Drupal core upgrade issue

Created on 28 September 2023, 9 months ago
Updated 10 October 2023, 8 months ago

Drupal core upgrade issue

We are trying to update from Drupal 9.5.11 to 10.0.11 but it is failing at this step. Our upgrade status is showing 100% compatible, as we have fixed all D10 issues.

composer require drupal/core-recommended:10.0.11 drupal/core-composer-scaffold:10.0.11 drupal/core-project-message:10.0.11 --update-with-all-dependencies

Problem 1
- drupal/console[1.0.0-alpha1, ..., 1.0.0-beta3] require phpseclib/phpseclib 2.* -> found phpseclib/phpseclib[2.0.0, ..., 2.0.x-dev] but it conflicts with your root composer.json require (^3.0).
- drupal/console[1.0.0-beta4, ..., 1.0.0-beta5] require php ^5.6 || ^7.0 -> your php version (8.1.0; overridden via config.platform, actual: 8.2.0) does not satisfy that requirement.
- drupal/console[1.0.0-rc1, ..., 1.9.4] require php ^5.5.9 || ^7.0 -> your php version (8.1.0; overridden via config.platform, actual: 8.2.0) does not satisfy that requirement.
- symfony/http-foundation[v4.0.0-BETA1, ..., v4.4.8] require php ^7.1.3 -> your php version (8.1.0; overridden via config.platform, actual: 8.2.0) does not satisfy that requirement.
- drupal/console[1.9.5, ..., 1.9.10] require symfony/http-foundation ~3.0|~4.0 -> satisfiable by symfony/http-foundation[v3.0.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.4.x-dev].
- You can only install one version of a package, so only one of these can be installed: symfony/http-foundation[v2.1.0, ..., 2.8.x-dev, v3.0.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.4.x-dev, v5.0.0-BETA1, ..., 5.4.x-dev, v6.0.0-BETA1, ..., 6.4.x-dev, 7.0.x-dev].
- drupal/core-recommended 10.0.11 requires symfony/http-foundation ~v6.2.6 -> satisfiable by symfony/http-foundation[v6.2.6, ..., 6.2.x-dev].
- Root composer.json requires drupal/core-recommended 10.0.11 -> satisfiable by drupal/core-recommended[10.0.11].
- Root composer.json requires drupal/console ~1.0 -> satisfiable by drupal/console[1.0.0-alpha1, ..., 1.9.10].

We have also tried to remove console module but that is also not working for us as it is throwing an error.
Please help us to fix this issue.
Thanks.

💬 Support request
Status

Fixed

Version

10.0

Component
Composer 

Last updated about 24 hours ago

No maintainer
Created by

🇮🇳India sandyjain

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

