Skip to content

Commit

Permalink
Issue #3239420: Use composer-merge-plugin to manage project composer.…
Browse files Browse the repository at this point in the history
…json dependencies

This enables more of the dependencies and configuration that need to be
present in the root project composer.json to be managed in the farmOS
repository itself, including drupal/core-composer-scaffold and
drupal/core-dev, which should match the drupal/core version defined in
the farmOS composer.json.

Previously these were declared in the project composer.json template
in https://github.com/farmOS/composer-project. This configuraton is
used as a template when a new farmOS project is created via
`composer create-project farmos/project`, but after initial setup it
is maintained by the end user. This means that updates to the project
composer.json generally requires the end-user to make changes
manually. This would be required every time farmOS requires a minor
version update of Drupal core.

So instead, we can manage those update in this new composer.project.json,
and use wikimedia/composer-merge-plugin to merge that into the project
composer.json. This allows the project composer.json to be much simpler,
and therefore will require less frequent manual updates.
  • Loading branch information
mstenta committed Sep 28, 2021
1 parent 092b693 commit bd33d0f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions composer.project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"require": {
"cweagans/composer-patches": "^1.7",
"drupal/core-composer-scaffold": "~9.2.0"
},
"require-dev": {
"brianium/paratest": "^4",
"drupal/core-dev": "~9.2.0",
"phpspec/prophecy-phpunit": "^2"
},
"_comments": {
"phpspec/prophecy-phpunit": "Required to fix ProphecyTrait not found, until Drupal core drops support for PHPUnit 8. See https://www.drupal.org/node/3176567"
},
"conflict": {
"drupal/drupal": "*"
},
"extra": {
"composer-exit-on-patch-failure": true,
"drupal-scaffold": {
"locations": {
"web-root": "web/"
}
},
"enable-patching": true,
"patches": {
"drupal/core": {
"Issue #3192365: Race Condition in 'public://simpletest' mkdir Call": "https://www.drupal.org/files/issues/2021-01-12/3192365-3.patch"
}
}
}
}

0 comments on commit bd33d0f

Please sign in to comment.