Skip to content
Advertisement

Tag: symfony5

Symfony Exception Subscriber not triggered

I need to format error messages and output it in JSON format. I have the following event subscriber: And following configuration in ./config/services.yaml This event subscriber is working when e.g. controller throws error. But if I have some other error e.g. wrong DI injection then output is still in Html format and as Symfony error page. How to make that

Symfony5/Doctrine can’t find my XML mapping file for my entity

I am currently trying to set up from scratch a Symfony 5 project using Doctrine with XML mapping. I created a simple AppBundle with some entities. After trying to generate my migration, I have this error : No mapping file found named ‘User.orm.xml’ for class ‘AppEntityUserUser’. A quick google search tells me it might be a conflict with annotations (which

Advertisement