Install phpstan-strict-rules

This commit is contained in:
Art4 2025-06-06 08:15:00 +00:00
parent fce04bfa5c
commit 07db85b99d
3 changed files with 56 additions and 1 deletions

View file

@ -2,6 +2,9 @@
# #
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
parameters: parameters:
level: 3 level: 3
@ -23,6 +26,9 @@ parameters:
dynamicConstantNames: dynamicConstantNames:
- DB_UPDATE_VERSION - DB_UPDATE_VERSION
strictRules:
allRules: false
ignoreErrors: ignoreErrors:
- -
# Ignore missing GdImage class in PHP <= 7.4 # Ignore missing GdImage class in PHP <= 7.4

View file

@ -157,6 +157,7 @@
"php-mock/php-mock-phpunit": "^2.10", "php-mock/php-mock-phpunit": "^2.10",
"phpmd/phpmd": "^2.15", "phpmd/phpmd": "^2.15",
"phpstan/phpstan": "^2.0", "phpstan/phpstan": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^9" "phpunit/phpunit": "^9"
}, },
"scripts": { "scripts": {

50
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "897b878d6db24b9a6437bd9f971478be", "content-hash": "e93a8ac7e31cf3e5e0ca76134e5ffa0b",
"packages": [ "packages": [
{ {
"name": "asika/simple-console", "name": "asika/simple-console",
@ -5849,6 +5849,54 @@
], ],
"time": "2024-11-11T15:43:04+00:00" "time": "2024-11-11T15:43:04+00:00"
}, },
{
"name": "phpstan/phpstan-strict-rules",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-strict-rules.git",
"reference": "a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158",
"reference": "a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0",
"phpstan/phpstan": "^2.0"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^9.6"
},
"type": "phpstan-extension",
"extra": {
"phpstan": {
"includes": [
"rules.neon"
]
}
},
"autoload": {
"psr-4": {
"PHPStan\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Extra strict and opinionated rules for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-strict-rules/issues",
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.0"
},
"time": "2024-10-26T16:04:33+00:00"
},
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "9.2.31", "version": "9.2.31",