Skip to content

Commit 6034b71

Browse files
Merge pull request #118 from discoverygarden/adam-vessey-patch-1
DDST-748: Adjust config event handler priority
2 parents 06215d4 + e57a1b1 commit 6034b71

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/EventSubscriber/ConfigTransformationEventSubscriber.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
*/
1818
class ConfigTransformationEventSubscriber implements EventSubscriberInterface, ContainerInjectionInterface {
1919

20+
const PRIORITY = 250;
21+
2022
/**
2123
* Constructor.
2224
*/
@@ -40,8 +42,8 @@ public static function create(ContainerInterface $container) {
4042
*/
4143
public static function getSubscribedEvents() : array {
4244
return [
43-
ConfigEvents::STORAGE_TRANSFORM_EXPORT => 'onExportTransform',
44-
ConfigEvents::STORAGE_TRANSFORM_IMPORT => 'onImportTransform',
45+
ConfigEvents::STORAGE_TRANSFORM_EXPORT => [['onExportTransform', static::PRIORITY]],
46+
ConfigEvents::STORAGE_TRANSFORM_IMPORT => [['onImportTransform', -static::PRIORITY]],
4547
];
4648
}
4749

src/Plugin/migrate/source/Spreadsheet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
101101
/**
102102
* {@inheritdoc}
103103
*/
104-
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL): self {
104+
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, ?MigrationInterface $migration = NULL): self {
105105
return new static(
106106
$configuration,
107107
$plugin_id,

0 commit comments

Comments
 (0)