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 Support conditional exclude for classes #1187

Merged
merged 1 commit into from
Apr 19, 2020
Merged

Fix Support conditional exclude for classes #1187

merged 1 commit into from
Apr 19, 2020

Conversation

arneee
Copy link
Contributor

@arneee arneee commented Apr 19, 2020

In #1099 support for ExcludeIf on class level was added, unfortunately the condition was inverted.

Current behavior would actually exclude this class:

/**
 * @Serializer\Exclude(if="false")
 */
class PersonAccount

However it should only exclude the class if the condition evaluates to true:

/**
 * @Serializer\Exclude(if="true")
 */
class PersonAccount

This was due to a copy mistake from Expose, which internal also uses Exclude, but with the condition negated and also due to a test scenario which was not very clear to udnerstand.

I have simplified the test to make it more clear and fixed the drivers.

@goetas
Copy link
Collaborator

goetas commented Apr 19, 2020

Thanks!

@goetas goetas merged commit a7f3490 into schmittjoh:master Apr 19, 2020
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.

2 participants