Unable to login in production when getUserIdentifier
uses an entity and monolog fingers_crossed handler set to "error"
#54641
Labels
Symfony version(s) affected
7.0
Description
I spent literally days to find out this bug. It was really a nightmare. Title may sound strange and if fact this bug is really odd.
When
getUserIdentifier
using a related entity, in my exampleUser
has a many-to-one non-nullable relation toAppProfile
:monolog.yaml
configuration, you are using the "fingers_crossed" handler with an action_level set to "error"What happens
var/log/prod.log
, you can't figure out what's happeningWhat I've tried
What's even stranger
In your
monolog.yaml
configuration setaction_level
to "debug" instead of "error" and login will always work.How to reproduce
https://github.com/gremo/symfony-login-bug
Possible Solution
No response
Additional Context
Inside
getUserIdentifier
, when you click "login", the$this->profile
member is actually a Doctrine Proxy:My original issue on monolog-bundle repository: symfony/monolog-bundle#476
The text was updated successfully, but these errors were encountered: