Skip to content
Advertisement

Tag: symfony

Symfony 5.2.11: Problem with creating Custom Access Decision Manager

I am trying to create a Custom Access Decision Manager by implementing AccessDecisionManagerInterface on Symfony 5.2. Symfony recognizes the decision manager and instantiate it, but it doesn’t pass Voters array to decision manager. So it can’t collect votes, however the default decision manager works fine. I have followed the information provided on Symfony website. I have also copied the decision

Symfony 5 / Doctrine: Sorting entity collection by creation DateTime

I am developing a project using Symfony 5. One of my use-cases involves reading a collection from the Database, with the items sorted by creation order, descending (newest first). I am using the “Timestampable” extension from “stof/doctrine-extensions-bundle” to save the createdAt and updatedAt timestamps in my entity. According to Doctrine documentation, I can sort items ussing the Repository methods: This

Symfony autowire/autoconfigure not working

I created a symfony 5.3 api. My plan is to inject the “EntityManager” via “EntityManagerInterface”. Error that comes: My services.yaml My CreateUserAccountController.php in src/Controller/: My composer.json: I know that I dont use the Manager, but it doesn´t work for me. The webserver I use: symfony cli webserver Has anyone a idea, where the problem is? Answer This is actually a

Symfony cascade persist or merge duplication

I have a problem with the cascade persist or merge, I have an application with two entities task and table (task_implements) When I create a task I choose cultures that are linked: If the user chooses 3 cultures => 3 tasks are created If the user chooses 3 cultures then 2 vehicles => 3 tasks must be created and each

Custom Twig filter from bundle: Unable to load the runtime

I’ve a small twig custom filter in my project created following https://symfony.com/doc/current/templating/twig_extension.html . As long as it sits in src/Twig, it works as expected. Now I’m trying to move it to a custom bundle (vendor/turbolabit/tli-base-bundle/src/Twig/) to make it reusable. I moved the two files: I tagged it in services.yaml: (I also tried as tags: [twig.extension], even if it would be

Advertisement