doctrine / lexer

Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
https://www.doctrine-project.org/projects/lexer.html
MIT License
11.07k stars 60 forks source link

Revert "Replace object-like array with class" #78

Closed greg0ire closed 1 year ago

greg0ire commented 1 year ago

This reverts commit 0d2314ad58928abdfae7c6e328608bb65040079f. Changing the type to a Token is too much of a BC-break: dependent packages can have methods that type hint against array when those methods have a token as a parameter or as a return value. This will have to be contributed to 2.0, verbatim so that there is an upgrade path. For instance, for doctrine/orm, the upgrade path will consist in dropping the type declarations at the following locations: