-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
Instructions for upgrading from addData in 1.x don't work #1030
Comments
Bit of a weird one, I think there's a bug in the upgrade instructions and have asked the maintainer to clarify (schmittjoh/serializer#1030). Bumps [jms/serializer-bundle](https://github.com/schmittjoh/JMSSerializerBundle) from 2.4.3 to 3.0.1. - [Release notes](https://github.com/schmittjoh/JMSSerializerBundle/releases) - [Changelog](https://github.com/schmittjoh/JMSSerializerBundle/blob/master/CHANGELOG.md) - [Commits](schmittjoh/JMSSerializerBundle@2.4.3...3.0.1)
hmm, that's interesting... $visitor->visitProperty(new StaticPropertyMetadata('', '_links', $linkJson), null); should be the right one... at least looking at
|
I have the same experience. |
Bump! |
Option 3 was the right way and #1066 updated the documentation |
That's grand - thanks! |
What's the forth parameter ($groups) on StaticPropertyMetadata for? I added groups, but it doesn't exclude property at all. What I'm doing wrong? |
It fails silently if your StaticPropertyMetadata is set up incorrectly:
|
The provided instructions for upgrading from
addData
in 1.x don't work. This is code from a project using the Symfony bundle. Instructions were (UPGRADING.md)Steps required to reproduce the problem
Expected Result
formed part of the output with with 1.x and was expected with method 2.
Actual Result
The expected JSON did not appear with method 2. It did appear with method 3.
Is this a bug in the code or a bug in the documentation? I.e. should I continue using method 3 or wait until a fix is released that makes method 2 work?
The text was updated successfully, but these errors were encountered: