[Solved] Symfony 3, Guard & Handlers

The new Guard is aimed to ease the implementation of custom authentication patterns such as yours. It is likely to be enough for most of the case even complex ones. However, try to extract your custom processing, logging, etc. from your Guard and inject them to improve the maintainability of it. Take a close look … Read more

[Solved] How to create web page profile

I think all that you need is to extend the FosUserBundle If you have already configured you must have at least the User Entity extended. You can create there the new fields and add this new fields to entity, form, views You can find more documentation in the FosUser https://symfony.com/doc/current/bundles/FOSUserBundle/overriding_controllers.html https://symfony.com/doc/master/bundles/FOSUserBundle/overriding_forms.html https://symfony.com/doc/master/bundles/FOSUserBundle/overriding_templates.html Other Tip: You … Read more

[Solved] Keeping composer.json updated and maintained

You have one central, very wrong sentence: e.g. what do i do when my composer.json says “require”: { “php”: “>=5.3.3”, “symfony/symfony”: “~2.4”, but downloads php 7.4 and symfony 4.3 instead? is this ok? Or do i ineed need to maintain my composer.json file? Wrong, Composer will not install any version of PHP, but will warn … Read more

[Solved] Doctrine ORM Error

Check your use statements in the class where you’re getting the exception, try replacing use Doctrine\ORM\Event\LoadClassMetadataEventArgs; with use Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs;, or try digging around with a debugger. solved Doctrine ORM Error

[Solved] How to Hide parameters in URL in Symfony2

As explained in comments, the request needs something to identify the resource you want to fetch. But this has nothing to do with URL rewriting. If you want to display the slug of the resource instead of the id, do the following : my_route: path: /products/{slug} defaults: { _controller: MyBundle:Default:myaction} Then, in MyBundle/Controller/DefaultController.php : public … Read more

[Solved] Symfony2 default installation keeps on adding a footer to my code

As you can already find in the other answer, the bar is called the debug bar. You will not find this in the twig templates. Instead you can remove it by disabling it in your configuration. This setting is in app/config/config_dev.yml: web_profiler: toolbar: true intercept_redirects: false solved Symfony2 default installation keeps on adding a footer … Read more

[Solved] Symfony 4 – Send POST request with multipart/form-data

Okay I used $request->request->get() to extract my values , like this : $entityManager = $this->getDoctrine()->getManager(); $user = new User(); $user->setLogin($request->request->get(‘login’)); $user->setPassword($request->request->get(‘password’)); $entityManager->persist($user); $entityManager->flush(); And then I serialize my values in a JSON object, it’s working perfectly ^^ Thanks for your help! ^^ 5 solved Symfony 4 – Send POST request with multipart/form-data

[Solved] how to call a Symfony service from my ContainerAwareCommand? [closed]

It’s described in detail here: http://symfony.com/doc/master/cookbook/console/console_command.html#getting-services-from-the-service-container A command that implements ContainerAwareCommand will have direct access to the service container and you can get/use services as usual. solved how to call a Symfony service from my ContainerAwareCommand? [closed]

[Solved] can’t find the symfony demo routing system?

In Symfony 4.1 routing is defined directly in controllers with annotation: http://symfony.com/doc/current/routing.html In your case, you can find routing for add, delete, edit and show directly above each actions: https://github.com/symfony/demo/blob/master/src/Controller/BlogController.php solved can’t find the symfony demo routing system?