Pantheon Builds fail with incorrect signature for MemoryBackend::_construct()

Created on 2 April 2025, about 1 month ago

Problem/Motivation

This isn't a bug per-se with core as far as we can tell, but we have not been able to identify the source of build failures in an upgraded project on Pantheon. Pantheon does not believe the problem is on their end.

Steps to reproduce

Upgrade a D10 site to D11 and run a lullabot drainpipe.
The project fails with attached error.
Composer requirements are as follows. None of the code in these calls Drupal\Core\Cache\MemoryBackend::__construct()

"require": {
"composer/installers": "^2.3",
"cweagans/composer-patches": "^1.7",
"drupal/address": "^2.0.2",
"drupal/address_map_link": "^2.0@alpha",
"drupal/admin_toolbar": "^3.0",
"drupal/allowed_formats": "^3.0",
"drupal/anchor_link": "^3.0@alpha",
"drupal/better_exposed_filters": "^7.0",
"drupal/bigmenu": "^2.1",
"drupal/block_class": "^4.0.0",
"drupal/captcha": "^2.0.6",
"drupal/chosen": "^5.0.0",
"drupal/ckeditor_layouts": "^2.0",
"drupal/components": "^3.0@beta",
"drupal/conditional_fields": "^4@alpha",
"drupal/config_filter": "^2.6",
"drupal/config_ignore": "^3.2.0",
"drupal/config_views": "^2.1",
"drupal/core-composer-scaffold": "^11",
"drupal/core-project-message": "^11",
"drupal/core-recommended": "^11",
"drupal/cshs": "^4.0",
"drupal/easy_breadcrumb": "^2.0",
"drupal/embedded_content": "^2.0",
"drupal/emulsify_twig": "^5.0",
"drupal/entity_usage": "^2.0@beta",
"drupal/entitygroupfield": "^2.0",
"drupal/environment_indicator": "^4.0",
"drupal/exif_orientation": "^1.2",
"drupal/extlink": "^2.0.4",
"drupal/field_group": "^3.2",
"drupal/flood_control": "^3.0.0",
"drupal/focal_point": "^2.0",
"drupal/fontawesome": "^3.0",
"drupal/fontawesome_menu_icons": "^3.0",
"drupal/fpa": "^4.0",
"drupal/geocoder": "^3.20 || ^4.0",
"drupal/geofield": "^1.44",
"drupal/gin": "^4.0.2",
"drupal/gin_toolbar": "^2.0.0",
"drupal/group": "^3.3.1",
"drupal/groupmedia": "^4.0.3",
"drupal/honeypot": "^2.2.0",
"drupal/hook_event_dispatcher": "^4.0@RC",
"drupal/image_widget_crop": "^3.0",
"drupal/jquery_ui": "^1.7",
"drupal/jquery_ui_datepicker": "^2.1",
"drupal/jquery_ui_slider": "^2.1",
"drupal/jquery_ui_touch_punch": "^1.1",
"drupal/leaflet": "^10.2",
"drupal/leaflet_more_maps": "^2.1",
"drupal/linkit": "^7.0.2",
"drupal/masquerade": "^2.0@RC",
"drupal/media_library_bulk_upload": "^1.0",
"drupal/menu_breadcrumb": "^2.0",
"drupal/metatag": "^2.0.0",
"drupal/migrate_plus": "^6.0",
"drupal/migrate_source_csv": "^3.5",
"drupal/migrate_tools": "^6.0",
"drupal/miniorange_saml": "^3.0",
"drupal/node_revision_delete": "^2.0@alpha",
"drupal/office_hours": "^1.5",
"drupal/paragraphs": "^1.12",
"drupal/paranoia": "^1.0",
"drupal/password_policy": "^4.0",
"drupal/path_redirect_import": "^2.0",
"drupal/pathauto": "^1.8",
"drupal/rabbit_hole": "^1.0.0-beta1",
"drupal/recaptcha": "^3.0",
"drupal/redirect": "^1.6",
"drupal/redis": "^1.9",
"drupal/robotstxt": "^1.5",
"drupal/scheduler": "^2.0",
"drupal/scheduler_content_moderation_integration": "^3.0",
"drupal/search_api_pantheon": "^8.3",
"drupal/search_api_solr": "^4.2",
"drupal/security_review": "^3.0.3",
"drupal/shortcutperrole": "^2.0",
"drupal/simple_menu_permissions": "^3.0",
"drupal/simple_sitemap": "^4.0",
"drupal/smtp": "^1.1",
"drupal/token": "^1.9",
"drupal/twig_tweak": "^3.1",
"drupal/upgrade_status": "^4.3",
"drupal/username_enumeration_prevention": "^1.2",
"drupal/views_bulk_operations": "^4.2",
"drupal/viewsreference": "^2.0@beta",
"drush/drush": "^13.4",
"geocoder-php/google-maps-provider": "^4.7",
"kporras07/composer-symlinks": "^0.1.0@dev",
"lullabot/drainpipe": "^3.8.2",
"mnsami/composer-custom-directory-installer": "^2.0",
"noli42/chosen": "3.0.0",
"northernco/ckeditor5-anchor-drupal": "^0.4.0",
"npm-asset/featherlight": "1.7.14",
"npm-asset/focus-trap": "^7.3",
"npm-asset/js-cookie": "^3.0",
"npm-asset/tabbable": "^6.2",
"oomphinc/composer-installers-extender": "^2.0",
"pantheon-systems/drupal-integrations": "^11.1",
"pantheon-upstreams/upstream-configuration": "dev-main",
}

