I'm trying to update to Symfony 7.0. So far the update was successful. Now, when I try to call one of my endpoints I get the following error:
"Ignore on \"Proxies\\__CG__\\App\\Entity\\Role::__setInitialized()\" cannot be added. Ignore can only be added on methods beginning with \"get\", \"is\", \"has\" or \"set\"."
The endpoint loads the User entities from Doctrine via the UserRepository. There is no custom query, just the simple findBy
function is used. The Role is an associated relationship.
I don't use the #[Ignore]
attribute anywhere in my code.
The version of Symfony is 7 and I have Doctrine 3.0. I did some research and found that in the LazyGhostTrait.php
file there is an #[Ignore]
. So this class is probably causing the issue?
Is this a bug in Symfony or do I need some additional configuration somewhere?