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

Improve overlapping version removal #982

Merged

Conversation

fredden
Copy link
Contributor

@fredden fredden commented Oct 5, 2023

This pull request

  • Ensures that specific version numbers already covered by a range are removed (3ecb33b)
  • Prefers caret version range operators over tilde version range operators when removing an overlap (3c5c1a4)
  • Ensures that the order of operands does not impact the end result

Follows #850


Before these changes, ^1.2 || 1.3.4 would not be changed. After these changes this is replaced with ^1.2.

Before these changes, ^1.2.0 || ~1.2.0 would be replaced with ~1.2.0, which is incorrect. After these changes, both ^1.2.0 || ~1.2.0 and ~1.2.0 || ^1.2.0 are replaced with ^1.2.0

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #982 (1e1f011) into main (8130f9b) will increase coverage by 0.15%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main     #982      +/-   ##
============================================
+ Coverage     97.52%   97.68%   +0.15%     
- Complexity      166      170       +4     
============================================
  Files            30       30              
  Lines           728      733       +5     
============================================
+ Hits            710      716       +6     
+ Misses           18       17       -1     
Files Coverage Δ
...rc/Vendor/Composer/VersionConstraintNormalizer.php 98.77% <100.00%> (+0.67%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@fredden fredden force-pushed the composer/overlapping-specific-version branch from 3c5c1a4 to 1e1f011 Compare October 5, 2023 09:21
@localheinz localheinz self-assigned this Oct 10, 2023
@localheinz localheinz force-pushed the composer/overlapping-specific-version branch from 1e1f011 to a850609 Compare October 10, 2023 13:58
@localheinz localheinz merged commit 930c60c into ergebnis:main Oct 10, 2023
13 checks passed
@localheinz
Copy link
Member

Thank you, @fredden!

@fredden fredden deleted the composer/overlapping-specific-version branch October 10, 2023 14:02
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.

2 participants