Drupal 11 compatibility for Layout Builder Styles

Created on 3 May 2024, about 2 months ago
Updated 15 May 2024, about 1 month ago

Problem/Motivation

Drupal 11 is coming soon. Let's make Layout Builder Styles compatible with Drupal 11!

Audit

- Drupal 10 deprecations
- PHP 8.3 compatibility
- jQuery 4 compatibility
- Symfony 7 compatibility
- PHPUnit 10 compatibility

1. Tests pass on Drupal 11 with pending change from πŸ› Individual block instances are no longer restricted Needs review : https://git.drupalcode.org/project/layout_builder_styles/-/pipelines/163673

Composer

  • [x] This module does not have a composer.json file

PHPStan Audit of Drupal deprecations

 ------ -------------------------------------------------------------------------------------------------------------------------- 
  Line   layout_builder_styles.module                                                                                              
 ------ -------------------------------------------------------------------------------------------------------------------------- 
  127    Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from       
         drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access  
         should be checked.                                                                                                        
         πŸ’‘ See https://www.drupal.org/node/3201242                                                                                
  177    Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from       
         drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access  
         should be checked.                                                                                                        
         πŸ’‘ See https://www.drupal.org/node/3201242                                                                                
 ------ -------------------------------------------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   src/Form/ConfigureSectionForm.php                                                     
 ------ -------------------------------------------------------------------------------------- 
  13     Class Drupal\layout_builder_styles\Form\ConfigureSectionForm extends @internal class  
         Drupal\layout_builder\Form\ConfigureSectionForm.                                      
 ------ -------------------------------------------------------------------------------------- 

 [ERROR] Found 3 errors                                                                                                 

Drupal-Rector Audit of Drupal deprecations

1 file with changes
===================

1) web/modules/contrib/layout_builder_styles/src/EventSubscriber/BlockComponentRenderArraySubscriber.php:42

    ---------- begin diff ----------
@@ @@
   /**
    * {@inheritdoc}
    */
-  public static function getSubscribedEvents() {
+  public static function getSubscribedEvents(): array {
     // Layout Builder also subscribes to this event to build the initial render
     // array. We use a higher weight so that we execute after it.
     $events[LayoutBuilderEvents::SECTION_COMPONENT_BUILD_RENDER_ARRAY] = [
    ----------- end diff -----------

Applied rules:
 * ProtectedStaticModulesPropertyRector (https://www.drupal.org/node/2909426)
 * AddReturnTypeDeclarationRector


 [OK] 1 file would have changed (dry-run) by Rector                                                                     

Audit of deprecated PHP <8.3 calls

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

................. 17 / 17 (100%)


Time: 128ms; Memory: 10MB

jQuery 4 compatibility: List of all custom JavaScript files

There are no JavaScript files in this module.

Should we drop support for Drupal 8 and 9?

diff --git a/layout<em>builder</em>styles.info.yml b/layout<em>builder</em>styles.info.yml
index 170cdae..31bd942 100644
--- a/layout<em>builder</em>styles.info.yml
+++ b/layout<em>builder</em>styles.info.yml
@@ -1,6 +1,6 @@
 name: Layout Builder Styles
 description: Apply styles to blocks in Layout Builder.
-core<em>version</em>requirement: ^8.7.7 || ^9 || ^10
+core<em>version</em>requirement: ^10 || ^11
 type: module
 package: Layout Builder
 dependencies:
πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

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

Comments & Activities

Production build 0.69.0 2024