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

Fix false positive for echoing Htmlable objects #91

Closed AJenbo closed 7 months ago

AJenbo commented 7 months ago

Stripping e() appears to have no real benefit and will result in false negatives (at level 2) when rendering pagination as they are typed as the Htmlable interface which echo can't handle directly without first passing it through e().

Mayne this was need at some point where Laravel didn't hint this method properly but that appers to not be the case at this point at least.

P.s. I hear you will be speaking at Laracon, maybe we will see each other there.

AJenbo commented 7 months ago

@TomasVotruba This PR is now ready for review.

TomasVotruba commented 7 months ago

Thanks for the ping, I missed this one.

Good to go :+1:

AJenbo commented 7 months ago

Thanks, with this we where able to make all our blade files pass PHPStan's level 3.

I don't know that there are any other issues related to Bladestan, but will let you know as things progress :)