Skip to content

Commit

Permalink
Merge pull request #91 from ahonymous/hotfix/fix-undefine-parameter-m…
Browse files Browse the repository at this point in the history
…essenger-transports

hotfix: not fount messenger.transport parameter
  • Loading branch information
mnapoli authored Aug 13, 2024
2 parents a4ed7da + c7bdc7a commit 872562e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/DependencyInjection/BrefMessengerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ public function prepend(ContainerBuilder $container): void

private function getMessengerTransports(array $frameworkConfig): array
{
$transportConfigs = array_column($frameworkConfig, 'messenger.transports');
$transportConfigs = array_column(
array_column($frameworkConfig, 'messenger'),
'transports',
);
$transportConfigs = array_filter($transportConfigs);

if (empty($transportConfigs)) {
return [];
}

return array_merge_recursive(...$transportConfigs);
return array_merge(...$transportConfigs);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testPrependSetsMessengerTransportsParameter(
->with('framework')
->willReturn($existConfig);

$container->expects(self::atMost(2))
$container->expects(self::once())
->method('setParameter')
->with(
'messenger.transports',
Expand Down

0 comments on commit 872562e

Please sign in to comment.