diff --git a/composer.json b/composer.json index fbbfba603..b313b4d2d 100644 --- a/composer.json +++ b/composer.json @@ -33,6 +33,7 @@ "friendsofphp/php-cs-fixer": "^3.0", "php-parallel-lint/php-parallel-lint": "^1.0", "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0", "symfony/phpunit-bridge": "^7.0" }, "license": "GPL-3.0", diff --git a/composer.lock b/composer.lock index c56f2e395..8ce2a2ec6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1b6dc5baa8ceb193a77d70730d4ee68f", + "content-hash": "c6379e20ca1bebc6474e12633f775688", "packages": [ { "name": "bcosca/fatfree-core", @@ -4226,6 +4226,53 @@ ], "time": "2024-11-17T14:17:00+00:00" }, + { + "name": "phpstan/phpstan-deprecation-rules", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", + "reference": "81833b5787e2e8f451b31218875e29e4ed600ab2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/81833b5787e2e8f451b31218875e29e4ed600ab2", + "reference": "81833b5787e2e8f451b31218875e29e4ed600ab2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "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": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", + "support": { + "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.0" + }, + "time": "2024-10-26T16:04:11+00:00" + }, { "name": "psr/event-dispatcher", "version": "1.0.0", diff --git a/phpstan.neon b/phpstan.neon index 7341144d0..e368a6c72 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -27,3 +27,6 @@ parameters: typeAliases: SpoutParameterInfo: 'array{title: string, type: spouts\Parameter::TYPE_*, default: string, required: bool, validation: array, values?: array}' SpoutParameters: 'array' + +includes: + - vendor/phpstan/phpstan-deprecation-rules/rules.neon