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

Conditional expose not working? #832

Open
DoobleD opened this issue Jan 17, 2021 · 0 comments
Open

Conditional expose not working? #832

DoobleD opened this issue Jan 17, 2021 · 0 comments

Comments

@DoobleD
Copy link

DoobleD commented Jan 17, 2021

Hi!

I'm trying to use a conditional expose and it doesn't care about the condition but just always exposes the field.

    /**
     * @Expose(if="AnyExpressionHereItDoesntMatter")
     * @var int
     * @ORM\Column(type="integer", nullable=true)
     */
    protected $field;

I'm using jms/serializer-bundle 1.5.0 with Symfony 3.4. I'm pretty sure I'm doing something wrong or missing some config. Any idea?

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

No branches or pull requests

1 participant