8000 Whitelist packages with names matching those specified before generating rules by naderman · Pull Request #2733 · composer/composer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Whitelist packages with names matching those specified before generating rules #2733

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? 8000 Sign in to your account

Merged
merged 4 commits into from
Feb 21, 2014

Conversation

naderman
Copy link
Member

Addresses #2690 but doesn't do any performance optimizations yet which we
could do now

…ing rules

Addresses composer#2690 doesn't do any performance optimisations yet which we
could do now
8000
@@ -46,7 +46,7 @@ public function remove($packageName, LinkConstraintInterface $constraint = null)
protected function addJob($packageName, $cmd, LinkConstraintInterface $constraint = null)
{
$packageName = strtolower($packageName);
$packages = $this->pool->whatProvides($packageName, $constraint);
$packages = $this->pool->whatProvides($packageName, $constraint, true);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may have to be a false, but it should be evaluated after the whitelist is generated I think. As it is, if you request the installation of symfony/process, it wouldn't be resolvable by installing symfony/symfony anymore - do we not have a test for that case?

@naderman
Copy link
Member Author

Working on another test, this doesn't seem to work quite right yet.

@naderman
Copy link
Member Author

Added tests for the changes in this PR and it seems to be working now.

naderman added a commit that referenced this pull request Feb 21, 2014
Whitelist packages with names matching those specified before generating rules
@naderman naderman merged commit 33e872d into composer:master Feb 21, 2014
{
if (isset($this->providerCache[$name][(string) $constraint])) {
return $this->providerCache[$name][(string) $constraint];
$key = ((string) (int) $mustMatchName).((string) $constraint);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to cast to string explicitly. the concatenation operator already does it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in eb5c785

filbertkm pushed a commit to wmde/WikidataBuilder that referenced this pull request Feb 24, 2014
filbertkm pushed a commit to wmde/puppet-composer that referenced this pull request Feb 24, 2014
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

Successfully merging this pull request may close these issues.

2 participants
0