Skip to content
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

PHPDoc parsing broken (phpdoc_types_order issue) #5921

Closed
drupol opened this issue Aug 30, 2021 · 10 comments
Closed

PHPDoc parsing broken (phpdoc_types_order issue) #5921

drupol opened this issue Aug 30, 2021 · 10 comments
Labels

Comments

@drupol
Copy link
Contributor

drupol commented Aug 30, 2021

I tried the latest ^3.1.0 on loophp/collection and I get:

-     * @return Closure(Iterator<TKey, T>): Generator<int, array<TKey, T>>
+     * @return Closure(Iterator<TKey, T>): Generator<int, <|array|TKey, T>>
-        /** @var Closure(Iterator<TKey, T>): Generator<int, array<TKey, T>> $pipe */
+        /** @var Closure(Iterator<TKey, T>): Generator<int, <|array|TKey, T>> $pipe */

I guess this is a follow-up of: #5834, #5832, #5798

drupol added a commit to drupol/phpcsfixer-configs-php that referenced this issue Aug 30, 2021
@drupol drupol changed the title PHPDoc parsing broken PHPDoc parsing broken (phpdoc_types_order issue) Aug 30, 2021
drupol added a commit to drupol/phpcsfixer-configs-php that referenced this issue Aug 30, 2021
@drupol
Copy link
Contributor Author

drupol commented Oct 5, 2021

Still the same issue with 3.2.1 :(

@drupol
Copy link
Contributor Author

drupol commented Oct 5, 2021

@keradus or @SpacePossum is there an issue open already for this one?

@SpacePossum
Copy link
Contributor

Thanks for retesting!
I couldn't tell if there is an issue already as I typically don't work on (PHPDoc) fixers that include (a lot) regex'ing

@keradus
Copy link
Member

keradus commented Oct 6, 2021

@drupol , would you mind to raise a fixing PR?

@drupol
Copy link
Contributor Author

drupol commented Oct 6, 2021

I already tried but without success yet. I don't mind having a bit of help on this one.

@ruudk
Copy link
Contributor

ruudk commented Oct 7, 2021

This is a PR that contains a failing test with a similar case: #5919

@drupol
Copy link
Contributor Author

drupol commented Nov 16, 2021

Still the same issue with 3.3.2:

-                 * @var Closure(Iterator<TKey, T>): Generator<TKey, T> $callback
+                 * @var Closure(Iterator<TKey, <|T>): Generator|TKey, T> $callback

@julienfalque
Copy link
Member

@drupol Could you please give #6063 a try and see if it fixes the issue?

@drupol
Copy link
Contributor Author

drupol commented Nov 20, 2021

@drupol Could you please give #6063 a try and see if it fixes the issue?

Works perfectly ! When can we get it merged ? It's been broken since a couple of releases :(

drupol added a commit to drupol/phpcsfixer-configs-php that referenced this issue Nov 30, 2021
SpacePossum added a commit that referenced this issue Jan 20, 2022
…, julienfalque)

This PR was merged into the master branch.

Discussion
----------

PhpdocTypesOrderFixer - Improve nested types support

Fixes #5850, #5921 and replaces #5919. It also improves nested union types support.

Commits
-------

0c76fe5 PhpdocTypesOrderFixer - Improve nested types support
533a934 Add failing test for #5850
@SpacePossum
Copy link
Contributor

fixed in #6063

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants