Skip to content

Commit 13e243c

Browse files
committed
replace rector/type-perfect with tomasvotruba/type-coverage
Type-perfect rules moved into tomasvotruba/type-coverage 2.3.0. The type_perfect config key is unchanged, so phpstan.neon keeps its existing settings.
1 parent cacd03a commit 13e243c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ vendor/bin/phpunit
3838
```
3939

4040
PHPStan extras enabled in `phpstan.neon`:
41-
- `type-perfect`: `no_mixed`, `null_over_false`, `narrow_param`, `narrow_return` — return/param types must be narrow; prefer `null` over `false` for "no result".
41+
- `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".
4242
- `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.
4343
- `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.
4444

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
"rector/jack": "^0.5",
5353
"rector/release-notes-generator": "^0.5.1",
5454
"rector/swiss-knife": "^2.4.1",
55-
"rector/type-perfect": "^2.1.2",
5655
"shipmonk/composer-dependency-analyser": "^1.8",
5756
"symplify/easy-coding-standard": "^13.2.13",
5857
"symplify/phpstan-extensions": "^12.0.2",
5958
"symplify/phpstan-rules": "^14.12",
6059
"symplify/vendor-patches": "^11.5",
6160
"tomasvotruba/class-leak": "^2.1",
61+
"tomasvotruba/type-coverage": "^2.3",
6262
"tomasvotruba/unused-public": "^2.2",
6363
"tracy/tracy": "^2.12"
6464
},

‎phpstan.neon‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ parameters:
5353
- '*tests/*/Source/*'
5454
- '*tests/*/Source*'
5555

56-
# https://github.com/rectorphp/type-perfect/
56+
# see https://github.com/TomasVotruba/type-coverage
5757
type_perfect:
5858
no_mixed: true
5959
null_over_false: true

0 commit comments

Comments
 (0)