483 questions
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
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
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\...
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\...
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. ...
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> ...
3 votes
2 answers
338 views
How can I attach a PDF generated using Gotenberg Bundle to a Symfony email?
I want to create a PDF with Symfony and Gotenberg like this: $doc = $gotenbergPdf ->html() ->content('rechnungen/pdf/rechnung.pdf.html.twig', []) ->...
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']) ...
7 votes
2 answers
15k views
How do I fix Symfony 6 Error "Input value contains a non-scalar value"
I am working with Symfony 6 forms. I tried submitting the form using the submit() method. From the documentation Symfony Form Direct Submit the cause of the error is spelled out as "The list of ...
2 votes
1 answer
215 views
How to configure ClockMock with Phpunit 10+?
ClockMock is a very useful tool for creating time sensitive tests e.g. if a date is in past A should happen, if it is in the future B should happen. ClockMock is a part of the phunit-bridge, which ...
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 ...
1 vote
2 answers
757 views
How to map a date from a query string?
I have a symfony API endpoint that goes like this: /orders/list-all?since=2024-10-21 I'd like to map that query string parameter to a DateTimeImmutable (or DateTimeInterface), like so: public ...
3 votes
2 answers
1k views
getting FlashBagInterface on session in Symfony 6
I'am upgrading a Symfony app from 5.4 to 6.0 On Symfony 6 it is no longer recomanded to use autowiring on Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface but instead to use session-&...
0 votes
1 answer
71 views
GosWebSocketBundle upgrade to symfony 6.4 gives option already exists error
We are upgrading a symfony 5.4 project to 6.4 but we are stuck on gos-websocket. When we are executing the command php bin/console gos:websocket:server -vvv we are getting following error: [Symfony\...
5 votes
1 answer
7k views
Deprecation notice after upgrading doctrine/orm from 2.11.1 to 2.16.2
I'm experiencing the following issue: User Deprecated: In ORM 3.0, the AttributeDriver will report fields for the classes where they are declared. This may uncover invalid mapping configurations. To ...