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

@Serializer\Exclude() broken since 3.5 #797

Open
thedomeffm opened this issue Apr 30, 2020 · 6 comments
Open

@Serializer\Exclude() broken since 3.5 #797

thedomeffm opened this issue Apr 30, 2020 · 6 comments

Comments

@thedomeffm
Copy link

With version
"jms/serializer-bundle": "^3.5",

the short form of @Exclude (in annotations?) does not work fine:

    /**
     * @var Client
     *
     * @Serializer\Exclude()
     *
     * @ORM\ManyToOne(targetEntity="Client")
     * @ORM\JoinColumn(name="client_id", referencedColumnName="id")
     */

But this works:

    /**
     * @var Client
     *
     * @Serializer\Exclude(if="true")
     [...]
@goetas goetas added the bug label Apr 30, 2020
@goetas goetas self-assigned this Apr 30, 2020
@thedomeffm
Copy link
Author

Info:
In normal properties like $createdAt it is working fine.
It has something to do with the reference.

@goetas
Copy link
Collaborator

goetas commented May 1, 2020

can you please tell which version of jms/serializer and jms/metadata are you using?

@goetas
Copy link
Collaborator

goetas commented May 4, 2020

this is weird to me as the version that supports @Exclude(if="something") has not yet been released

@thedomeffm
Copy link
Author

composer.json

"jms/serializer-bundle": "^3.5",

composer.lock

[...]
{
    "name": "jms/metadata",
    "version": "2.1.0",
},
{
    "name": "jms/serializer",
    "version": "3.6.0",
},
{
    "name": "jms/serializer-bundle",
     "version": "3.5.0",
}
[...]

@goetas
Copy link
Collaborator

goetas commented May 8, 2020

I've tried to reproduce this without success, can you try to submit a failing test case?

@praditha-hidayat
Copy link

I have another test case here: #889
Maybe it's the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants