Due to PHP Bug #53727, is_subclass_of might return inconsistent results on some PHP versions if \SpareParts\Enum\Enum::class can be an interface. If so, you could instead use ReflectionClass::implementsInterface.
Loading history...
32
1
throw new ConverterSetupException("Class ${enumClass} is not a valid Enum. (doesnt extend Enum class)");