Home

>

Tools

>

Drupal

>

Releases

>

10.0.0-alpha1

Drupal Release: 10.0.0-alpha1

Pre Release

Tag Name: 10.0.0-alpha1

Release Date: 1/28/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 10.0.0-alpha1 marks the first alpha release of Drupal 10, introducing significant modernization with PHP 8.0.2+ requirement, Symfony 5.4 compatibility, Twig 3 upgrade, and removal of legacy code. This release focuses on future-proofing Drupal by removing IE11 support, adopting modern JavaScript practices, and preparing for Symfony 6 compatibility. Major improvements include CKEditor 5 enhancements, better UI for deprecated modules, and numerous performance optimizations. This alpha release represents a substantial step toward a more modern, maintainable Drupal ecosystem.

Highlight of the Release

    • PHP 8.0.2+ is now required, with all PHP 7 code removed
    • Upgraded to Symfony 5.4 with preparations for Symfony 6 compatibility
    • Upgraded to Twig 3 for improved templating
    • Removed IE11 support, allowing for modern CSS and JavaScript
    • Enhanced CKEditor 5 with improved functionality and plugins
    • Improved UI for identifying deprecated modules with warnings and explanations
    • Database API improvements with better performance and compatibility
    • Modernized JavaScript with reduced jQuery dependencies
    • Olivero theme improvements with modern CSS variables and better responsive design
    • Added ability to configure which theme is used as a starterkit theme

Migration Guide

Preparing for Drupal 10

PHP Requirements

  • Upgrade your hosting environment to PHP 8.0.2 or higher
  • Remove any PHP 7 specific code from your custom modules and themes
  • Update any code using deprecated PHP functions

Framework Updates

  • Test your site with Symfony 5.4 compatibility
  • Update custom Twig templates for Twig 3 compatibility
  • Review and update any code using deprecated Symfony components

Frontend Changes

  • Remove any IE11-specific code or polyfills
  • Update custom JavaScript to use vanilla JS where possible instead of jQuery
  • Review custom CSS for modern browser compatibility

Module Updates

  • Update custom modules to use the new Database API
  • Replace deprecated functions:
    • Replace module_load_include() with \Drupal::moduleHandler()->loadInclude()
    • Replace module_load_install() with ModuleHandler::loadInstall()
    • Replace drupal_js_defaults() (now deprecated)
  • Update any code using Laminas\Feed reader and writer services (now deprecated)

Theme Updates

  • Update custom themes to be compatible with Twig 3
  • Take advantage of modern CSS features now that IE11 support is removed
  • Consider using the new starterkit theme configuration option

Database Changes

  • Replace usage of 'return' query option with Connection::lastInsertId()
  • Update code using deprecated Database API methods
  • Ensure your database supports JSON if using JSON database features

CKEditor Integration

  • Update custom CKEditor 5 plugins to use Drupal's JS translation API
  • Review and update any custom CKEditor integrations

Testing

  • Update PHPUnit tests to be compatible with PHPUnit 9.5
  • Remove usage of legacy assert traits
  • Add proper type hints to methods overriding Symfony interfaces

Upgrade Recommendations

For Production Sites: Do not upgrade to Drupal 10.0.0-alpha1 on production sites. This is an alpha release intended for testing and development purposes only.

For Development/Testing: This alpha release is recommended for:

  • Module developers who need to start updating their modules for Drupal 10 compatibility
  • Theme developers who want to take advantage of new theming features
  • Site builders who want to test their custom code against the upcoming changes
  • Contributors who want to help identify and fix bugs before the stable release

Preparation Steps:

  1. Set up a separate development environment for testing
  2. Ensure your development environment meets the PHP 8.0.2+ requirement
  3. Test your custom modules and themes for compatibility issues
  4. Review the list of deprecated APIs and update your code accordingly
  5. Report any bugs or issues you encounter to the Drupal issue queue

Timeline: Drupal 10.0.0 stable is expected to be released later in 2022. Plan your upgrade path accordingly, using this alpha release to prepare your codebase for the eventual stable release.

Bug Fixes

