minor: Parse all phpdoc types using full grammar#7010
Merged
kubawerlos merged 28 commits intoPHP-CS-Fixer:masterfrom Jun 24, 2023
Merged
minor: Parse all phpdoc types using full grammar#7010kubawerlos merged 28 commits intoPHP-CS-Fixer:masterfrom
kubawerlos merged 28 commits intoPHP-CS-Fixer:masterfrom
Conversation
3ee1d28 to
c7210b6
Compare
c7210b6 to
6eb8b44
Compare
mvorisek
commented
May 30, 2023
| } | ||
|
|
||
| Preg::matchAll('/@dataProvider\s+([a-zA-Z0-9._:-\\\\x7f-\xff]+)/', $tokens[$docCommentIndex]->getContent(), $matches); | ||
| Preg::matchAll('/@dataProvider\h+(('.self::REGEX_CLASS.'::)?'.TypeExpression::REGEX_IDENTIFIER.')/', $tokens[$docCommentIndex]->getContent(), $matches); |
Contributor
Author
There was a problem hiding this comment.
47de727 to
859ef21
Compare
mvorisek
commented
May 30, 2023
871a1d3 to
5e5156c
Compare
mvorisek
commented
May 30, 2023
| * @param array<int, FooInterface>|string $c | ||
| * @param Foo|Bar $b | ||
| * @param array<[int, int]> $d | ||
| * @param array<array{int, int}> $d |
Contributor
Author
There was a problem hiding this comment.
syntax was not valid - https://phpstan.org/r/ce7311f8-3255-4d7d-bb37-a059cbdd3e16
87c5dc5 to
258507e
Compare
712198e to
df656f9
Compare
6fc3bb9 to
31cb5bb
Compare
5bb87fc to
7bc07c3
Compare
Contributor
Author
|
@Wirone can you please review this PR? |
Member
|
@mvorisek I know you're waiting for it and it's important, but it requires more focus and I did not have moment to review it properly. I've just recently been doing mostly basic stuff not requiring much thinking 🙂. Will try to give it a shot soon. |
Wirone
requested changes
Jun 19, 2023
Member
Wirone
left a comment
There was a problem hiding this comment.
Whoa, this is really good work, I like it a lot! Left few small comments, though 🙂.
Wirone
approved these changes
Jun 22, 2023
4dacc78 to
5cfbe8e
Compare
kubawerlos
approved these changes
Jun 24, 2023
Member
|
Thank you @mvorisek 👍🏼 |
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
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.
Phpdoc must be always parsed using full grammar otherwise regexes like in
src/Fixer/Phpdoc/PhpdocVarWithoutNameFixer.phporiginally cannot be always correct, as variables can be for example part of conditional type or$this.fix #6984