I am trying to inject an array to Event Subscriber, but I also inject an other repository so I don’t know how this will work: Here’s what I am trying: services.yaml TerminateSubscriber.php: It says that the first parameter should be an instance of the Repo, array given. But if I switch the parameters it says “optional parameter given before required”
Tag: symfony
MySQL8 connection with php7.3 and Symfony 5 does not work
I have a connection problem with a mysql8 database, php7.3 and Symfony 5. The user and the password are correct ! The connection to MySQL8 database must be done from an SSH tunnel The SSH tunnel is working : MySQL access configuration: Doctrine configuration : I have the same problem with heidiSQL and on the VM I tried with the
How to use Vich uploader with easyAdmin 3 on Symfony 5
I’ve been trying to use VichUploader to upload files on a Symfony project, already using EasyAdmin 3. I’ve configured everything correctly, but I’m getting this error: The “pieceJointeFile” image field must define the directory where the images are uploaded using the setUploadDir() method. vich uploader configuration and finally My crud controller Finally, I want to clarify that when using TextField it
Findby DateTime the recent uploaded articles Symfony
Hello im triying to get on my dashboard only the most recent articles but isnt working i did this function public function PostsRecientes(){ return $this->getEntityManager() ->…
Using validation groups on EasyAdmin 3.x
I want to use validation groups with EasyAdmin 3.x when creating a new User to validate every field. I have a User entity with name, phone, and email fields and use @UniqueEntity in a “creation” group, so I can update the User in a form I created outside from EasyAdmin. That works just fine, but I can’t manage to find
Mysql Minus Sum Of Two Different Columns With Join – Using Symfony Query Builder
I’ve got two tables: The transactions links to the account, and the transaction can either be a payment or a charge. What I’m looking to do is in a single query, sum all the payments and minus the sum of all the charges so give the overall balance. I’m not great with mysql queries when they get this complex, but
Api-platform PUT operation with denormalization_context groups on an itemOperations not working
I have 2 entities: I wanted to retrieve only words for itemOperation and not for collectionOperations so i added a group GET “item_words.read” and for PUT denormalization_context. It is perfectly working for GET operation, for some reason the PUT operation is not giving me the “words” subresource. GET : PUT : Here is my code : Item and Word Answer
How to also send BCC to specific address during development with Symfony Mailer?
Symfony provides a way to send all emails to a specific email address during debugging and development but addressees in the BCC still receive the e-mail. This is very dangerous because you don’t want to send out any emails from your local dev environment. Is there a way to also deliver BCCs to a specific email address? Answer I wouldn’t
list display in choicEntity in symfony 5
I am not at all familiar with PHP, and still months with Symfony, I am developing a small project thanks to a tutorial and I have a problem that has blocked me for too long veil: I have a choiceType …
Twig templates don’t show updates. Symfony 4.3
After I edit my twig templates, they don’t load on the page. I have a header and footer twig file which are included in my base.html.twig. When i edit these files, the changes aren’t pushed trough when i reload the page. I’ve tried clearing the cache and i disabled cache in configpackagestwig.yaml I even tried to completely delete the cache