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

Generate docblocks: Class not imported if nested #2009

Closed
dantleech opened this issue Dec 31, 2022 · 1 comment
Closed

Generate docblocks: Class not imported if nested #2009

dantleech opened this issue Dec 31, 2022 · 1 comment

Comments

@dantleech
Copy link
Collaborator

dantleech commented Dec 31, 2022

Currently there is a bit of a mess when we do:

foreach ($type->classLikeTypes() as $type) {
    $builder->use($type->__toString());
}

as it does not include nested types, e.g. Iterator<int, Foobar>, Foobar will not be included in the set of "class like types".

It is not exactly clear what classLikeTypes means -- it is currently used in completion (e.g. all types that can be completed in a union or interesction type) and in the above case, but clearly they are different things.

@dantleech
Copy link
Collaborator Author

Fixed

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

No branches or pull requests

1 participant