diff --git a/composer.json b/composer.json index badb7792c2da7..e63ddc505762c 100644 --- a/composer.json +++ b/composer.json @@ -103,6 +103,7 @@ "pdepend/pdepend": "^2.10", "phpmd/phpmd": "^2.12", "phpstan/phpstan": "^1.9", + "phpstan/phpstan-deprecation-rules": "^1.1", "phpunit/phpunit": "^10.5", "symfony/finder": "^6.4" }, diff --git a/composer.lock b/composer.lock index ca0970094b701..ddd30891124e7 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": "6365ef759ff5394c26ed1a48d1119a26", + "content-hash": "4b1772723e4b915c272b96eb2ca9be86", "packages": [ { "name": "aws/aws-crt-php", @@ -12087,6 +12087,53 @@ ], "time": "2024-09-05T16:09:28+00:00" }, + { + "name": "phpstan/phpstan-deprecation-rules", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", + "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/f94d246cc143ec5a23da868f8f7e1393b50eaa82", + "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.12" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "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/1.2.1" + }, + "time": "2024-09-11T15:52:35+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "10.1.16", diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon index c6cf0a2a9c188..ca1bb43dab2e1 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon @@ -37,6 +37,8 @@ parameters: - '#Constant TESTS_INSTALLATION_DB_CONFIG_FILE not found.#' - '#Constant T_[A-Z_]+ not found.#' +includes: + - %rootDir%/../phpstan-deprecation-rules/rules.neon services: -