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

Hide installed packages from suggestions when package is not found #8372

Merged
merged 3 commits into from Jan 14, 2020

Conversation

xy2z
Copy link
Contributor

@xy2z xy2z commented Oct 12, 2019

This solves #8280

@Seldaek
Copy link
Member

Seldaek commented Oct 24, 2019

This is a good improvement for the require command, but for the init command itself, and the use case described in #8280 I don't think this will work as the first package added won't be in the installed repo yet, the names are merely collected in $requires - so I think maybe you should also filter the $matches here

$matches = $this->findPackages($package);
and make sure those already in $requires get filtered out before the array of matches is used further.

I believe this would fix it but you have to try and check, I'm not sure.

@Seldaek Seldaek modified the milestones: 1.9, 1.10 Oct 24, 2019
@xy2z
Copy link
Contributor Author

xy2z commented Oct 24, 2019

I'll look into it 👍

@xy2z
Copy link
Contributor Author

xy2z commented Nov 12, 2019

@Seldaek This should be fixed now

Seldaek added a commit that referenced this pull request Jan 14, 2020
@Seldaek Seldaek merged commit a91c946 into composer:master Jan 14, 2020
@Seldaek
Copy link
Member

Seldaek commented Jan 14, 2020

Thanks, simplified the code a little so it only loops once instead of on every package search (see 669033f), but otherwise patch was pretty good

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

Successfully merging this pull request may close these issues.

None yet

2 participants