Symfony 4 login form : authenticating successfully, but authentication...
I built a login form following this form login setup doc.This is working fine on localhost but not on the production server.On both localhost and prod, authentication begins successfullyGuard...
View ArticleSymfony 4 roles management
I am currently working on a project in Symfony 4 a website for a library.While configuring roles in the file security.yaml, I decommented this line :access_control: { path: ^/admin, roles: ROLE_ADMIN }...
View ArticleThe App\Security\LoginFormAuthenticator::getUser() method must return a...
I'm trying to customize the login with a graphql query to load the User data and it shows me that error.I use php bin / console make: auth and it works correctly when I query the $ user variable from...
View ArticleSymfony / Doctrine : problem with an entity ManyToOne to OneToOne
I'm having troubles with my Users entity.In my website, users can fill their collection to keep track of their Magic the gathering cards.Every users have one and only one collection. So, I created a...
View ArticleThe environment contains invalid characters, it can only contain characters...
I migrated from symfony 3.4 to symfony 4.4Now I have this error when I run any command:In Kernel.php line 478:The environment ".env.test.local" contains invalid characters, it can only contain...
View ArticleSymfony Voters: Access Denied
Is it normal when supports() returns false, it results Access Denied? According the Doc, Voter should end-up on supports so I assume an access should be granted. Voter::supports($attribute,...
View ArticleParse error: syntax error, unexpected '|', expecting variable (T_VARIABLE)...
I have some syntax errors from symfony vendor when i'm trying to composer install my project.Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE)...
View ArticleHow to switch Symfony bin/console deprecations from terminal to file
I have a a few commands, all of them work as intended, but every time i call one of them i get deprecation messages, for example something like that:2024-08-14T11:57:50+00:00 [info] User Deprecated:...
View ArticleMy event listener doesn't work from my reusable bundle in Symfony 4.1
Short story : I have some diffulties to use a listener properly on my custom "vendor" bundle.I'm coding a reusable bundle for Symfony 4.1 framework (for managing Users). I put the whole bundle in this...
View ArticleDeprecation on a service: Symfony asks to change service name
I am currently trying for the first time to migrate from Symfony 3.4 to 4.3.I'm at the stage where I have to remove the depreciation so that I can update the dependencies via composing as the doc saysI...
View ArticleSymfony 4.3.5 - locale loading nonexistent public
In Symfony 4.3.5 when using locale in url (e.q. http://127.0.0.1:8000/en/example), framework starts loading nonexisting public route to resources;/en/images/like-icon-58x25.png instead...
View ArticleSymfony 4 with PHP 7.3 I get Composer update error
I changed my Ubuntu Plesk PHP Version to 7.3.11 to update my Symfony project with composer.I get the following Error:To enable extensions, verify that they are enabled in your .ini files: -...
View ArticleHow to use Intl component with table builider?
Hey I use ominis/datatables bundle in Symfony 4.3. I store in my db country code from Intl.How to use Intl::getRegionBundle()->getCountryName($value) when i'm using table builider. My code below...
View ArticleHow to make jQuery work externally with Symfony Webpack Encore?
I'm following a tutorial on how to create a website with Symfony (so I'm new at this) on a french website, GraphikArt. I'm currently at the "Symfony Encore" part and I can't make it work when I have to...
View Articlecreate new folder structures in Symfony
I want to separate my sections in Symfony by folders like this: src - Blog -- Controller -- Entity -- Form -- Repository - Main -- Controller -- Entity -- Form -- RepositoryWith bundle I can't use...
View ArticleIs_granted method return error on Symfony 4
I am learning Symfony 4 and trying to use is_granted method in twig but unfortunately it return errors:HTTP 500 Internal Server ErrorArgument 4 passed to...
View ArticleHow do I authenticate user in functional test on Symfony 4?
I'm testing a page protected with IsGranted('ROLE_ADMIN') annotation. How do I make a request that simulate an autheticated user with role 'ROLE_ADMIN'?
View ArticleCan the 'auto' algorithm of the Symfony Security encoder change encoding method?
In Symfony 4.3, it is recommended to use the auto option for encoding algorithm:# config/packages/security.yamlsecurity:# ...encoders: # use your user class name here App\Entity\User: # Use native...
View ArticleDependency-Injection of an Doctrine-Entity into a Service in Symfony4?
I'm trying to inject an Entity via DI into a service. The Entity is created from a JSON-Field in the database (which got queried from the user-request) via the Doctrine-JSON-ODM-library...
View ArticleHow to exclude password field from the user entity with JMS serializer using...
I have implemented simple API with login functionality using FOSUserBundle and JWT (using LexikJWTAuthenticationBundle). All works well and I can login and get a jwt token. But when I created API...
View Article