We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi!
enable_lazy_ghost_objects: true became the default config for doctrinebundle symfony/recipes#1140
enable_lazy_ghost_objects: true
With it turned on I got this error from any translatable entity:
Proxies\__CG__\...\Entity\PageTranslation::createLazyGhost(): Argument #1 ($initializer) must be of type Closure|array, null given
this is because by default the translation property is not initialized by default as ArrayCollection in TranslatablePropertiesTrait.
related: doctrine/orm#10376
tldr: from now, you have to have
public function __construct() { $this->translations = new ArrayCollection(); }
in your translatable classes
The text was updated successfully, but these errors were encountered:
Not helped for me, resolved by redefine Knp\DoctrineBehaviors\Model\Translatable\TranslatableMethodsTrait::getTranslationEntityClass in entity:
Knp\DoctrineBehaviors\Model\Translatable\TranslatableMethodsTrait::getTranslationEntityClass
public static function getTranslationEntityClass(): string { return self::class.'Translation'; }
Sorry, something went wrong.
No branches or pull requests
Hi!
enable_lazy_ghost_objects: true
became the default config for doctrinebundlesymfony/recipes#1140
With it turned on I got this error from any translatable entity:
this is because by default the translation property is not initialized by default as ArrayCollection in TranslatablePropertiesTrait.
related: doctrine/orm#10376
tldr: from now, you have to have
in your translatable classes
The text was updated successfully, but these errors were encountered: