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

Fix handling of upper-bound platform req ignores to not act on conflicts #11037

Merged
merged 2 commits into from Sep 13, 2022

Conversation

Seldaek
Copy link
Member

@Seldaek Seldaek commented Aug 30, 2022

fixes #11020

@Seldaek Seldaek added this to the 2.4 milestone Aug 30, 2022
@Seldaek Seldaek requested a review from naderman August 30, 2022 12:49
{
if (!PlatformRepository::isPlatformPackage($req)) {
return $constraint;
}

if (!Preg::isMatch($this->ignoreUpperBoundRegex, $req)) {
if (!Preg::isMatch($this->ignoreUpperBoundRegex, $req) || !$allowUpperBoundOverride) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would swap the OR conditions as checking the boolean variable will be faster than running a regexp

@Seldaek Seldaek merged commit ab29ed5 into composer:2.4 Sep 13, 2022
@Seldaek Seldaek deleted the fix_conflicts branch September 13, 2022 12:50
Seldaek added a commit that referenced this pull request Sep 13, 2022
…cts (#11037)

* Fix handling of upper-bound platform req ignores to not act on conflicts, fixes #11020

* Optimization
emahorvat52 pushed a commit to emahorvat52/composer that referenced this pull request Feb 3, 2023
…cts (composer#11037)

* Fix handling of upper-bound platform req ignores to not act on conflicts, fixes composer#11020

* Optimization
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

3 participants