Skip to content

Conversation

AlexSkrypnyk
Copy link
Collaborator

@AlexSkrypnyk AlexSkrypnyk commented May 16, 2024

#660

  • A job was added to CI to check for negative test
__660__Fixed_required_Composer_version_constraint_and_added_a_CI_job__·_drupal-composer_drupal-project_cb50f44
  • Positive tests are all our existing CI jobs that are using stable Composer channel

Once this is approved - I will create a PR for 11.x

@AlexSkrypnyk AlexSkrypnyk marked this pull request as draft May 16, 2024 22:45
@AlexSkrypnyk AlexSkrypnyk marked this pull request as ready for review May 16, 2024 22:47
@AlexSkrypnyk AlexSkrypnyk requested review from normanlolx and webflo May 16, 2024 22:48
@AlexSkrypnyk AlexSkrypnyk self-assigned this May 16, 2024
@AlexSkrypnyk AlexSkrypnyk added D10 PR: Needs review Pull request needs a review from assigned developers labels May 16, 2024
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:
Copy link
Collaborator Author

@AlexSkrypnyk AlexSkrypnyk May 16, 2024

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.

}
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')) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

@normanlolx normanlolx left a comment

Choose a reason for hiding this comment

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

Very nice 🤩

@AlexSkrypnyk AlexSkrypnyk merged commit 0404d8a into 10.x May 17, 2024
@AlexSkrypnyk AlexSkrypnyk deleted the feature/660-fix-version-requirements branch August 14, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

D10 PR: Needs review Pull request needs a review from assigned developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants