Questions tagged as 'symfony-2'

1
answer

What are the ServiceProvider and ServiceContainer design patterns used in Laravel and Symfony?

In the Laravel 4 ou 5 and Symfony frameworks, I realize that there are two classes that are essential for the operation of the whole system: ServiceContainer and ServiceProvider. It seems to be a way for you to store instances o...
asked by 02.03.2016 / 13:11
1
answer

How to authenticate the application and authorize it to consume a restful API

In a given project, it was necessary to create a restful API that receives data from various forms spread across multiple sites hosted on different servers. The API was created to resolve the following issues: Maintenance: have a single d...
asked by 13.06.2016 / 16:49
1
answer

How to avoid misuse of a REST API?

I'm developing an application that is made up of three parts: Backend (BD + API), developed with Symfony 2 + Doctrine 2 iOS Client Android client Most client requests to the API must be authenticated through a token that is obtained t...
asked by 06.01.2015 / 12:05
1
answer

Syntax error "Unexpected tag name" in Symfony2 / Twig

My list has the following code: <h1>Posts</h1> {% for posts in post %} <article> <h2> {% post.titulo %} </h2> <div class="content"> {% post.conteudo...
asked by 04.09.2014 / 12:23
1
answer

Relation between 3 entities

I have the following tables: +----------+ +----------------------+ +------------+ | Produtos | | ProdutosVsCategorias | | Categorias | +----------+ +----------------------+ +------------+ - ID - ID - ID - TITULO...
asked by 28.08.2015 / 13:03
1
answer

What is the overhead of using Doctrine?

A few days ago I've been arguing with some co-workers about performance and high availability. In the middle of the discussion one of the points raised was that when reaching a certain number of requests, Doctrine ORM becomes a bottleneck i...
asked by 15.02.2017 / 18:03
2
answers

Function not recognized

Hello, I have the following code:    Old code: public function historicoAction() { $entity = new Intervencao(); $em = $this->getDoctrine()->getManager(); $entities = $em->getRepository('RoqSysControlManutencaoBun...
asked by 25.02.2015 / 12:11
1
answer

Access-Control-Allow-Origin: * does not work for all my domains

I have four applications that use the same API, and Access-Control-Allow-Origin: * does not account for all, the only application that does not work is the one I'm using Zend Framework 2 and Symfony, I do not know if I could have anything...
asked by 11.02.2016 / 16:13
1
answer

How to build a reusable bundle in symfony and manageable via composer

Even after reading best practices for code reuse in symfony and search for the use of < a href="https://tableless.com.br/composer-para-iniciantes/"> composer , I still can not understand how in practice I should create my bundle to be reusable...
asked by 18.12.2016 / 21:13
1
answer

Why do we use ContainerInterface when injecting @service_container as an argument?

In the file services.yml I have the following service configured: services: api.response_factory: class: AppBundle\Api\ResponseFactory arguments: ['@service_container'] In class ResponseFactory I have the c...
asked by 15.06.2016 / 12:12