nunomaduro / phpinsights

🔰 Instant PHP quality checks from your console
https://phpinsights.com
MIT License
5.29k stars 282 forks source link

PHP deprecations errors shown when running phpinsights #695

Open gremo opened 1 week ago

gremo commented 1 week ago
Q A
Bug report? no
Feature request? no
Library version v2.10.0
PHP version 8.3.12

First... that you for this such good tool! I've started used it today (Symfony framework here). Just a quick report: not a big deal but, php deprecations are reported when running the tool:

root@76c2985d039a:/app# vendor/bin/phpinsights          
PHP Deprecated:  Creation of dynamic property SlevomatCodingStandard\Sniffs\TypeHints\DeclareStrictTypesSniff::$newlinesCountBeforeDeclare is deprecated in /app/vendor/nunomaduro/phpinsights/src/Domain/InsightLoader/SniffLoader.php on line 40

Deprecated: Creation of dynamic property SlevomatCodingStandard\Sniffs\TypeHints\DeclareStrictTypesSniff::$newlinesCountBeforeDeclare is deprecated in /app/vendor/nunomaduro/phpinsights/src/Domain/InsightLoader/SniffLoader.php on line 40

Is there any why to suppress it?

Jibbarth commented 6 days ago

Linked to https://github.com/nunomaduro/phpinsights/pull/652#issuecomment-1784146804

This property doesn't exist anymore and should be replaced by linesCountBeforeDeclare in DefaultPreset.