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

Lint fails with "same as" test #33

Open
neilime opened this issue Feb 6, 2017 · 3 comments
Open

Lint fails with "same as" test #33

neilime opened this issue Feb 6, 2017 · 3 comments

Comments

@neilime
Copy link

neilime commented Feb 6, 2017

Hi,

here is an unexpected lint error :

{% if foo.attribute is same as(false) %}
    the foo attribute really is the 'false' PHP value
{% endif %}

Error :

>> 1      {% if foo.attribute is same as(false) %}
           >> Unexpected token "name" of value "as" ("end of statement block" expected).
              2          the foo attribute really is the 'false' PHP value
              3      {% endif %}

However it works with the test "sameas".

(Twig doc : http://twig.sensiolabs.org/doc/2.x/tests/sameas.html)

Thanks for your help.

@seanhamlin
Copy link

seanhamlin commented Jun 25, 2019

Experiencing the same issue. This is basically a show stopper for me to use this linter.

>> 10             {% if count > 0 and not type is same as('total') %}
>> Unexpected token "name" of value "as" ("end of statement block" expected)

@asm89
Copy link
Owner

asm89 commented Aug 26, 2021

Is this still an issue on the most recent version?

@bronzehedwick
Copy link
Contributor

@asm89 Yes I can confirm this is still an issue on version 1.0.3.

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

4 participants