The Needs Review Queue Bot β tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- πΊπΈUnited States mile23 Seattle, WA
The current behavior is that for dev branches, the project templates include drupal/core-dev as a require-dev. For tagged releases, drupal/core-dev is excluded.
Release:
% composer create-project drupal/recommended-project:@stable Creating a "drupal/recommended-project:@stable" project at "./recommended-project" Installing drupal/recommended-project (10.0.2) - Installing drupal/recommended-project (10.0.2): Extracting archive [...] % cd recommended-project % composer show "drupal/core-*" drupal/core-composer-scaffold 10.0.2 A flexible Composer project scaffold b... drupal/core-project-message 10.0.2 Adds a message after Composer installa... drupal/core-recommended 10.0.2 Core and its dependencies with known-c...
Dev:
% composer create-project drupal/recommended-project:@dev Creating a "drupal/recommended-project:@dev" project at "./recommended-project" Installing drupal/recommended-project (10.1.x-dev f2de0da24e4fdae1ae8b81d2f4f3fbd038809017) - Downloading drupal/recommended-project (10.1.x-dev f2de0da) - Installing drupal/recommended-project (10.1.x-dev f2de0da): Extracting archive [...] % cd recommended-project % composer show "drupal/core-*" drupal/core-composer-scaffold 10.1.x-dev 14db477 A flexible Composer projec... drupal/core-dev 10.1.x-dev a6812ad require-dev dependencies f... drupal/core-project-message 10.1.x-dev 59b4475 Adds a message after Compo... drupal/core-recommended 10.1.x-dev 3981ea2 Core and its dependencies ...
So in the meantime we split the difference: Releases don't risk including dev requirements by default, while dev setups include the dev tools.
The question then becomes: Should we exclude the dev tools from the dev project, and it's either +1 for consistency, or -1 for not letting users decide to take fate into their own hands by using @dev without having to type
composer require drupal/core-dev
I think I'm +1 for consistency, where we just never add drupal/core-dev to the project templates, and we tell users to add the package they need. Obviously real actual maintainers might have a different view. :-)
Since we have a CR, setting the issue to target Drupal core 10.1.x.