Skip to content
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

Allow missing attributes in serialized objects #1526

Merged
merged 5 commits into from
Dec 9, 2023

Conversation

boesing
Copy link
Contributor

@boesing boesing commented Dec 4, 2023

Q A
Bug fix? yes
Tests pass? yes
Fixed tickets #1525
License MIT

Fixes #1525 which points to some kind of BC break in v3.28.0 regarding missing attributes.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Copy link
Collaborator

@scyzoryck scyzoryck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contribution! :) Let me know if you need any help with PHPStan issues!.

Best!

phpstan.neon.dist Outdated Show resolved Hide resolved
The attribute is missing on purpose and therefore, ignoring that error should be legit.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing
Copy link
Contributor Author

boesing commented Dec 7, 2023

I hope I managed the phpstan configuration part correctly but from how I understand that issue, the changes should solve that problem.

I also added missing annotation to the fixture so that both metadata parser can extract the VirtualProperty from a method which has a non-existent attribute.
Thats why we now have both annotation and attribute VirtualProperty in the fixture.

@goetas goetas closed this Dec 8, 2023
@goetas goetas reopened this Dec 8, 2023
@scyzoryck
Copy link
Collaborator

Thanks for contribution! :)
I will release it on the beginning of the next week.

@scyzoryck scyzoryck merged commit c586bf6 into schmittjoh:master Dec 9, 2023
21 of 23 checks passed
@boesing boesing deleted the bugfix/missing-attributes branch December 9, 2023 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Serialization of objects with missing attribute errors
4 participants