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

Allow using temporary update constraints on all packages (incl non-root) #10773

Merged
merged 1 commit into from May 27, 2022

Conversation

Seldaek
Copy link
Member

@Seldaek Seldaek commented May 12, 2022

Fixes #10436

@Seldaek Seldaek added this to the 2.4 milestone May 12, 2022
@Seldaek Seldaek force-pushed the temp_constraints branch 2 times, most recently from 99508c1 to e6a537a Compare May 12, 2022 12:35
src/Composer/Command/UpdateCommand.php Outdated Show resolved Hide resolved
if (!$found) {
foreach ($aliasedPackages as $index => $packageOrAlias) {
foreach ($packageAndAliases as $index => $packageOrAlias) {
unset($this->packages[$index]);
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't the unsetting be done separately for each package depending on whether it matches or no ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure.. the package and its aliases are usually connected and have to be all installed or none. So here we keep the whole group if any of the aliased or alias matches the constraint, and if none match the whole thing is removed. I think this is correct.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, indeed

src/Composer/DependencyResolver/Problem.php Show resolved Hide resolved
@Seldaek Seldaek requested a review from naderman May 13, 2022 14:08
@Seldaek Seldaek merged commit 556450b into composer:main May 27, 2022
@Seldaek Seldaek deleted the temp_constraints branch May 27, 2022 12:51
emahorvat52 pushed a commit to emahorvat52/composer that referenced this pull request Feb 3, 2023
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.

Allow update --with for non-root packages
2 participants