Я пытаюсь обновить свое Symfony с 5,4 до 6,4 и PHP с 7,4 до 8,4. Я почти сделал все изменения, но в настоящее время я заблокирован этим исключением: < /p>
Typed property App\Entity\AppRole::$uniqid must not be accessed before initialization
< /code>
Я уже провел свои исследования и обнаружил, что частные свойства должны быть инициализированы, так что это то, что я сделал: < /p>
#[ORM\Column(name: "uniqid", type: "string", length: 50, nullable: false)]
private ?string $uniqid = null;
< /code>
public function getUniqid(): ?string
{
return $this->uniqid;
}
public function setUniqid(string $uniqid): self
{
$this->uniqid = $uniqid;
return $this;
}
< /code>
So I don't understand where comes my error ?
The error trace shows that it comes from the findAll()
Я пытаюсь обновить свое Symfony с 5,4 до 6,4 и PHP с 7,4 до 8,4. Я почти сделал все изменения, но в настоящее время я заблокирован этим исключением: < /p> [code]Typed property App\Entity\AppRole::$uniqid must not be accessed before initialization < /code> Я уже провел свои исследования и обнаружил, что частные свойства должны быть инициализированы, так что это то, что я сделал: < /p> #[ORM\Column(name: "uniqid", type: "string", length: 50, nullable: false)] private ?string $uniqid = null; < /code> public function getUniqid(): ?string { return $this->uniqid; }
public function setUniqid(string $uniqid): self { $this->uniqid = $uniqid;
return $this; } < /code> So I don't understand where comes my error ? The error trace shows that it comes from the findAll()[/code] Функция хранилища. Я что -то пропустил?>