DDev -upgrade from D9>D10 problem

Created on 12 January 2024, 12 months ago
Updated 14 January 2024, 11 months ago

Problem/Motivation

Updated with D9.5 site with all reqiurements using Upgrade Status - 100% completed
Followed the instructions to upgrade on https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-...
nginx/1.24.0
php:8.1.26

finally start ddev composer update --dry-run and got error:

  Problem 1
    - zendframework/zend-feed[dev-master, dev-develop, 2.11.0, ..., 2.13.x-dev] require php ^5.6 || ^7.0 -> your php version (8.1.26) does not satisfy that requirement.
    - laminas/laminas-feed[2.12.0, ..., 2.12.x-dev] require php ^5.6 || ^7.0 -> your php version (8.1.26) does not satisfy that requirement.
    - symfony/psr-http-message-bridge[v1.1.0, ..., 1.1.x-dev] require php ^5.3.3 || ^7.0 -> your php version (8.1.26) does not satisfy that requirement.
    - symfony-cmf/routing[1.4.0-RC1, ..., 1.4.x-dev] require php ^5.3.9|^7.0 -> your php version (8.1.26) does not satisfy that requirement.
    - symfony/psr-http-message-bridge[v1.2.0, ..., v1.3.0] require php ^7.1 -> your php version (8.1.26) does not satisfy that requirement.
    - laminas/laminas-feed[2.13.0, ..., 2.14.x-dev] require php ^7.3 || ~8.0.0 -> your php version (8.1.26) does not satisfy that requirement.
    - drupal/core[8.9.11, ..., 8.9.x-dev] require php ^7.0.8 -> your php version (8.1.26) does not satisfy that requirement.
    - drupal/core[9.0.10, ..., 9.0.x-dev] require php ^7.3 -> your php version (8.1.26) does not satisfy that requirement.
    - Root composer.json requires drupal/components ^2.4 -> satisfiable by drupal/components[2.4.0, 2.x-dev].
    - drupal/core-recommended 10.0.0-alpha3 requires drupal/core 10.0.0-alpha3 -> satisfiable by drupal/core[10.0.0-alpha3].
    - Conclusion: don't install drupal/core 10.0.0-alpha3 (conflict analysis result)...

Thx for any advice.

💬 Support request
Status

Closed: works as designed

Version

9.5

Component
Composer 

