-
Notifications
You must be signed in to change notification settings - Fork 93
ERROR: "Property doesn't exist...". But it has not to exist! #309
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
Comments
This is probably fixed by symfony/symfony#31836. |
@xabbuh I hope it will! But I have to wait the release 4.3.1, have I? |
You can require |
@xabbuh yes, this fixed the issue! 🎉Thank you! |
👍 thank you for the feedback |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the first error and is caused by this class:
As you can see, the property
NotificationAbstract::$read
exists, but the error says it doesn't.To fix this I have to change the visibility from
private
toprotected
and error goes away.But at this point another one arises:
The class that produces it is this:
So, now the extractor thinks that as I have a method
addNewFeedback()
, then I have to have also a property callednewFeedback
: but this is not true.The method actually only does a calculation using the passed feedback and does not set any
newFeedback
property anywhere.But, lets say I want to fix it: I change the method from
addNewFeedback()
toregisterNewFeedback()
.But now the uncontrollable happens:
The presupposed property
superAdmin
is actually a method in theUser
model from FOSUserBundle:So, there is no property
superAdmin
but the extractor thinks it exists and throws an error as it cannot find it.I think the problem is related to a behavior very similar to the one of
ReflectionExtractor
of Symfony's PropertyInfo component: practically that class uses accessors and mutators method to derive the list of properties and so, if we have a method likesetSuperAdmin()
, it suppose there is also a property calledsuperAdmin
and this is, obviously, not true.Anyway, for me, is now impossible to extract translations: any ideas?
The text was updated successfully, but these errors were encountered: