-
Notifications
You must be signed in to change notification settings - Fork 945
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
[#660] Fixed required Composer version constraint and added a CI job. #662
Conversation
@@ -85,3 +85,26 @@ jobs: | |||
|
|||
- name: Run a single unit test to verify the testing setup | |||
run: ./vendor/bin/phpunit -c ./web/core ./web/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php | |||
|
|||
# Using outdated Composer version to test the Composer version constraint. | |||
test-composer: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no simple way to use existing jobs without adding a lot of if
to every step as this check happens early in the run.
instead, having a standalone (fast) job is easier to maintain.
I called this test-composer
rather than test-composer-fail
etc. in case we want to add more composer-related tests in the future.
But happy to change the name to anything else.
@@ -92,8 +92,8 @@ public static function checkComposerVersion(Event $event) { | |||
if ($version === '@package_version@' || $version === '@package_branch_alias_version@') { | |||
$io->writeError('<warning>You are running a development version of Composer. If you experience problems, please update Composer to the latest stable version.</warning>'); | |||
} | |||
elseif (Comparator::lessThan($version, '1.0.0')) { | |||
$io->writeError('<error>Drupal-project requires Composer version 1.0.0 or higher. Please update your Composer before continuing</error>.'); | |||
elseif (Comparator::lessThan($version, '2.3.6')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice 🤩
#660
stable
Composer channelOnce this is approved - I will create a PR for
11.x