Last updated 4 days ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @zkristof
  • Status changed to Postponed: needs info 12 months ago
  • Remove drush/drush and try again. I think that's been a common problem. This issue doesn't look much different from any of these others I am linking. In future, please search a little more.

    Also, it is very helpful to share the original composer.json file when asking for Composer support.

  • Thans Cilefen for info.
    I repeate the upgrade procedure once again. Removed drush before composer iupdate --dry-run.
    I am getting the error:

      Problem 1
        - zendframework/zend-feed[dev-master, dev-develop, 2.11.0, ..., 2.13.x-dev] require php ^5.6 || ^7.0 -> your php version (8.1.26) does not satisfy that requirement.
        - laminas/laminas-feed[2.12.0, ..., 2.12.x-dev] require php ^5.6 || ^7.0 -> your php version (8.1.26) does not satisfy that requirement.
        - symfony/psr-http-message-bridge[v1.1.0, ..., 1.1.x-dev] require php ^5.3.3 || ^7.0 -> your php version (8.1.26) does not satisfy that requirement.
        - symfony-cmf/routing[1.4.0-RC1, ..., 1.4.x-dev] require php ^5.3.9|^7.0 -> your php version (8.1.26) does not satisfy that requirement.
        - symfony/psr-http-message-bridge[v1.2.0, ..., v1.3.0] require php ^7.1 -> your php version (8.1.26) does not satisfy that requirement.
        - laminas/laminas-feed[2.13.0, ..., 2.14.x-dev] require php ^7.3 || ~8.0.0 -> your php version (8.1.26) does not satisfy that requirement.
        - drupal/core[8.9.11, ..., 8.9.x-dev] require php ^7.0.8 -> your php version (8.1.26) does not satisfy that requirement.
        - drupal/core[9.0.10, ..., 9.0.x-dev] require php ^7.3 -> your php version (8.1.26) does not satisfy that requirement.
        - Root composer.json requires drupal/components ^2.4 -> satisfiable by drupal/components[2.4.0, 2.x-dev].
        - drupal/core-recommended 10.0.0-alpha3 requires drupal/core 10.0.0-alpha3 -> satisfiable by drupal/core[10.0.0-alpha3].
        - Conclusion: don't install drupal/core 10.0.0-alpha3 (conflict analysis result)

    Here is my composer.json file:

    {
        "name": "drupal-composer/drupal-project",
        "description": "Project template for Drupal 8 projects with composer",
        "type": "project",
        "license": "GPL-2.0-or-later",
        "authors": [
            {
                "name": "",
                "role": ""
            }
        ],
        "repositories": [
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
            }
        ],
        "require": {
            "php": ">=7.0.8",
            "cweagans/composer-patches": "^1.7",
            "drupal/components": "^2.4",
            "drupal/core-composer-scaffold": "^10",
            "drupal/core-dev": "^10",
            "drupal/core-project-message": "^10",
            "drupal/core-recommended": "^10",
            "drupal/fontawesome": "^2.15",
            "drupal/honeypot": "^2.0.2",
            "drupal/radix": "^4.10",
            "drupal/smtp": "^1.2",
            "drupal/views_bootstrap": "^4.2",
            "drupal/webform": "^6.0",
            "vlucas/phpdotenv": "^4.0",
            "webflo/drupal-finder": "^1.0.0",
            "zaporylie/composer-drupal-optimizations": "^1.0"
        },
        "conflict": {
            "drupal/drupal": "*"
        },
        "minimum-stability": "dev",
        "prefer-stable": true,
        "config": {
            "sort-packages": true,
            "allow-plugins": {
                "composer/installers": true,
                "dealerdirect/phpcodesniffer-composer-installer": true,
                "drupal/console-extend-plugin": true,
                "cweagans/composer-patches": true,
                "drupal/core-composer-scaffold": true,
                "drupal/core-project-message": true,
                "zaporylie/composer-drupal-optimizations": true
            }
        },
        "autoload": {
            "classmap": [
                "scripts/composer/ScriptHandler.php"
            ],
            "files": ["load.environment.php"]
        },
        "scripts": {
            "pre-install-cmd": [
                "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
            ],
            "pre-update-cmd": [
                "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
            ],
            "post-install-cmd": [
                "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
            ],
            "post-update-cmd": [
                "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
            ]
        },
        "extra": {
            "composer-exit-on-patch-failure": true,
            "patchLevel": {
                "drupal/core": "-p2"
            },
            "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"]
            }
        }
    }
  • Update:
    Removed drupal:components:2.4
    Succesfully created:

    1. composer update dry-run
    2. composer update
    3. composer install

    In my website got error:
    Fatal error: Uncaught Error: Undefined constant Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL in /var/www/html/web/sites/default/settings.php:380 Stack trace: #0 /var/www/html/vendor/drupal/core/lib/Drupal/Core/Site/Settings.php(146): require() #1 /var/www/html/web/core/includes/install.core.inc(335): Drupal\Core\Site\Settings::initialize('/var/www/html/w...', 'sites/default', Object(Composer\Autoload\ClassLoader)) #2 /var/www/html/web/core/includes/install.core.inc(116): install_begin_request(Object(Composer\Autoload\ClassLoader), Array) #3 /var/www/html/web/core/install.php(48): install_drupal(Object(Composer\Autoload\ClassLoader)) #4 {main} thrown in /var/www/html/web/sites/default/settings.php on line 380

  • 🇩🇰Denmark ressa Copenhagen

    I have no idea about the "Undefined constant" error ...

    But I also found Component was the blocker, so I am posting the method, in case it helps anyone else.

    I wonder how Upgrade Status could return 100%, since components 8.x-2.4 only "Works with Drupal: ^8.7.7 || ^9" ...

    Composer returns a huge list of versions and projects in these update errors. I have come to realize that the blocker is usually a module, but spotting the module is like finding a needle in a haystack ...

    Here's a one-liner, which isolates the Composer project names mentioned in the update error. When you exclude the two Drupal core modules, you have the most likely offender, almost like Sherlock Holmes :)

    $ cat update-error.txt | grep -E -o "drupal/[-_\.a-z0-9]+" | sort | uniq
    drupal/components
    drupal/core
    drupal/core-recommended
    

    Like you found out, after removing drupal/components, the installation completes.

  • 🇬🇧United Kingdom longwave UK

    For the constant error in #4 see https://www.drupal.org/node/3195579

  • Status changed to Closed: works as designed 11 months ago
Production build 0.71.5 2024