efabrica-team / phpstan-latte

PHPStan extension to check compiled latte templates
MIT License
42 stars 4 forks source link

Support first class callable, failing test #436

Closed spaze closed 10 months ago

spaze commented 1 year ago

It will fail intentionally on PHP 8.0 and lower because the syntax is supported starting with PHP 8.1, that's expected, will see later if this test can be run only on 8.1+ and how.

But it will also fail on PHP 8.2 with "No closure found" which is not expected. https://github.com/efabrica-team/phpstan-latte/actions/runs/5946401448/job/16126895022?pr=436#step:5:28

For #435

lulco commented 1 year ago

@spaze nice :) you've created your first failing test case :)

For now we don’t have any php specific test cases, but for this we will need some. Also for enums and other php 8.x specific cases

spaze commented 1 year ago

Here's an idea how to test only things that are supported by the particular PHP version used for the test. In PHPUnit it's just a docblock comment, syntax checker in syntax_checker.yml may still need some tuning but at least now tests fail only to highlight the problem.

MartinMystikJonas commented 10 months ago

Fixed by #450