Manual fix for Drupal 10 compatibility

Created on 2 October 2023, about 1 year ago
Updated 29 July 2024, 5 months ago

Problem/Motivation

The latest 8.x 2.4 version doesn't support Drupal 10.

Steps to reproduce

Add necessary changes to make the module support D10.

๐Ÿ“Œ Task
Status

Closed: outdated

Version

2.4

Component

Code

Created by

๐Ÿ‡ซ๐Ÿ‡ฎFinland mitechworld

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

Merge Requests

Comments & Activities

  • Issue created by @mitechworld
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    43 pass, 2 fail
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    run-tests.sh fatal error
  • ๐Ÿ‡ฏ๐Ÿ‡ตJapan tyler36 Osaka

    Need to check compatbility against a D10 compatible environment.

    Added test with PHP 8.1 & MySQL 8, D10.1

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    run-tests.sh fatal error
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada fengtan Montreal, Canada

    I have scanned components 8.x-2.4 with Upgrade Status โ†’ . The report shows 4 errors, which are all addressed by MR !35:

    Thanks! Attached is a static copy of MR !35 so it can be easily referenced in composer.json.

  • First commit to issue fork.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 12 months ago
    43 pass, 2 fail
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 8
    last update 12 months ago
    run-tests.sh fatal error
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada mvc Montrรฉal, CA

    I've updated some function signatures to resolve PHP 8 fatal errors.

  • Status changed to Needs work 11 months ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada RobLoach Earth

    I'm not sure about applying this to 2.x when the 3.x branch already targets Drupal 9/10. Make the upgrade to 3.x instead.

  • Status changed to Needs review 10 months ago
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 10 months ago
    42 pass, 3 fail
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia chaitanyadessai Goa

    Please review patch.

  • Status changed to Needs review 10 months ago
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 10 months ago
    Patch Failed to Apply
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia chaitanyadessai Goa

    Patch for 3.x version.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rishabh666

    Thanks for the patch @chaitanyadessai , I applied 3390999-9.patch on the 8.x-2.x branch and it gave the following error:

    Checking patch components.services.yml...
    error: while searching for:
        arguments: ['@extension.list.module', '@extension.list.theme', '@module_handler', '@theme.manager', '@cache.default', '@file_system']
    
      components.twig.loader:
        class: Drupal\components\Template\Loader\ComponentsLoader
        arguments: ['@components.registry']
        tags:
          - { name: twig.loader, priority: 200 }
    
      components.twig.extension:
        class: Drupal\components\Template\TwigExtension
        tags:
          - { name: twig.extension, priority: 150 }
    
    error: patch failed: components.services.yml:4
    error: components.services.yml: patch does not apply
    Checking patch src/Template/Loader/ComponentsLoader.php => src/Template/Loader/ComponentLoader.php...
    error: while searching for:
     * loader so that templates can be referenced by namespace, like
     * \@mycomponents/box.html.twig or \@mythemeComponents/page.html.twig.
     */
    class ComponentsLoader extends FilesystemLoader {
    
      /**
       * The components registry service.
    
    error: patch failed: src/Template/Loader/ComponentsLoader.php:13
    error: src/Template/Loader/ComponentsLoader.php: patch does not apply
    Checking patch src/Template/TwigExtension.php => src/Template/TwigExtensions.php...
    error: while searching for:
      public function getFilters(): array {
        return [
          'recursive_merge' => new TwigFilter('recursive_merge', [
            'Drupal\components\Template\TwigExtension', 'recursiveMergeFilter',
          ]),
          'set' => new TwigFilter('set', [
            'Drupal\components\Template\TwigExtension', 'setFilter',
          ]),
          'add' => new TwigFilter('add', [
            'Drupal\components\Template\TwigExtension', 'addFilter',
          ]),
        ];
      }
    
    error: patch failed: src/Template/TwigExtension.php:27
    error: src/Template/TwigExtension.php: patch does not apply
    Checking patch tests/src/Kernel/TwigExtensionTest.php...
    Checking patch tests/src/Unit/ComponentsLoaderTest.php...
    Hunk #2 succeeded at 28 (offset 7 lines).
    error: while searching for:
          ->method('getTemplate')
          ->willReturn($getTemplate);
    
        $this->systemUnderTest = new ComponentsLoader($componentsRegistry);
    
        try {
          // Use reflection to test protected methods and properties.
    
    error: patch failed: tests/src/Unit/ComponentsLoaderTest.php:61
    error: tests/src/Unit/ComponentsLoaderTest.php: patch does not apply
    Checking patch tests/src/Unit/TwigExtensionFiltersTest.php...
    error: while searching for:
      public function testSetFilter(array $element, string $at, $value, array $expected) {
        $result = NULL;
        try {
          $result = TwigExtension::setFilter($element, $at, $value);
        }
        catch (\Exception $e) {
          $this->fail('No Exception expected; "' . $e->getMessage() . '" thrown during: ' . $this->getName());
    
    error: patch failed: tests/src/Unit/TwigExtensionFiltersTest.php:173
    error: tests/src/Unit/TwigExtensionFiltersTest.php: patch does not apply
    Checking patch tests/src/Unit/TwigExtensionFunctionsTest.php...
    error: while searching for:
        $dateFormatter = $this->createMock('\Drupal\Core\Datetime\DateFormatterInterface');
        $fileURLGenerator = $this->createMock('\Drupal\Core\File\FileUrlGeneratorInterface');
    
        $this->systemUnderTest = new TwigExtension();
        $coreTwigExtension = new CoreTwigExtension($this->renderer, $urlGenerator, $themeManager, $dateFormatter, $fileURLGenerator);
    
        $loader = new StringLoader();
    
    error: patch failed: tests/src/Unit/TwigExtensionFunctionsTest.php:47
    error: tests/src/Unit/TwigExtensionFunctionsTest.php: patch does not apply
    
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.2.1 + Environment: PHP 7.4 & MySQL 5.7
    last update 10 months ago
    Composer require failure
  • Status changed to Closed: outdated 5 months ago
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    The 3.x branch has supported D10 for over 2 years now.

Production build 0.71.5 2024