8000 [Refactor] Update factory service container aliases · volldigital/laravel-json-api@e427bd9 · GitHub
[go: up one dir, main page]

Skip to content

Commit e427bd9

Browse files
committed
[Refactor] Update factory service container aliases
1 parent 65b531d commit e427bd9

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/ServiceProvider.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,20 +205,19 @@ protected function bootResponseMacro(ResponseFactoryContract $responses)
205205
*/
206206
protected function bindNeomerx()
207207
{
208-
$this->app->singleton(FactoryInterface::class, function (Application $app) {
209-
$logger = $app->make(LoggerInterface::class);
208+
$this->app->singleton(Factory::class, function (Application $app) {
210209
$factory = new Factory();
211-
$factory->setLogger($logger);
212-
210+
$factory->setLogger($app->make(LoggerInterface::class));
213211
return $factory;
214212
});
215213

216-
$this->app->alias(FactoryInterface::class, DocumentFactoryInterface::class);
217-
$this->app->alias(FactoryInterface::class, HandlerFactoryInterface::class);
218-
$this->app->alias(FactoryInterface::class, HttpFactoryInterface::class);
219-
$this->app->alias(FactoryInterface::class, ParserFactoryInterface::class);
220-
$this->app->alias(FactoryInterface::class, SchemaFactoryInterface::class);
221-
$this->app->alias(FactoryInterface::class, StackFactoryInterface::class);
214+
$this->app->alias(Factory::class, FactoryInterface::class);
215+
$this->app->alias(Factory::class, DocumentFactoryInterface::class);
216+
$this->app->alias(Factory::class, HandlerFactoryInterface::class);
217+
$this->app->alias(Factory::class, HttpFactoryInterface::class);
218+
$this->app->alias(Factory::class, ParserFactoryInterface::class);
219+
$this->app->alias(Factory::class, SchemaFactoryInterface::class);
220+
$this->app->alias(Factory::class, StackFactoryInterface::class);
222221
}
223222

224223
/**

0 commit comments

Comments
 (0)
0