diff --git a/composer.json b/composer.json index d095bf7..d42b185 100644 --- a/composer.json +++ b/composer.json @@ -23,12 +23,13 @@ "require-dev": { "nette/tester": "2.4.2", "mockery/mockery": "1.5.0", - "phpstan/phpstan": "1.7.8", - "phpstan/phpstan-strict-rules": "1.2.3", + "phpstan/phpstan": "1.7.15", + "phpstan/phpstan-strict-rules": "1.3.0", "phpstan/phpstan-nette": "1.0.0", + "phpstan/phpstan-mockery": "1.1.0", "nepada/phpstan-nette-tester": "0.4.0", "spaze/phpstan-disallowed-calls": "2.4.0", - "phpstan/phpstan-mockery": "1.1.0", + "shipmonk/phpstan-rules": "1.0.1", "php-parallel-lint/php-parallel-lint": "1.3.2", "nepada/coding-standard": "7.4.3", "nette/di": "^3.0.6@dev", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index b30ef7c..e897227 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -8,6 +8,7 @@ includes: - vendor/spaze/phpstan-disallowed-calls/disallowed-insecure-calls.neon - vendor/spaze/phpstan-disallowed-calls/disallowed-loose-calls.neon - tests/PHPStan/disallowedCalls.neon + - tests/PHPStan/shipmonk.neon parameters: level: max diff --git a/phpstan.tests.neon.dist b/phpstan.tests.neon.dist index ed363b8..52ec5ab 100644 --- a/phpstan.tests.neon.dist +++ b/phpstan.tests.neon.dist @@ -10,6 +10,7 @@ includes: - vendor/spaze/phpstan-disallowed-calls/disallowed-insecure-calls.neon - vendor/spaze/phpstan-disallowed-calls/disallowed-loose-calls.neon - tests/PHPStan/disallowedCalls.neon + - tests/PHPStan/shipmonk.neon parameters: level: max diff --git a/tests/PHPStan/shipmonk.neon b/tests/PHPStan/shipmonk.neon new file mode 100644 index 0000000..6df72ae --- /dev/null +++ b/tests/PHPStan/shipmonk.neon @@ -0,0 +1,14 @@ +rules: + - ShipMonk\PHPStan\Rule\ForbidFetchOnMixedRule + - ShipMonk\PHPStan\Rule\ForbidMatchDefaultArmForEnumsRule + - ShipMonk\PHPStan\Rule\ForbidMethodCallOnMixedRule + - ShipMonk\PHPStan\Rule\ForbidReturnInConstructorRule + - ShipMonk\PHPStan\Rule\ForbidUnsetClassFieldRule + - ShipMonk\PHPStan\Rule\ForbidUnusedExceptionRule + - ShipMonk\PHPStan\Rule\RequirePreviousExceptionPassRule + +services: + - + type: ShipMonk\PHPStan\Visitor\UnusedExceptionVisitor + tags: + - phpstan.parser.richParserNodeVisitor