I know I can pull individual form elements from the type’s builder into the form mapper as described in the documentation: You can add Symfony FormBuilderInterface instances to the FormMapper. This allows you to re-use a model form type. When adding a field using a FormBuilderInterface, the type is guessed. Given you have a PostType like this: you can reuse
Tag: symfony
CSRF Invalid because of two entities in the registration process
I have two entities and one form for the registration process.When I add csrf token it probably works for one of them, not for both. <form action="" method="post" class="registerForm" id="…
Deserialize a entities array with Symfony Serializer Component and AbstractNormalizer::OBJECT_TO_POPULATE
I already deserialize into a array of object with : $encoders = [new JsonEncoder()]; $normalizers = [new ObjectNormalizer(), new GetSetMethodNormalizer(), new ArrayDenormalizer()]; $serializer = new …
How i persist data with @ManyToMany Symfony4
I have problem when I want import data (csv) officer with relation ManyToMany Department : the officer (agent in french) are store but the relation are not created (table agent_departement). Agent …
How can I connect my entity field to the same entity?
I added to my entity “Category” a field “parentcategory” to be able to connect a category to another category: class Category { /** * @ORMId() * @ORMGeneratedValue() * @ORMColumn(type=”…
ServerBundle deprecation while using Symfony local server
I’m using Symfony 4.4.2 When I run the server using the server bundle… ./bin/console server:run …I get a deprecation warning: User Deprecated: Using the WebserverBundle is deprecated since …
Duplicating form on button click
I have a very simple form with 2 fields, all I want to do is a button where the user could duplicate this form to add multiple entries in one batch. What i would like to do (I can’t integrate images …
add html in the ‘help’ parameter of the formbuilder
I use the formbuilder in a Symfony project. I’d like to use as much as I can the {{ form_row(form) }} in my twig template to avoid writing errors, label, help and widget myself. In this particular …
Heroku : FFMpeg installed but php worker can’t find it
Context I’ve a RabbitMQ’s queue that contains AMQPMessage, those messages are referencing a video that needs to be treated (cut essentially and encoded in x264 also) Here’s the code that cause the …
Symfony 5.x – An error occurred while loading the web debug toolbar
I’m working with Symfony 5.X, it’s a fresh install on docker with the image “bitnami/symfony”. I use too “bitnami/nginx” and “bitnami/php-fpm”. All work good except the web profiler toolbar. I passed the 2 last days on Google searching for a solution but nothing work. I can access the url /_profiler/ but if I click on a token to view some