Drupal Release: 11.0.0-beta1
Pre Release
Tag Name: 11.0.0-beta1
Release Date: 5/17/2024
DrupalHighly 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.0.0-beta1: A Major Step Toward the Next Generation CMS
This beta release marks a significant milestone in Drupal's evolution, introducing the experimental Recipes API, upgrading to PHPUnit 10, and preparing for PHP 8.4 and Symfony 7.1 compatibility. With numerous accessibility improvements, bug fixes, and performance enhancements, Drupal 11.0.0-beta1 lays the groundwork for a more flexible, developer-friendly, and user-centric CMS. Site builders and developers should begin testing their modules and themes against this release to prepare for the upcoming stable version.
Highlight of the Release
- Introduction of the experimental Recipes API for streamlined site building
- Upgrade to PHPUnit 10 and preparation for PHP 8.4 compatibility
- Numerous accessibility improvements in Claro and Olivero themes
- Enhanced block administration with helpful editing links
- Improved file upload handling in JSON-API
- Updated JavaScript dependencies including jQuery UI 1.14.0 beta
Migration Guide
Upgrading to Drupal 11.0.0-beta1
PHP Requirements
- Ensure your environment meets the updated platform requirements detailed in INSTALL.txt.
- Prepare for PHP 8.4 compatibility, as several fixes in this release address PHP 8.4 deprecations.
Testing Framework
- If you have custom PHPUnit tests, you'll need to update them for PHPUnit 10:
- Replace PHPUnit annotations with attributes (e.g.,
@before*and@after*). - Update any code that relies on PHPUnit\Runner\ErrorHandler::__construct, which is private since PHPUnit 11.1.
- Replace PHPUnit annotations with attributes (e.g.,
JavaScript Updates
- Review any custom JavaScript that might be affected by the updated dependencies, including jQuery UI 1.14.0 beta.
- If you were using escapeAdmin.js functionality, note that it has been removed as it's no longer used.
API Changes
- If your code uses UserAuth for email-based logins, test thoroughly as the BC layer has been fixed.
- Update any code that uses InputStreamUploadedFile as deprecated methods have been removed.
- If you use the User class for role management, consider updating to use the new chainable methods.
Views
- Test any Views with attachments, especially if you've changed display machine names.
Theme Development
- Review any custom themes that might be affected by the accessibility and UI fixes in Claro and Olivero.
Upgrade Recommendations
For Development and Testing Environments
We strongly recommend upgrading development and testing environments to Drupal 11.0.0-beta1 to begin testing compatibility with your custom and contributed modules. This beta release contains significant changes, including the new experimental Recipes API and updates to core dependencies like PHPUnit and jQuery UI.
For Production Environments
This is a beta release and is not recommended for production sites. Production sites should continue using Drupal 10.x until the stable release of Drupal 11.0.0 is available.
Preparation Steps
- Review the updated platform requirements in INSTALL.txt
- Test your custom modules and themes for compatibility
- Check for PHP 8.4 compatibility issues
- Update any custom PHPUnit tests to work with PHPUnit 10
- Begin exploring the experimental Recipes API in development environments
Module and Theme Developers
If you maintain modules or themes, now is the critical time to test and update your code for Drupal 11 compatibility. Pay special attention to PHPUnit test changes, PHP 8.4 compatibility, and any code that interacts with areas that have seen significant changes.
Bug Fixes
Views Fixes
- Fixed an issue where changing a display's machine name while an attachment exists would break Views functionality.
- Fixed the taxonomy_tid ViewsArgumentDefault plugin to properly add cache tags.
- Added support for #attached settings in ViewAjaxController.
Theme and UI Fixes
- Fixed incorrect padding on child menu items.
- Addressed content shift issues in the Olivero theme on page load.
- Fixed the shortcuts menu flickering when the page is loaded.
- Corrected the 'Help' tooltip that was being obstructed behind the navigation toolbar border.
- Fixed the Olivero skip link element being offset by the Navigation module.
- Removed invalid iframe attributes from the oembed field formatter.
- Resolved a theme declaration and templates mismatch for feed_icon.
PHP and JavaScript Fixes
- Fixed DialogRenderer::getTitleAsStringable() to support all return types of TitleResolverInterface::getTitle().
- Fixed UserAuth BC layer to work correctly for modules that use it to provide email-based logins.
- Fixed Composer Scaffold plugin to call dispatchScript() instead of dispatch().
- Removed escapeAdmin.js functionality as it's no longer used.
New Features
Experimental Recipes API
The most significant addition in this beta release is the new experimental Recipes API. This feature aims to revolutionize how Drupal sites are built by providing a standardized way to package and distribute site building components. The Recipes API allows developers to create reusable recipes that can configure various aspects of a Drupal site, making site building more efficient and consistent.
Enhanced Block Administration
The block administration page (admin/structure/block) now provides helpful editing links for derivative blocks such as those from menus, views, and block content. This improvement makes it easier for site builders to manage and configure blocks without having to navigate to different administration pages.
Improved File Upload Handling
JSON-API file uploads have been refactored to use the FileUploadHandler, providing a more consistent and reliable approach to handling file uploads through the API.
Method Chaining for User Roles
User role management has been improved with the addition of method chaining for User::addRole() and User::removeRole(), allowing for more concise and readable code when managing user roles.
Security Updates
No specific security fixes were mentioned in the provided commit messages for this release. However, the upgrade to newer versions of dependencies like PHPUnit and preparation for PHP 8.4 compatibility inherently improve the security posture of the system by leveraging the latest security improvements in these dependencies.
Performance Improvements
Performance Enhancements
- Fixed the performance test GitLab job that was failing on the 11.x branch, ensuring reliable performance testing.
- Improved plugin configuration handling in DefaultLazyPluginCollection::setInstanceConfiguration() to ensure proper instance management.
- Updated JavaScript code to use more efficient string comparison methods with String.prototype.startsWith() and String.prototype.endsWith().
- Added composer dependency on ext-zlib to ensure optimal performance for compression-related operations.
Impact Summary
Drupal 11.0.0-beta1 represents a significant step forward in Drupal's evolution, introducing foundational changes that will shape the future of the platform. The experimental Recipes API stands out as the most transformative addition, promising to revolutionize how Drupal sites are built and configured by providing a standardized approach to packaging site building components.
The technical foundation has been strengthened with the upgrade to PHPUnit 10 and preparations for PHP 8.4 and Symfony 7.1 compatibility, ensuring Drupal remains current with modern development practices and tools. These changes, while requiring some adaptation from developers, position Drupal to leverage the latest improvements in the PHP ecosystem.
Accessibility has received considerable attention in this release, with numerous improvements to the Claro and Olivero themes addressing color contrast, focus states, and navigation elements. These enhancements make Drupal more inclusive and usable for all users, regardless of ability.
The user experience for site builders has been improved with helpful editing links on the block administration page and fixes to Views functionality, while content editors will benefit from UI refinements and bug fixes. The updated JavaScript dependencies, including jQuery UI 1.14.0 beta, provide a more modern and performant frontend experience.
Overall, this beta release lays crucial groundwork for Drupal 11's stable release, balancing innovation with the platform's commitment to stability, accessibility, and developer experience. While not yet ready for production use, it provides a clear preview of Drupal's next major version and gives the community time to prepare for the transition.
Statistics:
User Affected:
- Need to adapt to PHPUnit 10 upgrade for testing
- Can leverage the new experimental Recipes API for site building
- Should prepare for PHP 8.4 compatibility changes
- Will benefit from improved file upload handling in JSON-API
- Need to review code that uses UserAuth for email-based logins
