Environment
Packages
nucleos/profile-bundle 2.8.0
nucleos/user-bundle 3.7.0
symfony/framework-bundle 7.3.6
PHP version
Subject
When logging I get an error on accessing $groups property while we aren't using the groups feature (no group_class is configure in the config yaml).
The user finder seems to fetch the user from the db without instantiating the User object by it's constructor so the property is never initialized before access.
Adding this in our User class fix the login
public function getGroups(): Collection
{
return new ArrayCollection();
}
It was previously working with v3.6.1
This change seems to be culprit: 3.6.1...3.7.0#diff-2886a9a9577b1d57d2364a968402b5d7416d8091cbadab8f43c15b6400b671f4L246
Steps to reproduce
Logout and login