Drupal Release: 9.0.0-alpha1
Pre Release
Tag Name: 9.0.0-alpha1
Release Date: 2/11/2020
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 9.0.0-alpha1 marks the first alpha release of Drupal 9, representing a significant milestone in Drupal's evolution. This release focuses on removing deprecated code, updating dependencies, and preparing for PHP 7.3+ compatibility. While maintaining API compatibility with Drupal 8, it eliminates technical debt by removing deprecated code layers and updating third-party dependencies like Symfony components and JavaScript libraries. This release is primarily intended for developers and site builders to begin testing their modules and themes for Drupal 9 compatibility.
Highlight of the Release
- First alpha release of Drupal 9, focusing on removing deprecated code and updating dependencies
- Minimum PHP version requirement raised to 7.3
- Removal of deprecated code layers across multiple core modules
- Updated third-party dependencies including Symfony components and JavaScript libraries
- Improved Media Library and Workspaces toolbar UI
- Support for PostgreSQL 12
- Better display of core compatibility ranges for available module updates
- Improved security with multiple security fixes backported from Drupal 8
Migration Guide
Preparing for Drupal 9
PHP Requirements
- Drupal 9 requires PHP 7.3 or higher. Ensure your hosting environment meets this requirement before upgrading.
Removing Deprecated Code Usage
- Use the Upgrade Status module to scan your codebase for deprecated code usage.
- Use Drupal Rector to automatically fix many deprecated code patterns.
- Review all custom and contributed modules for compatibility.
Database Changes
- Test your site with PostgreSQL 12 if you're using PostgreSQL as your database.
- Review any custom database queries, especially those using the Query Builder, as the parameter order has changed in some cases.
Theme Changes
- If your theme extends Classy, review the changes to Classy libraries and templates.
- Check for any custom templates that might be affected by the removal of deprecated markup.
- Update any JavaScript that relies on removed jQuery UI components.
Module Updates
- Update all contributed modules to versions that declare Drupal 9 compatibility.
- Look for the
core_version_requirementkey in module info files to identify Drupal 9 compatible modules. - Pay special attention to modules that interact with:
- Path aliases (legacy Path Alias subsystem has been removed)
- Entity API (BC layers removed)
- Plugin system (BC layers removed)
- Database layer (BC layers removed)
Configuration
- Review any custom configuration entities as the config entity updater behavior has changed.
- Check for any usage of removed services or deprecated constants.
JavaScript Updates
- Update any custom JavaScript that depends on outdated libraries.
- Review usage of jQuery UI components as some have been removed or forked into core.
Migration from Drupal 7
- If migrating from Drupal 7, be aware of changes to migration plugins and processes.
- Test migrations thoroughly as several migration-related fixes and changes are included in this release.
Upgrade Recommendations
For Production Sites: Do NOT upgrade production sites to Drupal 9.0.0-alpha1. This is an alpha release intended for testing and development purposes only.
For Developers and Site Builders:
- Use this alpha release to test your custom and contributed modules for Drupal 9 compatibility.
- Begin updating custom code to remove usage of deprecated APIs.
- Test your site's functionality thoroughly in a development environment.
Preparation Steps:
- First upgrade to the latest version of Drupal 8.8.x or 8.9.x.
- Use the Upgrade Status module to identify compatibility issues.
- Fix all deprecated code usage in custom modules and themes.
- Ensure all contributed modules have Drupal 9 compatible versions available.
- Verify your hosting environment supports PHP 7.3 or higher.
Timeline:
- Wait for the stable release of Drupal 9.0.0 before considering upgrading production sites.
- Use this time to prepare your codebase and environment for the upgrade.
Technical Considerations:
- This alpha release contains significant changes to core dependencies and removal of deprecated code.
- Modules that rely on deprecated APIs will not function in Drupal 9.
- The minimum PHP version requirement has been raised to 7.3.
Recommendation Summary: Use Drupal 9.0.0-alpha1 for testing and preparation only. Continue using Drupal 8.8.x or 8.9.x for production sites until Drupal 9.0.0 stable is released.
Bug Fixes
Media and Editor
- Fixed "Convert line breaks into HTML" filter to exclude
<drupal-media>tag - Fixed EditorMediaDialog triggering an "undefined index" notice for data-view-mode
- Fixed default link button styles
Views
- Fixed Views bulk forms performing redirects to confirmation pages even when not allowed for the user
- Fixed "Undefined index: identifier" in view's DisplayPluginBase->isIdentifierUnique()
- Fixed Views attachments missing for some display machine names
- Fixed exposed sort label double-escaping special characters (apostrophe)
- Fixed issue where users weren't remaining on a View page after saving it
Entity and Field Handling
- Fixed "Cannot delete or edit a block that is placed in a section of the layout_builder"
- Fixed getHighestId() failing when there is a destination ID with type string
- Fixed numerical machine names creating problems in view filters
- Fixed Config entity updater misbehaving when updating multiple entity types
- Fixed reusing initialized constraint validators overwriting validation errors
- Fixed sort options for entity reference fields being unsorted
Workspaces
- Fixed workspace drawer CSS for better consistency
- Fixed hard-coded URI string in WorkflowListBuilder that breaks if Drupal is installed in a subfolder
Migration
- Fixed multiple issues with Drupal 7 date field migrations
- Fixed migrate_drupal's Variable source plugin always returning a row for processing
- Fixed missing migration filters that are replaced with filter_null having invalid settings applied
- Fixed d7_node_title_label migration plugin incorrectly generating base_field_override
UI and Accessibility
- Fixed multi-select list items "escaping" bounding box in Off-Canvas Forms in WebKit and Mozilla browsers
- Fixed inline labels in classy theme not clearing floats
- Fixed tabledrag rows not being able to swap by dragging lower over upper row in tests
- Fixed wrong initial machine name when label has certain default values
Database and Performance
- Fixed system.schema ending up with missing schema information
- Fixed field schema incorrectly storing serial fields as int
- Fixed dblog event page for non-existing events returning 200 instead of 404
Other
- Fixed error backtrace malformatting
- Fixed shortcut hook_toolbar implementation making all pages uncacheable
- Fixed datetime getInfo() caching user's timezone causing unpredictable timestamps
New Features
Core Compatibility Information
- Added support for displaying core compatibility ranges for available module updates, making it easier to identify modules compatible with Drupal 9
- Added information about security coverage for the site's installed minor version
- Improved error messages for invalid core_version_requirement constraints
Third-Party Libraries Support
- Added support for third-party libraries in site-specific and install profile-specific libraries folders
- Updated numerous JavaScript dependencies to their latest versions
Workspace Improvements
- Improved Workspaces toolbar UI for better consistency on both desktop and mobile devices
- Added purgeDeletedWorkspacesBatch to the WorkspaceManagerInterface
Media Enhancements
- Remote Video media type now has revisions enabled by default
- Improved Media Library UI with better handling of unsaved changes when opening links in new windows
Database Support
- Added support for PostgreSQL 12
Developer Experience
- Added __toString() to the entity Query class for better debugging
- Improved error messages for field storage changes
- Added ENTITY_TYPE_list:BUNDLE cache tag for better caching of bundle listings
Security Updates
Security Advisories
- Included security fixes from multiple security advisories backported from Drupal 8:
- SA-CORE-2019-009
- SA-CORE-2019-010
- SA-CORE-2019-011
- SA-CORE-2019-012
Security Improvements
- Removed deprecated code that could potentially introduce security vulnerabilities
- Updated dependencies to more secure versions, including Guzzle to ^6.5.2
- Updated Laminas (formerly Zend Framework) components to their latest secure versions
- Improved error handling and validation in various components
Performance Improvements
Caching Improvements
- Added ENTITY_TYPE_list:BUNDLE cache tag to improve caching of single bundle listings
- Fixed shortcut hook_toolbar implementation that was making all pages uncacheable
Compression Optimization
- Disabled brotli compression of pre-compressed CSS and JS files
Database Optimizations
- Made the Connection parameter the first parameter in Select Query Builder for better performance
- Various database query optimizations across multiple modules
JavaScript Performance
- Removed @import parsing from Drupal.AjaxCommands.prototype.add_css for better performance
- Updated multiple JavaScript libraries to newer versions with performance improvements:
- Backbone.js to 1.4.0
- Underscore.js to 1.9.1
- SortableJS to 1.10.1
- jquery-once to 2.2.3
- popper.js to 1.16.0
- picturefill to 3.0.3
- modernizr to 3.8.0
Impact Summary
Drupal 9.0.0-alpha1 represents a significant milestone in Drupal's evolution, focusing on cleaning up technical debt while maintaining API compatibility with Drupal 8. The primary impact is on developers who need to update their code to remove usage of deprecated APIs that have been removed in this release.
The most notable change is the increase in minimum PHP version to 7.3, which affects hosting requirements for all Drupal 9 sites. System administrators will need to ensure their environments meet this requirement before upgrading.
For site builders, this release provides improved tools for assessing module compatibility with Drupal 9, including better display of core compatibility ranges for available module updates. This makes it easier to plan and prepare for upgrades.
Content editors will benefit from UI improvements to the Media Library and Workspaces toolbar, providing a better user experience on both desktop and mobile devices.
This alpha release includes numerous bug fixes, particularly in the areas of Views, entity handling, and migrations from Drupal 7. Performance improvements include better caching through the new ENTITY_TYPE_list:BUNDLE cache tag and updates to various JavaScript libraries.
Security has been enhanced through the inclusion of multiple security fixes backported from Drupal 8 and updates to third-party dependencies to more secure versions.
Overall, while this alpha release is not intended for production use, it provides a crucial opportunity for the Drupal community to test and prepare for the stable release of Drupal 9. The focus on removing deprecated code and updating dependencies ensures that Drupal 9 will be more maintainable and future-proof, while the preservation of API compatibility with Drupal 8 makes the upgrade path much smoother than previous major version upgrades.
Statistics:
User Affected:
- Must update code that uses deprecated APIs as they have been removed
- Need to ensure modules and themes are compatible with PHP 7.3+
- Should update JavaScript dependencies to match new versions
- Need to adapt to removal of BC layers in various components
- Should test existing modules and themes against this alpha release
