website/errors/requireExtends.deprecatedEnum.md
<?php declare(strict_types = 1); // lint >= 8.1
/** @deprecated Use NewStatus instead */
enum OldStatus
{
case Active;
}
/**
* @phpstan-require-extends OldStatus
*/
interface StatusAware
{
}
This error is reported by the phpstan-deprecation-rules extension.
The @phpstan-require-extends PHPDoc tag references a deprecated enum. Deprecated enums are planned for removal in a future version.
Note: triggering this identifier requires @phpstan-require-extends to reference an enum, which is not valid. PHPStan therefore always also reports a requireExtends.enum error, and in practice the deprecation identifier is not reported alongside it.
Replace the deprecated enum with a proper class reference:
/**
- * @phpstan-require-extends OldStatus
+ * @phpstan-require-extends NewBaseClass
*/
interface StatusAware
{
}