SmilyOrg / ansi

Haxe utility for working with ANSI escape sequences.
MIT License
20 stars 4 forks source link

`Attribute` enum is not compatible with PHP 8 #9

Open cedx opened 3 years ago

cedx commented 3 years ago

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.

kevinresol commented 3 years ago

See https://github.com/HaxeFoundation/haxe/issues/10207