Skip to content

Fix the example for the When constraint #17905

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

Merged
merged 1 commit into from
Feb 14, 2023
Merged

Conversation

stof
Copy link
Member

@stof stof commented Feb 14, 2023

When evaluating the expression, the ExpressionLanguage does not have access to private properties of the object, as it runs from its outside. And contrary to Twig, ExpressionLanguage does not have the magic . operator that tries to find a getter when it cannot use the property.

See symfony/symfony#49367 for a support request caused by this bad example.

When evaluating the expression, the ExpressionLanguage does not have access to private properties of the object, as it runs from its outside. And contrary to Twig, ExpressionLanguage does not have the magic `.` operator that tries to find a getter when it cannot use the property.
@OskarStark
Copy link
Contributor

Thanks for fixing this bug @stof.

@OskarStark OskarStark merged commit 5ba520a into symfony:6.2 Feb 14, 2023
@xabbuh xabbuh added this to the 6.2 milestone Feb 16, 2023
@stof stof deleted the patch-1 branch April 6, 2023 12:04
kbond added a commit to symfony/ux that referenced this pull request Jun 1, 2024
This PR was merged into the 2.x branch.

Discussion
----------

Fix the example with Expression Language

`@stof` said in symfony/symfony-docs#17905:
> When evaluating the expression, the ExpressionLanguage does not have access to private properties of the object, as it runs from its outside. And contrary to Twig, ExpressionLanguage does not have the magic . operator that tries to find a getter when it cannot use the property.

I then improved the documentation :).

Commits
-------

15c6786 Fix the example with Expression Language
symfony-splitter pushed a commit to symfony/ux-turbo that referenced this pull request Jun 1, 2024
This PR was merged into the 2.x branch.

Discussion
----------

Fix the example with Expression Language

`@stof` said in symfony/symfony-docs#17905:
> When evaluating the expression, the ExpressionLanguage does not have access to private properties of the object, as it runs from its outside. And contrary to Twig, ExpressionLanguage does not have the magic . operator that tries to find a getter when it cannot use the property.

I then improved the documentation :).

Commits
-------

15c6786a Fix the example with Expression Language
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants