Can Symfony 4 be configured to ignore code installed in subdirectories?

I’m currently converting an old website to use Symfony 4 and the site uses the LiveZilla live chat app. LiveZilla lives in a subfolder of the site, and is accessed directly using URLs under somesite….

Show form errors

I would like to show error messages in the top of my registration form. I created my registration form:

Register

{{ form_start(form) }} {{ …

Symfony 4 custom deserializer returns empty properties in entity

I have a custom Symfony 4 deserializer class CardImageDecoder implements EncoderInterface, DecoderInterface { public function encode($data, $format, array $context = []) { if($format !…

Get data from multiple rows

I would like to get the value of the column uid from all rows where the value of the column city is london. I have tried it like this: $this->getDoctrine()->getRepository(Personal::class)->…

How do I get a service from the container directly, if I didn’t/couldn’t inject the service using DI?

I have a part of code where I’m injecting two services $checker and $paginator by dependency injection. It works perfectly: public function index(Request $request, Paginator $paginator, Checker $…

How to make /login route accessible only for anonymous users in Symfony4?

My access_controll looks like: – { path: ^/login, role: IS_AUTHENTICATED_ANONYMOUSLY} – { path: ^/, roles: ROLE_USER} I need to give an access to route /login only to anonymously authenticated users….

Script cache:clear returned with error code 255

I installed Symfony 4.2 via composer composer create-project Symfony/website-skeleton my-project everything works correctly, then I put the project in gitlab. a friend of mine tried to clone it on …

How to get query string in Symfony 4

I am trying to access the query string parameters in Symfony 4 namespace AppController; use SymfonyComponentHttpFoundationRequestStack; class Home extends Controller { private $request; …

Symfony 4 – controllers in two directories

In my application, I use Symfony 4. I want Symfony to search for controllers in two directories: A and B. I found something like this: controllers: resource: ‘../src/DirectoryA/Controller/’ …