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 commented Oct 12, 2019

This solves #8280

@Seldaek

This comment has been minimized.

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
@Seldaek Seldaek added the Feature label Oct 24, 2019
@xy2z

This comment has been minimized.

Copy link
Contributor Author

xy2z commented Oct 24, 2019

I'll look into it 👍

@xy2z xy2z force-pushed the xy2z:has-package-name branch from 08980ce to 1a0d5df Nov 12, 2019
@xy2z

This comment has been minimized.

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
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
@Seldaek

This comment has been minimized.

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
Projects
None yet
2 participants
You can’t perform that action at this time.