diff --git a/composer.json b/composer.json index 07bcf0edd..1b7979525 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,8 @@ "require-dev" : { "phpunit/phpunit" : "^11.0", "friendsofphp/php-cs-fixer" : "^3.64", - "phpstan/phpstan": "^1.12" + "phpstan/phpstan": "^1.12", + "shish/phpstan-safe-rule": "^1.3" }, "suggest": { "ext-memcache": "memcache caching", diff --git a/composer.lock b/composer.lock index 3459c6554..8c4c6fb92 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": "27bc81d9619cb6a701e6093a4dd448ad", + "content-hash": "787c91267affa8d5fac0e43cf9ab08f8", "packages": [ { "name": "aws/aws-crt-php", @@ -5217,6 +5217,61 @@ ], "time": "2024-07-03T05:13:08+00:00" }, + { + "name": "shish/phpstan-safe-rule", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/shish/phpstan-safe-rule.git", + "reference": "a5041fd41543fc49a7d036a563304b8aba8760f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/shish/phpstan-safe-rule/zipball/a5041fd41543fc49a7d036a563304b8aba8760f5", + "reference": "a5041fd41543fc49a7d036a563304b8aba8760f5", + "shasum": "" + }, + "require": { + "php": "^8.2", + "phpstan/phpstan": "^1.0", + "shish/safe": "^2.0" + }, + "replace": { + "thecodingmachine/phpstan-safe-rule": "1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.0", + "squizlabs/php_codesniffer": "^3.4" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "phpstan-safe-rule.neon" + ] + } + }, + "autoload": { + "psr-4": { + "TheCodingMachine\\Safe\\PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David NĂ©grier", + "email": "d.negrier@thecodingmachine.com" + } + ], + "description": "A PHPStan rule to detect safety issues. Must be used in conjunction with shish/safe", + "support": { + "source": "https://github.com/shish/phpstan-safe-rule/tree/v1.3.0" + }, + "time": "2024-10-08T18:43:14+00:00" + }, { "name": "symfony/event-dispatcher", "version": "v7.1.1", diff --git a/tests/phpstan.neon b/tests/phpstan.neon index aa6a6a66e..4ceda43b4 100644 --- a/tests/phpstan.neon +++ b/tests/phpstan.neon @@ -13,5 +13,5 @@ parameters: - STATSD_HOST - TRACE_FILE - UNITTEST -#includes: -# - ../vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon +includes: + - ../vendor/shish/phpstan-safe-rule/phpstan-safe-rule.neon