Fix Drupal 11 deprecations and remove Drupal < 10.3 support

Created on 8 September 2024, 11 days ago
Updated 9 September 2024, 10 days ago

Problem/Motivation

 ------ -------------------------------------------------------------- 
  Line   modules/field_group_accordion/src/Element/Accordion.php       
 ------ -------------------------------------------------------------- 
  13     Class Drupal\field_group_accordion\Element\Accordion extends  
         deprecated class Drupal\Core\Render\Element\RenderElement:    
         in drupal:10.3.0 and is removed from drupal:12.0.0. Use       
           \Drupal\Core\Render\Element\RenderElementBase instead.      
 ------ -------------------------------------------------------------- 
 ------ ------------------------------------------------------------------ 
  Line   modules/field_group_accordion/src/Element/AccordionItem.php       
 ------ ------------------------------------------------------------------ 
  12     Class Drupal\field_group_accordion\Element\AccordionItem extends  
         deprecated class Drupal\Core\Render\Element\RenderElement:        
         in drupal:10.3.0 and is removed from drupal:12.0.0. Use           
           \Drupal\Core\Render\Element\RenderElementBase instead.          
 ------ ------------------------------------------------------------------ 
 ------ -------------------------------------------------------------------- 
  Line   src/Element/HorizontalTabs.php                                      
 ------ -------------------------------------------------------------------- 
  17     Class Drupal\field_group\Element\HorizontalTabs extends deprecated  
         class Drupal\Core\Render\Element\RenderElement:                     
         in drupal:10.3.0 and is removed from drupal:12.0.0. Use             
           \Drupal\Core\Render\Element\RenderElementBase instead.            
 ------ -------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   src/Element/HtmlElement.php                                            
 ------ ----------------------------------------------------------------------- 
  14     Class Drupal\field_group\Element\HtmlElement extends deprecated class  
         Drupal\Core\Render\Element\RenderElement:                              
         in drupal:10.3.0 and is removed from drupal:12.0.0. Use                
           \Drupal\Core\Render\Element\RenderElementBase instead.               
 ------ ----------------------------------------------------------------------- 
 [ERROR] Found 4 errors  

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

4.0

Component

Miscellaneous

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Merge Requests

Comments & Activities

  • Issue created by @Anybody
  • 🇩🇪Germany Anybody Porta Westfalica

    Let's create a 4.x branch that drops Drupal 9 support and requires ^10.3 at least.
    We'll also use that 4.x branch for new features then.

  • Assigned to Anybody
  • 🇩🇪Germany Anybody Porta Westfalica
  • 🇩🇪Germany Anybody Porta Westfalica
  • Merge request !74Fix phpcs errors → (Merged) created by Anybody
  • Issue was unassigned.
  • Status changed to Needs review 11 days ago
  • Status changed to Needs work 11 days ago
  • 🇩🇪Germany Anybody Porta Westfalica

    Further fixes required:

     ------ ---------------------------------------------------------------------- 
      Line   field_group.module                                                    
     ------ ---------------------------------------------------------------------- 
      358    Call to static method isDisabled() on an unknown class Drupal\ds\Ds.  
             💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
     ------ ---------------------------------------------------------------------- 
     ------ -------------------------------------------------------------------------- 
      Line   tests/src/Functional/ManageDisplayTest.php                                
     ------ -------------------------------------------------------------------------- 
      94     Access to an undefined property                                           
             Drupal\Tests\field_group\Functional\ManageDisplayTest::$group.            
             💡 Learn more:                                                            
                https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
      98     Access to an undefined property                                           
             Drupal\Tests\field_group\Functional\ManageDisplayTest::$group.            
             💡 Learn more:                                                            
                https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
     ------ -------------------------------------------------------------------------- 
    
  • 🇩🇪Germany Anybody Porta Westfalica
  • 🇩🇪Germany Anybody Porta Westfalica
  • Pipeline finished with Failed
    10 days ago
    #277873
  • First commit to issue fork.
  • Pipeline finished with Failed
    10 days ago
    #277874
  • Pipeline finished with Failed
    10 days ago
    Total: 440s
    #277875
  • Pipeline finished with Failed
    10 days ago
    Total: 491s
    #277881
  • Pipeline finished with Failed
    10 days ago
    Total: 386s
    #277888
  • Pipeline finished with Success
    10 days ago
    #277911
  • Status changed to Needs review 10 days ago
  • 🇩🇪Germany Grevil

    All green, finally! Please review!

  • Status changed to RTBC 10 days ago
  • 🇩🇪Germany Anybody Porta Westfalica

    GREAT! :)

  • Status changed to Fixed 10 days ago
  • 🇩🇪Germany Anybody Porta Westfalica
  • Status changed to Needs work 10 days ago
  • 🇩🇪Germany Grevil

    After merge tests now fail again.

  • 🇩🇪Germany Grevil

    Ok, the tests I did for Add option to allow HTML in labels Fixed were not properly finished, as they didn't render the tabs probably and it seems I never commented out the tabs that do not render:

    // See if the field group supports HTML elements in the label:
    // Note, for some reason only Tab 2 gets rendered on the page:
    // We expect the HTML to be not escaped:

    So now in 1 Test it renders in the horizontal tabs view, but in the other it doesn't, but both check the same css class structure, which is different for one test.

    I'll fix this temporarily and spend a couple of minutes to see if I can fix the tests for good.

  • Status changed to RTBC 10 days ago
  • 🇩🇪Germany Grevil

    Alright, the new phpcs errors are due to commented out test code and the phpunit failures are due to 🐛 Horizontal Tabs render broken, if child allows HTML Active . We need to fix them in the mentioned issue.

    But everything else here is ready to being merged.

  • Status changed to Fixed 10 days ago
Production build 0.71.5 2024