TomasVotruba / bladestan

PHPStan analysis for Blade templates
https://tomasvotruba.com/blog/introducing-bladestan-phpstan-analysis-of-blade-templates/
MIT License
280 stars 13 forks source link

Resolve Larastan conflict BladeToPHPCompiler #76

Closed AJenbo closed 11 months ago

AJenbo commented 11 months ago

I'm unsure why this hack was ever needed but it's the cause of https://github.com/TomasVotruba/bladestan/issues/75 and https://github.com/TomasVotruba/bladestan/issues/30

It also breaks analyzing resolve() and app().

I tested on the projects I worked on both with and without Larastan enabled after making this change to the code and both appeared to work correctly so this looks to only fix issues and not break anything (tests are also working).

TomasVotruba commented 11 months ago

Thanks :+1:

Shall we bump some requirements in composer.json too to be compatible?

AJenbo commented 11 months ago

I think composer.json should already be good, though I have not tested with Laravel 8. It might be worth noting that Larastan 2.0 requires Laravel 9.

P.s. on a side note I have managed to get things to pass at level 7 on one of our major project and I'm getting close to level 8. I'm quite happy with how Bladestan is working out at this point. Mostly the biggest issue is performance, a few unsupported directives and ignored errors but that all looks fixable.

TomasVotruba commented 11 months ago

All right, let's ship it :)

szepeviktor commented 11 months ago

Thank you Anders.