How to replace spaces (%20) by "-" in Symfony routes
I want to replace spaces (%20) by "-" in Symfony 4.4 routes and delete first capital letter of my {slug}.E.g:RecipeController.php /** * @Route("/receta/{title}", name="recipe_show", methods={"GET"})...
View ArticleThere are no configured encoders for the "security" extension
When I launch this commandphp bin/console security:encode-passwordI am getting this errorThere are no configured encoders for the "security" extension. Do anyone has an idea about this error, I am...
View Articlesymfony - getting logged out at form->handleRequest
I have a problem regarding my Symfony4 App.What is happening?I want to build a "Change Password" function for the currently logged in user. So far everything is fine imo. When I submit the form...
View ArticleLANG variable isn't overriden in testing environment
I'm working on a Symfony 4.4 project. The project has been created from scratch (it's not an update from a 3.4 codebase or something like that). I'm adding automated tests to my codebase, but I'm...
View ArticleSymfony 4.4 - Custom Error Templates Not Working
I've got an issue when it comes to using Custom Error Templates in Symfony 4.4 Flex. Everything has been set properly according to the guide from...
View ArticleThere is no user provider for user App Entity User Shouldn't the...
I created an Email/Password Login form & have a great disappointing problem :(First of all, This is what I got (I'm using Symfony 4.4.18):& these are my codes:This is the User Entity...
View ArticleHow to control Symfony's RepeatedType validation sequence
I am using Symfony's RepeatedType for an email address on a registration form.$builder->add('email', RepeatedType::class, ['invalid_message' => 'Confirm your email address', ]);I am also adding...
View ArticleCustom voter does not work as expected after migrating from Symfony 3.4 to...
I'm migrating an app from Symfony 3.4 to Symfony 4.4. This app gives admin users the possibility to edit the role needed to access each route, so all the roles and routes are stored in the database.To...
View ArticleHow to start local server with symfony 5 or downgrade version to 4.4?
I started a new project in new Symfony 5 and i can't open my local server.On Symfony 4.4 the command PHP bin/console server:run is OK,But with Symfony 5 the command appears not to be...
View Articlesymfony 4.4 + FOSCKEditor + helios-agElfinder not working
Using Symfony 4.4 +"friendsofsymfony/ckeditor-bundle": "^2.2" +"helios-ag/fm-elfinder-bundle": "dev-master" after composer install (but also tried composer require helios-ag/fm-elfinder-bundle from the...
View ArticleSymfony Validator: validate by comparing the old value from the DB
I'm working with Symfony 4.4,For security reason, when submitting OrderProduct entity that embedd Product entity, I have to control some values of OrderProduct taken from Product.So, it's an Symfony...
View ArticleRedirect to "/" route in symfony
I'm trying to redirect to the "/" route (same page) after a form submission:/** * @Route("/") */My approach:return $this->redirectToRoute('/');Gives me the following error:Unable to generate a URL...
View ArticleWhere is correct place to authenticate users from multiple places?
In my first Symfony 4.4 project, I need to authenticate users from database. Unfortunately, before user sign-in I need to check user status in remote API service. If user is active in this service and...
View ArticleNo mapping found for field xy on class xy
SpecificationsSymfony > 4.4.2 (Not working)Symfony 4.4.1 (Working)I got a problem with my Translations because on every action that includes translations, symfony is throwing a error like "no...
View ArticleTesting Symfony Bundle : doctrine.orm.entity not found
I'm creating a standalone Symfony 4.4 bundle and I need to test it !I've created an AppKernelTest which extends Kernel and I registered all my bundles :class ServicesBundleTestingKernel extends Kernel{...
View Articlereturn a custom status code in User Checker
I'm working with Symfony 4.4.I'm using JWT Authentication and I'm now creating a custom user checker:I want to return a custom response code and a custom message when user checker detect that user can...
View ArticleTesting form with 'contraints' in options of TimeType generate an...
I made a form in Symfony 4.4 with a TimeType field defined like this :$builder ->add('planned_start', TimeType::class, ['widget' => 'single_text','empty_data' => '','constraints' => [ new...
View ArticleHow to change input "id" in FormType.php Symfony 4
I have tried to change the attr "id" in a FormType.php file :->add('content', TextareaType::class,(['label' => "Description détaillée",'attr' => ['placeholder' => "Donnez une description...
View ArticleHow can I implement a dotrine entity event listener
I'm working with Symfony 4.4, at first I want to check my doctrine version I found:in composer:doctrine/orm": "^2.4.5in symfony.lock:"doctrine/orm": {"version": "v2.7.0"},which one I have to trust ?So...
View ArticleSymfony 4 Form Builder EntityType Field "not a valid class" error
I am trying to add Select form field by using values in DB table. In the official documentation it is described as in the picture below:I did implemented in the same way but I am getting Expection:The...
View Article