Comments & Activities

  • Issue created by @sandyjain
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    What happens if you run
    composer remove drupal/console

  • 🇮🇳India sandyjain

    Hi @larowlan,
    Thanks for correcting the issue category.

    When I ran "composer remove drupal/console" it got removed but after that it if I run - "composer require drupal/core-recommended:10.0.11 drupal/core-composer-scaffold:10.0.11 drupal/core-project-message:10.0.11 --update-with-all-dependencies"
    It successfully run but on frontend it is showing this error.

    Warning: class_implements(): Class Drupal\Core\Entity\EntityBundleAccessCheck does not exist and could not be loaded in Drupal\Core\DependencyInjection\Compiler\RegisterAccessChecksPass->process() (line 43 of /code/vendor/drupal/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterAccessChecksPass.php).
    Drupal\Core\DependencyInjection\Compiler\RegisterAccessChecksPass->process(Object) (Line: 73)
    Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object) (Line: 721)
    Symfony\Component\DependencyInjection\ContainerBuilder->compile() (Line: 1318)
    Drupal\Core\DrupalKernel->compileContainer() (Line: 922)
    Drupal\Core\DrupalKernel->initializeContainer() (Line: 20)
    Drupal\Core\Installer\InstallerKernel->initializeContainer() (Line: 482)
    Drupal\Core\DrupalKernel->boot() (Line: 426)
    install_begin_request(Object, Array) (Line: 116)
    install_drupal(Object) (Line: 48)
    Additional uncaught exception thrown while handling exception.
    User warning: Invalid placeholder (severity_level) with string: "%type: @message in %function (line %line of %file).
    @backtrace
    " in Drupal\Component\Render\FormattableMarkup::placeholderFormat() (line 245 of /code/vendor/drupal/core/lib/Drupal/Component/Render/FormattableMarkup.php).
    Drupal\Component\Render\FormattableMarkup::placeholderFormat('%type: @message in %function (line %line of %file). @backtrace', Array) (Line: 99)
    Drupal\Component\Render\FormattableMarkup->__toString() (Line: 198)
    _drupal_exception_handler_additional(Object, Object) (Line: 180)
    _drupal_exception_handler(Object)
    Original
    TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in in_array() (line 43 of /code/vendor/drupal/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterAccessChecksPass.php).

    in_array('Drupal\Core\Access\AccessCheckInterface', , 1) (Line: 43)
    Drupal\Core\DependencyInjection\Compiler\RegisterAccessChecksPass->process(Object) (Line: 73)
    Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object) (Line: 721)
    Symfony\Component\DependencyInjection\ContainerBuilder->compile() (Line: 1318)
    Drupal\Core\DrupalKernel->compileContainer() (Line: 922)
    Drupal\Core\DrupalKernel->initializeContainer() (Line: 20)
    Drupal\Core\Installer\InstallerKernel->initializeContainer() (Line: 482)
    Drupal\Core\DrupalKernel->boot() (Line: 426)
    install_begin_request(Object, Array) (Line: 116)
    install_drupal(Object) (Line: 48)
    User warning: Invalid placeholder (severity_level) with string: "%type: @message in %function (line %line of %file).
    @backtrace
    " in Drupal\Component\Render\FormattableMarkup::placeholderFormat() (line 245 of /code/vendor/drupal/core/lib/Drupal/Component/Render/FormattableMarkup.php).
    Drupal\Component\Render\FormattableMarkup::placeholderFormat('%type: @message in %function (line %line of %file). @backtrace', Array) (Line: 99)
    Drupal\Component\Render\FormattableMarkup->__toString() (Line: 199)
    _drupal_exception_handler_additional(Object, Object) (Line: 180)
    _drupal_exception_handler(Object)
    Additional
    Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "theme.manager". in Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 935 of /code/vendor/symfony/dependency-injection/ContainerBuilder.php).

    Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('theme.manager') (Line: 550)
    Symfony\Component\DependencyInjection\ContainerBuilder->doGet('theme.manager', 1) (Line: 513)
    Symfony\Component\DependencyInjection\ContainerBuilder->get('theme.manager') (Line: 649)
    Drupal::theme() (Line: 22)
    _drupal_maintenance_theme() (Line: 316)
    drupal_maintenance_theme() (Line: 1025)
    install_display_output(Array, Array) (Line: 271)
    _drupal_log_error(Array, 1) (Line: 176)
    _drupal_exception_handler(Object)

  • 🇺🇸United States cilefen

    Consider running "vendor/bin/drush cr".

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Yes and drush updb

  • 🇮🇳India sandyjain

    I have tried these but those are also giving errors-


    vendor/bin/drush cr

    [warning] class_implements(): Class Drupal\Core\Entity\EntityBundleAccessCheck does not exist and could not be loaded RegisterAccessChecksPass.php:43

    Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in C:\xampp\htdocs\wilmington\plc-d9-wilmington\vendor\drupal\core\lib\Drupal\Core\DependencyInjection\Compiler\RegisterAccessChecksPass.php:43

    vendor/bin/drush updb

    Fatal error: Declaration of Drupal\dblog\Logger\DbLog::log($level, $message, array $context = []) must be compatible with Drupal\Core\Logger\RfcLoggerTrait::log($level, Stringable|string $message, array $context = []): void in C:\xampp\htdocs\wilmington\plc-d9-wilmington\web\core\modules\dblog\src\Logger\DbLog.php on line 55
    [warning] Drush command terminated abnormally.

  • Status changed to Postponed: needs info 9 months ago
  • 🇺🇸United States cilefen

    At this time you must show the composer.json file.

  • 🇮🇳India sandyjain

    This is my composer.json

    {
    "name": "pantheon-upstreams/drupal-composer-managed",
    "description": "Install Drupal 9 with Composer on Pantheon.",
    "type": "project",
    "license": "MIT",
    "repositories": [
    {
    "type": "composer",
    "url": "https://packages.drupal.org/8"
    },
    {
    "type": "path",
    "url": "upstream-configuration"
    }
    ],
    "require": {
    "drupal/admin_toolbar": "^3.0",
    "drupal/adminimal_theme": "1.7",
    "drupal/anchor_link": "^2.5",
    "drupal/asset_injector": "^2.8",
    "drupal/block_content_template": "^1.4",
    "drupal/bootstrap4": "3.0.5",
    "drupal/ckeditor_accordion": "2.0",
    "drupal/ckeditor_bs_grid": "^2.0",
    "drupal/ckeditor_div_manager": "2.1",
    "drupal/ckeditor_font": "^1.2",
    "drupal/ckeditor_resize": "^1.6",
    "drupal/ckwordcount": "^2.0",
    "drupal/colorbutton": "^1.3",
    "drupal/config_pages": "^2.9",
    "drupal/core-composer-scaffold": "10.1.4",
    "drupal/core-project-message": "10.1.4",
    "drupal/core-recommended": "10.1.4",
    "drupal/ctools": "^3.7",
    "drupal/draggableviews": "^2.0",
    "drupal/easy_breadcrumb": "^2.0",
    "drupal/entity_reference_revisions": "^1.9",
    "drupal/entity_reference_views_select": "^1.4",
    "drupal/extlink": "^1.6",
    "drupal/fakeobjects": "^1.1",
    "drupal/features": "3.13",
    "drupal/feeds": "^3.0",
    "drupal/feeds_ex": "^1.0",
    "drupal/feeds_tamper": "^2.0",
    "drupal/field_group": "^3.2",
    "drupal/fontawesome": "^2.19",
    "drupal/fontawesome_menu_icons": "2.0",
    "drupal/fontyourface": "4.0",
    "drupal/google_tag": "^1.4",
    "drupal/jquery_ui_accordion": "2.0",
    "drupal/layout_builder_styles": "2.0",
    "drupal/lazy": "3.12",
    "drupal/link_attributes": "^1.11",
    "drupal/masquerade": "^2.0",
    "drupal/media_library_form_element": "^2.0",
    "drupal/media_library_theme_reset": "^1.1",
    "drupal/menu_item_extras": "^2.16",
    "drupal/metatag": "^2.0",
    "drupal/notification": "^1.1",
    "drupal/panelbutton": "^1.4",
    "drupal/paragraphs": "^1.12",
    "drupal/paragraphs_table": "^1.20",
    "drupal/pathauto": "^1.8",
    "drupal/permissions_filter": "1.3",
    "drupal/redirect": "^1.6",
    "drupal/redis": "^1.5",
    "drupal/seeds_toolbar": "^2.0",
    "drupal/shield": "^1.5",
    "drupal/simple_sitemap": "^4.1",
    "drupal/siteimprove": "2.0",
    "drupal/stable": "2.0",
    "drupal/tamper": "^1.0",
    "drupal/token": "^1.12",
    "drupal/twig_tweak": "3.2",
    "drupal/ultimenu": "^2.3",
    "drupal/upgrade_status": "4.0",
    "drupal/video_embed_field": "^2.4",
    "drupal/views_bulk_operations": "^4.1",
    "drupal/views_year_filter": "^2.1",
    "drupal/youtube": "^2.0",
    "drush/drush": "~11.0",
    "kint-php/kint": "^4.1",
    "pantheon-systems/drupal-integrations": "^9 || ^10",
    "pantheon-upstreams/upstream-configuration": "dev-main",
    "phpoffice/phpspreadsheet": "^1.24",
    "phpseclib/phpseclib": "^3.0"
    },
    "conflict": {
    "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "extra": {
    "installer-paths": {
    "web/core": [
    "type:drupal-core"
    ],
    "web/libraries/{$name}": [
    "type:drupal-library"
    ],
    "web/modules/composer/{$name}": [
    "type:drupal-module"
    ],
    "web/profiles/composer/{$name}": [
    "type:drupal-profile"
    ],
    "web/themes/composer/{$name}": [
    "type:drupal-theme"
    ],
    "drush/Commands/contrib/{$name}": [
    "type:drupal-drush"
    ],
    "web/private/scripts/quicksilver/{$name}/": [
    "type:quicksilver-script"
    ]
    },
    "composer-exit-on-patch-failure": true,
    "patchLevel": {
    "drupal/core": "-p2"
    },
    "drupal-scaffold": {
    "allowed-packages": [
    "pantheon-systems/drupal-integrations"
    ],
    "locations": {
    "web-root": "./web"
    },
    "file-mapping": {
    "[project-root]/.editorconfig": false,
    "[project-root]/pantheon.upstream.yml": false,
    "[project-root]/.gitattributes": false,
    "[web-root]/robots.txt": {
    "append": "web/my-robots-additions.txt"
    }
    }
    },
    "patches": {
    "drupal/metatag": {
    "Feeds Integration (8.x)": " https://www.drupal.org/files/issues/2020-09-29/feeds-integration-3011202... ",
    "Metatag Update 8109": "patches/custom/metatag_8109.patch"
    }
    },
    "enable-patching" : true
    },
    "autoload": {
    "classmap": [
    "upstream-configuration/scripts/ComposerScripts.php"
    ]
    },
    "scripts": {
    "pre-update-cmd": [
    "DrupalComposerManaged\\ComposerScripts::preUpdate"
    ],
    "post-update-cmd": [
    "DrupalComposerManaged\\ComposerScripts::postUpdate"
    ]
    },
    "config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "platform": {
    "php": "8.1.0"
    },
    "allow-plugins": {
    "composer/installers": true,
    "cweagans/composer-patches": true,
    "drupal/core-composer-scaffold": true,
    "zaporylie/composer-drupal-optimizations": true,
    "drupal/core-project-message": true,
    "drupal/console-extend-plugin": true,
    "phpstan/extension-installer": true
    }
    }
    }

  • 🇬🇧United Kingdom catch

    EntityBundleAccessCheck was removed in Drupal 10, see https://www.drupal.org/node/3155569 the question then is why is the compiler pass still looking for it.

    Do you have any contrib or custom code specifying _entity_bundles?

  • First commit to issue fork.
  • 🇮🇳India sandyjain

    Hi @catch,

    No there is not a single code that contains this "EntityBundleAccessCheck" in my custom/contrib folder.

    Only these 3 files have -
    \web\core\core.services.yml
    \web\core\tests\Drupal\Tests\Core\Entity\EntityBundleAccessCheckTest.php
    \web\core\lib\Drupal\Core\Entity\EntityBundleAccessCheck.php

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Is that before or after the update?

  • 🇮🇳India sandyjain

    @larowlan,

    It's after the update. But I doubt the core has been updated to D10.

  • 🇬🇧United Kingdom catch

    If you're seeing those after composer has 'successfully' updated your code base to Drupal 10, you should delete the core/ directory and then run the composer commands again, or run composer install. You can check your core version manually by going to core/lib/Drupal.org and looking for the VERSION constant.

  • 🇮🇳India sandyjain

    Hi,

    "composer install" successfully runs but the core folder is not generated. Although, earlier core/lib/Drupal.php was showing const VERSION = '9.5.11'

  • 🇺🇸United States cilefen

    Let’s start by seeing composer.json as it is on the site with Drupal 9. The one above was already modified. What is the Composer version?

  • 🇮🇳India sandyjain

    Hi,

    This is what my composer looks like with working D9 (without any error). And upgrade status is 100% compatible
    ------------------

    {
    "name": "pantheon-upstreams/drupal-composer-managed",
    "description": "Install Drupal 9 with Composer on Pantheon.",
    "type": "project",
    "license": "MIT",
    "repositories": [
    {
    "type": "composer",
    "url": "https://packages.drupal.org/8"
    },
    {
    "type": "path",
    "url": "upstream-configuration"
    }
    ],
    "require": {
    "drupal/admin_toolbar": "^3.0",
    "drupal/adminimal_theme": "1.7",
    "drupal/anchor_link": "^2.5",
    "drupal/asset_injector": "^2.8",
    "drupal/block_content_template": "^1.4",
    "drupal/bootstrap4": "3.0.5",
    "drupal/ckeditor_accordion": "2.0",
    "drupal/ckeditor_bs_grid": "^2.0",
    "drupal/ckeditor_div_manager": "2.1",
    "drupal/ckeditor_font": "^1.2",
    "drupal/ckeditor_resize": "^1.6",
    "drupal/ckwordcount": "^2.0",
    "drupal/colorbutton": "^1.3",
    "drupal/config_pages": "^2.9",
    "drupal/core-composer-scaffold": "9.5.11",
    "drupal/core-project-message": "9.5.11",
    "drupal/core-recommended": "9.5.11",
    "drupal/ctools": "^3.7",
    "drupal/draggableviews": "^2.0",
    "drupal/easy_breadcrumb": "^2.0",
    "drupal/entity_reference_revisions": "^1.9",
    "drupal/entity_reference_views_select": "^1.4",
    "drupal/extlink": "^1.6",
    "drupal/fakeobjects": "^1.1",
    "drupal/features": "3.13",
    "drupal/feeds": "^3.0",
    "drupal/feeds_ex": "^1.0",
    "drupal/feeds_tamper": "^2.0",
    "drupal/field_group": "^3.2",
    "drupal/fontawesome": "^2.19",
    "drupal/fontawesome_menu_icons": "2.0",
    "drupal/fontyourface": "4.0",
    "drupal/google_tag": "^1.4",
    "drupal/jquery_ui_accordion": "2.0",
    "drupal/layout_builder_styles": "2.0",
    "drupal/lazy": "3.12",
    "drupal/link_attributes": "^1.11",
    "drupal/masquerade": "^2.0",
    "drupal/media_library_form_element": "^2.0",
    "drupal/media_library_theme_reset": "^1.1",
    "drupal/menu_item_extras": "^2.16",
    "drupal/metatag": "^2.0",
    "drupal/notification": "^1.1",
    "drupal/panelbutton": "^1.4",
    "drupal/paragraphs": "^1.12",
    "drupal/paragraphs_table": "^1.20",
    "drupal/pathauto": "^1.8",
    "drupal/permissions_filter": "1.3",
    "drupal/redirect": "^1.6",
    "drupal/redis": "^1.5",
    "drupal/seeds_toolbar": "^2.0",
    "drupal/shield": "^1.5",
    "drupal/simple_sitemap": "^4.1",
    "drupal/siteimprove": "2.0",
    "drupal/stable": "2.0",
    "drupal/tamper": "^1.0",
    "drupal/token": "^1.12",
    "drupal/twig_tweak": "3.2",
    "drupal/ultimenu": "^2.3",
    "drupal/upgrade_status": "4.0",
    "drupal/video_embed_field": "^2.4",
    "drupal/views_bulk_operations": "^4.1",
    "drupal/views_year_filter": "^2.1",
    "drupal/youtube": "^2.0",
    "drush/drush": "~11.0",
    "kint-php/kint": "^4.1",
    "pantheon-systems/drupal-integrations": "^9 || ^10",
    "pantheon-upstreams/upstream-configuration": "dev-main",
    "phpoffice/phpspreadsheet": "^1.24",
    "phpseclib/phpseclib": "^3.0"
    },
    "conflict": {
    "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "extra": {
    "installer-paths": {
    "web/core": [
    "type:drupal-core"
    ],
    "web/libraries/{$name}": [
    "type:drupal-library"
    ],
    "web/modules/composer/{$name}": [
    "type:drupal-module"
    ],
    "web/profiles/composer/{$name}": [
    "type:drupal-profile"
    ],
    "web/themes/composer/{$name}": [
    "type:drupal-theme"
    ],
    "drush/Commands/contrib/{$name}": [
    "type:drupal-drush"
    ],
    "web/private/scripts/quicksilver/{$name}/": [
    "type:quicksilver-script"
    ]
    },
    "composer-exit-on-patch-failure": true,
    "patchLevel": {
    "drupal/core": "-p2"
    },
    "drupal-scaffold": {
    "allowed-packages": [
    "pantheon-systems/drupal-integrations"
    ],
    "locations": {
    "web-root": "./web"
    },
    "file-mapping": {
    "[project-root]/.editorconfig": false,
    "[project-root]/pantheon.upstream.yml": false,
    "[project-root]/.gitattributes": false,
    "[web-root]/robots.txt": {
    "append": "web/my-robots-additions.txt"
    }
    }
    },
    "patches": {
    "drupal/metatag": {
    "Feeds Integration (8.x)": " https://www.drupal.org/files/issues/2020-09-29/feeds-integration-3011202... ",
    "Metatag Update 8109": "patches/custom/metatag_8109.patch"
    }
    },
    "enable-patching" : true
    },
    "autoload": {
    "classmap": [
    "upstream-configuration/scripts/ComposerScripts.php"
    ]
    },
    "scripts": {
    "pre-update-cmd": [
    "DrupalComposerManaged\\ComposerScripts::preUpdate"
    ],
    "post-update-cmd": [
    "DrupalComposerManaged\\ComposerScripts::postUpdate"
    ]
    },
    "config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "platform": {
    "php": "8.1.0"
    },
    "allow-plugins": {
    "composer/installers": true,
    "cweagans/composer-patches": true,
    "drupal/core-composer-scaffold": true,
    "zaporylie/composer-drupal-optimizations": true,
    "drupal/core-project-message": true,
    "drupal/console-extend-plugin": true
    }
    }
    }
    ------------------------

    composer -V
    Composer version 2.6.2 2023-09-03 14:09:15

  • 🇿🇦South Africa 369king

    Having the same issue its been two days nw :(

  • 🇺🇸United States cilefen

    This almost seems like those cases a few years ago where people said "N" to enabling Composer plugins and ended up with multiple core installs, one of which is in the vendor directory. Yet ^ that composer.json shows all plugins enabled.

    But as a matter of fact, this may be your problem. Why isn't composer/installers a requirement in that file?

  • 🇮🇳India sandyjain

    Hi @cilefen,

    I missed updating here, but it is now fixed because of "composer/installers", It got removed withthe composer update command but then I manually added this and it worked for me.
    Thank you for your help. Much appreciated.

  • Status changed to Fixed 8 months ago
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Thanks, updating status

  • 🇿🇦South Africa 369king

    Thanks for the update guys, i did run the composer/installers and it installed but i get this error: Parse error: syntax error, unexpected fully qualified name "\Drupal\Core\Extension\Extensi...", expecting "(" docroot/core/includes/bootstrap.inc on line 247

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    You need at least PHP 8.1, what version are you running

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

Production build 0.69.0 2024