diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 29b1601a..2f0db480 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -36,6 +36,7 @@ jobs: # Should update the following as the minimum supported version from Drupal.org - "9.2.x" - "9.3.x" + - "9.4.x" exclude: - php-version: "8.1" drupal-core: "9.2.x" diff --git a/composer.json b/composer.json index 5a298b66..b4e4deb5 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "drupal/drupal-extension": "master-dev", "drush/drush": "^9.0 || ^10.0", "mglaman/drupal-check": "1.3", - "phpmd/phpmd": "2.8.2", + "phpmd/phpmd": "^2.8.2", "phpmetrics/phpmetrics": "^2.5", "phpstan/phpstan": "^1.5" }, diff --git a/src/Entity/Storage/EdgeEntityStorageBase.php b/src/Entity/Storage/EdgeEntityStorageBase.php index 58e42f56..4a16eb61 100644 --- a/src/Entity/Storage/EdgeEntityStorageBase.php +++ b/src/Entity/Storage/EdgeEntityStorageBase.php @@ -335,15 +335,16 @@ final protected function processLoadedEntities(?array $ids, array $sdk_entities) protected function invokeStorageLoadHook(array &$entities) { if (!empty($entities)) { // Call hook_entity_storage_load(). - foreach ($this->moduleHandler()->getImplementations('entity_storage_load') as $module) { - $function = $module . '_entity_storage_load'; - $function($entities, $this->entityTypeId); - } + $this->moduleHandler()->invokeAll( + 'entity_storage_load', + [$entities, $this->entityTypeId] + ); + // Call hook_TYPE_storage_load(). - foreach ($this->moduleHandler()->getImplementations($this->entityTypeId . '_storage_load') as $module) { - $function = $module . '_' . $this->entityTypeId . '_storage_load'; - $function($entities); - } + $this->moduleHandler()->invokeAll( + $this->entityTypeId . '_storage_load', + [$entities] + ); } }