Add TokenType class#11228
Conversation
|
I suggest we have the old |
|
@derrabus Should I deprecate each constant or is one per section enough? I would mark all of them, but I don't know if you have any policy for that. |
|
If we want static analyzers to pick up the deprecation, we need to flag each constant as deprecated. |
Co-authored-by: Alexander M. Turek <[email protected]>
f623791 to
427bdd9
Compare
|
I think you should search and replace occurrences of |
|
You will need to update this as well: Lines 2047 to 2050 in 40fbbf4 Please take a look at this guide for more on how to try things locally. |
1422a36 to
ba8e7ae
Compare
greg0ire
left a comment
There was a problem hiding this comment.
Ah sorry I forgot: please add something in UPGRADE.md regarding the new deprecation.
|
@greg0ire I made the change you asked for. |
|
Thank you for your help in the creation of the PR and thank you for merging it. |
* 2.19.x: Add TokenType class (#11228)
* 3.1.x: Add TokenType class (doctrine#11228) Revert "Merge pull request doctrine#11229 from greg0ire/add-columns" Add columns for 3.1.x and 4.0x Update version ORM from 2 to 3 in docs (doctrine#11221) Clean up outdated sentence (doctrine#11224) Update README.md Point link to correct upgrade guide (doctrine#11220) Ignore subclasses without discriminatorValue when generating discriminator column condition SQL (doctrine#11200) Update branches in README
|
We missed a couple of references: #11234 |
|
It didn't occur to me to run phpstan with |
|
We have Psalm for that, but we apparently allow deprecated constants to be used inside the Lexer class. 🙈 |
| public const T_CLOSE_CURLY_BRACE = 19; | ||
|
|
||
| // All tokens that are identifiers or keywords that could be considered as identifiers should be >= 100 | ||
| /** @deprecated No Replacement planned. */ |
There was a problem hiding this comment.
why adding a deprecated one in TokenType ?
There was a problem hiding this comment.
Consistency, mainly. We've moved all token constants over to the new class.
The idea of a
TokenTypeclass was discussed to make it easier to support ORM2 and ORM3 together.beberlei/DoctrineExtensions#421 (comment)