nette / robot-loader

🍀 RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.
https://doc.nette.org/robotloader
Other
871 stars 32 forks source link

Support for PHP Enums #23

Closed Ayesh closed 3 years ago

Ayesh commented 3 years ago

PHP Enum RFC is currently being voted, and it's highly likely that it will pass.

Enums support autoloading, and it introduces a new T_ENUM token. I would like to suggest that we introduce support to autoload Enums from robot-loader.

Improve robot-loader to look for T_ENUM token if the PHP version is >= 80100, and include it in the autoload list.

f3l1x commented 3 years ago

👍