-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarExporter] Mapping Expception - Ignore can only be added on methods beginning with "get", "is", "has" or "set".` #54477
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
Can you please send a PR to remove the annotation where it shouldn't be found? |
same issue. new release (7.0.6) completely broke website |
Same here, I was creating an issue but you were faster than me and you found the issue origin I downgraded from Symfony 6.4.6 to 6.4.5 composer.json
|
This PR breaks: #54224 Ignore attribute in file src/Symfony/Component/VarExporter/LazyGhostTrait.php #[Ignore]
private function setLazyObjectAsInitialized(bool $initialized): void
{ |
I fail to see why the Can anyone affected by this bug please create a small example application that allows to reproduce it? |
That's because Doctrine is aliasing this method to another name. |
|
I just saw the same issue 6.4.5 works fine. |
… (nicolas-grekas) This PR was merged into the 5.4 branch. Discussion ---------- [Serializer] Ignore when using #[Ignore] on a non-accessor | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #54477 | License | MIT Because ignore means ignore so we know what to do with the attribute even when it's on something else than an accessor. Commits ------- 580b06a [Serializer] Ignore when using #[Ignore] on a non-accessor
Same here with symfony 7.0.6 |
I have the same problem in a MessageHandler. |
@sebheitzmann The PR fixing this issue (#54485) has been merged and will be part of the next patch releases. |
Symfony version(s) affected
6.4.6
Description
After upgrading symfony/var-exporter from 6.4.4 to 6.4.6 I get an error during my serialization process.
Ignore on "Proxies\__CG__\App\Entity\Artist::__setInitialized()" cannot be added. Ignore can only be added on methods beginning with "get", "is", "has" or "set".
vendor/symfony/serializer/Mapping/Loader/AttributeLoader.php:172
How to reproduce
Use Serializer and serialize some objects with relations and setting the context.
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: