Drupal 11 compatibility

Created on 9 May 2024, about 2 months ago
Updated 14 June 2024, 11 days ago

Problem/motivation

Drupal 11 will be released β†’ in 2024.

Steps to make Drupal 11 compatible

  1. Check for Drupal 11 code compatibility
  2. Check for PHP 8.3 compatibility
  3. Check for jQuery 4 compatibility
  4. Update core version requirements to include Drupal 11
  5. Drop Drupal 8 and 9 support
  6. Unit tests are updated to work with Drupal 11 (PHPUnit 10)
  7. Automated tests pass D11 compatibility
  8. Change version numbering to use semantic versioning
This module uses Gitlab CI for automated testing of proposed code changes. To contribute code changes, create a merge request. Patch files will not trigger automated testing and are not sufficient for review.
πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mmarler

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

Merge Requests

Comments & Activities

  • Issue created by @mmarler
  • πŸ‡ΊπŸ‡ΈUnited States daddison
  • Assigned to daddison
  • πŸ‡ΊπŸ‡ΈUnited States daddison
  • πŸ‡ΊπŸ‡ΈUnited States daddison
  • Merge request !5Resolve #3446311 "Drupal 11 compatibility" β†’ (Merged) created by daddison
  • πŸ‡ΊπŸ‡ΈUnited States daddison
  • πŸ‡ΊπŸ‡ΈUnited States daddison

    √ 1. Check for Drupal 11 code compatibility

    One change required

    1) web/modules/contrib/feed_block/src/EventSubscriber/FeedBlockCacheExpire.php:136
    
        ---------- begin diff ----------
    @@ @@
        * @return array
        *   An array of event listener definitions.
        */
    -  public static function getSubscribedEvents() {
    +  public static function getSubscribedEvents(): array {
         $events[KernelEvents::RESPONSE][] = ['onRespond'];
         return $events;
       }
        ----------- end diff -----------
    

    √ 2. Check for PHP 8.3 compatibility
    √ 3. Check for jQuery 4 compatibility
    √ 4. Update core version requirements to include Drupal 11
    √ 5. Drop Drupal 8 and 9 support
    √ 6. Unit tests are updated to work with Drupal 11 (PHPUnit 10)
    √ 7. Automated tests pass D11 compatibility

    D11 tests passed. Automated phpunit testing against Drupal 10 returned the following errors, due to this change.

    1) Drupal\Tests\feed_block\FunctionalJavascript\RssTypesTest::testRss
    Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for block_content.type.feed_block with the following errors: block_content.type.feed_block:revision variable type is boolean but applied schema class is Drupal\Core\TypedData\Plugin\DataType\IntegerData
    
    2) Drupal\Tests\feed_block\FunctionalJavascript\RssTypesTest::testYouTube
    Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for block_content.type.feed_block with the following errors: block_content.type.feed_block:revision variable type is boolean but applied schema class is Drupal\Core\TypedData\Plugin\DataType\IntegerData
    

    I tested the D11-compatible code on a stock D10 site. Feed block revisions remain enabled even with boolean config value true, rather than 1.

    √ 8. Change version numbering to use semantic versioning

  • Status changed to Fixed 25 days ago
  • πŸ‡ΊπŸ‡ΈUnited States daddison
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024