-
Notifications
You must be signed in to change notification settings - Fork 5
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
PHPStan Latte $level++
#141
Comments
* Change action `$param` type to int where possible * Work around efabrica-team/phpstan-latte#396 Ref #141
[9 errors remaining](https://github.com/spaze/michalspacek.cz/actions/runs/5562124085/jobs/10160242058) and they all seem to be related one way or another to form containers, so maybe the following will help? - efabrica-team/phpstan-latte#380 Ref #141
Ignoring just errors related to form containers which are not yet (fully) supported. I hope these would be solved one day when efabrica-team/phpstan-latte#380 is closed but currently, even when testing that branch, aren't. Ref #141
- Interview source name & href are always filled, no need to have them nullable - Make sure nullable values have a value when doing something with them Ref #141
Hey @lulco @MartinMystikJonas look I made it to and past the final boss 🦾 Thanks for creating the extension, looking forward to the next releases. If you want, and think it would be useful, feel free to use this code base for some kind of tests, like regression or so. The license allows it but I wanted to be explicit. The extension helped me to find some buggy code, like for example that I had a form component and a form container sharing the same name. It worked but probably just by coincidence. |
Thanks for using our extension! I wish there were more developers using Nette doing it too. Maybe you can share your experiences O:-) Ad your error - it is corect to use same name for container and control in it. Extension reports it because of its actual implementation which is hacky. We are trying to improve it step by step. |
Interesting, having a form container and a field with the same name felt wrong (because of accessing it with Anyway, this was an easy change, unlike some other refactoring (which should have been done much much earlier but I was lazy and didn't have the right tools available). |
This is kind of transformation we have done to make forms work with extension. The original compiled template is different.
|
Good to know this can also be somehow changed! |
The app is running PHPStan on level 8 for quite some time already (5cc25c4) and now even on level 9 #147, so let's see how far I can bring the Latte extensions.
PHPStan Latte Levels and PRs:
Lnil:
L0:
L1:
L2:
L3:
L4:
never
return type throws "Unreachable statement" efabrica-team/phpstan-latte#387{form $form
throws "Ternary operator condition is always false." efabrica-team/phpstan-latte#388I was able to work around the bug by using just one form for both adding something and editing something
n:href="foo => $bar"
throws "Offset 0 on array does not exist" efabrica-team/phpstan-latte#389{include}
'd template ignores that{include}
params may be different efabrica-team/phpstan-latte#391$trainingAction
is not always initialized like in the default action #183L5:
Worked around it in ff672c9
L6:
L7:
{capture $link}Foo:bar{/capture}
throws "link() expects string" on level 7 efabrica-team/phpstan-latte#398Workaround in Progress to PHPStan Latte level 7 #175
2 related errors are ignored in PHPStan Latte level 7 #176 2d7735e, better issue linked in Add better link to ignored errors #184:
L8:
L9:
+ Bleeding Edge:
setView
is used with bleeding edge enabled efabrica-team/phpstan-latte#402Some 🐛🐛🐛 discovered later by for example newer versions of the PHPStan Latte extension
The text was updated successfully, but these errors were encountered: