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

Fix type of serialization groups #359

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

loic425
Copy link
Member

@loic425 loic425 commented Jan 20, 2022

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations?
Related tickets
License MIT

@loic425 loic425 requested a review from a team as a code owner January 20, 2022 15:16
Copy link
Contributor

@lchrusciel lchrusciel left a comment

Choose a reason for hiding this comment

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

Can we write super simple case for that to avoid issues in the future?

@loic425
Copy link
Member Author

loic425 commented Jan 20, 2022

Can we write super simple case for that to avoid issues in the future?

There's already a simple test.... But I don't even know how it keeps working with the wrong type.
https://github.com/Sylius/SyliusResourceBundle/blob/master/src/Bundle/Tests/Routing/RoutesAttributesLoaderTest.php#L147

@lchrusciel
Copy link
Contributor

thats the worst type of bugs - you know, that tests should fail, but they are green :(

@loic425
Copy link
Member Author

loic425 commented Jan 20, 2022

thats the worst type of bugs - you know, that tests should fail, but they are green :(

Yes but the result is ok, even with the wrong type, I also test it manually 🗡️

@loic425
Copy link
Member Author

loic425 commented Jan 20, 2022

@lchrusciel I think there is some "magic" somewhere :)

@vvasiloi
Copy link
Contributor

vvasiloi commented Jan 20, 2022

It works... must be a bug (or feature) of PHP: https://3v4l.org/fOejp#v8.0.15

Screenshot

image

@vvasiloi
Copy link
Contributor

And although I only defined the serializationGroups in the attribute class, I also passed (unintentionally, copy/paste) name, path and controller and all were returned as a result.

@lchrusciel lchrusciel added the Bug Confirmed bugs or bugfixes. label Jan 21, 2022
@lchrusciel lchrusciel merged commit 90c4f95 into Sylius:master Jan 21, 2022
@lchrusciel
Copy link
Contributor

Thanks, Loïc! 🥇

@loic425 loic425 deleted the fix/serization-groups-type branch January 21, 2022 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bugs or bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants