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

Twig 2 supports hassers for the attribute operator #964

Closed
stof opened this issue Jun 23, 2017 · 2 comments
Closed

Twig 2 supports hassers for the attribute operator #964

stof opened this issue Jun 23, 2017 · 2 comments

Comments

@stof
Copy link
Contributor

stof commented Jun 23, 2017

Twig 1 only supports getters and issers for the attribute operator (.), but Twig 2 added support for hassers.
Currently the bundle marks this as an undefined property (and generates the access with hasFoo on autocomplete). It would be great if it could change its behavior based on the Twig version instead.

@Haehnchen Haehnchen added this to the Hackday milestone Jul 28, 2017
@Haehnchen
Copy link
Owner

Haehnchen commented Jul 28, 2017

related twigphp/Twig#1969

     * if not, and if ``foo`` is an object, check that ``getBar`` is a valid method;
     * if not, and if ``foo`` is an object, check that ``isBar`` is a valid method;
     * if not, and if ``foo`` is an object, check that ``hasBar`` is a valid method;

@Haehnchen
Copy link
Owner

done. but without Twig version check, overhead for this feature

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

2 participants