diff --git a/config/autoload/services.global.php b/config/autoload/services.global.php index bbf816d0..81c5669f 100644 --- a/config/autoload/services.global.php +++ b/config/autoload/services.global.php @@ -40,7 +40,6 @@ return [ Service\UrlShortener::class => AnnotatedFactory::class, Service\VisitsTracker::class => AnnotatedFactory::class, Service\ShortUrlService::class => AnnotatedFactory::class, - Service\RestTokenService::class => AnnotatedFactory::class, Cache::class => CacheFactory::class, // Cli commands diff --git a/config/config.php b/config/config.php index 850f5e4f..0fad2300 100644 --- a/config/config.php +++ b/config/config.php @@ -15,9 +15,9 @@ use Zend\Expressive\ConfigManager\ZendConfigProvider; return call_user_func(function () { $configManager = new ConfigManager([ + new ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php'), CLI\ConfigProvider::class, Rest\ConfigProvider::class, - new ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php') ], 'data/cache/app_config.php'); return $configManager->getMergedConfig(); diff --git a/module/Rest/config/middleware-pipeline.global.php b/module/Rest/config/middleware-pipeline.config.php similarity index 100% rename from module/Rest/config/middleware-pipeline.global.php rename to module/Rest/config/middleware-pipeline.config.php diff --git a/module/Rest/config/routes.global.php b/module/Rest/config/routes.config.php similarity index 100% rename from module/Rest/config/routes.global.php rename to module/Rest/config/routes.config.php diff --git a/module/Rest/config/services.global.php b/module/Rest/config/services.config.php similarity index 88% rename from module/Rest/config/services.global.php rename to module/Rest/config/services.config.php index d0975ec8..aff4cc96 100644 --- a/module/Rest/config/services.global.php +++ b/module/Rest/config/services.config.php @@ -2,12 +2,15 @@ use Acelaya\ZsmAnnotatedServices\Factory\V3\AnnotatedFactory; use Shlinkio\Shlink\Rest\Action; use Shlinkio\Shlink\Rest\Middleware; +use Shlinkio\Shlink\Rest\Service; use Zend\ServiceManager\Factory\InvokableFactory; return [ 'services' => [ 'factories' => [ + Service\RestTokenService::class => AnnotatedFactory::class, + Action\AuthenticateMiddleware::class => AnnotatedFactory::class, Action\CreateShortcodeMiddleware::class => AnnotatedFactory::class, Action\ResolveUrlMiddleware::class => AnnotatedFactory::class,