Home

>

Tools

>

Drupal

>

Releases

>

9.5.0-beta2

Drupal Release: 9.5.0-beta2

Pre Release

Tag Name: 9.5.0-beta2

Release Date: 9/29/2022

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 9.5.0-beta2 brings significant improvements to PHP 8.2 compatibility, test performance, and bug fixes across various subsystems. This release adds #[\AllowDynamicProperties] attributes to core classes to reduce PHP 8.2 log noise, fixes container serialization issues, improves Layout Builder functionality, and enhances the Umami demo theme with included fonts. It also addresses several test performance issues and documentation improvements, making this a solid beta release focused on stability and developer experience.

Highlight of the Release

    • Added #[\AllowDynamicProperties] attribute to core classes for PHP 8.2 compatibility
    • Fixed container serialization for string services in 9.x
    • Added render_cache debug output for improved debugging
    • Included fonts in the Umami demo theme
    • Fixed default values display for image fields in Layout Builder
    • Fixed race condition with automatic deploy steps on ConfigImporter
    • Improved test performance in multiple areas

Migration Guide

No significant migration steps are required for this beta release. Most changes are bug fixes and enhancements that don't require special migration procedures.

If you're developing custom code that:

  1. Relies on dynamic properties in PHP 8.2, be aware that core classes now have the #[\AllowDynamicProperties] attribute applied. You may need to apply this attribute to your own classes if you're experiencing warnings in PHP 8.2.

  2. Extends ViewsExposedFilterBlock, ensure your implementation properly returns an array from the build method.

  3. Uses container serialization with string services, this functionality has been fixed and should now work correctly.

  4. Interacts with BlockContent deletion, note that the process now properly uses pre/postdelete methods instead of the delete method.

Upgrade Recommendations

For Development and Testing Environments

It is recommended to upgrade development and testing environments to Drupal 9.5.0-beta2 to test compatibility with your custom and contributed modules, especially if you're planning to use PHP 8.2 in production.

For Production Environments

As this is a beta release, it is not recommended for production environments. Production sites should continue using the latest stable release of Drupal 9.4.x until Drupal 9.5.0 reaches a stable release.

Testing Focus Areas

When testing this beta release, pay special attention to:

  1. PHP 8.2 compatibility if applicable to your environment
  2. Layout Builder functionality, especially with image fields
  3. Block content deletion processes
  4. Views exposed filter blocks
  5. Any custom code that might be affected by the container serialization changes

Bug Fixes

PHP 8.2 Compatibility Fixes

  • Added #[\AllowDynamicProperties] attribute to core classes to reduce noise in logs when running on PHP 8.2
  • Fixed callable syntax for PHP 8.2 in Views.php
  • Set sqlQuery in Entity\Query\Sql Condition classes on own class

UI and Display Fixes

  • Fixed issue where default values were not displayed for image fields placed in Layout Builder
  • Fixed incorrect label in taxonomy glossary for terms that start with zero
  • Fixed Olivero's blockquote pseudo-element decoration display issue
  • Fixed compiled variable.css which contained nothing except comments

Functional Fixes

  • Fixed container serialization handling for string services in 9.x
  • Fixed ViewsExposedFilterBlock::build to always return array
  • Fixed broken "Allowed Tags" updating functionality
  • Fixed BlockContent entities to use proper pre/postdelete methods instead of delete method
  • Fixed race condition with automatic deploy steps on ConfigImporter
  • Fixed MySQL Module help page and other modules that directed users to 404 pages
  • Fixed database driver namespace handling for replicas

Test Fixes

  • Fixed test performance of CommentEditTest
  • Fixed test performance of NodeAccessBaseTableTest
  • Fixed random test failure in BookTest::testGetTableOfContents
  • Fixed DownloadTest on SQLite by skipping it
  • Fixed TestSiteInstallCommand for build tests

New Features

Added render_cache debug output

A significant enhancement for developers is the addition of render_cache debug output. This feature helps developers understand and debug caching behavior in Drupal's render system, making it easier to identify and resolve caching-related issues.

Included fonts in Umami demo theme

The Umami demo theme now includes fonts directly in the theme, rather than relying on external sources. This improves the theme's reliability and performance while providing a better demonstration of Drupal's theming capabilities.

Bundle Classes for building bundleFieldDefinitions

The system now uses Bundle Classes for building bundleFieldDefinitions, which provides a more structured and object-oriented approach to field definitions. This enhancement improves code organization and maintainability.

Security Updates

This release includes security fix SA-CORE-2022-016 by fabpot, nicolas.grekas, xjm, lauriii, alexpott, Berdir, larowlan, catch, longwave, cilefen, james.williams, and benjifisher. As per Drupal's security policy, detailed information about security fixes is not disclosed in release notes to prevent exploitation. Users are strongly encouraged to update to this version to ensure their sites remain secure.

Performance Improvements

Test Performance Improvements

Several tests have been optimized for better performance:

  • Improved performance of Drupal\Tests\comment\Functional\Views\CommentEditTest
  • Enhanced performance of Drupal\node\Tests\NodeAccessBaseTableTest
  • Removed unnecessary caching layer tests in EntityResourceTestBase

Runtime Performance

  • Fixed database driver namespace handling for replicas, which could impact database performance
  • Improved BlockContent entities deletion process by using proper pre/postdelete methods

Impact Summary

Drupal 9.5.0-beta2 represents a significant step toward PHP 8.2 compatibility while addressing numerous bugs and improving performance. The addition of #[\AllowDynamicProperties] attributes to core classes will substantially reduce log noise in PHP 8.2 environments, making debugging easier and improving overall developer experience.

The fixes for Layout Builder image fields, ViewsExposedFilterBlock, and "Allowed Tags" updating will resolve frustrating issues for site builders. Theme developers will benefit from the inclusion of fonts in the Umami demo theme and fixes to CSS-related issues.

Test performance improvements and better debugging tools like render_cache debug output will enhance the development workflow. The security fix included in this release (SA-CORE-2022-016) addresses important security concerns, though details are appropriately limited.

While this is a beta release and not recommended for production, it provides a solid preview of the improvements coming in Drupal 9.5.0 stable. The focus on PHP 8.2 compatibility is particularly forward-looking, preparing Drupal for broader adoption of this PHP version.

Statistics:

File Changed300
Line Additions1,317
Line Deletions656
Line Changes1,973
Total Commits45

User Affected:

  • Improved PHP 8.2 compatibility with #[\AllowDynamicProperties] attributes added to core classes
  • Fixed container serialization handling for string services in 9.x
  • Better test performance in multiple areas
  • Enhanced debugging with render_cache debug output
  • Fixed callable syntax for PHP 8.2 in Views.php

Contributors:

xjmalexpottlauriii