TransWikia.com

How do I update from 9.0.10 to 9.1.0?

Drupal Answers Asked by user101999 on February 19, 2021

I have tried to update drupal 9.0.10 to 9.1 with composer but I cannot:

composer outdated 'drupal/*' 
 drupal/core             9.0.10 **9.1.0** Drupal is an open source content manage... 
 drupal/core-recommended 9.0.10 **9.1.0** Locked core dependencies; require this ...

I have executed "composer update drupal/core-recommended –with-all-dependencies" and this is the result

loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Generating autoload files

This is my composer.json

{
    "name": "drupal/recommended-project",
    "description": "Project template for Drupal 8 projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^1.9",
        "drupal/bootstrap": "^3.23",
        "drupal/core-composer-scaffold": "^9",
        "drupal/core-project-message": "^9",
        "drupal/core-recommended": "^9",
        "drupal/metatag": "^1.13",
        "drupal/migrate_plus": "^5.1",
        "drupal/migrate_tools": "^4.5|^5",
        "drupal/migrate_upgrade": "^3.2",
        "drupal/pathauto": "^1.8",
        "drupal/redirect": "^1.6",
        "drush/drush": "^10.3"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "sort-packages": true
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "type:drupal-library"
            ],
            "web/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "web/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "web/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "web/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "web/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/8/install",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        }
    }
}

One Answer

With version 9.1.0 (release notes) Drupal Composer templates no longer use minimum-stability dev as in the past this occasionally produced unexpected results, such as upgrading to newer unstable releases. This is what's currently happening to you.

Raised minimum stability will not affect existing projects; this has to be done manually. For production websites stable is recommended.

So in you composer.json replace "minimum-stability": "dev" with "minimum-stability": "stable" and then simply require core again: composer require drupal/core-recommended. This will give you the latest stable release.

From then on for updating core simply run composer update drupal/core 'drupal/core-*' --with-all-dependencies as recommended under Updating Drupal core via Composer.

Answered by leymannx on February 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP