From bbef18826302faed8c97a2f012555f75dc622beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 8 Jan 2025 12:41:43 +0100 Subject: [PATCH] Enhancement: Require ergebnis/phpstan-rules --- composer.json | 1 + composer.lock | 78 +++++++++++++++++++++++++++++++++++++++++++++++++-- phpstan.neon | 7 +++++ 3 files changed, 83 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 495eff46..a4a1adb4 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "ergebnis/composer-normalize": "^2.45.0", "ergebnis/data-provider": "^3.4.0", "ergebnis/license": "^2.6.0", + "ergebnis/phpstan-rules": "^2.6.0", "ergebnis/phpunit-slow-test-detector": "^2.17.0", "ergebnis/rector-rules": "^1.3.0", "fakerphp/faker": "^1.24.1", diff --git a/composer.lock b/composer.lock index 3df49486..d59a0a7e 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": "5c4e7383d6093fabfc04c0ae47df0610", + "content-hash": "79019bf3e091a17f2c199ea01185d4d0", "packages": [ { "name": "clue/ndjson-react", @@ -3394,6 +3394,78 @@ }, "time": "2024-11-17T20:12:16+00:00" }, + { + "name": "ergebnis/phpstan-rules", + "version": "2.6.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/phpstan-rules.git", + "reference": "61968aacd749c1d7565deec2853f5d4edb3f37cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/61968aacd749c1d7565deec2853f5d4edb3f37cd", + "reference": "61968aacd749c1d7565deec2853f5d4edb3f37cd", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "phpstan/phpstan": "^2.0.0" + }, + "require-dev": { + "doctrine/orm": "^2.20.0 || ^3.3.0", + "ergebnis/composer-normalize": "^2.45.0", + "ergebnis/license": "^2.6.0", + "ergebnis/php-cs-fixer-config": "^6.39.0", + "ergebnis/phpunit-slow-test-detector": "^2.17.0", + "nette/di": "^3.1.10", + "nikic/php-parser": "^4.19.4", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-strict-rules": "^2.0.1", + "phpunit/phpunit": "^9.6.21", + "psr/container": "^2.0.2", + "symfony/finder": "^5.4.45", + "symfony/process": "^5.4.47" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\PHPStan\\Rules\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides rules for phpstan/phpstan.", + "homepage": "https://github.com/ergebnis/phpstan-rules", + "keywords": [ + "PHPStan", + "phpstan-rules" + ], + "support": { + "issues": "https://github.com/ergebnis/phpstan-rules/issues", + "security": "https://github.com/ergebnis/phpstan-rules/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/phpstan-rules" + }, + "time": "2025-01-08T09:39:27+00:00" + }, { "name": "ergebnis/phpunit-slow-test-detector", "version": "2.17.0", @@ -5829,14 +5901,14 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-filter": "*" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "7.4.33" }, diff --git a/phpstan.neon b/phpstan.neon index bdde8809..8ffa9880 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,6 +2,13 @@ includes: - phpstan-baseline.neon parameters: + ergebnis: + noExtends: + classesAllowedToBeExtended: + - Ergebnis\PhpCsFixer\Config\Test\EndToEnd\RuleSet\AbstractRuleSetTestCase + - Ergebnis\PhpCsFixer\Config\Test\Unit\RuleSet\AbstractRuleSetTestCase + - Ergebnis\PhpCsFixer\Config\Test\Unit\RuleSet\ExplicitRuleSetTestCase + inferPrivatePropertyTypeFromConstructor: true level: max