Closed ZebulanStanphill closed 2 years ago
Reveal\RevealLatte\Rules\LatteCompleteCheckRule
is registered twice - check generated container in /tmp/phpstan/cache/nette.configurator/Container_something.php
You will see something like this:
'Reveal\RevealLatte\Rules\LatteCompleteCheckRule' => [['0359', '0486']],
First it is registered via phpstan/extension-installer
and second is manually in phpstan.dist.neon
Oh, sorry. I didn't realize that explicitly registering it in my config would cause issues if it was already being auto-registered. Thanks for your help!
With
reveal/reveal-latte
installed,phpstan analyse
will fail and output the following error as long as theReveal\RevealLatte\Rules\LatteCompleteCheckRule
rule is included in my PHPStan config:This rather cryptic error appears to have something to do with the Container class from
nette/component-model
, but the reported line doesn't appear to be anything relevant in the latest released version (3.0.2, which I've verified is the one installed in myvendor
folder).It kinda seems like
LatteCompleteCheckRule
is just broken in the current version ofreveal/reveal-latte
(0.1.1). Maybe it has something to do with me using PHP 8.1?Here is a simple repo that I used to reproduce the issue: https://gitlab.com/ZebulanStanphill/reveal-latte-bug-reproduction
In fact, even reducing the PHP code to just an empty
Main.php
(and deleting the Latte file) still doesn't make the error go away. The code that's there is mostly just for the sake of demonstrating the kind of code I'd want to lint in one of my real projects.