Critical Bug Fixes

  • Fixed user login page broken when there are more than 5 failed login attempts (Issue #3198010)
  • Fixed installer tasks using multiple batch sets in non-interactive mode not executing (Issue #2871357)
  • Fixed LocaleConfigSubscriber causing data loss during install (Issue #2925203)
  • Fixed system_post_update_sort_all_config exhausting PHP memory in 9.3.0 (Issue #3254403)

UI and Form Fixes

  • Fixed undefined index notice in FieldUiTable::reduceOrder() (Issue #3064890)
  • Fixed node form layout issues on wide screens (Issue #3184667)
  • Fixed dialog width and positioning issues in Claro (Issue #3191527)
  • Fixed dropbuttons in table cells becoming unusable with long text options (Issue #3168326)
  • Fixed empty toolbar tray displaying a stray orientation toggle (Issue #3257504)

API and Integration Fixes

  • Fixed TrustedRedirectResponse failing with ?check_logged_in=1 parameter (Issue #3253889)
  • Fixed Layout Builder using the wrong RouteObjectInterface (Issue #3253666)
  • Fixed FileUrlGenerator::generate() not working with externally hosted files (Issue #3254553)
  • Fixed view mode not displaying in dropdown if numerical (Issue #3241633)
  • Fixed MediaLibraryWidget triggering AJAX errors when all media types can be referenced (Issue #3190261)

Database and Performance Fixes

  • Fixed comparing fields with different collations in SelectSubqueryTest (Issue #3250648)
  • Fixed LayoutBuilderIsActiveCacheContext not providing correct context value (Issue #3190541)
  • Fixed UID base field override configs still having old default value callbacks (Issue #3153455)

Migration Fixes

  • Fixed D6 taxonomy term fields not migrating with allowed vocabularies (Issue #3042533)
  • Fixed SubProcess migrate process plugin not throwing exceptions on invalid input (Issue #3048464)

Security Fixes

  • Applied security fix SA-CORE-2022-001

New Features

PHP 8.0.2+ Requirement

  • Drupal 10 now requires PHP 8.0.2 or higher
  • Removed all PHP 7 specific code
  • Updated .htaccess files for PHP 8 compatibility

Framework Upgrades

  • Upgraded to Symfony 5.4 with preparations for Symfony 6 compatibility
  • Upgraded to Twig 3 for improved templating
  • Updated to CKEditor 5 v31.1.0
  • Upgraded to Guzzle 7

Modern Frontend Support

  • Removed IE11 support from core's browserlist
  • Refactored CSS to take advantage of modern features
  • Reduced jQuery dependencies with vanilla JavaScript alternatives
  • Added Array.includes polyfill for better browser compatibility

UI Improvements

  • Enhanced UI for identifying deprecated modules with warnings and explanations at admin/reports/status
  • Improved dialog styling and positioning in Claro theme
  • Better indication of non-stable module statuses in admin/modules page
  • Fixed dropbutton styling in table cells for better usability

Theme Enhancements

  • Added ability to configure which theme is used as a starterkit theme
  • Olivero theme improvements:
    • Converted all colors to HSL for better consistency
    • Renamed and consolidated color CSS variable names
    • Used CSS custom properties for grid-related variables
    • Refactored tabs CSS to use modern techniques
    • Fixed z-index issues with mobile navigation

CKEditor 5 Improvements

  • Added Drupal's JS translation API support for CKEditor 5 plugins
  • Split CKEditor 5 alignment plugin for more precise upgrade path
  • Fixed fragment links to properly redirect to CKEditor 5 instance
  • Added smart default settings for handling unsupported attributes

Database Improvements

  • Added relationship from revision table to main table
  • Introduced Connection::lastInsertId() method
  • Adjusted Database API to remove deprecated Drupal 9 code

Security Updates

  • Applied security fix SA-CORE-2022-001 by lauriii, cilefen, mcdruid, effulgentsia, bnjmnm, xjm, nod_
  • Removed typo3/phar-stream-wrapper and associated code as it's no longer needed with PHP 8
  • Do not register Phar stream wrapper on PHP 8 because it is not vulnerable to unserialize bugs
  • Stopped setting X-UA-Compatible header for improved security
  • Updated guzzlehttp/psr7 to 2.1.0 addressing security concerns
  • Improved trusted host settings with better documentation in default.settings.php
  • Fixed invalid JSON:API responses when maintenance mode is on for better security
  • Upgraded to Guzzle 7 with improved security features

Performance Improvements

Database Performance Improvements

  • Introduced Connection::lastInsertId() for better performance
  • Deprecated the 'return' query option and Database::RETURN_* constants
  • Moved core database drivers to modules of their own for better maintainability
  • Adjusted Database API to remove deprecated code for better performance

API Performance Optimizations

  • Used CacheableSupportsMethodInterface for performance improvement in JSON:API normalizers
  • Converted select query extenders to backend-overrideable services
  • Avoided hundreds of unnecessary installs when testing config entities
  • Improved cacheability with upgrade to asm89/stack-cors ^2.0

JavaScript and Frontend Performance

  • Reduced jQuery dependencies by refactoring to vanilla JavaScript:
    • Refactored uses of jQuery val() function
    • Refactored uses of jQuery text() function
  • Removed non-essential CSS importing and recompiled assets
  • Removed IE11 support allowing for more efficient CSS and JS

Memory Usage Improvements

  • Fixed system_post_update_sort_all_config exhausting PHP memory
  • Improved memory handling in database operations

Build and Development Performance

  • Updated PHPUnit configuration for better test performance
  • Started running PHPStan on Drupal core (level 0) for better code quality
  • Fixed PHPUnit compatibility issues for faster testing

Impact Summary

Drupal 10.0.0-alpha1 represents a significant modernization of the Drupal platform with several high-impact changes. The most notable is the requirement for PHP 8.0.2+, which means hosting environments and custom code must be updated to support this version. The upgrade to Symfony 5.4 (with preparations for Symfony 6) and Twig 3 brings Drupal in line with modern PHP frameworks but requires updates to custom code that interacts with these libraries.

The removal of IE11 support is another major shift, allowing Drupal to embrace modern CSS and JavaScript features without legacy browser constraints. This enables significant improvements in frontend performance and developer experience but may affect sites with users on older browsers.

For developers, numerous API changes and deprecations require attention, particularly in the Database API, JavaScript layer, and plugin systems. The move of core database drivers to separate modules improves maintainability but requires testing for compatibility.

Site administrators will benefit from improved UIs, particularly for identifying deprecated modules, and better performance across various systems. Content editors will see enhancements to CKEditor 5 and improvements to the Olivero theme's responsive design.

Overall, this alpha release sets the foundation for a more modern, maintainable Drupal ecosystem, though it requires significant preparation from the community to ensure a smooth transition to Drupal 10.

Statistics:

File Changed300
Line Additions3,748
Line Deletions9,776
Line Changes13,524
Total Commits201

User Affected:

  • Must update code to be compatible with PHP 8.0.2+ as this is now the minimum requirement
  • Need to adapt to Symfony 5.4 and prepare for Symfony 6 compatibility
  • Should update custom modules to work with Twig 3
  • Must remove any IE11-specific code as it's no longer supported
  • Need to update any code using deprecated APIs that have been removed

Contributors:

gobaalexpottlauriiixjmbbenjamin