-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TokenType class #11228
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 <me@derrabus.de>
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why adding a deprecated one in TokenType ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency, mainly. We've moved all token constants over to the new class.
The idea of a
TokenType
class was discussed to make it easier to support ORM2 and ORM3 together.beberlei/DoctrineExtensions#421 (comment)