I use Api Platform & Symfony (5.4) + php 7.2.5 I created an Entity by myself, I just added one file in /src/Entity and it’s not working. I refresh, I cleared cache, I adde @ApiResource… But the Entity is not visible in the doc page in API Platform. Have you an idea where the error is ? Thanks …
Tag: symfony
An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘pokemon_id’ cannot be null
I’m a bit clueless. I would like to import data to my DB. This is a example entity: all fields nesassary fields were filled, but doctrine tells me: Here is the snipped of my entity. Where did i miss the point? P.S.: Maybe I should also tell that this property never can be null. And I have a relation to
Symfony, Docker container fpm, apache : could not find driver [doctrine:database:create]
I’m trying to create symfony 5.4 project using docker with a container for apache, php fpm, symfony, mysql db. but actualy i don’t succed to create my database, i get this error: this doctrine conf : config/packages/doctrine.yaml: this is extensions activated : this my Docker-compose-stack-file: a…
Own Symfony serializer gets added as encoder to default one
I’m using Symfony 6.0.7 and noticed this Behavior: When I register a custom serializer as service, it gets added as encoder to the default “@serializer” one. Why is this the case and how can I change this behavior? My problem is, that this messes up the error handling of the FOSRestBundle wh…
add additional header to symfony mailer message
I don’t use the Symfony Framework. When I add my header like then a $mailer->send($mail); doesn’t work anymore:-( How do I send mail? Answer getHeaders functions return an header, so in your $mail, you dont have an email but a Header
VichUploaderBundle in Symfony 6
I hope you can help me because i’m searching and i’m lost 🙁 I’m trying to upload image in my symfony 6 project with VichUploaderBundle. I used the doc : https://github.com/dustin10/VichUploaderBundle/blob/master/docs/usage.md#step-1-configure-an-upload-mapping But i have this error : The cla…
How to test form submission with wrong values using Symfony crawler component and PHPUnit?
When you’re using the app through the browser, you send a bad value, the system checks for errors in the form, and if something goes wrong (it does in this case), it redirects with a default error message written below the incriminated field. This is the behaviour I am trying to assert with my test case…
How to set up live reloading with webpack-encore in a Symfony project?
I have created a Symfony full web app with the given command symfony new app –webapp. It came with Webpack configured with webpack-encore. I can have my assets compiled with npm run watch. But the browser don’t reload automatically when my I make changes. I have tried webpack-dev-server following …
Message not dispatched async despite configuring the handler route to be async in Symfony Messenger
I’m working with Symfony 4.4 and Symfony Messenger Messenger configuration includes a transport and routing: Though the handler looks like configured correctly (when I run console debug:messenger it shows up correctly assigned to transport) The message class SnowplowMessage is not queued, but sent insta…
Symfony – ChoiceType with multiple and resetViewTransformers returns invalid_message
We have upgraded our project to Symfony 4.4.35 2 months ago and now I noticed a strange behavior. When I use ChoiceType with the following configuration, the form returns error (This value is not valid): The POST: Can someone tell me what has changed? I have tried to inspect ChoiceType.php, and find out the p…