Drupal 11 compatibility

Created on 9 May 2024, about 2 months ago
Updated 17 May 2024, about 1 month 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 https://semver.org/
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

Active

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
  • Assigned to mark_fullmer
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Auditor checklist

    • [ ] Deprecated Drupal code is remediated
    • [ ] Deprecated PHP code is remediated
    • [ ] Custom code is compatible with jQuery 4
    • [ ] Custom code core_version_requirement indicates Drupal 11 compatibility
    • [ ] Contrib modules are compatible with Drupal 11

    References

    Composer

    • [ ] This module has a composer.json file. Manually review it for Drupal 11 compatibility, such as external requirements, core version constraints, and PHP version constraints

    PHPStan Audit of Drupal deprecations

     <span class="hljs-comment">------ --------------------------------------------------------------------------------------------------- </span>
      Line   src/Controller/ChooseBlockController.php                                                           
     <span class="hljs-comment">------ --------------------------------------------------------------------------------------------------- </span>
      <span class="hljs-number">14</span>     Class Drupal\layout_builder_restrictions\Controller\ChooseBlockController <span class="hljs-keyword">extends</span> @internal <span class="hljs-class"><span class="hljs-keyword">class</span>  </span>
             Drupal\layout_builder\Controller\ChooseBlockController.                                            
     <span class="hljs-comment">------ --------------------------------------------------------------------------------------------------- </span>
    
     <span class="hljs-comment">------ ------------------------------------------------------------------------------------------------- </span>
      Line   src/Controller/MoveBlockController.php                                                           
     <span class="hljs-comment">------ ------------------------------------------------------------------------------------------------- </span>
      <span class="hljs-number">17</span>     Class Drupal\layout_builder_restrictions\Controller\MoveBlockController <span class="hljs-keyword">extends</span> @internal <span class="hljs-class"><span class="hljs-keyword">class</span>  </span>
             Drupal\layout_builder\Controller\MoveBlockController.                                            
     <span class="hljs-comment">------ ------------------------------------------------------------------------------------------------- </span>
    
     <span class="hljs-comment">------ ------------------------------------------------------------------------------------------------------------------------------- </span>
      Line   src/Form/MoveBlockForm.php                                                                                                     
     <span class="hljs-comment">------ ------------------------------------------------------------------------------------------------------------------------------- </span>
      <span class="hljs-number">17</span>     Class Drupal\layout_builder_restrictions\Form\MoveBlockForm <span class="hljs-keyword">extends</span> @internal <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Drupal</span>\<span class="hljs-title">layout_builder</span>\<span class="hljs-title">Form</span>\<span class="hljs-title">MoveBlockForm</span>.  </span>
     <span class="hljs-comment">------ ------------------------------------------------------------------------------------------------------------------------------- </span>
    
     [ERROR] Found <span class="hljs-number">3</span> errors
    

    Drupal-Rector Audit of Drupal deprecations

    
    <span class="inform7"> <span class="hljs-comment">[OK]</span> Rector <span class="hljs-keyword">is</span> done!</span>
    

    Audit of deprecated PHP <8.3 calls

    If no errors are listed below, php-compatibility did not find any.

    ...................................... <span class="hljs-number">38</span> / <span class="hljs-number">38</span> (<span class="hljs-number">100</span>%)
    
    
    Time: <span class="hljs-number">408</span>ms; Memory: <span class="hljs-number">12</span>MB
    

    jQuery 4 compatibility: List of all custom JavaScript files

    Any files listed below should be reviewed for jQuery 4 compatibility

    web<span class="hljs-regexp">/modules/</span>contrib<span class="hljs-regexp">/layout_builder_restrictions/m</span>odules<span class="hljs-regexp">/layout_builder_restrictions_by_region/</span>js<span class="hljs-regexp">/display_mode_form.js</span>
    

    Diff for updating core_version_requirement

    diff --git a/layout_builder_restrictions.info.yml b/layout_builder_restrictions.info.yml
    index 6f3d7d5..794c958 100644
    <span class="hljs-comment">--- a/layout_builder_restrictions.info.yml</span>
    <span class="hljs-comment">+++ b/layout_builder_restrictions.info.yml</span>
    <span class="hljs-meta">@@ -1,5 +1,5 @@</span>
     name: Layout Builder Restrictions
    <span class="hljs-deletion">-core_version_requirement: ^9.3 || ^10</span>
    <span class="hljs-addition">+core_version_requirement: ^10 || ^11</span>
     description: 'Manage which fields &amp; layouts are available in Layout Builder'
     type: module
     package: 'Layout Builder'
    diff --git a/modules/layout_builder_restrictions_by_region/layout_builder_restrictions_by_region.info.yml b/modules/layout_builder_restrictions_by_region/layout_builder_restrictions_by_region.info.yml
    index b04effc..8dbe672 100644
    <span class="hljs-comment">--- a/modules/layout_builder_restrictions_by_region/layout_builder_restrictions_by_region.info.yml</span>
    <span class="hljs-comment">+++ b/modules/layout_builder_restrictions_by_region/layout_builder_restrictions_by_region.info.yml</span>
    <span class="hljs-meta">@@ -1,5 +1,5 @@</span>
     name: Layout Builder Restrictions By Region
    <span class="hljs-deletion">-core_version_requirement: ^9.3 || ^10</span>
    <span class="hljs-addition">+core_version_requirement: ^10 || ^11</span>
     description: 'Restricts layouts and blocks per layout region'
     type: module
     package: 'Layout Builder'
    
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
  • Pipeline finished with Skipped
    about 1 month ago
    #175354
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
Production build 0.69.0 2024