I am working on a symfony/api platform app that allows users to track sports matches. My entities look like this (shortened for brevity): User.php MatchPlayer.php Match.php So in my model, a user can relate to many matches and a match can relate to many users via the glue table that also saves what position a user played. Now I want
Tag: symfony
How to add options to a Symfony Form field?
I am rather new to PHP & Symfony, and am struggling with the form options: I have the following, simple code: I get an error because the format is not an option of TextType, but I cannot find a way to add my own options (But I know this is possible, from the others posts I read) I have read
Symfony 5 API populate related object entities
I am trying to create a simple web app using Symfony 5. I am using the API. Currently when calling some endpoint it only displays the IRI link to the related link: I need instead to display the …
symfony Declaration of AppSwaggerSwaggerDecorator::normalize must be compatible
I use api platform to create api rest but in configuration package i found this error. enter image description here I copie and paste this code in documentation : https://api-platform.com/docs/core/…
How send Id to my view in redictionRoute Symfony
(Sorry for my english) I’m making a subscribe system (the flush is ok in database) than: My Route of redirection needs an Id How can I send this id to the redirection ? I tried to play with the user object but no success Answer Try this Or (PHP < 5.4) Symfony should then load the User with that ID
Entity not found with Symfony 5.1
I have an issue with an Entity. The goal is to display a Form which the user can use to change his personal information like the Email or password. I created a form for that, but when I created the /Edit Route I get the following error: “AppEntityUsers object not found by the @ParamConverter annotation.” Here’s my Controller: Here’s the
get PHP function (Symfony 4.2)
I have the following error that I do not understand: “Attempted to call function “pasPointer” from namespace “AppController”.” The code that goes with it: public …
Why after upgrading to Symfony 4.4 I no longer get the error preview pages?
I’ve just updated a project from Symfony 4.3 to 4.4. After the update when I have an error the page shown is the production error page with the “Oops! An Error Occurred!”, not the dev error page with all the trace of the error. Also the profiler doesn’t log the error page, I can see all the requests in the
How define some PHP constant in the Symfony configuration?
this is my first post, so i will try to be clear So i need to define some constants in the Symfony configuration (in a .yaml file, i guess) I know i could define them throw public const MY_CONST but …
Shopware 5.6 override class method
I want to override method ajaxAddArticleCartAction in engine/Shopware/Controllers/Frontend/Checkout.php, cuz i want a bit complicated logic on accessories quantity calculation. My question is: Is it possible to override this method in my custom plugin. With other words, if i add product in cart, i want to use my function (in plugin), not the Shopware one. Thanks a lot! Answer Yes that