Any recommendations for PHP code linters or static analysis tools?
[#]php #codestyle #softwareengineering
=> More informations about this toot | More toots from kelpana@mastodon.ie
@kelpana
https://packagist.org/packages/symplify/easy-coding-standard for formatting.
https://phpstan.org/ for static analysis and replacing phpmd.
https://github.com/maglnet/ComposerRequireChecker for detecting dependency landmines.
=> More informations about this toot | More toots from dcoderlt@ohai.social
@kelpana PHPStan: @phpstan & I'd also consider trying some extensions too, depending what you are using - https://packagist.org/?type=phpstan-extension
=> More informations about this toot | More toots from alister@hachyderm.io
@alister @kelpana @phpstan +1 on PHPStan. As for linting / prettifying we're using https://github.com/easy-coding-standard/easy-coding-standard at my job, seems to work well enough. I think it wraps other tooling but it should make the configuration a nicer experience* π
=> More informations about this toot | More toots from qrazi@phpc.social
@kelpana PHPstan + php-cs-fixer.
=> More informations about this toot | More toots from Crell@phpc.social
@kelpana I'm partial to @psalm for static analysis, though @phpstan is arguably more popular; in particular, I like that any given warning/error links you to an explanation of what causes that category of error, along with common approaches to resolving it.
I use @phpcs for code style enforcement;fixing; if you need just pure linting, php -l
does that for you, and as of 8.2 or 8.3, will do multiple files/trees for you.
=> More informations about this toot | More toots from mwop@phpc.social
@mwop @kelpana Happy to see @phpcs being mentioned in that list ;-)
And if you are also looking for a pure PHP linting tool which can process your whole repo in one go and works PHP cross-version, I'd suggest having a look at https://github.com/php-parallel-lint/PHP-Parallel-Lint
=> More informations about this toot | More toots from jrf_nl@phpc.social This content has been proxied by September (3851b).Proxy Information
text/gemini