website/errors/sealed.internalEnum.md
<?php declare(strict_types = 1); // lint >= 8.1
namespace Vendor {
/** @internal */
enum Status {
case Active;
case Inactive;
}
}
namespace App {
/**
* @phpstan-sealed \Vendor\Status
*/
interface StatusProvider
{
}
}
The @phpstan-sealed PHPDoc tag references an enum that is marked as @internal in another package. Internal symbols are not meant to be used outside of their own package, and referencing them in a @phpstan-sealed tag creates a dependency on an implementation detail that could change without notice.
Reference only public (non-internal) enums in @phpstan-sealed tags, or create your own enum that mirrors the needed values.
<?php declare(strict_types = 1);
namespace App;
-use Internal\Status;
+use App\Enums\Status;
/**
* @phpstan-sealed Status
*/
interface StatusProvider
{
}