-
Notifications
You must be signed in to change notification settings - Fork 230
Add support for the new PHP 8 tokens for use statements #347
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The T_STRING and T_NS_SEPARATOR tokens are used differently in use statements. Treating them the same makes the code harder to follow and harder to adapt for PHP 8.
Co-authored-by: Soner Sayakci <[email protected]>
shyim
approved these changes
Aug 10, 2020
Contributor
shyim
left a comment
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.
Thanks!
Member
|
Triggering a new build now that #345 was merged |
greg0ire
reviewed
Aug 10, 2020
Co-authored-by: Grégoire Paris <[email protected]>
Member
jkufner
added a commit
to smalldb/annotations
that referenced
this pull request
Aug 11, 2020
Release [1.10.4](https://github.com/doctrine/annotations/milestone/25) 1.10.4 ====== - Total issues resolved: **0** - Total pull requests resolved: **8** - Total contributors: **5** - [347: Add support for the new PHP 8 tokens for use statements](doctrine#347) thanks to @stof - [345: Remove calls to TestCase::at()](doctrine#345) thanks to @greg0ire - [343: Allow using PHPUnit 9.3](doctrine#343) thanks to @greg0ire Improvement ----------- - [342: Upgrade phpunit](doctrine#342) thanks to @greg0ire - [332: DocParser: Improve private typehints](doctrine#332) thanks to @jkufner bug --- - [341: Make type in phpdoc resolvable](doctrine#341) thanks to @greg0ire Documentation ------------- - [338: update annotation IDE annotation with current links](doctrine#338) thanks to @Haehnchen Documentation,Improvement ------------------------- - [337: Replace "blacklist" terminology with "ignore"](doctrine#337) thanks to @albe
BenMorel
added a commit
to brick/reflection
that referenced
this pull request
Sep 28, 2020
Fixes the TokenParser for PHP 8: doctrine/annotations#347
Yurunsoft
added a commit
to Yurunsoft/doctrine-annotations
that referenced
this pull request
Nov 29, 2020
Release [1.10.4](https://github.com/doctrine/annotations/milestone/25) 1.10.4 ====== - Total issues resolved: **0** - Total pull requests resolved: **8** - Total contributors: **5** - [347: Add support for the new PHP 8 tokens for use statements](doctrine#347) thanks to @stof - [345: Remove calls to TestCase::at()](doctrine#345) thanks to @greg0ire - [343: Allow using PHPUnit 9.3](doctrine#343) thanks to @greg0ire Improvement ----------- - [342: Upgrade phpunit](doctrine#342) thanks to @greg0ire - [332: DocParser: Improve private typehints](doctrine#332) thanks to @jkufner bug --- - [341: Make type in phpdoc resolvable](doctrine#341) thanks to @greg0ire Documentation ------------- - [338: update annotation IDE annotation with current links](doctrine#338) thanks to @Haehnchen Documentation,Improvement ------------------------- - [337: Replace "blacklist" terminology with "ignore"](doctrine#337) thanks to @albe # gpg: Signature made Tue Aug 11 20:55:32 2020 # gpg: using DSA key 1BEDEE0A820BC30D858F9F0C2C3A645671828132 # gpg: Can't check signature: No public key # Conflicts: # composer.json # lib/Doctrine/Common/Annotations/Annotation/Attributes.php # lib/Doctrine/Common/Annotations/DocParser.php # tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php # tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php # tests/Doctrine/Tests/Common/Annotations/DocParserTest.php # tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php # tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php # tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #339
Replaces #344
This PR achieves the same goal than #344 but without forking the whole method. This is done by first refactoring the existing code to differentiate between
T_STRINGandT_NS_SEPARATORas they actually have different needs (T_NS_SEPARATORwon't appear in a explicit alias for instance) and then adding the support for the new PHP 8 tokens in this cleaned code.For the second commit, I marked @shyim as a co-author to credit them for the good work done in #344 to make the feature work.