Это самое значительное обновление Друпала 8: версия включает два новых пути установки системы, демонстрационный профиль с сайтом журнала кулинарных рецептов, поддержку oEmbed media, стабильный путь обновления для одноязычных сайтов, медиабиблиотеку, рабочие области, улучшения связанные с управлением макетами, REST и тестированием.
В версию 8.6.0 встроена поддержка oEmbed для медиаданных и ядро распространяется с поддержкой встраивания в содержания видео с сервисов YouTube и Vimeo.
Медиабиблиотека содержит уже добавленные на сайт медиаданные и возможность добавления новых, поддерживая одновременное добавление нескольких медиафайлов. Страница медиабиблиотеке сделана видом и может быть легко настроена под свои нужды.
Друпал 8.6.0 распространяется с новым демонстрационным профилем, содержащим новую тему и готовый сайт с содержанием, который можно использовать для знакомства с Друпалом. Представлены моделирование данных (типы документов и разные типы полей), списки, лендинг и возможности модерирования содержания. Сайт содержит пользователей, являющихся авторами и редакторами журнала, что позволяет изучить разные аспекты использования интерфейса управления содержанием.
Демопрофиль и тему не следует использовать в качестве основы настоящего сайта, так как для этого профиля не предусмотрена обратная совместимость или путь обновления. Будущие версии Umami будут демонстрировать возможности мультиязычности, управление медиа, макетами и так далее.
Существующие возможности модерации хорошо работают, когда вам нужно перемещать отдельные части содержания через процесс правки и утверждения. Например, используя статусы «черновик», «архив», «публикация» и настроив роли, которые могут перемещать содержание между статусами.
Когда нужно подготовить и развернуть «пакеты» содержания одновременно (которые могут содержать хоть сотни и тысячи пунктов), вы увидите, что новый экспериментальный модуль Workspaces незаменим. Определите несколько рабочих областей, вносите изменения в содержание и разворачивайте его через интерфейс.
Экспериментальный модуль Layout Builder теперь поддерживает настройку на основе дисплеев (например дисплеев «полное содержание» или «результат поиска»), поэтому вместо определения порядка полей, вы можете определять макеты с динамическими разделами. Также возможно создание отдельных блоков, которые будут использоваться только в определённом макете, и не будут показываться в общем списке блоков. Это может быть удобно для показа какой-либо информации на одной лендинг-странице.
Поддержка пути миграции постоянно улучшается. В этой версии стали стабильными модули Migrate Drupal (для миграции с одной основной версии Друпала на другую) и Migrate Drupal UI (интерфейс управления миграциями). Это значит, что если у вас есть сайт на Друпале 6 или Друпале 7, то теперь вы можете обновиться до Друпала 8 используя модули ядра.
Миграция мультиязычных сайтов является экспериментальной и её возможности находятся в модуле Migrate Drupal Multilingual. В этой области значительна улучшена поддержка модуля Entity Translation для документов и поддержка модуля Title. Для перевода модуля в стабильное состояние по-прежнему требуется внедрение недостающих частей и тестирование.
За последние 6 месяцев мы также сделали множество улучшений в процессе миграции для дополнительных модулей. Многие дополнительные модули, такие как Paragraphs, Field Collections, Multifield, Media, Workflow и другие, имеют определённый уровень поддержки.
Друпал зависит от разных внешних инструментов. Чтобы заметно упростить установку сайта для быстрой оценки возможностей Друпала или окружения, введена команда quick-start, который требуется только наличие в системе PHP. Используя встроенный в PHP веб-сервер и базу данных SQLite, она быстро установит сайт на Друпале и откроет его в браузере:
$ curl -sSO https://www.drupal.org/download-latest/zip
$ unzip drupal-x.y.z.zip
$ php drupal-x.y.z/core/scripts/drupal quick-start
18/18 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
Congratulations, you installed Drupal!
Username: admin
Password: NlH5cmfEzsbS3DSs
Drupal development server started: <http://127.0.0.1:8888>
This server is not meant for production use.
One time login url: <http://127.0.0.1:8888/user/reset/1/1525772031/pyK4gRFkQSGGKJk0GhZRucybqROZ2zvV85JwQiD3bFY/login>
Press Ctrl-C to quit the Drupal development server.
Кроме того, установщик теперь распознаёт существующую конфигурацию и предоставляет возможность установки сайта с этой конфигурацией. Это позволяет перестраивать сайт (без содержания) для разработки локально. Drush также поддерживает эту возможность с помощью параметра --existing-config для команды drush site:install.
MySQL 8 включает несколько улучшений в быстродействии и поддержке языка/сравнения и Друпал 8.6.0 поддерживает восьмую версию этой СУБД. Планов по изменению необходимой для работы Друпала версии базы данных нет.
Процесс переноса всех тестов из нашей реализации SimpleTest в PHPUnit почти завершён. В этой версии у нас 3 215 тестов на основе PHPUnit и 68 тестов на SimpleTest. Система тестирования JavaScript также значительно улучшена за счёт добавления поддержки Nightwatch.js, который поддерживает создание автоматических тестов в самом JavaScript. Среди множества исправленных ошибок и улучшений внесённых в REST, теперь можно загружать файлы при REST-запросах.
* Aliases are defined in an associative array named $sites. The array is
* written in the format: '<port>.<domain>.<path>' => 'directory'. As an
* example, to map https://www.drupal.org:8080/mysite/test to the configuration
* directory sites/example.com, the array should be defined as:
* @code
* $sites = array(
* '8080.www.drupal.org.mysite.test' => 'example.com',
* );
Заменено на:
* Aliases are defined in an associative array named $sites. The array is
* written in the format: '<port>.<domain>.<path>' => 'directory'. As an
* example, to map https://www.drupal.org:8080/mysite/test to the configuration
* directory sites/example.com, the array should be defined as:
* @code
* $sites = [
* '8080.www.drupal.org.mysite.test' => 'example.com',
* ];
/**
* Database settings:
*
* The $databases array specifies the database connection or
* connections that Drupal may use. Drupal is able to connect
* to multiple databases, including multiple types of databases,
* during the same request.
*
* One example of the simplest connection array is shown below. To use the
* sample settings, copy and uncomment the code below between the @code and
* @endcode lines and paste it after the $databases declaration. You will need
* to replace the database username and password and possibly the host and port
* with the appropriate credentials for your database system.
*
* The next section describes how to customize the $databases array for more
* specific needs.
*
* @code
* $databases['default']['default'] = array (
* 'database' => 'databasename',
* 'username' => 'sqlusername',
* 'password' => 'sqlpassword',
* 'host' => 'localhost',
* 'port' => '3306',
* 'driver' => 'mysql',
* 'prefix' => '',
* 'collation' => 'utf8mb4_general_ci',
* );
* @endcode
*/
$databases = array();
Заменено на:
/**
* Database settings:
*
* The $databases array specifies the database connection or
* connections that Drupal may use. Drupal is able to connect
* to multiple databases, including multiple types of databases,
* during the same request.
*
* One example of the simplest connection array is shown below. To use the
* sample settings, copy and uncomment the code below between the @code and
* @endcode lines and paste it after the $databases declaration. You will need
* to replace the database username and password and possibly the host and port
* with the appropriate credentials for your database system.
*
* The next section describes how to customize the $databases array for more
* specific needs.
*
* @code
* $databases['default']['default'] = array (
* 'database' => 'databasename',
* 'username' => 'sqlusername',
* 'password' => 'sqlpassword',
* 'host' => 'localhost',
* 'port' => '3306',
* 'driver' => 'mysql',
* 'prefix' => '',
* 'collation' => 'utf8mb4_general_ci',
* );
* @endcode
*/
$databases = [];
/**
* Location of the site configuration files.
*
* The $config_directories array specifies the location of file system
* directories used for configuration data. On install, the "sync" directory is
* created. This is used for configuration imports. The "active" directory is
* not created by default since the default storage for active configuration is
* the database rather than the file system. (This can be changed. See "Active
* configuration settings" below).
*
* The default location for the "sync" directory is inside a randomly-named
* directory in the public files path. The setting below allows you to override
* the "sync" location.
*
* If you use files for the "active" configuration, you can tell the
* Configuration system where this directory is located by adding an entry with
* array key CONFIG_ACTIVE_DIRECTORY.
*
* Example:
* @code
* $config_directories = array(
* CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
* );
* @endcode
*/
$config_directories = array();
Заменено на:
/**
* Location of the site configuration files.
*
* The $config_directories array specifies the location of file system
* directories used for configuration data. On install, the "sync" directory is
* created. This is used for configuration imports. The "active" directory is
* not created by default since the default storage for active configuration is
* the database rather than the file system. (This can be changed. See "Active
* configuration settings" below).
*
* The default location for the "sync" directory is inside a randomly-named
* directory in the public files path. The setting below allows you to override
* the "sync" location.
*
* If you use files for the "active" configuration, you can tell the
* Configuration system where this directory is located by adding an entry with
* array key CONFIG_ACTIVE_DIRECTORY.
*
* Example:
* @code
* $config_directories = array(
* CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
* );
* @endcode
*/
$config_directories = [];
Удалены строки:
/**
* The active installation profile.
*
* Changing this after installation is not recommended as it changes which
* directories are scanned during extension discovery. If this is set prior to
* installation this value will be rewritten according to the profile selected
* by the user.
*
* @see install_select_profile()
*
* @deprecated in Drupal 8.3.0 and will be removed before Drupal 9.0.0. The
* install profile is written to the core.extension configuration. If a
* service requires the install profile use the 'install_profile' container
* parameter. Functional code can use \Drupal::installProfile().
*/
# $settings['install_profile'] = '';
/**
* Specify every reverse proxy IP address in your environment.
* This setting is required if $settings['reverse_proxy'] is TRUE.
*/
# $settings['reverse_proxy_addresses'] = array('a.b.c.d', ...);
Заменено на:
/**
* Specify every reverse proxy IP address in your environment.
* This setting is required if $settings['reverse_proxy'] is TRUE.
*/
# $settings['reverse_proxy_addresses'] = ['a.b.c.d', ...];
/**
* String overrides:
*
* To override specific strings on your site with or without enabling the Locale
* module, add an entry to this list. This functionality allows you to change
* a small number of your site's default English language interface strings.
*
* Remove the leading hash signs to enable.
*
* The "en" part of the variable name, is dynamic and can be any langcode of
* any added language. (eg locale_custom_strings_de for german).
*/
# $settings['locale_custom_strings_en'][''] = array(
# 'forum' => 'Discussion board',
# '@count min' => '@count minutes',
# );
Заменено на:
/**
* String overrides:
*
* To override specific strings on your site with or without enabling the Locale
* module, add an entry to this list. This functionality allows you to change
* a small number of your site's default English language interface strings.
*
* Remove the leading hash signs to enable.
*
* The "en" part of the variable name, is dynamic and can be any langcode of
* any added language. (eg locale_custom_strings_de for german).
*/
# $settings['locale_custom_strings_en'][''] = [
# 'forum' => 'Discussion board',
# '@count min' => '@count minutes',
# ];
/**
* Active configuration settings.
*
* By default, the active configuration is stored in the database in the
* {config} table. To use a different storage mechanism for the active
* configuration, do the following prior to installing:
* - Create an "active" directory and declare its path in $config_directories
* as explained under the 'Location of the site configuration files' section
* above in this file. To enhance security, you can declare a path that is
* outside your document root.
* - Override the 'bootstrap_config_storage' setting here. It must be set to a
* callable that returns an object that implements
* \Drupal\Core\Config\StorageInterface.
* - Override the service definition 'config.storage.active'. Put this
* override in a services.yml file in the same directory as settings.php
* (definitions in this file will override service definition defaults).
*/
# $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage');
Заменено на:
/**
* Active configuration settings.
*
* By default, the active configuration is stored in the database in the
* {config} table. To use a different storage mechanism for the active
* configuration, do the following prior to installing:
* - Create an "active" directory and declare its path in $config_directories
* as explained under the 'Location of the site configuration files' section
* above in this file. To enhance security, you can declare a path that is
* outside your document root.
* - Override the 'bootstrap_config_storage' setting here. It must be set to a
* callable that returns an object that implements
* \Drupal\Core\Config\StorageInterface.
* - Override the service definition 'config.storage.active'. Put this
* override in a services.yml file in the same directory as settings.php
* (definitions in this file will override service definition defaults).
*/
# $settings['bootstrap_config_storage'] = ['Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage'];
Пошаговое описание обновления системы до новой версии смотрите в документации.
Обновите свой сайт до версии 8.6.0, чтобы получать исправления ошибок. Следующая версия с исправлениями — 8.6.1 — выйдет 3 октября 2018 года.
Обновление сайта с версии 8.5.6 до версии 8.6.0 через файл updae.php точно такое же как обновление между версиями 8.5.5 и 8.5.6. Друпал 8.6.0 также обновит несколько зависимостей. Модулям, темам и переводам могут потребоваться обновления, поэтому тестируйте обновление на тестовой машине до обновления основного сайта.
Отметьте: Друпал 8 начнёт требовать PHP версии 7+ с марта 2019 года. Если ваш сайт размещается на хостинге с PHP 5.5–, то начните планировать обновление PHP (для достижения лучших результатов на версию 7.2).
Друпал 7 по-прежнему полностью поддерживается и будет получать исправления ошибок при выходе всех версий Друпала 8. Друпал 6 не поддерживается. Для таких одноязычных сайтов теперь можно использовать стабильный путь миграции через интерфейс реализованный в ядре. При обновлении мультиязычных сайтов сообщайте о найденных проблемах.
Минорные версии содержат дополнения и новые возможности поддерживающие обратную совместимость. Таким образом, модули, темы и переводы поддерживавшиеся в Друпале 8.5.х, поддерживаются и в версии 8.6.х. Но новая версия включает некоторые изменения в строках, интерфейсе и API, поэтому могут потребоваться незначительные изменения.
Спасибо всем сделавшим вклад в Друпал 8.6!