Drupal Release: 8.0-alpha13
Pre Release
Tag Name: 8.0-alpha13
Release Date: 7/1/2014
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 8.0-alpha13 brings significant architectural improvements and refactoring to the core system. Major changes include refactoring the bootstrap process to better utilize the kernel, decoupling entity field storage from configurable fields, converting numerous theme functions to Twig templates, and implementing condition plugins for block visibility. This release also includes extensive documentation improvements, accessibility enhancements, and bug fixes across various modules. The update represents continued progress toward a more modern, object-oriented Drupal with improved developer experience and frontend capabilities.
Highlight of the Release
- Refactored bootstrap process to better utilize the kernel
- Decoupled entity field storage from configurable fields
- Converted numerous theme functions to Twig templates
- Implemented condition plugins for block visibility
- Updated PHPUnit to 4.x
- Added mobile-friendly meta tags
- Improved accessibility with better contrast and ARIA attributes
- Enhanced documentation across multiple systems
Migration Guide
Upgrading to Drupal 8.0-alpha13
Bootstrap Changes
If you have custom code that interacts with Drupal's bootstrap process, you'll need to update it to work with the refactored bootstrap that better utilizes the kernel (#2016629). Review the changes in index.php and related bootstrap files.
Entity Field Storage
The decoupling of entity field storage from configurable fields (#2144263) represents a significant architectural change. If you have custom field types or are working with field storage directly:
// Old approach
// Directly accessing field storage through configurable fields
// New approach
// Use the appropriate field storage API methods
Block Visibility
Block visibility has been refactored to use condition plugins (#2278541). If you have custom block visibility logic:
// Old approach
// Custom visibility logic in block settings
// New approach
// Create a condition plugin that implements the appropriate interfaces
Theme Functions to Twig
Many theme functions have been converted to Twig templates. Update your theme overrides accordingly:
- theme_date() → input__date.html.twig
- theme_input() → input.html.twig
- theme_form_element_label() → form-element-label.html.twig
- theme_update_last_check → update-last-check.html.twig
- Various other theme functions in Image, File, and Language modules
PHPUnit 4.x
Tests have been updated to use PHPUnit 4.x (#2114823). If you have custom tests, ensure they're compatible with the new version:
- Update any deprecated assertions
- Check for compatibility with the new test runner
- Review test class inheritance if extending core test classes
RouteMatch
A new RouteMatch class has been introduced (#2238217) and hook_help() now uses RouteMatch instead of Request (#2294129):
// Old approach
function mymodule_help($path, $arg) {
// ...
}
// New approach
function mymodule_help($route_name, RouteMatchInterface $route_match) {
// ...
}
Renamed Modules
- custom_block.module has been renamed to block_content.module (#1920862)
Deprecated Functions
The following functions have been deprecated:
- drupal_anonymous_user() (#2185315)
- format_string() (#2278501)
Use their replacements instead.
Upgrade Recommendations
for Drupal 8.0-alpha13
This is an alpha release and is not recommended for production sites. It's intended for developers and site builders who want to test the latest features and provide feedback on Drupal 8's development.
Who should upgrade:
- Developers actively contributing to Drupal 8
- Module maintainers preparing for Drupal 8 compatibility
- Site builders testing Drupal 8 features and providing feedback
- Anyone testing migration paths from Drupal 7 to Drupal 8
Who should wait:
- Production sites (continue using Drupal 7)
- Sites without dedicated development resources for testing and troubleshooting
- Sites with complex custom functionality that hasn't been ported to Drupal 8
Upgrade path:
If you're already running a previous Drupal 8 alpha, you can update to this release by following the standard update procedure:
- Back up your code, files, and database
- Put the site in maintenance mode
- Update the codebase
- Run update.php
- Clear caches
- Test thoroughly before taking the site out of maintenance mode
Note that between alpha releases, there may be significant changes requiring manual intervention or updates to custom code. Always review the release notes carefully before upgrading.
Bug Fixes
Core System
- Exception Handling: Fixed exceptions caught and printed from index.php to not return a 200 status code (#2284111).
- Page Title Display: Fixed display of page title even if it's 0 (#578400).
- Installer Messaging: Improved installer REQUIREMENT_WARNING messaging (#2240021).
- Installation Information: Fixed install.php to give accurate information if Drupal is already installed (#1963760).
Entity System
- Entity Reference Fields: Fixed FieldInstance::__construct() loading all field_config entities (#2211723).
- Entity Type Keys: Fixed unnecessary high memory usage in EntityType::getKeys() (#2269003).
- Entity Display Configuration: Fixed third-party modules storing extra configuration in EntityDisplay (#2005434).
Field System
- Default Value Handling: Improved default value handling of fields to be consistent (#2226267).
- Files and Image Widgets: Fixed completely broken files and image widgets (#2172241).
- Field Format Settings: Fixed non-existing 'max_length' setting on EntityRef fields (#2278051).
Cache System
- Rendered Entity Caching: Fixed rendered entities to be cached by time zone (#2274791).
- Library Extension Caches: Consolidated library extension caches into a single cache entry (#2223143).
- Plugin Discovery Caching: Stopped caching plugin discovery/info hooks by language (#2281905).
Text Processing
- Text Filters: Fixed text filters to be able to add #attached, #post_render_cache, and cache tags (#2217877).
- Text Truncation: Fixed search_excerpt() to use unicode ellipsis characters (#2279623).
- Word Breaking: Fixed word break in table cells (#2278507).
Comment System
- Tracker Page Ordering: Fixed tracker page not ordering results properly (#2224917).
- Comment Statistics: Fixed comment and comment_entity_statistics only supporting integer entity ids (#2205215).
Views
- Frontpage View: Fixed frontpage view feed display rendering the node comment form (#2289095).
- ViewListBuilder: Fixed ViewListBuilder::getDisplaysList() not handling empty admin strings (#2282477).
User Interface
- CKEditor Support: Fixed CKEditor not supporting the "readonly" attribute (#2275491).
- Admin Page Grouping: Cleaned up module page grouping (#2278565).
- Breadcrumb Issues: Fixed breadcrumb on single log event pages (#2267053).
Translation System
- Translation Dependencies: Fixed translation of low-level info/annotations leading to circular dependencies (#2244447).
- Translation Loading: Fixed Drupal 8 loading alpha2 translations instead of alpha12 (#2285795).
Testing
- PHPUnit Coverage: Fixed PHPUnit coverage tests (#2287385).
- Test Encapsulation: Ensured web tests are encapsulated (#2280501).
- Random Test Failures: Fixed random fail in LanguageFallbackTest (#2291777).
New Features
Core Architecture
- Refactored Bootstrap Process: The bootstrap process has been refactored to better utilize the kernel, improving performance and maintainability (#2016629).
- Decoupled Entity Field Storage: Entity field storage has been decoupled from configurable fields, providing more flexibility for developers (#2144263).
- RouteMatch Class: A new RouteMatch class has been introduced to improve routing (#2238217).
- Context-Aware Plugins: Added service for handling context-aware plugins (#2277981).
- Display Variants: Introduced Display Variants for the block rendering flow (#2286357).
Block System
- Condition Plugins for Block Visibility: Block visibility has been refactored to use condition plugins (#2278541).
- Current Theme Condition: Added a condition for the current theme (#2288783).
- Current Path Condition: Created a Current Path Condition (#1921544).
- User Role Condition: Created a User Role Condition (#1921540).
Field System
- Allowed Formats Property: Added #allowed_formats property for #type 'text_format' to filter available formats (#1423244).
- EntityReferenceField Method: Added EntityReferenceField::referencedEntities() method (#2073661).
- Field Schema Unique Keys: Allow field schemas to contain unique keys (#2209049).
Comment System
- Comment Type Config Entity: Created a comment-type config entity to use as comment bundles (#2228763).
- ForumIndexStorage: Split ForumManager to create ForumIndexStorage (#2205185).
Views
- OPML Functionality: Added OPML functionality to views (#2154957).
- GET Query Parameter Plugin: Provided a GET query parameter default argument plugin (#2255659).
User Interface
- Collapsible Menu: Made menu collapsible on small screen resolutions (#1880488).
- Mobile-Friendly Meta Tags: Added mobile-friendly meta tags to HTML output (#1468582).
- Modal Style Update: Updated modal styling (#2113911).
- Table Footer Support: Tables now take an optional footer variable and produce
<tfoot>(#806982).
Accessibility
- Menu Item Contrast: Improved contrast for on-focus menu items (#1929010).
- Navigation ARIA Attributes: Added aria-label or aria-describedby attributes to all
<nav>elements (#2052473). - 'Access Shortcuts' Permission: Added new permission for shortcut access (#1541094).
Internationalization
- Translation Handling: Improved handling of field translatability (#2143291).
Plugin System
- Optional Token Descriptions: Made token and token type descriptions optional (#1911768).
- MimeTypeGuessers: Converted file_get_mimetype() to use Symfony MimeTypeGuessers (#1921558).
Security Updates
No significant security fixes were explicitly mentioned in the release notes. However, it's worth noting that the update to PHPUnit 4.x (#2114823) may include security improvements in the testing framework.
The improvements to exception handling from index.php (#2284111) to ensure exceptions don't return a 200 status code could have security implications by preventing information disclosure through error messages while maintaining proper HTTP response codes.
Performance Improvements
Core Performance
- Bootstrap Optimization: The refactored bootstrap process better utilizes the kernel, resulting in improved performance and resource usage (#2016629).
- Entity Type Memory Usage: Fixed unnecessary high memory usage in EntityType::getKeys() (#2269003).
- Field Form Generation: Generate lighter $form[$field] structures for better form rendering performance (#2293723).
Cache System
- Library Extension Caches: Consolidated library extension caches into a single cache entry, reducing cache overhead (#2223143).
- Plugin Discovery Caching: Improved caching of plugin discovery by stopping language-based caching of plugin discovery/info hooks (#2281905).
- Memory Cache Backend: Fixed MemoryBackend's cache entries that could be modified unintentionally due to object references (#2293163).
Testing
- Test Performance: Fixed test performance of Drupal\system\Tests\Module\ModuleApiTest (#2254203).
Database
- Query Optimization: Converted several database queries to entity queries for better performance:
- Converted comment_user_predelete query to entity query (#2290157)
- Converted comment_entity_predelete query to entity query (#2291445)
- Removed join comments on users table (#2292815)
Impact Summary
Drupal 8.0-alpha13 represents a significant step forward in Drupal 8's development, with major architectural improvements and refinements across the system. The most impactful changes include:
-
Core Architecture Improvements: The refactored bootstrap process and decoupled entity field storage provide a more maintainable and flexible foundation. These changes improve performance and create a more modular system that will benefit both core and contributed modules.
-
Enhanced Developer Experience: The introduction of RouteMatch, context-aware plugins, and condition plugins for block visibility gives developers more powerful and consistent APIs. The update to PHPUnit 4.x modernizes the testing framework, allowing for better test coverage and reliability.
-
Frontend Modernization: The continued conversion of theme functions to Twig templates advances Drupal 8's theming system. Mobile-friendly meta tags, improved modal styling, and collapsible menus enhance the responsive capabilities of Drupal sites.
-
Accessibility Enhancements: Improved contrast, ARIA attributes for navigation elements, and other accessibility improvements make Drupal more inclusive and compliant with accessibility standards.
-
Documentation Expansion: Significant improvements to API documentation, including new topic pages for Entity API, Typed Data, Internationalization, Views, and Object-Oriented Programming, make Drupal 8 more approachable for new developers.
This alpha release demonstrates Drupal 8's evolution toward a more modern, object-oriented CMS with improved developer experience, frontend capabilities, and accessibility. While still not ready for production use, it provides a clear view of the direction and improvements coming in the final release.
Statistics:
User Affected:
- Improved bootstrap process utilizing the kernel for better performance and maintainability
- Decoupled entity field storage from configurable fields for more flexibility
- New condition plugins system for block visibility
- Updated PHPUnit to 4.x for better testing capabilities
- New RouteMatch class for improved routing
- Context-aware plugins with better service handling
