Drupal Release: 10.0.0-alpha5
Pre Release
Tag Name: 10.0.0-alpha5
Release Date: 6/8/2022
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 10.0.0-alpha5 brings significant improvements to the CKEditor 5 integration, theme enhancements for Olivero and Claro, and important deprecations as Drupal continues its modernization journey. This release includes color scale definitions for Claro, accessibility improvements for Olivero, removal of jQuery UI libraries, and various API improvements. It also introduces a new API for dynamically setting recommended PHP versions and makes important changes to the extension system. This alpha release represents continued progress toward a more modern, accessible, and developer-friendly Drupal 10.
Highlight of the Release
- New color scale definitions for Claro theme (Blue and Red)
- Improved CKEditor 5 integration with updated dependencies and better alignment options
- Removal of deprecated jQuery UI libraries from core
- New API for dynamically setting recommended PHP versions
- Improved accessibility for Olivero theme in forced colors mode
- Deprecation of Color module
- Enhanced token system with new Token::replacePlain() function
- Standard install profile now uses Olivero for update.php
Migration Guide
Deprecated APIs and Components
-
Color Module: The Color module has been deprecated. Theme developers should begin transitioning to alternative approaches for theme color customization.
-
jQuery UI Libraries: jQuery UI libraries have been removed from core. If your code depends on these libraries:
- Consider using modern JavaScript alternatives
- If absolutely necessary, use the jQuery UI module as a transitional solution
-
Contextual JS API: The contextual JavaScript API has been deprecated and marked as internal. If you're using this API:
- Review your custom JavaScript that interacts with contextual links
- Consider using the DOM events or other supported methods for interacting with contextual links
-
jQuery.form: This has been marked as internal. If your code relies on jQuery.form:
- Update to use native form submission or modern alternatives
- Consider using the Fetch API or other modern approaches for form handling
Extension System Changes
- BC Layers Removed: Backward compatibility layers have been removed from the extension system. Ensure your custom modules:
- Follow current extension system patterns
- Don't rely on deprecated extension system functionality
Theme Updates
-
Classy Dependency: Many tests have been updated to no longer rely on Classy. If your theme extends or depends on Classy:
- Begin transitioning away from Classy dependencies
- Consider using the new starterkit theme as a base
-
Modernizr Touchevent: A replacement for Modernizr touchevent test has been implemented and the original has been deprecated. Update any code that relies on this functionality.
PHP Version Requirements
- A new API for dynamically setting recommended and supported PHP versions has been added. Review the PHP version requirements for your modules to ensure compatibility with future Drupal releases.
Upgrade Recommendations
As Drupal 10.0.0-alpha5 is an alpha release, it is not recommended for production sites. This release is intended for:
- Module and theme developers who need to test and update their code for compatibility with Drupal 10.
- Contributors who want to help identify and fix bugs before the stable release.
- Site builders who want to explore new features in a development or testing environment.
If you're currently running a previous alpha version of Drupal 10, upgrading to this alpha release is recommended for testing purposes to ensure your custom code works with the latest changes.
For production sites, it's recommended to:
- Stay on Drupal 9.x stable releases
- Begin planning your upgrade to Drupal 10
- Test your custom modules and themes against Drupal 10 alpha releases in a separate environment
- Address any deprecation notices in your custom code
- Update contributed modules to versions that support Drupal 10
When upgrading test environments to this alpha release, pay special attention to:
- CKEditor 5 configuration changes
- Theme compatibility, especially if using custom themes
- Custom code that might be affected by jQuery UI removal
- Extension system changes if you have custom modules
Remember to always back up your site before testing any alpha release.
Bug Fixes
CKEditor and Media
- HTMLRestrictions Diff Operation: Fixed bug in HTMLRestrictions' diff operation where
diff(<tag attr="A B">, <tag attr>)should return an empty result. - Media Embed Filter: Fixed the CKEditor 4 → 5 upgrade path for the media_embed filter to properly handle the
data-view-modeattribute on<drupal-media>. - HTMLRestrictions Merge: Fixed issues with
HTMLRestrictions::merge()and::toGeneralHtmlSupportConfig()failing on allowed attribute values that can be interpreted as integers.
Theme and UI
- Olivero Mobile Menu: Fixed mobile menu experience in Olivero that didn't properly adapt to forced colors.
- Progress Indicator: Fixed spacing in Olivero's progress indicator percentage label.
- Button Styling: Fixed hyperlinks with "button" or "button--primary" classes not having proper styling when nested in a "text-content" container in Olivero.
- Code Block Styling: Fixed broken code block styling in Olivero at various viewport widths.
- Tabledrag Icon: Fixed tabledrag icon not adapting to forced-colors mode.
- Message Rendering: Fixed malformed messages in Olivero when JS creates messages and PHP messages already exist.
Core Functionality
- View Name Changes: Fixed issue where changing view name does not update page title in views UI.
- Form Building: Fixed unnecessary form building when not using fields.
- Menu Layout: Fixed Olivero main/user account menu layout issues with long menus.
- Extension Discovery: Fixed issue where ExtensionDiscovery was unable to find modules with a comment at the end of the type property in a .info.yml file.
- Revision Default: Fixed issue by setting revision_default when publishing content.
New Features
Theme Enhancements
- Color Scales for Claro: Defined Blue and Red color scales for the Claro theme, improving visual consistency.
- Olivero Color Settings: Implemented color changing theme settings for Olivero, allowing for greater customization.
- Starterkit Improvements: Made updating changes from starterkit themes to generated themes easier, and removed unnecessary template overrides.
CKEditor 5 Updates
- Version Update: Updated to CKEditor 5 v34.1.0 with latest improvements.
- Alignment Options: Improved alignment functionality by addressing confusion between separate buttons and dropdown options.
- List Support: Changed to DocumentList (successor to List) to enable
<ol type>and<ul type>support with General HTML Support.
API Improvements
- PHP Version API: Added an API for dynamically setting recommended and supported PHP versions based on known and predicted PHP release schedules.
- Token System Enhancement: Added
Token::replacePlain()function to fix token system confusion. - Database Connection: Decoupled Connection from the wrapped PDO connection to allow alternative clients.
User Experience
- Update Module Permissions: Added permissions to the update module to hide warnings for non-administrative users.
- Welcome Message: Changed "Welcome to [site name]" to "Welcome!" on the initial install screen for a more universal greeting.
- Olivero for Updates: Standard install profile now uses Olivero for update.php, providing a consistent experience.
Security Updates
No specific security fixes were mentioned in the provided commit messages for this alpha release. As this is an alpha version, security issues are typically addressed in stable releases and would be documented in security advisories.
Performance Improvements
Contextual Links Performance
- Contextual Preprocessing: Implemented a solution to avoid running
contextual_preprocess()on every template, which significantly improves rendering performance for pages with many contextual links.
Testing Framework
- PHPStan Analysis: Improved PHPStan integration to always do a full analysis on DrupalCI, enhancing code quality checks.
- Test Cleanup: Removed dead code from various test classes and improved test organization.
Dependency Updates
- JavaScript Dependencies: Updated production JavaScript dependencies to latest minors for better performance and security.
- Composer Dependencies: Increased Composer dependency constraints to latest minors for forward-compatibility.
Code Optimization
- Dead Code Removal: Removed dead code from ContentTranslationController and other components.
- Deprecated Code Removal: Removed deprecated code from the testing framework (base classes, listeners, etc.) and views module functions.
Impact Summary
Drupal 10.0.0-alpha5 represents a significant step in Drupal's evolution toward a more modern, accessible, and developer-friendly CMS. This release focuses on several key areas:
Frontend Modernization: The removal of jQuery UI libraries and deprecation of older JavaScript patterns signals Drupal's continued commitment to modern frontend practices. Theme developers will benefit from improved starterkit theme functionality and new color systems in both Claro and Olivero themes.
Editor Experience: CKEditor 5 integration continues to mature with version updates, better alignment options, and improved handling of HTML attributes. These changes provide a more intuitive and powerful content editing experience.
Accessibility: Significant improvements to Olivero's accessibility, particularly in forced colors mode, demonstrate Drupal's commitment to inclusive design. The tabledrag icon fixes and improved mobile menu experience benefit users with various accessibility needs.
Developer Experience: The new API for PHP version recommendations, improved token system, and database connection decoupling provide developers with more flexible and powerful tools. The removal of deprecated code and BC layers pushes the ecosystem toward more modern practices.
Performance: By addressing the contextual links preprocessing issue and updating dependencies, this release continues Drupal's focus on performance optimization.
As an alpha release, these changes set the stage for what will eventually become Drupal 10 stable, giving the community time to adapt to breaking changes and take advantage of new features. The focus on removing deprecated code and modernizing APIs indicates that Drupal 10 will be a leaner, more focused platform that embraces current web development best practices.
Statistics:
User Affected:
- New color scale definitions for Claro theme (Blue and Red scales)
- Removal of unnecessary template overrides from starterkit theme
- Improved updating of changes from starterkit themes to generated themes
- Deprecation of Color module
- New color changing theme settings for Olivero
