Questions tagged [symfony-3.3]

This is the Symfony 3.3.x specific tag. Use it in addition to the symfony3 tag if your question is specific to Symfony 3.3.x — not just 3.x.

Symfony is a PHP full-stack web framework developed and maintained by Sensio Labs.

Information

This tag is specific for the 3.3 version of Symfony. See the tag for general Symfony 3.x questions.

The 3.3.0 version was released on the 29th May 2017.

491 questions
18
votes
2 answers

Argument 1 passed to Symfony\Component\Form\FormRenderer::renderBlock() must be an instance of ...\FormView, instance of ...\Form given

Whole error is missiong namespace Symfony\Component\Form which is replaced with 3 dots, due to title maximum characters. So, I am following the steps, that are presented in the docs and I'm unable to find source of the error I'm getting. If anyone…
h0lend3r
  • 323
  • 1
  • 2
  • 10
14
votes
2 answers

Execute next / previous migration with doctrine migrations using symfony 3

I know that I can run specific migrations using execute with up / down and version number, ie doctrine:migrations:execute YYYYMMDDHHMMSS --down My question then - is there an easier way to simply run the next or previous migration without having to…
Bananaapple
  • 2,722
  • 2
  • 21
  • 32
12
votes
2 answers

Symfony 3, populating token and refreshing user

repository with issue I have a form for entity User with email field: ->add('email', EmailType::class, [ 'constraints' => [ new NotBlank(), new Email([ 'checkMX' =>…
kRicha
  • 657
  • 7
  • 25
11
votes
1 answer

Serializer using Normalizer returns nothing when using setCircularReferenceHandler

Question: Why does my response return "blank" when I set the setCircularReferenceHandler callback? EDIT: Would appear that it returns nothing, but does set the header to 500 Internal Server Error. This is confusing as Symfony should send some kind…
kemicofa ghost
  • 14,587
  • 5
  • 63
  • 112
10
votes
2 answers

Multiple entity managers in Symfony 3.3 seams to not work as service arguments

I have configured two connections to the database. One connection is called user and other is called client. This is the configuration in the config.yml file: doctrine: dbal: default_connection: client connections: …
Caslav Sabani
  • 391
  • 4
  • 16
10
votes
3 answers

Override association mapping of a trait property in Doctrine 2.6

Prerequisites: PHP 7.1.8 Symfony 3.3.9 Doctrine 2.6.x-dev I wonder if it's possible to override an inversedBy attribute of a property association mapping that's taken from a trait. An interface that I use as a concrete user entity…
genesst
  • 1,164
  • 1
  • 8
  • 38
8
votes
3 answers

Is there a way to inject EntityManager into a service

While using Symfony 3.3, I am declaring a service like this: class TheService implements ContainerAwareInterface { use ContainerAwareTrait; ... } Inside each action where I need the EntityManager, I get it from the container: $em =…
user3429660
  • 1,597
  • 3
  • 16
  • 29
7
votes
1 answer

Overwriting Symfony 3.3 container services in controller tests

I have a series of tests for controllers that rely on 3rd-party APIs that need to be mocked out in the test environment. We override the functional test client crawler and mock out the dependencies we need to test with. The key here is that the…
Tom Jowitt
  • 5,686
  • 11
  • 42
  • 60
6
votes
1 answer

VichUploaderBundle - namer: Parent definition does not exist

config.yml vich_uploader: db_driver: orm mappings: media_image: uri_prefix: '%uploads_dir%' upload_destination: '%kernel.root_dir%/../web/uploads/images' namer:…
breq
  • 20,864
  • 20
  • 55
  • 98
6
votes
1 answer

Symfony 3 sharing cookies across sub-domains?

I want to share a cookie across any subdomain. This should then allow me to keep the session. I am using the Symfony framework version 3.0. I've read that you should set the following: ## app/config/config.yml session: cookie_domain:…
nigel
  • 151
  • 1
  • 10
6
votes
4 answers

Autowiring in abstract classes with DI in Symfony 3.3, is it possible?

I am moving a Symfony 3.2 project to Symfony 3.3 and I would like to use DI new features. I have read the docs but so far I can make this to work. See the following class definition: use Http\Adapter\Guzzle6\Client; use…
ReynierPM
  • 15,161
  • 39
  • 158
  • 314
6
votes
2 answers

Symfony queryBuilder: too many queries

I have an entity with a ManyToMany relationship with the User table: /** * @ORM\ManyToMany(targetEntity="User") * @ORM\JoinTable( * name="offer_allowedusers", * joinColumns={ * @ORM\JoinColumn(name="offer_id", referencedColumnName="id",…
the_nuts
  • 4,495
  • 1
  • 29
  • 54
6
votes
1 answer

Symfony Doctrine event subscriber not listed in debug:event-dispatcher

Symfony v3.3.4, Doctrine ORM v2.5.6 I've created an event subscriber for a doctrine entity : AppBundle\EventListener\LivreSubscriber: tags: - { name: doctrine.event_subscriber } It works fine ! But for a long time I tought it didn't…
kondor
  • 639
  • 1
  • 6
  • 16
6
votes
2 answers

Symfony 3.3 services autoconfiguration

I'm trying migrate to symfony 3.3 and use new feature autowire/autoconfigure services: So in services.yml i have: services: _defaults: autowire: true autoconfigure: true public: false # makes classes in src/AppBundle…
kRicha
  • 657
  • 7
  • 25
5
votes
1 answer

convert_encoding not allowed in twig

In order to convert my french html accents I try to change encoding by doing this in Twig : {{ ddf.description | convert_encoding('UTF-8', 'HTML-ENTITIES') }} But here is the message I get : An exception has been thrown during the rendering of a…
Gautier
  • 846
  • 10
  • 21
1
2 3
32 33