phpstan: added rule to ban new $class

see #6635 for rationale on why we want to get rid of this

for now, this rule will prevent this anti-feature from being used in new code
This commit is contained in:
Dylan K. Taylor
2025-03-09 00:51:12 +00:00
parent 09f0ce458c
commit 2291546610
3 changed files with 86 additions and 0 deletions

View File

@ -11,6 +11,7 @@ includes:
rules:
- pocketmine\phpstan\rules\DeprecatedLegacyEnumAccessRule
- pocketmine\phpstan\rules\DisallowDynamicNewRule
- pocketmine\phpstan\rules\DisallowEnumComparisonRule
- pocketmine\phpstan\rules\DisallowForeachByReferenceRule
- pocketmine\phpstan\rules\ExplodeLimitRule