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_types_order bug with intersection types and generic annotations #5885

Closed
AlexandruGG opened this issue Aug 20, 2021 · 3 comments
Closed
Labels

Comments

@AlexandruGG
Copy link

AlexandruGG commented Aug 20, 2021

Bug report

3.0.1 (or 3.0.2) seems to have introduced a bug with phpdoc_types_order.
I found a related issue #5798 which was closed as solved.
I think this is a slightly different issue but still related.

Code snippet that reproduces the problem

Initial code:

/**
 * @var Collection<int, AbstractInvoice> & Selectable<int, AbstractInvoice>
 */
private Collection $invoices;

Changed code:

/**
 * @var Collection<int, <|AbstractInvoice> & Selectable|int, AbstractInvoice>
 */
private Collection $invoices;

Current workaround I'm using:

/**
 * @var (Collection<int, AbstractInvoice>) & (Selectable<int, AbstractInvoice>)
 */
private Collection $invoices;
@andyexeter
Copy link

I believe this has been fixed in #6063

@SpacePossum
Copy link
Contributor

Thanks for the headsup, this seems fixed indeed in v3.6.0, let me know if not and I'll reopen 👍

@AlexandruGG
Copy link
Author

I'm not able to test this at the moment but thank you very much if it's been fixed! 💯

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

3 participants