Closed greg0ire closed 1 year ago
We should try to ship this change in 1.x. It would be unfortunate if we needed to ship 2.x with a BC layer.
We should try to ship this change in 1.x. It would be unfortunate if we needed to ship 2.x with a BC layer.
I think we are going to need a 3.x very soon, because inheritance is involved: the ORM lexer extends the AbstractLexer, which means that if we add return type hints on 3.x, we will make it impossible for doctrine/orm to be compatible with both v1 and v2 at the same time, just like here: https://github.com/doctrine/collections/pull/331
For that reason, I think it's not that big of a deal to have that BC layer on 2.x, since that series is supposed to be short-lived.
If you can think of a way to ship this change in 1.x, I'm still interested though.
I'm working on a solution to ship this in 1.x
ping @derrabus are you fine with this?
The new class is templatable, which should enable us to specify that the ORM Lexer is an
Lexer<self::T_*>
, and in the future, define an enum called TokenType in the ORM, and switch toLexer<TokenType>
.