You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 19, 2025. It is now read-only.
It seems very normal in the end, since that readonly properties can only be initialized from constructor, but since I mostly bypass constructors to hydrate all object values at once, I end up on this error:
Cannot initialize readonly property App\Domain\Bibliotheque\Model\ContenuBibliotheque::$id from scope GeneratedHydratorGeneratedClass\__PM__\App\Domain\Bibliotheque\Model\ContenuBibliotheque\YToxOntzOjc6ImZhY3RvcnkiO3M6NDE6IkdlbmVyYXRlZEh5ZHJhdG9yXEZhY3RvcnlcSHlkcmF0b3JGYWN0b3J5Ijt9
I wonder if there's a trick to bypass this ?
The text was updated successfully, but these errors were encountered:
I don't like this ugly hack but in the end, the generated hydrator is using the very ulgy closure hack itself, and implementation won't matter for users, as soon as it works as expected.
Should I attempt an implementation of this ?
pounard
added a commit
to pounard/GeneratedHydrator
that referenced
this issue
Sep 13, 2023
It seems very normal in the end, since that readonly properties can only be initialized from constructor, but since I mostly bypass constructors to hydrate all object values at once, I end up on this error:
I wonder if there's a trick to bypass this ?
The text was updated successfully, but these errors were encountered: