For a variety of reasons, known and unknown, in order to upgrade between major versions of drupal (and potentially minor versions), for users that are starting with 8.8.x or 8.9.x, and using the drupal/recommended-project template, they must upgrade *both* the drupal/core-recommended *and* the drupal/dev-dependencies, and for consistencies sake, should probably
also update core-vendor-hardening and drupal/core-composer-scaffold.

The following command is something that will work, but is somewhat unwieldy:

composer require drupal/core-recommended:^9 drupal/dev-dependencies:^9 drupal/core-vendor-hardening drupal/core-composer-scaffold --update-with-dependencies

The ideal command would be:

composer require drupal/core* --update-with-dependences

In order to do this, we should rename both drupal/dev-dependencies and drupal/pinned-dev-dependencies to start with core
(drupal/core-dev and drupal/core-dev-pinned) dropping the term "dependencies" to keep the packagenames manageable and eliminate redundancy.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mixologic created an issue. See original summary.

Mixologic’s picture

Mixologic’s picture

Status: Active » Needs review
opdavies’s picture

Status: Needs review » Reviewed & tested by the community

I was speaking with Ryan about this earlier today, and I'd like to get more involved with the Composer initiative.

Reviewing and RTBC-ing this patch seems like a good first step. :)

One thing to note reading the issue description, the --with-all-dependencies option is not present, at least for me running Composer 1.9.0 (though it's the current stable release). I assume Ryan means the --update-with-all-dependencies option.

greg.1.anderson’s picture

Status: Reviewed & tested by the community » Needs work

The issue summary says we are going to rename to drupal/core-dev-pinned, but the patch uses drupal/core-pinned-dev.

I think that the version in the issue summary is better. If you had a script that wanted to update the dependencies, but wasn't sure if the target used pinned or non-pinned dependencies, it could use drupal/core-dev*. I minor point, but *-on-the-end is clearer.

opdavies’s picture

Status: Needs work » Needs review
FileSize
7.97 KB
3.56 KB

Attached is a new patch, and an interdiff compared to #2, using drupal/core-dev*.

greg.1.anderson’s picture

Thanks for the updated patch, @opdavies. Looks good to me. A patch for Drupal 9 would be useful as well.

greg.1.anderson’s picture

Mixologic’s picture

Title: Rename drupal/dev-dependencies and drupal/ » Rename drupal/dev-dependencies and drupal/pinned-dev-dependencies

title fix

greg.1.anderson’s picture

Status: Needs review » Reviewed & tested by the community

@mixologic and I agree this is ready for core committer review.

greg.1.anderson’s picture

Just noticed I accidentally ran the 9.0.x patch against 8.9.x. Queuing up another test.

jibran’s picture

How would this work for existing projects using these packages already?

greg.1.anderson’s picture

How would this work for existing projects using these packages already?

Drupal 8.8.0 is alpha; we do not guarantee compatibility. Existing projects will simply need to rename these packages in their root-level composer.json. We can provide a change record for early adopters.

greg.1.anderson’s picture

Speaking of which, this must go in 8.8.x, or not be committed at all. It wouldn't be good to have differently-named packages for the different versions of Drupal. The 8.9.x patch applies to 8.8.x.

We'll also have to rename the legacy package names (for Drupal 8.7.x and earlier).

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. I discussed this with @catch and we agreed that this needs to go in 8.8.x
  2. // included from subprojects. Use 'drupal/core-dev-dependencies' to get
    

    in composer/Generator/Builder/DrupalCoreRecommendedBuilder.php needs an update (I think)

  3. +++ b/composer/Metapackage/README.txt
    @@ -15,20 +15,20 @@ Drupal Core provides three metapackages that serve different purposes.
    - - drupal/dev-dependencies: This project provides the same version constraints
    + - 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
    + - 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.
    

    These comments need re-flowing so we make the best use of the 80 chars

  4. +++ b/composer/Metapackage/README.txt
    @@ -39,7 +39,7 @@ updated.
    +drupal/core-dev and the project (subtree split) drupal/core, as
     used in the drupal/recommended-project is shown below:
    

    Re-flow...

jibran’s picture

We'll also have to rename the legacy package names (for Drupal 8.7.x and earlier).

It is fine for 8.8.x but I'm concerned about 8.7.x and before.

greg.1.anderson’s picture

The 8.7.x components provided for use with the Drupal 8.8.x scaffold tool are also alpha. Folks will just have to rename one package.

Mixologic’s picture

2, 3, 4 all addressed.

This patch applies cleanly to 8.8/8.9/9.0.x

alexpott’s picture

+++ b/composer/Generator/Builder/DrupalCoreRecommendedBuilder.php
@@ -33,7 +33,7 @@ public function getPackage() {
-    // included from subprojects. Use 'drupal/core-dev-dependencies' to get
+    // included from subprojects. Use 'drupal/core-dev' to get
     // Drupal's dev dependencies.

Needs re-flowing :)

Mixologic’s picture

Mixologic’s picture

Status: Needs review » Reviewed & tested by the community

We concur solidly that all text is now reflowed.

alexpott’s picture

Version: 8.9.x-dev » 8.8.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 7d71991c2d to 9.0.x and 54c8aae944 to 8.9.x and 7d073337c6 to 8.8.x. Thanks!

Backported to 8.8.x after discussing with @catch

  • alexpott committed 7d71991 on 9.0.x
    Issue #3090684 by Mixologic, greg.1.anderson, opdavies, alexpott: Rename...

  • alexpott committed 54c8aae on 8.9.x
    Issue #3090684 by Mixologic, greg.1.anderson, opdavies, alexpott: Rename...

  • alexpott committed 7d07333 on 8.8.x
    Issue #3090684 by Mixologic, greg.1.anderson, opdavies, alexpott: Rename...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

ressa’s picture