Skip to content

Commit 3e869a9

Browse files
committed
Updated to hydrator ^1.0
1 parent fc456a2 commit 3e869a9

File tree

3 files changed

+36
-44
lines changed

3 files changed

+36
-44
lines changed

composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"name": "api-clients/foundation",
33
"license": "MIT",
4-
"minimum-stability": "dev",
5-
"prefer-stable": true,
64
"authors": [
75
{
86
"name": "Cees-Jan Kiewiet",
@@ -12,7 +10,7 @@
1210
"require": {
1311
"php": "^7.0",
1412
"api-clients/command-bus": "^2.0",
15-
"api-clients/hydrator": "dev-master",
13+
"api-clients/hydrator": "^1.0.1",
1614
"api-clients/middleware": "^2.0||^1.1",
1715
"api-clients/transport": "^1.0",
1816
"league/event": "^2.1",

composer.lock

Lines changed: 31 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Factory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ private static function createContainer(
4343
) use ($options) {
4444
return self::createTransport($locator, $loop, $options);
4545
},
46-
Hydrator::class => function (ContainerInterface $container) use ($options) {
47-
return self::createHydrator($container, $options);
46+
Hydrator::class => function (LoopInterface $loop, CommandBusInterface $commandBus) use ($options) {
47+
return self::createHydrator($loop, $commandBus, $options);
4848
},
4949
CommandBusInterface::class => function (ContainerInterface $container) {
5050
return CommandBusFactory::create($container);
@@ -67,12 +67,12 @@ private static function createTransport(
6767
return TransportFactory::create($locator, $loop, $options[Options::TRANSPORT_OPTIONS]);
6868
}
6969

70-
private static function createHydrator(ContainerInterface $container, array $options = [])
70+
private static function createHydrator(LoopInterface $loop, CommandBusInterface $commandBus, array $options = [])
7171
{
7272
if (!isset($options[Options::HYDRATOR_OPTIONS])) {
7373
throw new InvalidArgumentException('Missing Hydrator options');
7474
}
7575

76-
return HydratorFactory::create($container, $options[Options::HYDRATOR_OPTIONS]);
76+
return HydratorFactory::create($loop, $commandBus, $options[Options::HYDRATOR_OPTIONS]);
7777
}
7878
}

0 commit comments

Comments
 (0)