Problem/Motivation
As shown in #3392616: Update to Symfony 6.4 \Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest::testMinimumStabilityStrictness struggles with the dev release versions returned by composer info.
Those version strings are ending in the first seven digits of the commit ID, and are passed as-is to \Composer\Semver\VersionParser::parseStability where they fall-through and are marked as 'stable'
Steps to reproduce
The fail shows in #3392616: Update to Symfony 6.4 (where we use a lot of dev-versions of Symfony 6.4) with a friendly
1) Drupal\BuildTests\Composer\Template\ComposerProjectTemplatesTest::testMinimumStabilityStrictness
Failed asserting that an array contains 'dev'.
/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55
/var/www/html/core/tests/Drupal/BuildTests/Composer/Template/ComposerProjectTemplatesTest.php:136
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:144
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:97
Proposed resolution
Strip the first seven digits of the commit ID, when present.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|
Issue fork drupal-3392814
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
spokjeSo the fail shows in #3392616: Update to Symfony 6.4 , if we apply the fix to that we get the attached patch, which should have 4 failures instead of the 5 it has in https://www.drupal.org/pift-ci-job/2781978
Comment #3
spokjeMeh, let's try uploading the correct patch this time...
Comment #4
spokjeOk, I could have named the patch a bit better, but at least the failure from the IS is gone.
The actual fix is in the MR.
Comment #5
spokjeComment #7
smustgrave commentedWasn't entirely too sure how to test. The comment made it very clear. #3 did resolve the issue in the IS.
Comment #8
longwaveSome little style nits but this looks good to me and will help with these upgrades now and in the future.
Comment #9
spokjeThanks @longwave, back to NR.
Comment #10
smustgrave commentedFeedback item has been addressed.
Comment #11
longwaveCommitted fcb8618 and pushed to 11.x. Thanks!
Don't think this is worth backporting given we will only need -dev releases in 11.x/10.3.x from here onwards that I can see.