TomasVotruba / bladestan

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

setup documentation: add phpstan.neon includes #38

Closed ghbob closed 1 year ago

ghbob commented 1 year ago

Couldn't find it in the blogpost (1) nor the readme (2) but one actually has to require the extension to run bladestan with phpstan, correct?

Otherwise I immediately run into:

Invalid configuration:
Unexpected item 'parameters › bladestan'.

therefore e.g.

includes:
    - ./vendor/tomasvotruba/bladestan/config/extension.neon
    - ./vendor/phpstan/phpstan-strict-rules/rules.neon
    - ./vendor/nunomaduro/larastan/extension.neon

Thanks!

TomasVotruba commented 1 year ago

Yes, always use the PHPStan extension installer. Not for this project only, but any other PHPStan extension. It will save you from so much config copying.

https://github.com/phpstan/extension-installer

TomasVotruba commented 1 year ago

If you have time and it's not much troubles for you, could you send PR to readme to clarify it?

ghbob commented 1 year ago

Ok, did my best #39 :)

I didn't know about the extension installer so thanks! However it apparently enables everything and if I enable all the phpstan-strict-rules my co-workers will murder me in my sleep ;)

(Described here in the blue box: https://phpstan.org/user-guide/extension-library#installing-extensions)

TomasVotruba commented 1 year ago

However it apparently enables everything and if I enable all the phpstan-strict-rules my co-workers will murder me in my sleep ;)

Yes, you should only install the extensions you need :wink: