From 69f5f7a673a8782c92342fc8e419981854e50ea9 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 4 Jun 2020 15:43:25 +0300 Subject: [PATCH 01/31] GH-291: Drupal 9 compatibility . Remove deprecated drupal_set_message, file_scan_directory. --- .../src/Plugin/Deriver/LibraryDeriver.php | 12 +++++- .../ui_patterns_views.module | 2 +- .../Deriver/AbstractPatternsDeriver.php | 23 +++++++--- .../Deriver/AbstractYamlPatternsDeriver.php | 43 ++++++++++++++++++- 4 files changed, 71 insertions(+), 9 deletions(-) diff --git a/modules/ui_patterns_library/src/Plugin/Deriver/LibraryDeriver.php b/modules/ui_patterns_library/src/Plugin/Deriver/LibraryDeriver.php index 88e34399..581384c3 100644 --- a/modules/ui_patterns_library/src/Plugin/Deriver/LibraryDeriver.php +++ b/modules/ui_patterns_library/src/Plugin/Deriver/LibraryDeriver.php @@ -4,6 +4,8 @@ use Drupal\Component\Serialization\Yaml; use Drupal\Core\Extension\ExtensionDiscovery; +use Drupal\Core\File\FileSystemInterface; +use Drupal\Core\Messenger\MessengerInterface; use Drupal\Core\TypedData\TypedDataManager; use Drupal\ui_patterns\Plugin\Deriver\AbstractYamlPatternsDeriver; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -80,6 +82,10 @@ class LibraryDeriver extends AbstractYamlPatternsDeriver { * The base plugin ID. * @param \Drupal\Core\TypedData\TypedDataManager $typed_data_manager * Typed data manager service. + * @param \Drupal\Core\Messenger\MessengerInterface $messenger + * Messenger. + * @param \Drupal\Core\File\FileSystemInterface + * File system service. * @param string $root * Application root directory. * @param array $extensions @@ -89,8 +95,8 @@ class LibraryDeriver extends AbstractYamlPatternsDeriver { * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler * Theme handler service. */ - public function __construct($base_plugin_id, TypedDataManager $typed_data_manager, $root, array $extensions, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) { - parent::__construct($base_plugin_id, $typed_data_manager); + public function __construct($base_plugin_id, TypedDataManager $typed_data_manager, MessengerInterface $messenger, FileSystemInterface $file_system, $root, array $extensions, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) { + parent::__construct($base_plugin_id, $typed_data_manager, $messenger, $file_system); $this->root = $root; $this->fileExtensions = $extensions; $this->moduleHandler = $module_handler; @@ -105,6 +111,8 @@ public static function create(ContainerInterface $container, $base_plugin_id) { return new static( $base_plugin_id, $container->get('typed_data_manager'), + $container->get('messenger'), + $container->get('file_system'), $container->get('app.root'), $container->getParameter('ui_patterns_library.file_extensions'), $container->get('module_handler'), diff --git a/modules/ui_patterns_views/ui_patterns_views.module b/modules/ui_patterns_views/ui_patterns_views.module index 388b2872..0b2ad4c6 100644 --- a/modules/ui_patterns_views/ui_patterns_views.module +++ b/modules/ui_patterns_views/ui_patterns_views.module @@ -47,7 +47,7 @@ function template_preprocess_pattern_views_row(array &$variables) { $variables['pattern'] = []; if ($view->preview && !isset($view->element['#embed'])) { - drupal_set_message(t("Pattern Views row plugin does not support preview."), 'warning'); + \Drupal::messenger()->addWarning(t("Pattern Views row plugin does not support preview.")); $variables['pattern'] = ['#type' => 'status_messages']; } elseif (!empty($fields)) { diff --git a/src/Plugin/Deriver/AbstractPatternsDeriver.php b/src/Plugin/Deriver/AbstractPatternsDeriver.php index 9f24f8fd..152fb307 100644 --- a/src/Plugin/Deriver/AbstractPatternsDeriver.php +++ b/src/Plugin/Deriver/AbstractPatternsDeriver.php @@ -3,7 +3,9 @@ namespace Drupal\ui_patterns\Plugin\Deriver; use Drupal\Component\Plugin\Derivative\DeriverBase; +use Drupal\Core\Messenger\MessengerInterface; use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface; +use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\TypedData\TypedDataManager; use Drupal\ui_patterns\Definition\PatternDefinition; use Drupal\ui_patterns\TypedData\PatternDataDefinition; @@ -16,6 +18,8 @@ */ abstract class AbstractPatternsDeriver extends DeriverBase implements PatternsDeriverInterface, ContainerDeriverInterface { + use StringTranslationTrait; + /** * Typed data manager service. * @@ -23,12 +27,20 @@ abstract class AbstractPatternsDeriver extends DeriverBase implements PatternsDe */ protected $typedDataManager; + /** + * The messenger. + * + * @var \Drupal\Core\Messenger\MessengerInterface + */ + protected $messenger; + /** * AbstractPatternsDeriver constructor. */ - public function __construct($base_plugin_id, TypedDataManager $typed_data_manager) { + public function __construct($base_plugin_id, TypedDataManager $typed_data_manager, MessengerInterface $messenger) { $this->basePluginId = $base_plugin_id; $this->typedDataManager = $typed_data_manager; + $this->messenger = $messenger; } /** @@ -37,7 +49,8 @@ public function __construct($base_plugin_id, TypedDataManager $typed_data_manage public static function create(ContainerInterface $container, $base_plugin_id) { return new static( $base_plugin_id, - $container->get('typed_data_manager') + $container->get('typed_data_manager'), + $container->get('messenger') ); } @@ -82,14 +95,14 @@ protected function isValidPatternDefinition(PatternDefinition $definition) { $violations = $this->typedDataManager->create($data_definition, $definition->toArray())->validate(); if ($violations->count()) { /** @var \Symfony\Component\Validator\ConstraintViolation $violation */ - drupal_set_message(t("Pattern ':id' is skipped because of the following validation error(s):", [':id' => $definition->id()]), 'error'); + $this->messenger->addError($this->t("Pattern ':id' is skipped because of the following validation error(s):", [':id' => $definition->id()])); foreach ($violations as $violation) { - $message = t('Validation error on ":id.:property": :message', [ + $message = $this->t('Validation error on ":id.:property": :message', [ ':id' => $definition->id(), ':property' => $violation->getPropertyPath(), ':message' => $violation->getMessage(), ]); - drupal_set_message($message, 'error'); + $this->messenger->addError($message); } return FALSE; } diff --git a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php index 2a2bb9fd..25ff6a59 100644 --- a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php +++ b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php @@ -2,7 +2,11 @@ namespace Drupal\ui_patterns\Plugin\Deriver; +use Drupal\Core\File\FileSystemInterface; +use Drupal\Core\Messenger\MessengerInterface; use Drupal\Core\Site\Settings; +use Drupal\Core\TypedData\TypedDataManager; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Class AbstractYamlPatternsDeriver. @@ -13,6 +17,43 @@ */ abstract class AbstractYamlPatternsDeriver extends AbstractPatternsDeriver implements YamlPatternsDeriverInterface { + /** + * File system service. + * + * @var \Drupal\Core\File\FileSystemInterface + */ + protected $fileSystem; + + /** + * Constructor. + * + * @param string $base_plugin_id + * The base plugin ID. + * @param \Drupal\Core\TypedData\TypedDataManager $typed_data_manager + * Typed data manager service. + * @param \Drupal\Core\Messenger\MessengerInterface $messenger + * Messenger. + * @param \Drupal\Core\File\FileSystemInterface + * File system service. + */ + public function __construct($base_plugin_id, TypedDataManager $typed_data_manager, MessengerInterface $messenger, FileSystemInterface $file_system) { + parent::__construct($base_plugin_id, $typed_data_manager, $messenger); + + $this->fileSystem = $file_system; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, $base_plugin_id) { + return new static( + $base_plugin_id, + $container->get('typed_data_manager'), + $container->get('messenger'), + $container->get('file_system') + ); + } + /** * {@inheritdoc} */ @@ -21,7 +62,7 @@ public function fileScanDirectory($directory) { $extensions = $this->getFileExtensions(); $extensions = array_map('preg_quote', $extensions); $extensions = implode('|', $extensions); - return file_scan_directory($directory, "/{$extensions}$/", $options, 0); + return $this->fileSystem->scanDirectory($directory, "/{$extensions}$/", $options); } /** From b5868fbb3bf47e84332478420364ac8d06b2eecf Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 4 Jun 2020 15:47:15 +0300 Subject: [PATCH 02/31] GH-291: Drupal 9 compatibility . Remove deprecated ConfigurablePluginInterface. --- src/Plugin/PatternSourceBase.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Plugin/PatternSourceBase.php b/src/Plugin/PatternSourceBase.php index 114aa603..ffc53400 100644 --- a/src/Plugin/PatternSourceBase.php +++ b/src/Plugin/PatternSourceBase.php @@ -6,13 +6,13 @@ use Drupal\Component\Plugin\PluginBase; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\ui_patterns\Definition\PatternSourceField; -use Drupal\Component\Plugin\ConfigurablePluginInterface; +use Drupal\Component\Plugin\ConfigurableInterface; use Drupal\Component\Plugin\PluginInspectionInterface; /** * Base class for UI Patterns Source plugins. */ -abstract class PatternSourceBase extends PluginBase implements PatternSourceInterface, PluginInspectionInterface, ConfigurablePluginInterface { +abstract class PatternSourceBase extends PluginBase implements PatternSourceInterface, PluginInspectionInterface, ConfigurableInterface { use StringTranslationTrait; @@ -58,11 +58,4 @@ public function getContextProperty($name) { throw new PluginException($this->t("Context property '@property' from @class is missing or empty.", ['@property' => $name, '@class' => $reflection->name])); } - /** - * {@inheritdoc} - */ - public function calculateDependencies() { - return []; - } - } From 896dbf9272b45e238654b6d54981cdbf9eec6c90 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 4 Jun 2020 15:56:11 +0300 Subject: [PATCH 03/31] GH-291: Drupal 9 compatibility. Remove deprecated ThemeHandler::setDefault. --- .../FunctionalJavascript/UiPatternsLibraryOverviewTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php index 3b1fecba..7a902a81 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php @@ -24,11 +24,11 @@ class UiPatternsLibraryOverviewTest extends WebDriverTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->container->get('theme_installer')->install(['ui_patterns_library_theme_test']); - $this->container->get('theme_handler')->setDefault('ui_patterns_library_theme_test'); + $this->container->get('config.factory')->getEditable('system.theme')->set('default', 'ui_patterns_library_theme_test')->save(); $this->container->set('theme.registry', NULL); $user = $this->drupalCreateUser(['access patterns page']); From a51f36bbe1979761b98cbaf49339cdd18faba8d9 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 4 Jun 2020 15:59:50 +0300 Subject: [PATCH 04/31] GH-291: Drupal 9 compatibility. Remove deprecated PHPUnit_Framework_MockObject_MockObject. --- tests/src/Kernel/Plugin/PatternBaseTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/Kernel/Plugin/PatternBaseTest.php b/tests/src/Kernel/Plugin/PatternBaseTest.php index 9134bf8d..418321e8 100644 --- a/tests/src/Kernel/Plugin/PatternBaseTest.php +++ b/tests/src/Kernel/Plugin/PatternBaseTest.php @@ -46,7 +46,7 @@ public function hookLibraryInfoBuildDataProvider() { * @param array $methods * List of methods to mock. * - * @return \PHPUnit_Framework_MockObject_MockObject + * @return \PHPUnit\Framework\MockObject\MockObject * Mock object. */ protected function getUiPatternBaseMock(array $plugin_definition = [], array $methods = []) { From 3b99ed9ad3da24712ca4228fe91ae8e5821f690b Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 4 Jun 2020 19:06:16 +0300 Subject: [PATCH 05/31] GH-291: Drupal 9 compatibility. Fix deprecated EntityManager. --- .../ui_patterns_library_theme_test.info.yml | 1 + src/Plugin/UiPatterns/Source/FieldSource.php | 14 +++++++------- ui_patterns.info.yml | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/ui_patterns_library/tests/modules/ui_patterns_library_theme_test/ui_patterns_library_theme_test.info.yml b/modules/ui_patterns_library/tests/modules/ui_patterns_library_theme_test/ui_patterns_library_theme_test.info.yml index 386175b7..31b27cd8 100644 --- a/modules/ui_patterns_library/tests/modules/ui_patterns_library_theme_test/ui_patterns_library_theme_test.info.yml +++ b/modules/ui_patterns_library/tests/modules/ui_patterns_library_theme_test/ui_patterns_library_theme_test.info.yml @@ -1,3 +1,4 @@ name: 'UI Patterns library theme test' type: theme core: 8.x +base theme: stable diff --git a/src/Plugin/UiPatterns/Source/FieldSource.php b/src/Plugin/UiPatterns/Source/FieldSource.php index 06ce4473..c86cda70 100644 --- a/src/Plugin/UiPatterns/Source/FieldSource.php +++ b/src/Plugin/UiPatterns/Source/FieldSource.php @@ -2,7 +2,7 @@ namespace Drupal\ui_patterns\Plugin\UiPatterns\Source; -use Drupal\Core\Entity\EntityManager; +use Drupal\Core\Entity\EntityFieldManager; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\ui_patterns\Plugin\PatternSourceBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -24,16 +24,16 @@ class FieldSource extends PatternSourceBase implements ContainerFactoryPluginInt /** * Entity manager service. * - * @var \Drupal\Core\Entity\EntityManager + * @var \Drupal\Core\Entity\EntityFieldManager */ - protected $entityManager; + protected $entityFieldManager; /** * {@inheritdoc} */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManager $entity_manager) { + public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityFieldManager $entity_manager) { parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->entityManager = $entity_manager; + $this->entityFieldManager = $entity_manager; } /** @@ -44,7 +44,7 @@ public static function create(ContainerInterface $container, array $configuratio $configuration, $plugin_id, $plugin_definition, - $container->get('entity.manager') + $container->get('entity_field.manager') ); } @@ -53,7 +53,7 @@ public static function create(ContainerInterface $container, array $configuratio */ public function getSourceFields() { $sources = []; - $fields = $this->entityManager->getFieldDefinitions($this->getContextProperty('entity_type'), $this->getContextProperty('entity_bundle')); + $fields = $this->entityFieldManager->getFieldDefinitions($this->getContextProperty('entity_type'), $this->getContextProperty('entity_bundle')); /** @var \Drupal\Core\Field\FieldDefinitionInterface $field */ foreach ($fields as $field) { diff --git a/ui_patterns.info.yml b/ui_patterns.info.yml index 94f9c2ea..a746b6c6 100644 --- a/ui_patterns.info.yml +++ b/ui_patterns.info.yml @@ -2,6 +2,7 @@ name: UI Patterns type: module description: UI patterns core: 8.x +core_version_requirement: ^8 || ^9 package: User interface dependencies: - drupal:system (>=8.3.0) From e332178bf0d2b074ded4a2fd9dbd571bd0052f07 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Fri, 5 Jun 2020 17:21:18 +0300 Subject: [PATCH 06/31] GH-291: Drupal 9 compatibility. Fix tests --- .travis.yml | 12 ++++++------ .../ui_patterns_ds_test/ui_patterns_ds_test.info.yml | 1 + modules/ui_patterns_ds/ui_patterns_ds.info.yml | 1 + .../ui_patterns_field_group_test.info.yml | 1 + .../ui_patterns_field_group.info.yml | 1 + .../ui_patterns_layouts_test.info.yml | 1 + .../ui_patterns_layouts/ui_patterns_layouts.info.yml | 1 + .../ui_patterns_library_bad_definition_test.info.yml | 1 + .../ui_patterns_library_module_test.info.yml | 1 + .../ui_patterns_library_theme_test.info.yml | 3 ++- .../ui_patterns_library/ui_patterns_library.info.yml | 1 + .../config/install/views.view.articles.yml | 1 + .../ui_patterns_views_test.info.yml | 1 + modules/ui_patterns_views/ui_patterns_views.info.yml | 1 + .../ui_patterns_field_source_test.info.yml | 1 + .../ui_patterns_render_test.info.yml | 1 + tests/src/Functional/UiPatternsPreviewRenderTest.php | 7 +++++++ tests/src/Kernel/Plugin/Deriver/YamlDeriverTest.php | 2 +- tests/src/Kernel/Plugin/PatternBaseTest.php | 2 +- tests/src/Kernel/UiPatternsManagerTest.php | 2 +- 20 files changed, 32 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index d148b376..5c523e4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ sudo: required language: php php: -- 7.1 -- 7.2 +- 7.3 +- 7.4 services: - docker @@ -12,13 +12,13 @@ env: global: - DOCKER_COMPOSE_VERSION=1.17.1 matrix: - - DRUPAL_VERSION=~8.6 - DRUPAL_VERSION=~8.7 - - DRUPAL_VERSION=8.8.x-dev + - DRUPAL_VERSION=~8.8 + - DRUPAL_VERSION=9.0.x-dev matrix: allow_failures: - - env: DRUPAL_VERSION=8.8.x-dev + - env: DRUPAL_VERSION=9.0.x-dev before_install: - docker-compose up -d @@ -32,4 +32,4 @@ script: - docker-compose exec -u www-data php ./vendor/bin/phpunit notifications: - email: false \ No newline at end of file + email: false diff --git a/modules/ui_patterns_ds/tests/modules/ui_patterns_ds_test/ui_patterns_ds_test.info.yml b/modules/ui_patterns_ds/tests/modules/ui_patterns_ds_test/ui_patterns_ds_test.info.yml index 16ede36d..2142c359 100644 --- a/modules/ui_patterns_ds/tests/modules/ui_patterns_ds_test/ui_patterns_ds_test.info.yml +++ b/modules/ui_patterns_ds/tests/modules/ui_patterns_ds_test/ui_patterns_ds_test.info.yml @@ -2,6 +2,7 @@ name: 'UI Patterns Display Suite Test' type: module description: 'Test module for UI Patterns.' core: 8.x +core_version_requirement: ^8 || ^9 hidden: true package: 'User interface' dependencies: diff --git a/modules/ui_patterns_ds/ui_patterns_ds.info.yml b/modules/ui_patterns_ds/ui_patterns_ds.info.yml index 3058bad0..a37275e2 100644 --- a/modules/ui_patterns_ds/ui_patterns_ds.info.yml +++ b/modules/ui_patterns_ds/ui_patterns_ds.info.yml @@ -2,6 +2,7 @@ name: UI Patterns Display Suite type: module description: Use patterns as Display Suite field templates. It also provides Display Suite pattern sources. core: 8.x +core_version_requirement: ^8 || ^9 package: User interface dependencies: - ds:ds diff --git a/modules/ui_patterns_field_group/tests/modules/ui_patterns_field_group_test/ui_patterns_field_group_test.info.yml b/modules/ui_patterns_field_group/tests/modules/ui_patterns_field_group_test/ui_patterns_field_group_test.info.yml index cfe353b8..a6226496 100644 --- a/modules/ui_patterns_field_group/tests/modules/ui_patterns_field_group_test/ui_patterns_field_group_test.info.yml +++ b/modules/ui_patterns_field_group/tests/modules/ui_patterns_field_group_test/ui_patterns_field_group_test.info.yml @@ -2,6 +2,7 @@ name: 'UI Patterns Field Group Test' type: module description: 'Test module for UI Patterns.' core: 8.x +core_version_requirement: ^8 || ^9 hidden: true package: 'User interface' dependencies: diff --git a/modules/ui_patterns_field_group/ui_patterns_field_group.info.yml b/modules/ui_patterns_field_group/ui_patterns_field_group.info.yml index dab10213..2c5a4b0b 100644 --- a/modules/ui_patterns_field_group/ui_patterns_field_group.info.yml +++ b/modules/ui_patterns_field_group/ui_patterns_field_group.info.yml @@ -2,6 +2,7 @@ name: UI Patterns Field Group type: module description: Use patterns as field groups templates. core: 8.x +core_version_requirement: ^8 || ^9 package: User interface dependencies: - field_group:field_group diff --git a/modules/ui_patterns_layouts/tests/modules/ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml b/modules/ui_patterns_layouts/tests/modules/ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml index ccef506d..a0569c2c 100644 --- a/modules/ui_patterns_layouts/tests/modules/ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml +++ b/modules/ui_patterns_layouts/tests/modules/ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml @@ -2,6 +2,7 @@ name: 'UI Patterns Layouts Test' type: module description: 'Test module for UI Patterns.' core: 8.x +core_version_requirement: ^8 || ^9 hidden: true package: 'User interface' dependencies: diff --git a/modules/ui_patterns_layouts/ui_patterns_layouts.info.yml b/modules/ui_patterns_layouts/ui_patterns_layouts.info.yml index 472023e2..d0f06b18 100644 --- a/modules/ui_patterns_layouts/ui_patterns_layouts.info.yml +++ b/modules/ui_patterns_layouts/ui_patterns_layouts.info.yml @@ -2,6 +2,7 @@ name: UI Patterns Layouts type: module description: Use patterns as layouts via the Layout Discovery module. core: 8.x +core_version_requirement: ^8 || ^9 package: User interface dependencies: - drupal:layout_discovery diff --git a/modules/ui_patterns_library/tests/modules/ui_patterns_library_bad_definition_test/ui_patterns_library_bad_definition_test.info.yml b/modules/ui_patterns_library/tests/modules/ui_patterns_library_bad_definition_test/ui_patterns_library_bad_definition_test.info.yml index 8763ac09..5c6900d0 100644 --- a/modules/ui_patterns_library/tests/modules/ui_patterns_library_bad_definition_test/ui_patterns_library_bad_definition_test.info.yml +++ b/modules/ui_patterns_library/tests/modules/ui_patterns_library_bad_definition_test/ui_patterns_library_bad_definition_test.info.yml @@ -1,3 +1,4 @@ name: 'UI Patterns bad definition test' type: module core: 8.x +core_version_requirement: ^8 || ^9 diff --git a/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/ui_patterns_library_module_test.info.yml b/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/ui_patterns_library_module_test.info.yml index a46c4374..1ccbcdea 100644 --- a/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/ui_patterns_library_module_test.info.yml +++ b/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/ui_patterns_library_module_test.info.yml @@ -1,3 +1,4 @@ name: 'UI Patterns library module test' type: module core: 8.x +core_version_requirement: ^8 || ^9 \ No newline at end of file diff --git a/modules/ui_patterns_library/tests/modules/ui_patterns_library_theme_test/ui_patterns_library_theme_test.info.yml b/modules/ui_patterns_library/tests/modules/ui_patterns_library_theme_test/ui_patterns_library_theme_test.info.yml index 31b27cd8..d0069a21 100644 --- a/modules/ui_patterns_library/tests/modules/ui_patterns_library_theme_test/ui_patterns_library_theme_test.info.yml +++ b/modules/ui_patterns_library/tests/modules/ui_patterns_library_theme_test/ui_patterns_library_theme_test.info.yml @@ -1,4 +1,5 @@ name: 'UI Patterns library theme test' type: theme core: 8.x -base theme: stable +core_version_requirement: ^8 || ^9 +base theme: stark diff --git a/modules/ui_patterns_library/ui_patterns_library.info.yml b/modules/ui_patterns_library/ui_patterns_library.info.yml index 3121a23a..23ad2ff1 100644 --- a/modules/ui_patterns_library/ui_patterns_library.info.yml +++ b/modules/ui_patterns_library/ui_patterns_library.info.yml @@ -2,6 +2,7 @@ name: UI Patterns Library type: module description: Exposed patterns in you modules and themes and display them in a pattern library page. core: 8.x +core_version_requirement: ^8 || ^9 package: User interface dependencies: - ui_patterns:ui_patterns diff --git a/modules/ui_patterns_views/tests/modules/ui_patterns_views_test/config/install/views.view.articles.yml b/modules/ui_patterns_views/tests/modules/ui_patterns_views_test/config/install/views.view.articles.yml index dffea42c..59f8ca52 100644 --- a/modules/ui_patterns_views/tests/modules/ui_patterns_views_test/config/install/views.view.articles.yml +++ b/modules/ui_patterns_views/tests/modules/ui_patterns_views_test/config/install/views.view.articles.yml @@ -15,6 +15,7 @@ tag: '' base_table: node_field_data base_field: nid core: 8.x +core_version_requirement: ^8 || ^9 display: default: display_plugin: default diff --git a/modules/ui_patterns_views/tests/modules/ui_patterns_views_test/ui_patterns_views_test.info.yml b/modules/ui_patterns_views/tests/modules/ui_patterns_views_test/ui_patterns_views_test.info.yml index 03073c51..e6954e14 100644 --- a/modules/ui_patterns_views/tests/modules/ui_patterns_views_test/ui_patterns_views_test.info.yml +++ b/modules/ui_patterns_views/tests/modules/ui_patterns_views_test/ui_patterns_views_test.info.yml @@ -2,6 +2,7 @@ name: 'UI Patterns Views Test' type: module description: 'Test module for UI Patterns.' core: 8.x +core_version_requirement: ^8 || ^9 hidden: true package: 'User interface' dependencies: diff --git a/modules/ui_patterns_views/ui_patterns_views.info.yml b/modules/ui_patterns_views/ui_patterns_views.info.yml index 30371593..f1297fdd 100644 --- a/modules/ui_patterns_views/ui_patterns_views.info.yml +++ b/modules/ui_patterns_views/ui_patterns_views.info.yml @@ -2,6 +2,7 @@ name: UI Patterns Views type: module description: Use patterns as Views templates. core: 8.x +core_version_requirement: ^8 || ^9 package: User interface dependencies: - drupal:views diff --git a/tests/modules/ui_patterns_field_source_test/ui_patterns_field_source_test.info.yml b/tests/modules/ui_patterns_field_source_test/ui_patterns_field_source_test.info.yml index c3f61f75..7f770e42 100644 --- a/tests/modules/ui_patterns_field_source_test/ui_patterns_field_source_test.info.yml +++ b/tests/modules/ui_patterns_field_source_test/ui_patterns_field_source_test.info.yml @@ -1,3 +1,4 @@ name: 'UI Patterns field source test' type: module core: 8.x +core_version_requirement: ^8 || ^9 diff --git a/tests/modules/ui_patterns_render_test/ui_patterns_render_test.info.yml b/tests/modules/ui_patterns_render_test/ui_patterns_render_test.info.yml index 9519a677..df40108b 100644 --- a/tests/modules/ui_patterns_render_test/ui_patterns_render_test.info.yml +++ b/tests/modules/ui_patterns_render_test/ui_patterns_render_test.info.yml @@ -1,3 +1,4 @@ name: 'UI Patterns Render Test' type: module core: 8.x +core_version_requirement: ^8 || ^9 diff --git a/tests/src/Functional/UiPatternsPreviewRenderTest.php b/tests/src/Functional/UiPatternsPreviewRenderTest.php index 9d93928f..380d1f0a 100644 --- a/tests/src/Functional/UiPatternsPreviewRenderTest.php +++ b/tests/src/Functional/UiPatternsPreviewRenderTest.php @@ -12,6 +12,13 @@ */ class UiPatternsPreviewRenderTest extends BrowserTestBase { + /** + * Default theme. See https://www.drupal.org/node/3083055. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * Disable schema validation when running tests. * diff --git a/tests/src/Kernel/Plugin/Deriver/YamlDeriverTest.php b/tests/src/Kernel/Plugin/Deriver/YamlDeriverTest.php index 18061ac6..5bb39cfd 100644 --- a/tests/src/Kernel/Plugin/Deriver/YamlDeriverTest.php +++ b/tests/src/Kernel/Plugin/Deriver/YamlDeriverTest.php @@ -6,7 +6,7 @@ use Drupal\ui_patterns\UiPatterns; /** - * @coversDefaultClass \Drupal\ui_patterns\Plugin\Deriver\YamlDeriver + * @coversDefaultClass \Drupal\ui_patterns\Plugin\Deriver\AbstractPatternsDeriver * * @group ui_patterns */ diff --git a/tests/src/Kernel/Plugin/PatternBaseTest.php b/tests/src/Kernel/Plugin/PatternBaseTest.php index 418321e8..5298b389 100644 --- a/tests/src/Kernel/Plugin/PatternBaseTest.php +++ b/tests/src/Kernel/Plugin/PatternBaseTest.php @@ -17,7 +17,7 @@ class PatternBaseTest extends AbstractUiPatternsTest { * * @dataProvider hookLibraryInfoBuildDataProvider * - * @covers ::hookLibraryInfoBuild + * @covers ::getLibraryDefinitions */ public function testHookLibraryInfoBuild($actual, $expected) { $pattern = $this->getUiPatternBaseMock($actual); diff --git a/tests/src/Kernel/UiPatternsManagerTest.php b/tests/src/Kernel/UiPatternsManagerTest.php index 506aa3b8..cfe3d790 100644 --- a/tests/src/Kernel/UiPatternsManagerTest.php +++ b/tests/src/Kernel/UiPatternsManagerTest.php @@ -21,7 +21,7 @@ class UiPatternsManagerTest extends AbstractUiPatternsTest { /** * Test UiPatternsManager::getPatternDefinition. * - * @covers ::getPatternDefinition + * @covers ::getPatterns */ public function testGetPattern() { $manager = UiPatterns::getManager(); From 0ea6510860163142d5f35c4ff358827863da05f7 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Fri, 5 Jun 2020 17:35:30 +0300 Subject: [PATCH 07/31] GH-291: Drupal 9 compatibility. Fix coding standards. --- modules/ui_patterns_ds/ui_patterns_ds.services.yml | 1 - .../ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml | 1 - .../ui_patterns_library_module_test.info.yml | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/ui_patterns_ds/ui_patterns_ds.services.yml b/modules/ui_patterns_ds/ui_patterns_ds.services.yml index 580ff770..1cea2e17 100644 --- a/modules/ui_patterns_ds/ui_patterns_ds.services.yml +++ b/modules/ui_patterns_ds/ui_patterns_ds.services.yml @@ -1,4 +1,3 @@ services: ui_patterns_ds.field_template_processor: class: Drupal\ui_patterns_ds\FieldTemplateProcessor - diff --git a/modules/ui_patterns_layouts/tests/modules/ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml b/modules/ui_patterns_layouts/tests/modules/ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml index a0569c2c..9f2d26c6 100644 --- a/modules/ui_patterns_layouts/tests/modules/ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml +++ b/modules/ui_patterns_layouts/tests/modules/ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml @@ -19,4 +19,3 @@ config_devel: - field.field.node.article.body - node.type.article - core.entity_view_display.node.article.default - diff --git a/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/ui_patterns_library_module_test.info.yml b/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/ui_patterns_library_module_test.info.yml index 1ccbcdea..8fbd6cc8 100644 --- a/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/ui_patterns_library_module_test.info.yml +++ b/modules/ui_patterns_library/tests/modules/ui_patterns_library_module_test/ui_patterns_library_module_test.info.yml @@ -1,4 +1,4 @@ name: 'UI Patterns library module test' type: module core: 8.x -core_version_requirement: ^8 || ^9 \ No newline at end of file +core_version_requirement: ^8 || ^9 From 4e489eacd5294bf8d1ce090776ba95b4a68440dd Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Fri, 5 Jun 2020 18:00:44 +0300 Subject: [PATCH 08/31] GH-291: Drupal 9 compatibility. Fix CI --- .travis.yml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5c523e4c..75b65d9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ services: env: global: - - DOCKER_COMPOSE_VERSION=1.17.1 + - DOCKER_COMPOSE_VERSION=1.25.5 matrix: - DRUPAL_VERSION=~8.7 - DRUPAL_VERSION=~8.8 diff --git a/docker-compose.yml b/docker-compose.yml index 4796a637..a92d1ac7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: MYSQL_PASSWORD: drupal php: - image: wodby/drupal-php:${TRAVIS_PHP_VERSION}-4.6.3 + image: wodby/drupal-php:${TRAVIS_PHP_VERSION}-4.15.9 environment: DB_HOST: mariadb DB_USER: drupal From 3fb9f4bd5167fc25c70e289fbeeecfe8c6407777 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Mon, 8 Jun 2020 10:56:35 +0300 Subject: [PATCH 09/31] GH-291: Drupal 9 compatibility. Fix coding standard issues. --- .../src/Plugin/Deriver/LibraryDeriver.php | 2 +- .../UiPatternsLibraryOverviewTest.php | 2 +- src/Definition/PatternSourceField.php | 23 +++++++++++++++++++ .../Deriver/AbstractYamlPatternsDeriver.php | 2 +- src/Plugin/PatternSourceBase.php | 3 ++- 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/modules/ui_patterns_library/src/Plugin/Deriver/LibraryDeriver.php b/modules/ui_patterns_library/src/Plugin/Deriver/LibraryDeriver.php index 581384c3..5601003b 100644 --- a/modules/ui_patterns_library/src/Plugin/Deriver/LibraryDeriver.php +++ b/modules/ui_patterns_library/src/Plugin/Deriver/LibraryDeriver.php @@ -84,7 +84,7 @@ class LibraryDeriver extends AbstractYamlPatternsDeriver { * Typed data manager service. * @param \Drupal\Core\Messenger\MessengerInterface $messenger * Messenger. - * @param \Drupal\Core\File\FileSystemInterface + * @param \Drupal\Core\File\FileSystemInterface $file_system * File system service. * @param string $root * Application root directory. diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php index 7a902a81..d85778b3 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php @@ -67,7 +67,7 @@ public function testOverviewPage() { public function testSinglePages() { $session = $this->assertSession(); - foreach ($this->getExpectedPatterns() as $index => $pattern) { + foreach ($this->getExpectedPatterns() as $pattern) { $this->drupalGet('/patterns/' . $pattern['name']); $session->elementContains('css', 'h1', $pattern['label']); diff --git a/src/Definition/PatternSourceField.php b/src/Definition/PatternSourceField.php index 4809e5dc..e345a6f1 100644 --- a/src/Definition/PatternSourceField.php +++ b/src/Definition/PatternSourceField.php @@ -11,9 +11,32 @@ class PatternSourceField { const FIELD_KEY_SEPARATOR = ':'; + /** + * Field name. + * + * @var mixed + */ private $fieldName; + + /** + * Field label. + * + * @var mixed + */ private $fieldLabel; + + /** + * Plugin ID. + * + * @var mixed + */ private $pluginId; + + /** + * Plugin label. + * + * @var mixed + */ private $pluginLabel; /** diff --git a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php index 25ff6a59..819c7eb6 100644 --- a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php +++ b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php @@ -33,7 +33,7 @@ abstract class AbstractYamlPatternsDeriver extends AbstractPatternsDeriver imple * Typed data manager service. * @param \Drupal\Core\Messenger\MessengerInterface $messenger * Messenger. - * @param \Drupal\Core\File\FileSystemInterface + * @param \Drupal\Core\File\FileSystemInterface $file_system * File system service. */ public function __construct($base_plugin_id, TypedDataManager $typed_data_manager, MessengerInterface $messenger, FileSystemInterface $file_system) { diff --git a/src/Plugin/PatternSourceBase.php b/src/Plugin/PatternSourceBase.php index ffc53400..560f69a3 100644 --- a/src/Plugin/PatternSourceBase.php +++ b/src/Plugin/PatternSourceBase.php @@ -55,7 +55,8 @@ public function getContextProperty($name) { return $configuration['context'][$name]; } $reflection = new \ReflectionClass($this); - throw new PluginException($this->t("Context property '@property' from @class is missing or empty.", ['@property' => $name, '@class' => $reflection->name])); + $message = sprintf("Context property '%s' from %s is missing or empty.", $name, $reflection->name); + throw new PluginException($message); } } From 954ad7eee4b65479d30e73a3233d1dbe63b9b095 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Mon, 8 Jun 2020 12:38:39 +0300 Subject: [PATCH 10/31] GH-291: Drupal 9 compatibility. Fix tests. --- .../Kernel/Plugin/Deriver/YamlDeriverTest.php | 21 +++++++++++++++++-- tests/src/Kernel/UiPatternsManagerTest.php | 14 +++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/tests/src/Kernel/Plugin/Deriver/YamlDeriverTest.php b/tests/src/Kernel/Plugin/Deriver/YamlDeriverTest.php index 5bb39cfd..a7bb4053 100644 --- a/tests/src/Kernel/Plugin/Deriver/YamlDeriverTest.php +++ b/tests/src/Kernel/Plugin/Deriver/YamlDeriverTest.php @@ -6,7 +6,7 @@ use Drupal\ui_patterns\UiPatterns; /** - * @coversDefaultClass \Drupal\ui_patterns\Plugin\Deriver\AbstractPatternsDeriver + * @coversDefaultClass \Drupal\ui_patterns\Plugin\Deriver\AbstractYamlPatternsDeriver * * @group ui_patterns */ @@ -16,17 +16,34 @@ class YamlDeriverTest extends AbstractUiPatternsTest { * {@inheritdoc} */ public static $modules = [ + 'system', 'ui_patterns', + 'ui_patterns_library', ]; + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + + // Theme with existing patterns has to be enabled. + $default_theme = 'ui_patterns_library_theme_test'; + $this->container->get('theme_installer')->install([$default_theme]); + $this->container->get('config.factory')->getEditable('system.theme')->set('default', $default_theme)->save(); + } + /** * Test get derivative definitions. * * @covers ::getDerivativeDefinitions */ public function testGetDerivativeDefinitions() { + UiPatterns::getManager()->clearCachedDefinitions(); foreach (UiPatterns::getManager()->getDefinitions() as $definition) { - $this->assertArrayHasKey(['id', 'provider', 'base path'], $definition); + $this->assertNotEmpty($definition->id(), 'Pattern definition id is empty'); + $this->assertNotEmpty($definition->getProvider(), 'Pattern definition provider is empty'); + $this->assertNotEmpty($definition->getBasePath(), 'Pattern definition base path is empty'); } } diff --git a/tests/src/Kernel/UiPatternsManagerTest.php b/tests/src/Kernel/UiPatternsManagerTest.php index cfe3d790..a7f3198f 100644 --- a/tests/src/Kernel/UiPatternsManagerTest.php +++ b/tests/src/Kernel/UiPatternsManagerTest.php @@ -15,9 +15,23 @@ class UiPatternsManagerTest extends AbstractUiPatternsTest { * {@inheritdoc} */ public static $modules = [ + 'system', 'ui_patterns', + 'ui_patterns_library', ]; + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + + // Theme with existing patterns has to be enabled. + $default_theme = 'ui_patterns_library_theme_test'; + $this->container->get('theme_installer')->install([$default_theme]); + $this->container->get('config.factory')->getEditable('system.theme')->set('default', $default_theme)->save(); + } + /** * Test UiPatternsManager::getPatternDefinition. * From 0a776496b24bd45ad4a7e87b20922a916e790992 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Mon, 8 Jun 2020 13:15:33 +0300 Subject: [PATCH 11/31] GH-291: Drupal 9 compatibility. Fix CI. --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 75b65d9b..26e8f644 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,19 +12,20 @@ env: global: - DOCKER_COMPOSE_VERSION=1.25.5 matrix: - - DRUPAL_VERSION=~8.7 - DRUPAL_VERSION=~8.8 - - DRUPAL_VERSION=9.0.x-dev + - DRUPAL_VERSION=~8.9 + - DRUPAL_VERSION=~9.0 + - DRUPAL_VERSION=9.1.x-dev matrix: allow_failures: - - env: DRUPAL_VERSION=9.0.x-dev + - env: DRUPAL_VERSION=9.1.x-dev before_install: - docker-compose up -d install: -- docker-compose exec -u root php composer require webflo/drupal-core-require-dev:$DRUPAL_VERSION --dev +- docker-compose exec -u root php composer require drupal/core-dev:$DRUPAL_VERSION --dev - docker-compose exec -u root php chown -R www-data:www-data build script: From 64ba96dd8df6fcf3c966f9c24e30308d30d9c1d1 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Mon, 8 Jun 2020 15:23:41 +0300 Subject: [PATCH 12/31] GH-291: Drupal 9 compatibility. Fix CI. --- composer.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index d4d08d1b..0195d91e 100644 --- a/composer.json +++ b/composer.json @@ -15,21 +15,21 @@ "require-dev": { "composer/installers": "^1.2", "cweagans/composer-patches": "~1.4", - "drupal-composer/drupal-scaffold": "^2.2", + "drupal-composer/drupal-scaffold": "^2.6", + "drupal/coffee": "~1", + "drupal/config_devel": "~1", "drupal/config_installer": "~1", "drupal/console": "~1", - "drush/drush": "~9", + "drupal/core-dev": "~9.0", "drupal/ds": "~3", "drupal/field_group": "~1", - "drupal/coffee": "~1", - "drupal/config_devel": "~1", - "drupal/panels": "~4", "drupal/page_manager": "*", + "drupal/panels": "~4", "drupal/paragraphs": "~1", "drupal/token": "~1", - "phpro/grumphp": "~0.14", - "webflo/drupal-core-require-dev": "~8.7", - "openeuropa/task-runner": "~1.0-beta3" + "drush/drush": "~9", + "openeuropa/task-runner": "~1.0-beta6", + "phpro/grumphp": "~0.19" }, "repositories": [ { From ac1dce392d958297a4beba965be72d350e505a09 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Mon, 8 Jun 2020 16:50:25 +0300 Subject: [PATCH 13/31] GH-291: Drupal 9 compatibility. Fix tests. --- .../src/FunctionalJavascript/UiPatternsFieldRenderTest.php | 7 +++++++ .../FunctionalJavascript/UiPatternsFieldSettingsTest.php | 7 +++++++ .../FunctionalJavascript/UiPatternsLayoutsRenderTest.php | 7 +++++++ .../FunctionalJavascript/UiPatternsLayoutsSettingsTest.php | 7 +++++++ .../UiPatternsLibraryBadDefinitionTest.php | 7 +++++++ .../FunctionalJavascript/UiPatternsLibraryOverviewTest.php | 7 +++++++ .../src/FunctionalJavascript/UiPatternsViewsRenderTest.php | 7 +++++++ 7 files changed, 49 insertions(+) diff --git a/modules/ui_patterns_ds/tests/src/FunctionalJavascript/UiPatternsFieldRenderTest.php b/modules/ui_patterns_ds/tests/src/FunctionalJavascript/UiPatternsFieldRenderTest.php index b99f62b5..64ef3168 100644 --- a/modules/ui_patterns_ds/tests/src/FunctionalJavascript/UiPatternsFieldRenderTest.php +++ b/modules/ui_patterns_ds/tests/src/FunctionalJavascript/UiPatternsFieldRenderTest.php @@ -12,6 +12,13 @@ */ class UiPatternsFieldRenderTest extends WebDriverTestBase { + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * Disable schema validation when running tests. * diff --git a/modules/ui_patterns_ds/tests/src/FunctionalJavascript/UiPatternsFieldSettingsTest.php b/modules/ui_patterns_ds/tests/src/FunctionalJavascript/UiPatternsFieldSettingsTest.php index 74f7e31f..2487d9a9 100644 --- a/modules/ui_patterns_ds/tests/src/FunctionalJavascript/UiPatternsFieldSettingsTest.php +++ b/modules/ui_patterns_ds/tests/src/FunctionalJavascript/UiPatternsFieldSettingsTest.php @@ -12,6 +12,13 @@ */ class UiPatternsFieldSettingsTest extends WebDriverTestBase { + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * Disable schema validation when running tests. * diff --git a/modules/ui_patterns_layouts/tests/src/FunctionalJavascript/UiPatternsLayoutsRenderTest.php b/modules/ui_patterns_layouts/tests/src/FunctionalJavascript/UiPatternsLayoutsRenderTest.php index 7aab0498..44feaaf4 100644 --- a/modules/ui_patterns_layouts/tests/src/FunctionalJavascript/UiPatternsLayoutsRenderTest.php +++ b/modules/ui_patterns_layouts/tests/src/FunctionalJavascript/UiPatternsLayoutsRenderTest.php @@ -12,6 +12,13 @@ */ class UiPatternsLayoutsRenderTest extends WebDriverTestBase { + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * Disable schema validation when running tests. * diff --git a/modules/ui_patterns_layouts/tests/src/FunctionalJavascript/UiPatternsLayoutsSettingsTest.php b/modules/ui_patterns_layouts/tests/src/FunctionalJavascript/UiPatternsLayoutsSettingsTest.php index f07732c7..0b1c589f 100644 --- a/modules/ui_patterns_layouts/tests/src/FunctionalJavascript/UiPatternsLayoutsSettingsTest.php +++ b/modules/ui_patterns_layouts/tests/src/FunctionalJavascript/UiPatternsLayoutsSettingsTest.php @@ -12,6 +12,13 @@ */ class UiPatternsLayoutsSettingsTest extends WebDriverTestBase { + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * Disable schema validation when running tests. * diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryBadDefinitionTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryBadDefinitionTest.php index 89ad31f0..3f41c4fa 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryBadDefinitionTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryBadDefinitionTest.php @@ -11,6 +11,13 @@ */ class UiPatternsLibraryBadDefinitionTest extends WebDriverTestBase { + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * {@inheritdoc} */ diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php index d85778b3..8d9e848b 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php @@ -12,6 +12,13 @@ */ class UiPatternsLibraryOverviewTest extends WebDriverTestBase { + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * {@inheritdoc} */ diff --git a/modules/ui_patterns_views/tests/src/FunctionalJavascript/UiPatternsViewsRenderTest.php b/modules/ui_patterns_views/tests/src/FunctionalJavascript/UiPatternsViewsRenderTest.php index 239a6ac5..b58ee19c 100644 --- a/modules/ui_patterns_views/tests/src/FunctionalJavascript/UiPatternsViewsRenderTest.php +++ b/modules/ui_patterns_views/tests/src/FunctionalJavascript/UiPatternsViewsRenderTest.php @@ -14,6 +14,13 @@ class UiPatternsViewsRenderTest extends WebDriverTestBase { use TwigDebugTrait; + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * Disable schema validation when running tests. * From f488a11826eb69e6552d7720ada76819724c0a16 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Tue, 9 Jun 2020 11:46:02 +0300 Subject: [PATCH 14/31] GH-291: Drupal 9 compatibility. Fix CI. Restore settings back to use webflo --- .travis.yml | 9 ++++----- composer.json | 16 ++++++++-------- phpunit.xml.dist | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26e8f644..324ac99d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: php php: - 7.3 -- 7.4 services: - docker @@ -12,9 +11,9 @@ env: global: - DOCKER_COMPOSE_VERSION=1.25.5 matrix: - - DRUPAL_VERSION=~8.8 - - DRUPAL_VERSION=~8.9 - - DRUPAL_VERSION=~9.0 + - DRUPAL_VERSION=~8.8.7 + - DRUPAL_VERSION=~8.9.0 + - DRUPAL_VERSION=~9.0.0 - DRUPAL_VERSION=9.1.x-dev matrix: @@ -25,7 +24,7 @@ before_install: - docker-compose up -d install: -- docker-compose exec -u root php composer require drupal/core-dev:$DRUPAL_VERSION --dev +- docker-compose exec -u root php composer require webflo/drupal-core-require-dev:$DRUPAL_VERSION --dev - docker-compose exec -u root php chown -R www-data:www-data build script: diff --git a/composer.json b/composer.json index 0195d91e..0a213424 100644 --- a/composer.json +++ b/composer.json @@ -15,21 +15,21 @@ "require-dev": { "composer/installers": "^1.2", "cweagans/composer-patches": "~1.4", - "drupal-composer/drupal-scaffold": "^2.6", - "drupal/coffee": "~1", - "drupal/config_devel": "~1", + "drupal-composer/drupal-scaffold": "^2.2", "drupal/config_installer": "~1", "drupal/console": "~1", - "drupal/core-dev": "~9.0", + "drush/drush": "~9", "drupal/ds": "~3", "drupal/field_group": "~1", - "drupal/page_manager": "*", + "drupal/coffee": "~1", + "drupal/config_devel": "~1", "drupal/panels": "~4", + "drupal/page_manager": "*", "drupal/paragraphs": "~1", "drupal/token": "~1", - "drush/drush": "~9", - "openeuropa/task-runner": "~1.0-beta6", - "phpro/grumphp": "~0.19" + "phpro/grumphp": "~0.14", + "webflo/drupal-core-require-dev": "~8.8", + "openeuropa/task-runner": "~1.0-beta3" }, "repositories": [ { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 13971453..f36571c8 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,7 +9,7 @@ - + ./tests/ ./modules/*/tests/ From 176a75c660e664c49b7f612e76b1aefaf8a79b1a Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Tue, 9 Jun 2020 16:01:20 +0300 Subject: [PATCH 15/31] GH-291: Drupal 9 compatibility. Fix CI. Workaround for recursion. --- runner.yml.dist | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/runner.yml.dist b/runner.yml.dist index adf7fbf1..5cfd75e5 100644 --- a/runner.yml.dist +++ b/runner.yml.dist @@ -24,7 +24,14 @@ selenium: commands: drupal:site-setup: - - { task: "symlink", from: "../../..", to: "${drupal.root}/modules/custom/ui_patterns" } + - { task: "symlink", from: "../../../../modules", to: "${drupal.root}/modules/custom/ui_patterns/modules" } + - { task: "symlink", from: "../../../../src", to: "${drupal.root}/modules/custom/ui_patterns/src" } + - { task: "symlink", from: "../../../../templates", to: "${drupal.root}/modules/custom/ui_patterns/templates" } + - { task: "symlink", from: "../../../../tests", to: "${drupal.root}/modules/custom/ui_patterns/tests" } + - { task: "symlink", from: "../../../../ui_patterns.info.yml", to: "${drupal.root}/modules/custom/ui_patterns/ui_patterns.info.yml" } + - { task: "symlink", from: "../../../../ui_patterns.install", to: "${drupal.root}/modules/custom/ui_patterns/ui_patterns.install" } + - { task: "symlink", from: "../../../../ui_patterns.module", to: "${drupal.root}/modules/custom/ui_patterns/ui_patterns.module" } + - { task: "symlink", from: "../../../../ui_patterns.services.yml", to: "${drupal.root}/modules/custom/ui_patterns/ui_patterns.services.yml" } # Generate settings.testing.php, it will be used when running functional tests. - { task: "process-php", type: "write", config: "drupal.settings", source: "${drupal.root}/sites/default/default.settings.php", destination: "${drupal.root}/sites/default/settings.testing.php", override: true } - { task: "run", command: "drupal:drush-setup" } From 3f75389a4958fd5c2c33acf42f2d8ff6692cc163 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Tue, 9 Jun 2020 18:23:55 +0300 Subject: [PATCH 16/31] GH-291: Drupal 9 compatibility. Fix tests. Issue "The string "Button" was not found". --- .../src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php index 8d9e848b..5a0a0d52 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php @@ -17,7 +17,7 @@ class UiPatternsLibraryOverviewTest extends WebDriverTestBase { * * @var string */ - protected $defaultTheme = 'stark'; + protected $defaultTheme = 'ui_patterns_library_theme_test'; /** * {@inheritdoc} From 0cd5c25ee133e9f367067a03260cd099f3e04c64 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Tue, 9 Jun 2020 22:02:12 +0300 Subject: [PATCH 17/31] GH-291: Drupal 9 compatibility. Fix CI. drupa/core-dev is used. --- .travis.yml | 2 +- composer.json | 134 ++++++++++++++++++++++++++------------------------ 2 files changed, 70 insertions(+), 66 deletions(-) diff --git a/.travis.yml b/.travis.yml index 324ac99d..90609aa0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ before_install: - docker-compose up -d install: -- docker-compose exec -u root php composer require webflo/drupal-core-require-dev:$DRUPAL_VERSION --dev +- docker-compose exec -u root php composer require drupal/core-dev:$DRUPAL_VERSION --dev - docker-compose exec -u root php chown -R www-data:www-data build script: diff --git a/composer.json b/composer.json index 0a213424..f68ed73e 100644 --- a/composer.json +++ b/composer.json @@ -1,68 +1,72 @@ { - "name": "drupal/ui_patterns", - "type": "drupal-module", - "description": "UI Patterns.", - "keywords": ["drupal", "web", "ui"], - "license": "GPL-2.0+", - "minimum-stability": "dev", - "prefer-stable": true, - "authors": [ - { - "name": "Nuvole Web", - "email": "info@nuvole.org" + "name": "drupal/ui_patterns", + "type": "drupal-module", + "description": "UI Patterns.", + "keywords": ["drupal", "web", "ui"], + "license": "GPL-2.0+", + "minimum-stability": "dev", + "prefer-stable": true, + "authors": [ + { + "name": "Nuvole Web", + "email": "info@nuvole.org" + } + ], + "require-dev": { + "composer/installers": "^1.2", + "cweagans/composer-patches": "~1.4", + "drupal/core-composer-scaffold": "^8.8 || ^9", + "drupal/coffee": "~1", + "drupal/config_devel": "~1", + "drupal/config_installer": "~1", + "drupal/console": "~1", + "drupal/core-dev": "~8.9.0", + "drupal/ds": "~3", + "drupal/field_group": "~1", + "drupal/page_manager": "*", + "drupal/panels": "~4", + "drupal/paragraphs": "~1", + "drupal/token": "~1", + "drush/drush": "~9", + "openeuropa/task-runner": "~1.0-beta3", + "phpro/grumphp": "~0.14" + }, + "repositories": [ + { + "type": "composer", + "url": "https://packages.drupal.org/8" + } + ], + "autoload": { + "psr-4": { + "Drupal\\ui_patterns\\": "./src" + } + }, + "autoload-dev": { + "psr-4": { + "Drupal\\Tests\\ui_patterns\\": "./tests/src" + } + }, + "scripts": { + "post-install-cmd": "./vendor/bin/run drupal:site-setup", + "post-update-cmd": "./vendor/bin/run drupal:site-setup" + }, + "extra": { + "composer-exit-on-patch-failure": true, + "enable-patching": true, + "drupal-scaffold": { + "locations": { + "web-root": "build/" + } + }, + "installer-paths": { + "build/core": ["type:drupal-core"], + "build/modules/contrib/{$name}": ["type:drupal-module"], + "build/profiles/contrib/{$name}": ["type:drupal-profile"], + "build/themes/contrib/{$name}": ["type:drupal-theme"] + } + }, + "config": { + "sort-packages": true } - ], - "require-dev": { - "composer/installers": "^1.2", - "cweagans/composer-patches": "~1.4", - "drupal-composer/drupal-scaffold": "^2.2", - "drupal/config_installer": "~1", - "drupal/console": "~1", - "drush/drush": "~9", - "drupal/ds": "~3", - "drupal/field_group": "~1", - "drupal/coffee": "~1", - "drupal/config_devel": "~1", - "drupal/panels": "~4", - "drupal/page_manager": "*", - "drupal/paragraphs": "~1", - "drupal/token": "~1", - "phpro/grumphp": "~0.14", - "webflo/drupal-core-require-dev": "~8.8", - "openeuropa/task-runner": "~1.0-beta3" - }, - "repositories": [ - { - "type": "composer", - "url": "https://packages.drupal.org/8" - } - ], - "autoload": { - "psr-4": { - "Drupal\\ui_patterns\\": "./src" - } - }, - "autoload-dev": { - "psr-4": { - "Drupal\\Tests\\ui_patterns\\": "./tests/src" - } - }, - "scripts": { - "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", - "post-install-cmd": "./vendor/bin/run drupal:site-setup", - "post-update-cmd": "./vendor/bin/run drupal:site-setup" - }, - "extra": { - "composer-exit-on-patch-failure": true, - "enable-patching": true, - "installer-paths": { - "build/core": ["type:drupal-core"], - "build/modules/contrib/{$name}": ["type:drupal-module"], - "build/profiles/contrib/{$name}": ["type:drupal-profile"], - "build/themes/contrib/{$name}": ["type:drupal-theme"] - } - }, - "config": { - "sort-packages": true - } } From 6e0bd4981e39c470c0a747e7f2088ff981e6d96a Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Wed, 10 Jun 2020 10:41:27 +0300 Subject: [PATCH 18/31] GH-291: Drupal 9 compatibility. Fix CI. Fix D9 composer. --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index f68ed73e..0443b8fe 100644 --- a/composer.json +++ b/composer.json @@ -15,11 +15,9 @@ "require-dev": { "composer/installers": "^1.2", "cweagans/composer-patches": "~1.4", - "drupal/core-composer-scaffold": "^8.8 || ^9", "drupal/coffee": "~1", "drupal/config_devel": "~1", - "drupal/config_installer": "~1", - "drupal/console": "~1", + "drupal/core-composer-scaffold": "^8.8 || ^9", "drupal/core-dev": "~8.9.0", "drupal/ds": "~3", "drupal/field_group": "~1", From f48c75749bc62fb77772f7c8ec539b0a085c62fb Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Wed, 10 Jun 2020 13:37:49 +0300 Subject: [PATCH 19/31] GH-291: Drupal 9 compatibility. Fix CI. Fix D9 composer. --- .gitignore | 2 ++ composer.json | 12 +++++++++--- docker-compose.yml | 2 +- grumphp.yml.dist | 2 +- .../UiPatternsFieldGroupRenderTest.php | 7 +++++++ .../UiPatternsFieldGroupSettingsTest.php | 7 +++++++ .../UiPatternsLibraryOverviewTest.php | 2 +- .../UiPatternsViewsSettingsTest.php | 7 +++++++ 8 files changed, 35 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index fd824867..a8ebb04d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ /phpunit.xml /docker-compose.override.yml /runner.yml +/.editorconfig +/.gitattributes \ No newline at end of file diff --git a/composer.json b/composer.json index 0443b8fe..718d5735 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,15 @@ "drupal/coffee": "~1", "drupal/config_devel": "~1", "drupal/core-composer-scaffold": "^8.8 || ^9", - "drupal/core-dev": "~8.9.0", + "drupal/core-dev": "^8.8 || ^9", + "drupal/core-recommended": "~8.9.0", "drupal/ds": "~3", - "drupal/field_group": "~1", + "drupal/field_group": "~3", "drupal/page_manager": "*", "drupal/panels": "~4", "drupal/paragraphs": "~1", "drupal/token": "~1", - "drush/drush": "~9", + "drush/drush": "~10", "openeuropa/task-runner": "~1.0-beta3", "phpro/grumphp": "~0.14" }, @@ -62,6 +63,11 @@ "build/modules/contrib/{$name}": ["type:drupal-module"], "build/profiles/contrib/{$name}": ["type:drupal-profile"], "build/themes/contrib/{$name}": ["type:drupal-theme"] + }, + "patches": { + "drupal/coffee": { + "Drupal 9 compatibility issue": "https://www.drupal.org/files/issues/2020-06-09/3147664-5.patch" + } } }, "config": { diff --git a/docker-compose.yml b/docker-compose.yml index a92d1ac7..c9c010c5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "2" services: mariadb: - image: wodby/mariadb:10.1-3.3.0 + image: wodby/mariadb:10.3-3.8.4 stop_grace_period: 30s environment: MYSQL_ROOT_PASSWORD: password diff --git a/grumphp.yml.dist b/grumphp.yml.dist index 7d9c0de2..79311e22 100644 --- a/grumphp.yml.dist +++ b/grumphp.yml.dist @@ -1,4 +1,4 @@ -parameters: +grumphp: ascii: failed: ~ succeeded: ~ diff --git a/modules/ui_patterns_field_group/tests/src/FunctionalJavascript/UiPatternsFieldGroupRenderTest.php b/modules/ui_patterns_field_group/tests/src/FunctionalJavascript/UiPatternsFieldGroupRenderTest.php index dd7e8c34..8f59175e 100644 --- a/modules/ui_patterns_field_group/tests/src/FunctionalJavascript/UiPatternsFieldGroupRenderTest.php +++ b/modules/ui_patterns_field_group/tests/src/FunctionalJavascript/UiPatternsFieldGroupRenderTest.php @@ -12,6 +12,13 @@ */ class UiPatternsFieldGroupRenderTest extends WebDriverTestBase { + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * Disable schema validation when running tests. * diff --git a/modules/ui_patterns_field_group/tests/src/FunctionalJavascript/UiPatternsFieldGroupSettingsTest.php b/modules/ui_patterns_field_group/tests/src/FunctionalJavascript/UiPatternsFieldGroupSettingsTest.php index 632aa369..6ff078e4 100644 --- a/modules/ui_patterns_field_group/tests/src/FunctionalJavascript/UiPatternsFieldGroupSettingsTest.php +++ b/modules/ui_patterns_field_group/tests/src/FunctionalJavascript/UiPatternsFieldGroupSettingsTest.php @@ -13,6 +13,13 @@ */ class UiPatternsFieldGroupSettingsTest extends WebDriverTestBase { + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * Disable schema validation when running tests. * diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php index 5a0a0d52..afd190a4 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php @@ -64,7 +64,7 @@ public function testOverviewPage() { // Test view single page link. $session->linkExists("View {$pattern['label']} as stand-alone"); $link = $this->getSession()->getPage()->findLink("View {$pattern['label']} as stand-alone"); - $this->assertContains('/patterns/' . $pattern['name'], $link->getAttribute('href')); + $this->assertStringContainsString('/patterns/' . $pattern['name'], $link->getAttribute('href')); } } diff --git a/modules/ui_patterns_views/tests/src/FunctionalJavascript/UiPatternsViewsSettingsTest.php b/modules/ui_patterns_views/tests/src/FunctionalJavascript/UiPatternsViewsSettingsTest.php index 6e567eb2..2c7c5439 100644 --- a/modules/ui_patterns_views/tests/src/FunctionalJavascript/UiPatternsViewsSettingsTest.php +++ b/modules/ui_patterns_views/tests/src/FunctionalJavascript/UiPatternsViewsSettingsTest.php @@ -12,6 +12,13 @@ */ class UiPatternsViewsSettingsTest extends WebDriverTestBase { + /** + * Default theme. + * + * @var string + */ + protected $defaultTheme = 'stark'; + /** * Disable schema validation when running tests. * From 067c4a3ecff6d917c745bb874f737ab889ed7a0e Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Wed, 10 Jun 2020 13:44:47 +0300 Subject: [PATCH 20/31] GH-291: Drupal 9 compatibility. Fix CI. Fix D9 composer. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 90609aa0..420418fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ before_install: - docker-compose up -d install: -- docker-compose exec -u root php composer require drupal/core-dev:$DRUPAL_VERSION --dev +- docker-compose exec -u root php composer require drupal/core-recommended:$DRUPAL_VERSION --dev - docker-compose exec -u root php chown -R www-data:www-data build script: From a5959842a55d59637d3348287daa7149b16b7100 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Wed, 10 Jun 2020 14:42:40 +0300 Subject: [PATCH 21/31] GH-291: Drupal 9 compatibility. Test debugging. --- .../src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php | 1 + phpunit.xml.dist | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php index afd190a4..06e69bc3 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php @@ -56,6 +56,7 @@ public function testOverviewPage() { foreach ($this->getExpectedPatterns() as $index => $pattern) { // Assert pattern anchor link. + print 'Pattern - ' . $index . ', label "' . $pattern['label'] . '", name "' . $pattern['name'] . '". '; $this->assertListLink($index + 1, $pattern['label'], $pattern['name']); // Assert pattern preview. diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f36571c8..56c9f528 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + From 4685148ca0dc68269809094405386e9769d83acf Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Wed, 10 Jun 2020 15:25:21 +0300 Subject: [PATCH 22/31] GH-291: Drupal 9 compatibility. Test debugging. --- .../FunctionalJavascript/UiPatternsLibraryOverviewTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php index 06e69bc3..b652b912 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php @@ -4,6 +4,7 @@ use Drupal\Core\Serialization\Yaml; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use Drupal\ui_patterns\UiPatterns; /** * Test patterns overview page. @@ -53,10 +54,12 @@ public function testOverviewPage() { $session->elementContains('css', 'h1', 'Pattern library'); $session->elementContains('css', 'h2', 'Available patterns'); + foreach (UiPatterns::getManager()->getDefinitions() as $definition) { + print 'pattern definition. id: "' . $definition->id() . '", label: "' . $definition->getLabel() . '". '; + } foreach ($this->getExpectedPatterns() as $index => $pattern) { // Assert pattern anchor link. - print 'Pattern - ' . $index . ', label "' . $pattern['label'] . '", name "' . $pattern['name'] . '". '; $this->assertListLink($index + 1, $pattern['label'], $pattern['name']); // Assert pattern preview. From 1154d7584a4ad27ff71f6f57e822b9cd36bb3af3 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Wed, 10 Jun 2020 17:23:33 +0300 Subject: [PATCH 23/31] GH-291: Drupal 9 compatibility. Fix different file order in different file systems. --- .../FunctionalJavascript/UiPatternsLibraryOverviewTest.php | 4 ---- src/Plugin/Deriver/AbstractYamlPatternsDeriver.php | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php index b652b912..afd190a4 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php @@ -4,7 +4,6 @@ use Drupal\Core\Serialization\Yaml; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; -use Drupal\ui_patterns\UiPatterns; /** * Test patterns overview page. @@ -54,9 +53,6 @@ public function testOverviewPage() { $session->elementContains('css', 'h1', 'Pattern library'); $session->elementContains('css', 'h2', 'Available patterns'); - foreach (UiPatterns::getManager()->getDefinitions() as $definition) { - print 'pattern definition. id: "' . $definition->id() . '", label: "' . $definition->getLabel() . '". '; - } foreach ($this->getExpectedPatterns() as $index => $pattern) { // Assert pattern anchor link. diff --git a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php index 819c7eb6..a9ce9625 100644 --- a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php +++ b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php @@ -62,7 +62,11 @@ public function fileScanDirectory($directory) { $extensions = $this->getFileExtensions(); $extensions = array_map('preg_quote', $extensions); $extensions = implode('|', $extensions); - return $this->fileSystem->scanDirectory($directory, "/{$extensions}$/", $options); + $files = $this->fileSystem->scanDirectory($directory, "/{$extensions}$/", $options); + // In different file systems order of files in a folder can be different + // that can break tests. So let's sort them alphabetically manually. + ksort($files); + return $files; } /** From 571d9b21b2d10df4b8ab1807c799e204b1f38cef Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Wed, 10 Jun 2020 18:30:47 +0300 Subject: [PATCH 24/31] GH-291: Drupal 9 compatibility. Make grumphp compatible with D8 and D9. --- .travis.yml | 21 +++++++++++----- .../UiPatternsLibraryOverviewTest.php | 4 ---- src/Definition/PatternSourceField.php | 24 +++++++++---------- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 420418fb..d76b96f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ language: php php: - 7.3 +- 7.4 services: - docker @@ -10,15 +11,23 @@ services: env: global: - DOCKER_COMPOSE_VERSION=1.25.5 - matrix: - - DRUPAL_VERSION=~8.8.7 - - DRUPAL_VERSION=~8.9.0 - - DRUPAL_VERSION=~9.0.0 - - DRUPAL_VERSION=9.1.x-dev matrix: + include: + - env: + DRUPAL_VERSION=~8:8:7 + GRUMPHP_PARAM="parameters" + - env: + DRUPAL_VERSION=~8:9:0 + GRUMPHP_PARAM="parameters" + - env: + DRUPAL_VERSION=~9.0.0 + GRUMPHP_PARAM="grumphp" + - env: + DRUPAL_VERSION=9.1.x-dev + GRUMPHP_PARAM="grumphp" allow_failures: - - env: DRUPAL_VERSION=9.1.x-dev + - env: DRUPAL_VERSION=9.1.x-dev before_install: - docker-compose up -d diff --git a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php index afd190a4..3188b00b 100644 --- a/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php +++ b/modules/ui_patterns_library/tests/src/FunctionalJavascript/UiPatternsLibraryOverviewTest.php @@ -34,10 +34,6 @@ class UiPatternsLibraryOverviewTest extends WebDriverTestBase { protected function setUp(): void { parent::setUp(); - $this->container->get('theme_installer')->install(['ui_patterns_library_theme_test']); - $this->container->get('config.factory')->getEditable('system.theme')->set('default', 'ui_patterns_library_theme_test')->save(); - $this->container->set('theme.registry', NULL); - $user = $this->drupalCreateUser(['access patterns page']); $this->drupalLogin($user); } diff --git a/src/Definition/PatternSourceField.php b/src/Definition/PatternSourceField.php index e345a6f1..8c9177d0 100644 --- a/src/Definition/PatternSourceField.php +++ b/src/Definition/PatternSourceField.php @@ -14,28 +14,28 @@ class PatternSourceField { /** * Field name. * - * @var mixed + * @var string */ private $fieldName; /** * Field label. * - * @var mixed + * @var string */ private $fieldLabel; /** * Plugin ID. * - * @var mixed + * @var string */ private $pluginId; /** * Plugin label. * - * @var mixed + * @var string */ private $pluginLabel; @@ -52,7 +52,7 @@ public function __construct($field_name, $field_label, $plugin_id, $plugin_label /** * Get FieldName property. * - * @return mixed + * @return string * Property value. */ public function getFieldName() { @@ -62,7 +62,7 @@ public function getFieldName() { /** * Set FieldName property. * - * @param mixed $fieldName + * @param string $fieldName * Property value. * * @return $this @@ -75,7 +75,7 @@ public function setFieldName($fieldName) { /** * Get FieldLabel property. * - * @return mixed + * @return string * Property value. */ public function getFieldLabel() { @@ -85,7 +85,7 @@ public function getFieldLabel() { /** * Set FieldLabel property. * - * @param mixed $fieldLabel + * @param string $fieldLabel * Property value. * * @return $this @@ -98,7 +98,7 @@ public function setFieldLabel($fieldLabel) { /** * Get Plugin property. * - * @return mixed + * @return string * Property value. */ public function getPluginId() { @@ -108,7 +108,7 @@ public function getPluginId() { /** * Set Plugin property. * - * @param mixed $pluginId + * @param string $pluginId * Property value. * * @return $this @@ -121,7 +121,7 @@ public function setPluginId($pluginId) { /** * Get PluginLabel property. * - * @return mixed + * @return string * Property value. */ public function getPluginLabel() { @@ -131,7 +131,7 @@ public function getPluginLabel() { /** * Set PluginLabel property. * - * @param mixed $pluginLabel + * @param string $pluginLabel * Property value. * * @return $this From b77e336794b83da656b4883d0b64fb174766a30e Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Wed, 10 Jun 2020 18:58:52 +0300 Subject: [PATCH 25/31] GH-291: Drupal 9 compatibility. Make grumphp compatible with D8 and D9. --- .travis.yml | 23 ++++++++--------------- grumphp.0.18.yml | 16 ++++++++++++++++ grumphp.yml.dist => grumphp.0.19.yml | 0 3 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 grumphp.0.18.yml rename grumphp.yml.dist => grumphp.0.19.yml (100%) diff --git a/.travis.yml b/.travis.yml index d76b96f3..b2e5dfbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,23 +11,16 @@ services: env: global: - DOCKER_COMPOSE_VERSION=1.25.5 + matrix: + - DRUPAL_VERSION=~8.8.7 GRUMPHP_VERSION=0.18 + - DRUPAL_VERSION=~8.9.0 GRUMPHP_VERSION=0.18 + - DRUPAL_VERSION=~9.0.0 GRUMPHP_VERSION=0.19 + - DRUPAL_VERSION=9.1.x-dev GRUMPHP_VERSION=0.19 + matrix: - include: - - env: - DRUPAL_VERSION=~8:8:7 - GRUMPHP_PARAM="parameters" - - env: - DRUPAL_VERSION=~8:9:0 - GRUMPHP_PARAM="parameters" - - env: - DRUPAL_VERSION=~9.0.0 - GRUMPHP_PARAM="grumphp" - - env: - DRUPAL_VERSION=9.1.x-dev - GRUMPHP_PARAM="grumphp" allow_failures: - - env: DRUPAL_VERSION=9.1.x-dev + - env: DRUPAL_VERSION=9.1.x-dev before_install: - docker-compose up -d @@ -37,7 +30,7 @@ install: - docker-compose exec -u root php chown -R www-data:www-data build script: -- docker-compose exec -u www-data php ./vendor/bin/grumphp run +- docker-compose exec -u www-data php ./vendor/bin/grumphp run -c grumphp.$GRUMPHP_VERSION.yml - docker-compose exec -u www-data php ./vendor/bin/phpunit notifications: diff --git a/grumphp.0.18.yml b/grumphp.0.18.yml new file mode 100644 index 00000000..7d9c0de2 --- /dev/null +++ b/grumphp.0.18.yml @@ -0,0 +1,16 @@ +parameters: + ascii: + failed: ~ + succeeded: ~ + tasks: + phpcs: + standard: vendor/drupal/coder/coder_sniffer/Drupal/ + ignore_patterns: + - build/ + - vendor/ + triggered_by: + - php + - module + - install + - inc + - theme diff --git a/grumphp.yml.dist b/grumphp.0.19.yml similarity index 100% rename from grumphp.yml.dist rename to grumphp.0.19.yml From 6f25d2c2340349a666ce3d0b62186f9d415ba8af Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Wed, 10 Jun 2020 19:19:30 +0300 Subject: [PATCH 26/31] GH-291: Drupal 9 compatibility. Make grumphp compatible with D8 and D9. --- .travis.yml | 10 +++++----- grumphp.0.18.yml => grumphp.drupal8.yml | 0 grumphp.0.19.yml => grumphp.yml | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename grumphp.0.18.yml => grumphp.drupal8.yml (100%) rename grumphp.0.19.yml => grumphp.yml (100%) diff --git a/.travis.yml b/.travis.yml index b2e5dfbb..ff96192d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,10 +12,10 @@ env: global: - DOCKER_COMPOSE_VERSION=1.25.5 matrix: - - DRUPAL_VERSION=~8.8.7 GRUMPHP_VERSION=0.18 - - DRUPAL_VERSION=~8.9.0 GRUMPHP_VERSION=0.18 - - DRUPAL_VERSION=~9.0.0 GRUMPHP_VERSION=0.19 - - DRUPAL_VERSION=9.1.x-dev GRUMPHP_VERSION=0.19 + - DRUPAL_VERSION=~8.8.7 GRUMPHP_CONFIG=grumphp.drupal8.yml + - DRUPAL_VERSION=~8.9.0 GRUMPHP_CONFIG=grumphp.drupal8.yml + - DRUPAL_VERSION=~9.0.0 GRUMPHP_CONFIG=grumphp.yml + - DRUPAL_VERSION=9.1.x-dev GRUMPHP_CONFIG=grumphp.yml matrix: @@ -30,7 +30,7 @@ install: - docker-compose exec -u root php chown -R www-data:www-data build script: -- docker-compose exec -u www-data php ./vendor/bin/grumphp run -c grumphp.$GRUMPHP_VERSION.yml +- docker-compose exec -u www-data php ./vendor/bin/grumphp run -c $GRUMPHP_CONFIG - docker-compose exec -u www-data php ./vendor/bin/phpunit notifications: diff --git a/grumphp.0.18.yml b/grumphp.drupal8.yml similarity index 100% rename from grumphp.0.18.yml rename to grumphp.drupal8.yml diff --git a/grumphp.0.19.yml b/grumphp.yml similarity index 100% rename from grumphp.0.19.yml rename to grumphp.yml From b0e3abe41b19a1b9639eb91688fb924f32122c73 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 11 Jun 2020 11:12:46 +0300 Subject: [PATCH 27/31] GH-291: Drupal 9 compatibility. Pull request comments fix. --- .gitignore | 2 +- .travis.yml | 1 + composer.json | 138 +++++++++---------- src/Plugin/UiPatterns/Source/FieldSource.php | 4 +- ui_patterns.info.yml | 2 - 5 files changed, 70 insertions(+), 77 deletions(-) diff --git a/.gitignore b/.gitignore index a8ebb04d..d8633ada 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ /docker-compose.override.yml /runner.yml /.editorconfig -/.gitattributes \ No newline at end of file +/.gitattributes diff --git a/.travis.yml b/.travis.yml index ff96192d..8f80ccff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,3 +35,4 @@ script: notifications: email: false + diff --git a/composer.json b/composer.json index 718d5735..3260541b 100644 --- a/composer.json +++ b/composer.json @@ -1,76 +1,70 @@ { - "name": "drupal/ui_patterns", - "type": "drupal-module", - "description": "UI Patterns.", - "keywords": ["drupal", "web", "ui"], - "license": "GPL-2.0+", - "minimum-stability": "dev", - "prefer-stable": true, - "authors": [ - { - "name": "Nuvole Web", - "email": "info@nuvole.org" - } - ], - "require-dev": { - "composer/installers": "^1.2", - "cweagans/composer-patches": "~1.4", - "drupal/coffee": "~1", - "drupal/config_devel": "~1", - "drupal/core-composer-scaffold": "^8.8 || ^9", - "drupal/core-dev": "^8.8 || ^9", - "drupal/core-recommended": "~8.9.0", - "drupal/ds": "~3", - "drupal/field_group": "~3", - "drupal/page_manager": "*", - "drupal/panels": "~4", - "drupal/paragraphs": "~1", - "drupal/token": "~1", - "drush/drush": "~10", - "openeuropa/task-runner": "~1.0-beta3", - "phpro/grumphp": "~0.14" - }, - "repositories": [ - { - "type": "composer", - "url": "https://packages.drupal.org/8" - } - ], - "autoload": { - "psr-4": { - "Drupal\\ui_patterns\\": "./src" - } - }, - "autoload-dev": { - "psr-4": { - "Drupal\\Tests\\ui_patterns\\": "./tests/src" - } - }, - "scripts": { - "post-install-cmd": "./vendor/bin/run drupal:site-setup", - "post-update-cmd": "./vendor/bin/run drupal:site-setup" - }, - "extra": { - "composer-exit-on-patch-failure": true, - "enable-patching": true, - "drupal-scaffold": { - "locations": { - "web-root": "build/" - } - }, - "installer-paths": { - "build/core": ["type:drupal-core"], - "build/modules/contrib/{$name}": ["type:drupal-module"], - "build/profiles/contrib/{$name}": ["type:drupal-profile"], - "build/themes/contrib/{$name}": ["type:drupal-theme"] - }, - "patches": { - "drupal/coffee": { - "Drupal 9 compatibility issue": "https://www.drupal.org/files/issues/2020-06-09/3147664-5.patch" - } - } + "name": "drupal/ui_patterns", + "type": "drupal-module", + "description": "UI Patterns.", + "keywords": ["drupal", "web", "ui"], + "license": "GPL-2.0+", + "minimum-stability": "dev", + "prefer-stable": true, + "authors": [ + { + "name": "Nuvole Web", + "email": "info@nuvole.org" + } + ], + "require-dev": { + "composer/installers": "^1.2", + "cweagans/composer-patches": "~1.4", + "drupal/config_devel": "~1", + "drupal/core-composer-scaffold": "^8.8 || ^9", + "drupal/core-dev": "^8.8 || ^9", + "drupal/core-recommended": "~8.9.0", + "drupal/ds": "~3", + "drupal/field_group": "~3", + "drupal/page_manager": "*", + "drupal/panels": "~4", + "drupal/paragraphs": "~1", + "drupal/token": "~1", + "drush/drush": "~10", + "openeuropa/task-runner": "~1.0-beta3", + "phpro/grumphp": "~0.14" + }, + "repositories": [ + { + "type": "composer", + "url": "https://packages.drupal.org/8" + } + ], + "autoload": { + "psr-4": { + "Drupal\\ui_patterns\\": "./src" + } + }, + "autoload-dev": { + "psr-4": { + "Drupal\\Tests\\ui_patterns\\": "./tests/src" + } + }, + "scripts": { + "post-install-cmd": "./vendor/bin/run drupal:site-setup", + "post-update-cmd": "./vendor/bin/run drupal:site-setup" + }, + "extra": { + "composer-exit-on-patch-failure": true, + "enable-patching": true, + "drupal-scaffold": { + "locations": { + "web-root": "build/" + } }, - "config": { - "sort-packages": true + "installer-paths": { + "build/core": ["type:drupal-core"], + "build/modules/contrib/{$name}": ["type:drupal-module"], + "build/profiles/contrib/{$name}": ["type:drupal-profile"], + "build/themes/contrib/{$name}": ["type:drupal-theme"] } + }, + "config": { + "sort-packages": true + } } diff --git a/src/Plugin/UiPatterns/Source/FieldSource.php b/src/Plugin/UiPatterns/Source/FieldSource.php index c86cda70..7ff73013 100644 --- a/src/Plugin/UiPatterns/Source/FieldSource.php +++ b/src/Plugin/UiPatterns/Source/FieldSource.php @@ -31,9 +31,9 @@ class FieldSource extends PatternSourceBase implements ContainerFactoryPluginInt /** * {@inheritdoc} */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityFieldManager $entity_manager) { + public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityFieldManager $entity_field_manager) { parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->entityFieldManager = $entity_manager; + $this->entityFieldManager = $entity_field_manager; } /** diff --git a/ui_patterns.info.yml b/ui_patterns.info.yml index a746b6c6..fdd0b2e2 100644 --- a/ui_patterns.info.yml +++ b/ui_patterns.info.yml @@ -4,5 +4,3 @@ description: UI patterns core: 8.x core_version_requirement: ^8 || ^9 package: User interface -dependencies: - - drupal:system (>=8.3.0) From f01a65f8d1095e05b710712132914273fc6e2776 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 11 Jun 2020 12:12:35 +0300 Subject: [PATCH 28/31] GH-291: Drupal 9 compatibility. Pull request comments fix. --- .travis.yml | 1 - phpunit.xml.dist | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8f80ccff..ff96192d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,4 +35,3 @@ script: notifications: email: false - diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 56c9f528..5322204e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + From d0e6d1ebd582b2ab97c2cdd8a370c935cd280271 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 11 Jun 2020 12:20:33 +0300 Subject: [PATCH 29/31] GH-291: Drupal 9 compatibility. Pull request comments fix. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ff96192d..8f80ccff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,3 +35,4 @@ script: notifications: email: false + From 8470142e69c2f500b84951428631883b5bbad81d Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 11 Jun 2020 12:27:46 +0300 Subject: [PATCH 30/31] GH-291: Drupal 9 compatibility. Add newline --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8f80ccff..ff96192d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,4 +35,3 @@ script: notifications: email: false - From a84a59ee7261560b720f2ad3796f7a96f5389cd1 Mon Sep 17 00:00:00 2001 From: Evgenii Nikitin Date: Thu, 11 Jun 2020 12:31:52 +0300 Subject: [PATCH 31/31] GH-291: Drupal 9 compatibility. Pull request comments fix. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ff96192d..c602fc47 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ env: - DRUPAL_VERSION=~9.0.0 GRUMPHP_CONFIG=grumphp.yml - DRUPAL_VERSION=9.1.x-dev GRUMPHP_CONFIG=grumphp.yml - matrix: allow_failures: - env: DRUPAL_VERSION=9.1.x-dev @@ -35,3 +34,4 @@ script: notifications: email: false +