483 questions
2 votes
2 answers
3k views
how to dynamically add choices to a Symfony form EntityType element
I'm developing an app (with Doctrine) to manage scheduling and billing for a psychology practice. The entity Invoice has a one-to-many relationship with the entitySession. So my form class has an ...
1 vote
2 answers
142 views
Typed property App\Entity\X:X must not be accessed before initialization
I'm trying to upgrade my Symfony from 5.4 to 6.4 and PHP from 7.4 to 8.4. I almost did all changes but I'm currently blocked on this exception : Typed property App\Entity\AppRole::$uniqid must not be ...
0 votes
1 answer
58 views
notifier component's Texter::send() always returns NULL (no SentMessage-object response to see if the SMS has been sent)
When using Symfony's notifier component to send an SMS via a custom SMS Service, the Texter::send()-method always returns NULL, which prevents me from seeing if the message has been sent or not. ...
0 votes
1 answer
52 views
translation:extract is not working in forms
Regarding this form: <?php // src/Form/ContacteType.php namespace App\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\...
0 votes
0 answers
126 views
Custom bundle no services found in debug:container
I need to add new features to a custom Symfony bundle that my colleague had previously developed. To work with this bundle, I installed it in the Symfony base_app via composer. There was an error ...
0 votes
0 answers
19 views
Custom bundle Symfony 6.2
Receiving definition has no class error when trying to work with custom bundle I tried this command with namespace of my bundle: bin/console debug:container NotificationBundle No services found that ...
2 votes
1 answer
520 views
How to make a config singleton in symfony
Good morning, I'm starting to learn symfony. I would like to create a class to manage the settings that are in parameters - Services.yml. parameters: config: global: db.host: xxx ...
1 vote
1 answer
169 views
Intelephense is showing Undefined Type errors that are not true
Windows 11: 24h2 VS Code: 1.102.1 (WSL: Ubuntu 24.04.2 LTS) Intelephense: 1.14.4 Symfony: v6.4.23 PHP: 8.2.28 <?php namespace App\Command; use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\...
1 vote
0 answers
34 views
Symfony form $form->isValid() always returns false – Form is submitted, all fields filled
<div class="container"> <h1>Hello {{ controller_name }}! </h1> <div class="row"> <table class="table"> <tr> ...
0 votes
1 answer
332 views
Do not login unverified user
I have a short question on which i couldn't find an answer: What is a correct way to deny a user with not validated email to log in using symfony 6.2 From the box Symfony allows user to log in no ...
0 votes
1 answer
1k views
Symfony 6 does not work in a subdirectory on the server
I need to run the application I wrote with symfony 6 in a subfolder. There will be 2 applications in the same domain. I defined virtual host in .htaccess file but it didn't work. I define rewrite base ...
0 votes
0 answers
34 views
Symfony 6.4 controller receives blank response from command
I have a Symfony 6.4 controller that accepts a JSON, retrieves the values from the JSON, sets the arguments and calls a Symfony Command with these arguments. The Command executes certain API calls and ...
0 votes
0 answers
166 views
Symfony 6.4 - Authenticator does not support the request
I have a Symfony 6.4 (with Api Platform v3.4.5) project. I have a controller that accepts a JSON. The controller picks up the arguments passed via the JSON and calls a Symfony Command with these ...
0 votes
1 answer
767 views
Symfony 6 EasyAdmin 4 VichUploader Multi files
could you help me how to upload files using Symfony 6 and EasyAdmin 4 ? I have: File #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ApiProperty] ...
0 votes
2 answers
127 views
Get Symfony form data with unmapped fields
I have a Symfony form, some fields are from entity, some not (unmapped). I need to get full form data with those unmapped fields. I know there is a way to get those one-by-one (eg $form['unmapped']) ...