Skip to content

Commit 7021dea

Browse files
committed
Removed league container container from the fatory
1 parent 7476209 commit 7021dea

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Factory.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use DI\ContainerBuilder;
1313
use Generator;
1414
use Interop\Container\ContainerInterface;
15-
use League\Container\Container;
15+
use League\Event\Emitter;
1616
use League\Event\EmitterInterface;
1717
use League\Tactician\Container\ContainerLocator;
1818
use League\Tactician\Handler\CommandHandlerMiddleware;
@@ -31,11 +31,12 @@ public static function create(
3131
);
3232
}
3333

34-
private static function createContainer(LoopInterface $loop, array $options): Container
34+
private static function createContainer(LoopInterface $loop, array $options): ContainerInterface
3535
{
3636
$container = new ContainerBuilder();
3737

3838
$container->addDefinitions([
39+
EmitterInterface::class => new Emitter(),
3940
LoopInterface::class => $loop,
4041
TransportClient::class => function (ContainerInterface $container, LoopInterface $loop) use ($options) {
4142
return self::createTransport($container, $loop, $options);

tests/FactoryTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use ApiClients\Foundation\Factory;
88
use ApiClients\Foundation\Options;
99
use ApiClients\Tools\TestUtilities\TestCase;
10-
use League\Container\Container;
1110
use League\Event\CallbackListener;
1211
use League\Event\EmitterInterface;
1312
use League\Tactician\Exception\MissingHandlerException;
@@ -23,7 +22,6 @@ public function testCreate()
2322

2423
$client = Factory::create(
2524
$loop,
26-
new Container(),
2725
[
2826
Options::HYDRATOR_OPTIONS => [],
2927
Options::TRANSPORT_OPTIONS => [],

0 commit comments

Comments
 (0)