Proposed resolution

Patch the core module temporarily so that the MemoryBackend::construct() does not require a TimeInterface.

If no time interface is received, create one with a now() value.

Remaining tasks

Determine the upstream cause.

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

cache system

Created by

πŸ‡ΊπŸ‡ΈUnited States Chris Dart

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

Comments & Activities

  • Issue created by @Chris Dart
  • @chris-dart opened merge request.
  • First commit to issue fork.
  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    You should be able to get a debug backtrace to identify the offending module/config.

    I'd look first at your Drush version, or your services.yml file.

  • πŸ‡ΊπŸ‡ΈUnited States Chris Dart

    Here is a composer.json from a site I just tried this again with. I cannot replicate this in DDEV.

    It is entirely possible this has to do with the runner. Attached is the FULL drainpipe build log. The other file Deplo file Deploy-log-only.txt contains all the actions that likely cause the failure. Start on line 6588.

    Here's the full composer.json file.

    {
      "name": "pantheon-upstreams/drupal-project",
      "description": "Install Drupal 9 with Composer on Pantheon.",
      "type": "project",
      "license": "MIT",
      "repositories": {
        "drupal-packagist": {
          "type": "composer",
          "url": "https://packages.drupal.org/8",
          "exclude": [
            "drupal/block_scheduler",
            "drupal/field_inheritance",
            "drupal/layout_builder_norender",
            "drupal/view_mode_selector",
            "drupal/recurring_events"
          ]
        },
        "pantheon-upstream": {
          "type": "path",
          "url": "upstream-configuration"
        },
        "asset-packagist": {
          "type": "composer",
          "url": "https://asset-packagist.org"
        },
        "drupal-fancy/view_mode_selector": {
          "type": "package",
          "package": {
            "name": "drupal-fancy/view_mode_selector",
            "version": "1.0.0",
            "type": "drupal-module",
            "source": {
              "url": "https://github.com/drupal-fancy/view_mode_selector.git",
              "type": "git",
              "reference": "8.x-1.x"
            }
          }
        },
        "drupal/block_scheduler": {
          "type": "package",
          "package": {
            "name": "drupal/block_scheduler",
            "version": "2.0.1",
            "type": "drupal-module",
            "source": {
              "url": "https://git.drupalcode.org/issue/block_scheduler-3429017.git",
              "type": "git",
              "reference": "87e6dc451f29d9eb64949301fcfb333c8a894c9a"
            }
          }
        },
        "drupal/field_inheritance": {
          "type": "package",
          "package": {
            "name": "drupal/field_inheritance",
            "version": "2.0.0",
            "type": "drupal-module",
            "source": {
              "url": "https://git.drupalcode.org/issue/field_inheritance-3480537.git",
              "type": "git",
              "reference": "ab98b7e8d5e124d4ce648166c83344e374a23897"
            }
          }
        },
        "drupal/layout_builder_norender": {
          "type": "package",
          "package": {
            "name": "drupal/layout_builder_norender",
            "version": "1.0.0",
            "type": "drupal-module",
            "source": {
              "url": "https://git.drupalcode.org/issue/layout_builder_norender-3431590.git",
              "type": "git",
              "reference": "9f938fbe06a493b5c657ef54b796c9c246e6b5d5"
            }
          }
        },
        "drupal/view_mode_selector": {
          "type": "package",
          "package": {
            "name": "drupal/view_mode_selector",
            "version": "1.0.0",
            "type": "drupal-module",
            "source": {
              "url": "https://git.drupalcode.org/issue/view_mode_selector-3435379.git",
              "type": "git",
              "reference": "a72f5c49938ae28e0d8c351a13763565e3fa5d64"
            }
          }
        },
        "drupal/recurring_events": {
          "type": "package",
          "package": {
            "name": "drupal/recurring_events",
            "version": "3.0.0",
            "type": "drupal-module",
            "source": {
              "url": "https://git.drupalcode.org/issue/recurring_events-3480491.git",
              "type": "git",
              "reference": "72ed9e72309ec0dfb0e3a2c288fbf087f1d6bbac"
            }
          }
        }
      },
      "require": {
        "ext-curl": "*",
        "ext-zlib": "*",
        "composer/installers": "^1.9",
        "cweagans/composer-patches": "^1.7",
        "drupal-fancy/view_mode_selector": "^1.0",
        "drupal/address": "^2.0",
        "drupal/admin_toolbar": "^3.1",
        "drupal/allowed_formats": "^3.0",
        "drupal/backup_migrate": "^5.0",
        "drupal/better_exposed_filters": "^7.0",
        "drupal/bg_image_formatter": "^1.15",
        "drupal/block_class": "^4.0",
        "drupal/block_field": "^1.0@RC",
        "drupal/block_scheduler": "^2.0",
        "drupal/block_visibility_groups": "^2.0",
        "drupal/captcha": "^2.0",
        "drupal/components": "^3.0@beta",
        "drupal/config_filter": "^2.7",
        "drupal/config_split": "^2.0",
        "drupal/core-composer-scaffold": "^11",
        "drupal/core-project-message": "^11",
        "drupal/core-recommended": "^11",
        "drupal/date_popup": "^2.0",
        "drupal/diff": "^2.0@beta",
        "drupal/easy_breadcrumb": "^2.0",
        "drupal/entity": "^1.5",
        "drupal/externalauth": "^2.0",
        "drupal/field_group": "^4.0",
        "drupal/field_inheritance": "^2.0",
        "drupal/focal_point": "^2.0",
        "drupal/gin": "^3.0@beta",
        "drupal/group": "^3.2",
        "drupal/honeypot": "^2.0",
        "drupal/jquery_ui_datepicker": "^2.0",
        "drupal/jquery_ui_slider": "^2.1",
        "drupal/jquery_ui_touch_punch": "^1.1",
        "drupal/jsonapi_extras": "^3.25",
        "drupal/layout_builder_iframe_modal": "^1.3",
        "drupal/layout_builder_norender": "^1.0",
        "drupal/layout_builder_restrictions": "^3.0",
        "drupal/layout_builder_styles": "^2.0",
        "drupal/layoutbuilder_search_api": "^1.0",
        "drupal/mailsystem": "^4.4",
        "drupal/masquerade": "^2.0@RC",
        "drupal/menu_block": "^1.8",
        "drupal/menu_link_attributes": "^1.2",
        "drupal/menu_position": "^1.0@beta",
        "drupal/metatag": "^2.1",
        "drupal/nomarkup": "^1.0",
        "drupal/openid_connect": "^3.0@alpha",
        "drupal/paragraph_lineage": "^1.0",
        "drupal/paragraphs": "^1.13",
        "drupal/pathauto": "^1.9",
        "drupal/recaptcha_v3": "^2.0",
        "drupal/recurring_events": "^3.0",
        "drupal/redirect": "^1.7",
        "drupal/redis": "^1.5",
        "drupal/search_api": "^1.28",
        "drupal/search_api_pantheon": "^8.3",
        "drupal/search_api_solr": "^4.2",
        "drupal/select_or_other": "^4.0",
        "drupal/simple_sitemap": "^4.2",
        "drupal/smart_date": "^4.2",
        "drupal/smtp": "^1.0",
        "drupal/svg_image": "^3.0",
        "drupal/tb_megamenu": "^3.0",
        "drupal/token": "^1.10",
        "drupal/twig_field_value": "^2.0",
        "drupal/twig_tweak": "^3.2",
        "drupal/upgrade_status": "^4.3",
        "drupal/view_mode_selector": "^1.0",
        "drupal/views_bulk_operations": "^4.2",
        "drupal/views_rest_serializer_extra": "^1.0",
        "drupal/webform": "^6.3@beta",
        "drush/drush": "^13.6",
        "kint-php/kint": "^5.1",
        "lullabot/drainpipe": "^3.12",
        "npm-asset/litepicker": "^2.0",
        "npm-asset/swiper": "^8.4",
        "oomphinc/composer-installers-extender": "^2.0",
        "pantheon-systems/drupal-integrations": "^11.0",
        "pantheon-systems/search_api_pantheon": "^8.2",
        "pantheon-upstreams/upstream-configuration": "dev-main"
      },
      "require-dev": {
        "drupal/core-dev": "^11",
        "drupal/devel": "^5.1",
        "drupal/stage_file_proxy": "^3.1",
        "lullabot/drainpipe-dev": "^3.4",
        "weitzman/drupal-test-traits": "^2.2",
        "weitzman/logintrait": "^1.2"
      },
      "conflict": {
        "drupal/drupal": "*"
      },
      "minimum-stability": "dev",
      "prefer-stable": true,
      "extra": {
        "drainpipe": {
          "github": ["Pantheon", "ComposerLockDiff", "PantheonReviewApps"],
          "tugboat": {
            "terminus": true
          }
        },
        "drupal-scaffold": {
          "locations": {
            "web-root": "./web"
          },
          "allowed-packages": ["lullabot/drainpipe", "lullabot/drainpipe-dev"],
          "file-mapping": {
            "[project-root]/.editorconfig": false,
            "[project-root]/pantheon.upstream.yml": false,
            "[project-root]/.gitattributes": false
          },
          "gitignore": "true"
        },
        "installer-types": [
          "npm-asset"
        ],
        "installer-paths": {
          "web/core": [
            "type:drupal-core"
          ],
          "web/libraries/{$name}": [
            "type:drupal-library",
            "type:npm-asset"
          ],
          "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/profiles/custom/{$name}": [
            "type:drupal-custom-profile"
          ],
          "web/themes/custom/{$name}": [
            "type:drupal-custom-theme"
          ],
          "web/private/scripts/quicksilver/{$name}/": [
            "type:quicksilver-script"
          ]
        },
        "composer-exit-on-patch-failure": true,
        "patchLevel": {
          "drupal/core": "-p2"
        },
        "patches": {
          "drupal/menu_position": {
            "https://www.drupal.org/project/menu_position/issues/3180912": "https://www.drupal.org/files/issues/2023-05-29/menu_position-3180912-6.patch"
          },
          "drupal/core": {
            "https://www.drupal.org/project/drupal/issues/3239705": "https://www.drupal.org/files/issues/2021-10-06/make_link_fields_click_sortable-3239705-7.patch",
            "Pantheon Compatibility Patch https://www.drupal.org/project/drupal/issues/3516912": "patches/3516912-core.patch"
          },
          "lullabot/drainpipe": {
            "https://github.com/Lullabot/drainpipe/issues/357": "patches/drainpipe-skip-wipe-357.patch",
            "Patch for MNHS builds": "patches/drainpipe-mnhs-builds.patch"
          }
        }
      },
      "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "process-timeout": 0,
        "platform": {
          "php": "8.3"
        },
        "allow-plugins": {
          "composer/installers": true,
          "dealerdirect/phpcodesniffer-composer-installer": true,
          "cweagans/composer-patches": true,
          "drupal/core-composer-scaffold": true,
          "drupal/core-project-message": true,
          "oomphinc/composer-installers-extender": true,
          "phpstan/extension-installer": true,
          "lullabot/drainpipe": true,
          "lullabot/drainpipe-dev": true,
          "php-http/discovery": true,
          "tbachert/spi": true
        }
      }
    }
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    The backtrace shows a cache.pantheon service is being constructed when the error occurs:

    2025-04-23T18:23:14.2956229Z [drupal:update]  [error]  ArgumentCountError: Too few arguments to function Drupal\Core\Cache\MemoryBackend::__construct(), 0 passed and exactly 1 expected in Drupal\Core\Cache\MemoryBackend->__construct() (line 38 of /code/web/core/lib/Drupal/Core/Cache/MemoryBackend.php) #0 [internal function]: Drupal\Core\Cache\MemoryBackend->__construct()
    2025-04-23T18:23:14.2958516Z [drupal:update] #1 /code/vendor/symfony/dependency-injection/ContainerBuilder.php(1190): ReflectionClass->newInstanceArgs(Array)
    2025-04-23T18:23:14.2960178Z [drupal:update] #2 /code/vendor/symfony/dependency-injection/ContainerBuilder.php(626): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, ***, 'cache.pantheon')
    2025-04-23T18:23:14.2961924Z [drupal:update] #3 /code/vendor/symfony/dependency-injection/ContainerBuilder.php(1308): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('cache.pantheon', 1, Array, ***)
    

    This service is not defined by Drupal core, I assume this is something on Pantheon's side.

  • πŸ‡¨πŸ‡·Costa Rica esolano

    Hi there! We are experiencing this issue as well.

    We were able to get `drush` working again (and get the site working as well) using Pantheon's SFTP dev mode, and editing `settings.pantheon.php`. There, we are temporarily commenting out the following:

    if (isset($_ENV['PANTHEON_ENVIRONMENT'])) {
      $GLOBALS['conf']['container_service_providers']['PantheonServiceProvider'] = '\Pantheon\Internal\PantheonServiceProvider';
    }
    

    Which suggests that pantheon service provider is the one messing things up. We have an open case with Pantheon's support, and they are looking into it. I'll report back as soon as they fix the issue.

    Cheers!

  • You should update "pantheon-systems/drupal-integrations" from ^10.0 to ^11.0. And it will fix the issue

  • πŸ‡¨πŸ‡·Costa Rica esolano

    Hello there! I'm happy to report that everything is working now.
    Updating `pantheon-systems/drupal-integrations` in composer was all we really needed. The issue we were facing was specific to our CI/CD process, where we were not syncing over the newly scaffolded `pantheon.settings.php` to the pantheons's multi-dev environment; hence an old version was being used, causing all sorts of issues.

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Thanks for the update, this should help anyone else in a similar situation.

Production build 0.71.5 2024