Home

>

Tools

>

Drupal

>

Releases

>

11.2.0-beta1

Drupal Release: 11.2.0-beta1

Pre Release

Tag Name: 11.2.0-beta1

Release Date: 5/23/2025

Drupal LogoDrupal

Highly flexible, open-source content management system known for complex, scalable web applications. Preferred by government, educational, and large enterprise websites requiring advanced customization and security features. Robust module ecosystem.

TL;DR

Drupal 11.2.0-beta1: Performance Enhancements and Developer Experience Improvements

This beta release brings significant performance improvements with AVIF image support and cache tag optimization, enhances developer experience with Single Directory Components improvements, and introduces HTMX response handling. It also includes several bug fixes and code quality improvements that strengthen Drupal's foundation as it moves toward the stable 11.2.0 release.

Highlight of the Release

    • AVIF image format support with WebP fallback for all core image styles
    • Optimized cache tag handling to prevent endless growth
    • Improved Single Directory Components (SDC) template auto-reloading
    • HTMX response handling with proper CSS/JS asset processing
    • Package Manager can now operate directly on the live code base

Migration Guide

Deprecated APIs

  1. Custom Keys in $_SESSION

    • Custom keys in $_SESSION are now deprecated
    • Migrate to using Drupal's state system or other appropriate storage mechanisms
  2. SyndicateBlock Deprecation

    • The SyndicateBlock has been deprecated
    • Consider using alternative methods for content syndication
  3. #[Hook] Extension

    • Support for extending #[Hook] has been removed
    • Classes extending it (#[FormAlter] and #[Preprocess]) should be updated
    • Use composition instead of inheritance for these attributes
  4. RequirementSeverity Constants

    • drupal_requirements_severity() constants are deprecated
    • Migrate to using the new RequirementSeverity enums

Code Updates Required

  1. Session Usage

    • Review any custom code that stores data directly in $_SESSION
    • Update to use Drupal's recommended state or user data storage methods
  2. Hook Attributes

    • If you've extended #[Hook], #[FormAlter], or #[Preprocess] classes:
      • Refactor to use composition instead of inheritance
      • Use the base attributes directly
  3. Requirement Severity

    • Replace uses of constants like REQUIREMENT_ERROR with RequirementSeverity::Error

Upgrade Recommendations

Who Should Upgrade

  • Development and Staging Environments: This beta release is recommended for testing in development and staging environments to identify any potential issues before the stable release.
  • Module and Theme Developers: Developers should test their custom code against this beta to ensure compatibility with the upcoming 11.2.0 stable release.
  • Production Sites: As this is a beta release, it is not recommended for production environments unless you have thoroughly tested it and are prepared to handle potential issues.

Upgrade Path

  1. Test First: Create a clone of your site for testing before upgrading any production environment.
  2. Update Composer Dependencies: If using Composer, update your project with:
    composer require drupal/core:11.2.0-beta1 --update-with-dependencies
    
  3. Run Database Updates: After updating code, run database updates via the admin interface or Drush:
    drush updatedb
    
  4. Clear Caches: Clear all caches after upgrading:
    drush cache:rebuild
    
  5. Test Thoroughly: Test all critical site functionality, especially if you use custom modules or themes.

Special Considerations

  • Custom Session Usage: If your site uses custom keys in $_SESSION, plan to refactor this code as it's now deprecated.
  • SDC Components: If you use Single Directory Components, test that your components load correctly after theme changes.
  • Image Styles: Check your image styles as they now use AVIF with WebP fallback by default.

Bug Fixes

Component and Template Issues

  • SDC Template Reloading: Fixed issue where Single Directory Components templates were not auto-reloaded after changes.
  • SDC Component Availability: Fixed issue where new SDC components were not available when enabling themes through the UI.

User Interface and Interaction

  • Node Preview Modal: Fixed node preview modal to properly use Drupal API.
  • Views 'More' Link: Added proper user access checks to 'more' links in views.
  • Views Exposed Form: Fixed issue where invalid exposed form data was not being excluded.
  • Active Link in Views: Fixed template_preprocess_views_summary_unformatted() to correctly set active link when using AJAX.

Cache and Performance

  • Cache Tags Growth: Fixed issue where cache tags would grow endlessly.
  • Cache Redirect Error: Resolved cache redirect error when using 'view own unpublished content' permission alongside node grants.

Form and API Issues

  • askHidden Prompt: Fixed askHidden prompt failure with "Unknown named parameter $default".
  • LanguageItem Schema: Added missing schema for LanguageItem default values.
  • Toolbar Test: Fixed random test failure in Toolbar Test (toolbarTest.js).

Migration and Configuration

  • Highwater Mark Reset: Fixed migration issue by resetting highwater mark before rolling back.
  • Block Creation During Config Sync: Fixed issue where block_theme_initialize would create blocks during config sync.
  • Views Deletion: Fixed issue where uninstalling a module would delete all views with third-party settings by that module.

New Features

Image Handling Improvements

  • AVIF Image Format Support: Added AVIF conversion with WebP fallback for all core image styles, providing better image quality at smaller file sizes.
  • Automatic Block Type Redirection: When only one block type is available, users are now automatically redirected to the block/add page.

Developer Experience Enhancements

  • HTMX Response Handling: Added support for processing attachments (CSS/JS) for HTMX responses and adding Drupal asset libraries.
  • Package Manager Improvements: Package Manager can now operate directly on the live code base, streamlining the update process.
  • RequirementSeverity Enums: Created enums for RequirementSeverity and deprecated the older drupal_requirements_severity() constants.
  • LazyPluginCollection Enhancement: Made LazyPluginCollection::getIterator more flexible to return a Traversable.

Maintainer Updates

  • Added larowlan as a co-maintainer for Form API and render API subsystems.
  • Added nicxvan as maintainer of the extension API.

Security Updates

No specific security fixes were mentioned in the release notes. However, as with all Drupal updates, it's recommended to apply this update to ensure you have the latest security improvements that may be included as part of general code improvements.

Performance Improvements

Image Optimization

  • AVIF Format Support: Implemented AVIF image format with WebP fallback for all core image styles, providing better compression while maintaining high quality.

Cache Handling

  • Cache Tag Optimization: Fixed critical issue where cache tags would grow endlessly, significantly improving memory usage and performance over time.
  • Cache Redirect Handling: Improved cache handling when using 'view own unpublished content' permission alongside node grants, preventing unnecessary cache redirects.

Code Efficiency

  • Session Handling: Deprecated custom keys in $_SESSION to improve standardization and performance.
  • Form Processing: Refactored FormTestClickedButtonForm::buildForm for better efficiency.

Impact Summary

Drupal 11.2.0-beta1 delivers significant improvements in several key areas:

Performance and Scalability

The release addresses a critical issue with cache tags that could grow endlessly, potentially causing memory problems on large sites. This fix alone represents a major performance improvement for many Drupal installations. Additionally, the introduction of AVIF image format support with WebP fallback will reduce bandwidth usage while maintaining high image quality.

Developer Experience

Several improvements enhance the developer experience, including better handling of Single Directory Components (SDC) templates, HTMX response processing for modern interactive interfaces, and more flexible plugin collections. The introduction of RequirementSeverity enums also modernizes the codebase and provides better type safety.

User Experience

Content editors will benefit from an improved node preview modal and better access control for 'more' links. Site builders will appreciate automatic redirection when only one block type is available, streamlining the content creation workflow.

Code Quality

This release includes numerous refactoring efforts and test improvements that, while not immediately visible to end users, strengthen Drupal's foundation and ensure better stability and maintainability moving forward.

Overall, this beta release represents a solid step forward for Drupal 11, with meaningful improvements for developers, site builders, and content editors alike. The performance optimizations are particularly noteworthy and should benefit virtually all Drupal sites once the stable release is available.

Statistics:

File Changed280
Line Additions4,884
Line Deletions2,138
Line Changes7,022
Total Commits45

User Affected:

  • Benefit from improved Single Directory Components (SDC) template auto-reloading
  • Can now use HTMX responses with proper CSS/JS asset handling
  • Have access to new enums for RequirementSeverity replacing constants
  • Need to be aware of deprecated custom keys in $_SESSION
  • Can use justinrainbow/json-schema 6.x version

Contributors:

longwavealexpottlarowlan