Upgrading phpstan/phpstan-deprecation-rules 1 to 2
Breaking1.2.1 → 2.0.5Breaking2Security2Deprecated1New5Changed12Fixed3Other33
BreakingUpgrade verdict
2 breaking changes and 2 security fixes.
In plain terms
- A rule that flagged deprecated casts has been removed because the main PHPStan tool now handles this itself.
- The old type hint deprecation rules are replaced by a new extension, which may change how deprecations are reported.
- Hardens GitHub Actions workflows.
- Removes PHPSTAN_BOT_TOKEN from checkout step.
Must act 5 items need code or config changes
PHP requirement changed in 2.0.0: ^7.2 || ^8.0 → ^7.4 || ^8.0.
What you must change
Breaking2
Removes UsageOfDeprecatedCastRule because PHPStan already implements it via RestrictedMethodUsageExtension.
UsageOfDeprecatedCastRuleRestrictedMethodUsageExtensionReplaces TypeHintDeprecated*Rule with RestrictedDeprecatedClassNameUsageExtension.
TypeHintDeprecated*RuleRestrictedDeprecatedClassNameUsageExtensionSecurity2
Hardens GitHub Actions workflows.
Removes PHPSTAN_BOT_TOKEN from checkout step.
PHPSTAN_BOT_TOKENDeprecations to plan for
Deprecated1
Deprecates selectSingle().
selectSingle()