In PHP 8, Attribute is a reserved class name due to the introduction of attributes.
When the Attribute enum is compiled to PHP, an Attribute PHP class is generated, resulting in this error at runtime:
PHP Fatal error: Uncaught Error: Call to undefined method Attribute::Off() in [...]\ANSI.php:598
So the Attribute enum should be renamed. Or better this library should be put in a package instead of the root namespace.
In PHP 8,
Attribute
is a reserved class name due to the introduction of attributes. When theAttribute
enum is compiled to PHP, anAttribute
PHP class is generated, resulting in this error at runtime:So the
Attribute
enum should be renamed. Or better this library should be put in a package instead of the root namespace.