Skip to content
Advertisement

Tag: symfony

Symfony inject array through services.yaml

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”

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

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

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

Advertisement