diff --git a/CLAUDE.md b/CLAUDE.md index ba2f186a252..822d0648eed 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,7 +38,7 @@ vendor/bin/phpunit ``` PHPStan extras enabled in `phpstan.neon`: -- `type-perfect`: `no_mixed`, `null_over_false`, `narrow_param`, `narrow_return` — return/param types must be narrow; prefer `null` over `false` for "no result". +- `type-coverage` (ships the former `type-perfect` rules): `no_mixed`, `null_over_false`, `narrow_param`, `narrow_return` — return/param types must be narrow; prefer `null` over `false` for "no result". - `unused-public`: public methods/properties/constants must be used somewhere. If you add a new public API, expect to use it or mark it accordingly. - `symplify/phpstan-rules` + `rector-rules`: forbids `var_dump`, `dd`, `property_exists`, `class_exists`, `@` error suppression, dynamic names, etc., outside the narrowly listed exceptions in `phpstan.neon`. Do not add new exceptions casually — fix the code. diff --git a/composer.json b/composer.json index 0fc3d46ab00..5447cd70a75 100644 --- a/composer.json +++ b/composer.json @@ -52,13 +52,13 @@ "rector/jack": "^0.5", "rector/release-notes-generator": "^0.5.1", "rector/swiss-knife": "^2.4.1", - "rector/type-perfect": "^2.1.2", "shipmonk/composer-dependency-analyser": "^1.8", "symplify/easy-coding-standard": "^13.2.13", "symplify/phpstan-extensions": "^12.0.2", "symplify/phpstan-rules": "^14.12", "symplify/vendor-patches": "^11.5", "tomasvotruba/class-leak": "^2.1", + "tomasvotruba/type-coverage": "^2.3", "tomasvotruba/unused-public": "^2.2", "tracy/tracy": "^2.12" }, diff --git a/phpstan.neon b/phpstan.neon index 7c772600d34..071ff24a49b 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -53,7 +53,7 @@ parameters: - '*tests/*/Source/*' - '*tests/*/Source*' - # https://github.com/rectorphp/type-perfect/ + # see https://github.com/TomasVotruba/type-coverage type_perfect: no_mixed: true null_over_false: true