-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Typed property Proxies\__CG__\App\Entity\Website::$ must not be accessed before initialization (in __sleep) #38274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Is this entities somehow related to user ( |
yes <?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity()
* @UniqueEntity(fields="email", message="email_already_taken")
* @ORM\HasLifecycleCallbacks
*
*/
class Customer implements UserInterface
{
use HasId;
use HasCreationAndUpdateTime;
/**
* @ORM\ManyToOne(targetEntity=Website::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Website $defaultWebsite;
} |
Just implement
|
thanks i'm trying that right now ! |
I confirm it fixed the problem, thanks a lot :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 5.1.5
php version 7.4.3
Description
When login in my website , it produces this exception
How to reproduce
no real idea
Possible Solution
no idea too :(
Additional context
it seems related to this PR #36332 , but unfortunately I still have this problem
The text was updated successfully, but these errors were encountered: