Drupal 8.3.0 发布
Drupal 8.3.0 于2017年4月6日发布了!
Drupal 8.3.0 是 Drupal 8 的一个补丁版本,也是 8.3.x 系列的补丁第一个版本,现已可以用于生产站点了。
BigPipe模块首次从实验模块中毕业,新增了工作流Workflows(大单位比较期待的功能)、布局探索 Layout Discovery(主题开发会更容易)、字段布局 Field Layout 等三个实验模块,改进了一系列核心和非核心功能,详见:https://www.drupal.org/project/drupal/releases/8.3.0。升级可以参考:升级。
向后兼容中断以正确序列化模块输出
#2751325: All serialized values are strings, should be integers/booleans when appropriate corrects a bug that would output all scalar values as strings rather than the correct data type in serialized output, including REST responses. This fix may require some client application updates if the application relies on these values being strings.
An opt-in backwards compatibility mode is configurable at the site level, but not enabled by default. Read the change record for more information on this change and on configuring the backwards compatibility mode.
下面是几个重要问题已在 8.3.0 中修复。
- #2640496: Revision ID in {node} and {node_revision} can get out of sync as well as a blocking issue #2640496: Store revision ID in originalRevisionId property to use after revision id is updated are resolved to address data integrity issues with the revisioning system.
- #2606772: Long Twig cache directories can cause failures on some filesystems shortens directories to a predictable length, prevents installs to directories that are too deep, and warns on existing and moved sites where the files directory is too deep. This will mitigate errors on Windows/IIS and some other environments.
- #2665152: Simplify module form structure and fix bugs when Suhosin is used resolves an issue where some modules (including experimental modules) could not be enabled on sites using Suhosin.
- #2846782: Bulk operation actions might not act on the selected items resolves a recently discovered issue where the wrong data might be deleted by Views bulk forms on high-traffic sites.
- #2822190: PathValidator validates based on a RequestContext leaked from the current request, resulting in false negatives during CLI requests and POST submissions
新的稳定功能
The BigPipe module has become stable in 8.3.0. This module provides an advanced implementation of Facebook's BigPipe page rendering strategy, leading to greatly improved perceived performance for pages with dynamic, personalized, or uncacheable content. See the BigPipe handbook page.
改进了编辑功能
- #2831442: Switch to CKEditor 4.6's new "Moono-Lisa" skin
- #2421427: Can now drag and drop images into image fields in Quick Edit mode.
- #2307451: Improved usability for image fields on mobile devices.
- #2239419: CKEditor now utilizes the AutoGrow plugin to better take advantage of larger screen sizes.
改进了站点构建和管理功能
- #665790: Redesign the status report page
- #2656278: Convert "Limit allowed HTML tags" input field to a textarea
- #2574767: Standardized display of Views overview page to more closely match that of other administrative overview pages.
- #2830449: Views filter order now matches the table column order below in Content and People overview pages.
- #2840832: Add layout templates based on Panels layouts to core
- Resolved #2858852: [8.3.x regression] Extra fields cannot be used with tabledrag in Manage Display, which was a regression following entity display improvements that support the Layout Initiative.
- #2075889: Make Drupal handle incoming paths in a case-insensitive fashion for routing resolves a usability, DX, and migration path bug where case variants of the same path would result in 404s for routes. Path aliases in Drupal 8 were already case-insensitive, but route paths were not. With this change, exact matches are still supported for route paths with different cases, but the normal behavior is changed to be case-insensitive for consistency with Drupal 7, path aliases, and user expectations.
- #2826728: Block layout action removes instance, but contextual link deletes all instances.
改进的 web services 功能
Drupal 8.3.0 significantly improves REST and API-first support with the following new features, API and developer experience improvements, and bug fixes.
- #2808233: REST 403 responses don't tell the user *why* access is not granted: requires deep Drupal understanding to figure out
- #2815845: Importing (deploying) REST resource config entities should automatically do the necessary route rebuilding
- #2291055: REST API now supports the registering of users.
- #2807501: Anonymous REST API performance increased by 60% by utilizing the internal page cache.
- Improved the response bodies and status codes for requests with incorrect request headers or request bodies, in dozens of situations.
- #2737719: Massive overhaul of the test coverage
- #2808233: 403 responses now return reason why access was denied
改进的性能和可扩展性
- #2556025: Optimized class loader detection made more generic to support class loaders other than ApcClassLoader.
- #1446932: Improve statistics performance by adding a swappable backend.
- #2824548: Move token info cache to data cache bin and #2824547: Change ViewsData to use the default cache bin instead of discovery move caches to the default cache bin to prevent APCu memory from being filled too quickly.
测试改进
- #2605664: Align TestDiscovery and bootstrap.php's non-permissive loading of PSR-4 namespaces for traits
- #2809117: Integrated PHPUnit verbose output in SimpleTest UI.
- Improved backward compatibility between BrowserTestBase and WebTestBase.
- Expanded automated test coverage for JavaScript.
- #2294731: Simpletest fails to run PHPUnit on Windows
- #2849222: settings.testing.php / testing.services.yml not picked up by BrowserTestBase
- #2770921: Convert chunk of WTB to BTB by just moving classes, changing use statements adding traits updates many core tests to use a more modern testing API.
实验性模块
The modules listed in this section are considered experimental for this release. Experimental modules are provided with Drupal core for testing purposes, but are not yet fully supported.
New experimental modules
- Workflows (alpha stability)
- This module abstracts the transitions and states system from Content Moderation into a separate component so that it can be reused by modules that implement non-publishing workflows (such as for users or products) as well as content publishing workflows. The module also includes support for default workflow states and transitions.
- Layout Discovery (alpha stability)
- Provides an API for modules or themes to register layouts as well as five common default layouts. By providing this API in core, we help make it possible for core and contributed layout solutions to be compatible with each other. The following contributed modules already have development versions that support the new API:
- Display Suite 8.3.x (beta version available).
- Panels 8.4.x (in development).
- Panelizer 8.4.x (beta version available).
See the layout roadmap for the next steps for this module.
- Field Layout (alpha stability)
- This module provides the ability for site builders to rearrange fields on content types, block types, etc. into new regions, for both the form and display, on the same forms provided by the normal field user interface. See the entity display layout roadmap for the next steps for this module.
Updated experimental modules
- Migrate (beta stability)
- As of 8.3.0, the Migrate API now has beta stability, meaning that no future backwards-incompatible API changes are anticipated, so developers can leverage these APIs in custom migrations. Migrate will be considered completely stable after the issues tagged Migrate critical are resolved, to ensure the base API fully supports critical functionality.
- Migrate Drupal and Migrate Drupal UI (alpha stability)
-
- This release adds configuration translation support to migrations.
- Core provides migrations for most Drupal 6 data and can be used for migrating Drupal 6 sites to Drupal 8. A critical issue with user picture IDs is addressed in this release, and the Drupal 6 to 8 migration path is nearing beta stability. Some gaps remain, such as for dates, references, and some internationalization data. (Outstanding issues for the Drupal 6 to Drupal 8 migration)
- The Drupal 7 to Drupal 8 migration is incomplete, but is suitable for developers who would like to help improve the migration, and can be used to test upgrades especially for simple Drupal 7 sites. This release adds support for migration of Drupal 7 core node translations and most high-priority migrations are available. (Outstanding issues for the Drupal 7 to Drupal 8 migration)
- Drush support is currently only available in the Drupal Upgrade contributed module. (See the pull request to add support to Drush.)
- Content Moderation (alpha stability)
-
Content Moderation allows content workflow states such as Draft, Archived, and Published, and now depends on the new experimental Workflows module (described above) to supply workflows and transitions for these states. See the Workflows change record for more information.
Important: If you previously installed Content Moderation in 8.2.x, you must uninstall it before upgrading to 8.3.0 or you will encounter fatal errors. You will need to reconfigure your workflows and transitions with the new module after upgrading and re-enabling Content Moderation, so be sure to back them up beforehand. (No upgrade path is supplied since the module is still alpha stability.)
Content Moderation includes many additional improvements in this release:
- #2787881: Non-translatable entity types can now be moderated.
- #2799785: Entity types without bundles can be moderated, as long as they have revisions.
- #2809123: When reverting a moderated revision, the moderation state is now reverted too.
- The module now publishes any entity type that implements EntityPublishedInterface, not just Nodes.
- #2830581: Fix ContentModeration workflow type to calculate correct dependencies
- #2850601: ContentModeration workflow type plugin incorrectly preserves bundle keys on sorting and does not sort entity types
See the Content Moderation roadmap for the next steps for this module. Both Workflow and Content Moderation must reach beta stability within six months for Content Moderation to remain in core.
- Settings Tray (alpha stability)
- This is a prototype of Dries's proposed Outside-In usability enhancements. It allows configuring page elements such as blocks and menus from the frontend of your site. See the roadmap of outstanding issues, which includes both planned improvements and known accessibility and interaction bugs. The module is more polished in this release, but still considered alpha stability. It needs to become stable within the next six months to remain in core.
- DateTime Range (alpha stability)
- The DateTime Range module provides a field type that allows end dates. This is important for contributed modules like the Calendar module to work with Drupal 8 core. The DateTime Range module plan is mostly complete and DateTime Range is expected to be beta stability soon, with only a couple of usability issues remaining. This module needs to become stable within the next six months to remain in core.
- Place Block (alpha stability)
- This feature allows the user to place a block on any page and see the region where it will be displayed, without having to navigate to a backend administration form. The Place Block module needs to reach stability within the next six months to remain in core.
- Inline Form Errors (alpha stability)
- This provides a proof-of-concept for showing form errors inline for improved accessibility. Since the last minor release, Inline Form Errors has improved significantly, including usability and accessibility fixes as well as underlying fixes to the form system. The Inline Form Errors experimental module's functionality is now automatically disabled while editing a field with Quick Edit because its method of displaying errors was not compatible with Quick Edit's. (There is a followup to allow any form to opt out of Inline Form Errors.) See the outstanding issues for Inline Form Errors for additional issues that remain before Inline Form Errors can become stable.
包管理改进
- #2758737: Add a packages.drupal.org to root composer.json
- #2866109: Composer/installers update to 1.2.0 adding support for installing custom modules and themes to directories other than /vendor
- #2809477: Added Package.json enabling new JavaScript language features
其他 API 改进
Modules requiring Drupal 8.3.0 or later can take advantage of these additional API improvements:
- #2810303: Deprecated several routing services in favor of two unified services.
- #2287073: Allow Views contextual filters to expose the context using argument validation plugins
- #2721179: Replaced the deprecated Symfony ExecutionContextInterface for better Symfony compatibility
- #2789315: EntityPublishedInterface and #2810381: EntityPublishedTrait have been added to give a #2812811: generic publishing API, and are being used by Node and Comment entity types.
- #2767025: Add entity type label for a collection of entities
第三方库更新
In addition to the vendor updates and coding standards changes described below, PHP CodeSniffer and Drupal Coder have been added as development requirements: #2744463: Add phpcs/coder to dev requirements. (As a reminder, dev dependencies should never be added to production or Internet-facing sites. See Drupal 8 will no longer include dev dependencies in release packages for more information.)
#2859772: Update Symfony components to ~2.8.18
- #2804365: Update Twig to 1.25
- #2763787: Upgraded random_compat to 2.0.2 and then to 2.0.10 (see below).
- Provided upstream fixes for Mink and Symfony for #2808085: Pipe char in locators break Mink and Symfony element search, and updated dependencies accordingly.
- #2852636: Update jQuery to version 2.2.4
- #2848215: Update CKEditor library to 4.6.2
- Finally, #2862254: Update non-Symfony dependencies before 8.3.0 adds patch-level updates to the latest versions for all dependencies wherever possible. Minor updates are also included for the Symfony PSR-7 Bridge and Zend Stdlib, which Drupal does not depend on directly.
修改了代码标准
Drupal 8.3.0 has adopted the following coding standards changes:
- Drupal core itself and the coding standards were updated to now use the short PHP array syntax.
- Most global constants in Drupal 8 have been deprecated in favor of class constants. As a best practice, use appropriate class constants rather than global constants.
更新说明
从 8.2.3 开始,打包的Drupal版本将不再包含开发 PHP 库(development PHP libraries)。更多信息请查看这篇文章:Drupal 8 will no longer include dev dependencies in release packages 。
更新日志:
关于这两个版本的更新日志,请查看 8.3.0 对应的发布说明。
更新说明:
关于这两个版本的更新说明,请查看 8.3.0 对应的发布说明。
已知问题:
Drupal 8 currently has a number of known issues related to incorrect tracking of file usage, which can result in files being unexpectedly deleted from a site. Site owners experiencing unexplained file loss should consider setting "Delete orphaned files" to "Never" on /admin/config/media/file-system until these issues are resolved, and note the following issues:
- #2801777: Give users the option to prevent Drupal from automatically marking unused files as temporary
- #2708411: File usage not incremented when adding new translation
- #1239558: Deleting a node with revisions does not release file usage
- #2666700: User profile images unexpectedly deleted
- #2810355: Images lost when changing node language
Search the issue queue for all known issues.