Manual fix for Drupal 10 compatibility

Created on 2 October 2023, 9 months ago
Updated 27 February 2024, 4 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

Needs review

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 9 months ago
    43 pass, 2 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update 8 months 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 8 months 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 6 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 6 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 5 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 4 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 4 months ago
    42 pass, 3 fail
  • 🇮🇳India chaitanyadessai

    Please review patch.

  • Status changed to Needs review 4 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 4 months ago
    Patch Failed to Apply
  • 🇮🇳India chaitanyadessai

    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 4 months ago
    Composer require failure
Production build 0.69.0 2024