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: Adjust COMPOSER_ROOT_VERSION and branch alias #1040

Merged

Conversation

localheinz
Copy link
Contributor

This pull request

  • removes the declaration of the COMPOSER_ROOT_VERSION environment variable

Related to #1038.

@localheinz
Copy link
Contributor Author

Hmm.

@localheinz localheinz closed this Jul 3, 2024
@localheinz localheinz deleted the fix/composer-root-version branch July 3, 2024 17:12
@localheinz localheinz restored the fix/composer-root-version branch July 16, 2024 20:46
@localheinz localheinz reopened this Jul 16, 2024
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.93%. Comparing base (9ed46b6) to head (08ec02a).
Report is 5 commits behind head on 9.2.

Additional details and impacted files
@@             Coverage Diff              @@
##                9.2    #1040      +/-   ##
============================================
- Coverage     83.95%   83.93%   -0.03%     
  Complexity     1197     1197              
============================================
  Files            61       59       -2     
  Lines          4276     4264      -12     
============================================
- Hits           3590     3579      -11     
+ Misses          686      685       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@localheinz localheinz changed the title Fix: Remove declaration of COMPOSER_ROOT_VERSION environment variable @Fix: Adjust COMPOSER_ROOT_VERSION and branch alias Jul 16, 2024
@localheinz localheinz changed the title @Fix: Adjust COMPOSER_ROOT_VERSION and branch alias Fix: Adjust COMPOSER_ROOT_VERSION and branch alias Jul 16, 2024
@localheinz
Copy link
Contributor Author

@sebastianbergmann

Running

<?php

declare(strict_types=1);

use Composer\Semver;

require_once  __DIR__ . '/../vendor/autoload.php';

$versions = [
    '9.2-dev',
    '9.2.x-dev',
    '9.3-dev',
    '9.3.x-dev',
];

$constraint = '^9.2.13';

var_dump(array_combine(
    $versions,
    array_map(static function (string $version) use ($constraint): string {
        return sprintf(
            '%s %s',
            Semver\Semver::satisfies($version, $constraint) ? 'satisfies' : 'does not satisfy',
            $constraint
        );
    }, $versions)
));

yields

array(4) {
  ["9.2-dev"]=>
  string(24) "does not satisfy ^9.2.13"
  ["9.2.x-dev"]=>
  string(17) "satisfies ^9.2.13"
  ["9.3-dev"]=>
  string(17) "satisfies ^9.2.13"
  ["9.3.x-dev"]=>
  string(17) "satisfies ^9.2.13"
}

Does that make sense?

@sebastianbergmann
Copy link
Owner

Does that make sense?

No, but it seems to fix the build :-) Thanks!

@sebastianbergmann sebastianbergmann merged commit 48eb304 into sebastianbergmann:9.2 Jul 17, 2024
35 of 36 checks passed
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