Commit 7d073337 authored by alexpott's avatar alexpott

Issue #3090684 by Mixologic, greg.1.anderson, opdavies, alexpott: Rename...

Issue #3090684 by Mixologic, greg.1.anderson, opdavies, alexpott: Rename drupal/dev-dependencies and drupal/pinned-dev-dependencies

(cherry picked from commit 7d71991c)
parent 7dee9da3
......@@ -33,8 +33,8 @@ public function getPackage() {
// Copy the 'packages' section from the Composer lock into our 'require'
// section. There is also a 'packages-dev' section, but we do not need
// to pin 'require-dev' versions, as 'require-dev' dependencies are never
// included from subprojects. Use 'drupal/core-dev-dependencies' to get
// Drupal's dev dependencies.
// included from subprojects. Use 'drupal/core-dev' to get Drupal's
// dev dependencies.
foreach ($composerLockData['packages'] as $package) {
// If there is no 'source' record, then this is a path repository
// or something else that we do not want to include.
......
......@@ -3,7 +3,7 @@
namespace Drupal\Composer\Generator\Builder;
/**
* Builder to produce metapackage for drupal/dev-dependencies.
* Builder to produce metapackage for drupal/core-dev.
*/
class DrupalDevDependenciesBuilder extends DrupalPackageBuilder {
......@@ -49,7 +49,7 @@ public function getPackage() {
*/
protected function initialPackageMetadata() {
return [
"name" => "drupal/dev-dependencies",
"name" => "drupal/core-dev",
"type" => "metapackage",
"description" => "require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.",
"license" => "GPL-2.0-or-later",
......
......@@ -3,7 +3,7 @@
namespace Drupal\Composer\Generator\Builder;
/**
* Builder to produce metapackage for drupal/pinned-dev-dependencies.
* Builder to produce metapackage for drupal/core-dev-pinned.
*/
class DrupalPinnedDevDependenciesBuilder extends DrupalPackageBuilder {
......@@ -53,7 +53,7 @@ public function getPackage() {
*/
protected function initialPackageMetadata() {
return [
"name" => "drupal/pinned-dev-dependencies",
"name" => "drupal/core-dev-pinned",
"type" => "metapackage",
"description" => "Pinned require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.",
"license" => "GPL-2.0-or-later",
......
{
"name": "drupal/dev-dependencies",
"name": "drupal/core-dev",
"type": "metapackage",
"description": "require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.",
"license": "GPL-2.0-or-later",
......
{
"name": "drupal/pinned-dev-dependencies",
"name": "drupal/core-dev-pinned",
"type": "metapackage",
"description": "Pinned require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.",
"license": "GPL-2.0-or-later",
......
......@@ -15,20 +15,20 @@ Drupal Core provides three metapackages that serve different purposes.
diagram below. This relationship makes it easier for Composer to update
a Drupal project.
- drupal/dev-dependencies: This project provides the same version constraints
as Drupal uses for testing. It is useful for projects that either wish to
run some of the Drupal tests directly, or for projects that may wish to use
the same components that Drupal does for testing.
- drupal/core-dev: This project provides the same version constraints as Drupal
uses for testing. It is useful for projects that either wish to run some of
the Drupal tests directly, or for projects that may wish to use the same
components that Drupal does for testing.
- drupal/pinned-dev-dependencies: This project should be used INSTEAD OF
drupal/dev-dependencies in instances where a project wishes to pin to the
exact version of each testing dependency used in Drupal. This in general
should not be necessary.
- drupal/core-dev-pinned: This project should be used INSTEAD OF
drupal/core-dev in instances where a project wishes to pin to the exact
version of each testing dependency used in Drupal. This in general should not
be necessary.
Note that a project that uses both drupal/core-recommended and
drupal/pinned-dev-dependencies must update them both at the same time, e.g.:
drupal/core-dev-pinned must update them both at the same time, e.g.:
composer update drupal/core-recommended drupal/pinned-dev-dependencies --with-updates
composer update drupal/core-recommended drupal/core-dev-pinned --with-updates
Composer may have trouble with the update if one of these projects is listed
on the command line without the other. Running composer update without any
......@@ -39,8 +39,8 @@ updated.
## Metapackage Usage in Template Projects
The relationship between the metapackages drupal/core-recommended and
drupal/dev-dependencies and the project (subtree split) drupal/core, as
used in the drupal/recommended-project is shown below:
drupal/core-dev and the project (subtree split) drupal/core, as used in the
drupal/recommended-project is shown below:
+----------------------------+
| drupal/recommended-project |
......@@ -55,7 +55,7 @@ used in the drupal/recommended-project is shown below:
+--"require-dev":
|
| +-------------------------+
+-->| drupal/dev-dependencies |
+-->| drupal/core-dev |
+-------------------------+
If a user does not wish to pin their Drupal project's dependencies to the same
......@@ -63,4 +63,4 @@ versions used in drupal/core, then they should replace drupal/core-recommended
with drupal/core in their "require" section.
If a user does not need the testing dependencies in their Drupal project, then
they may simply remove drupal/dev-dependencies from the "require-dev" section.
they may simply remove drupal/core-dev from the "require-dev" section.
......@@ -16,7 +16,7 @@
"drupal/core-vendor-hardening": "^8.8"
},
"require-dev": {
"drupal/dev-dependencies": "^8.8"
"drupal/core-dev": "^8.8"
},
"conflict": {
"drupal/drupal": "*"
......
......@@ -15,7 +15,7 @@
"drupal/core-composer-scaffold": "^8.8"
},
"require-dev": {
"drupal/dev-dependencies": "^8.8"
"drupal/core-dev": "^8.8"
},
"conflict": {
"drupal/drupal": "*"
......
......@@ -42,7 +42,7 @@ public function builderTestData() {
[
DrupalDevDependenciesBuilder::class,
[
'name' => 'drupal/dev-dependencies',
'name' => 'drupal/core-dev',
'type' => 'metapackage',
'description' => 'require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.',
'license' => 'GPL-2.0-or-later',
......@@ -60,7 +60,7 @@ public function builderTestData() {
[
DrupalPinnedDevDependenciesBuilder::class,
[
'name' => 'drupal/pinned-dev-dependencies',
'name' => 'drupal/core-dev-pinned',
'type' => 'metapackage',
'description' => 'Pinned require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.',
'license' => 'GPL-2.0-or-later',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment