From 170c96b8ef7cc1dd18aec3b8b78f84d53cc3c37e Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Tue, 19 Jul 2016 17:12:50 +0200 Subject: [PATCH] Fixed config files names --- config/autoload/services.global.php | 1 - config/config.php | 2 +- ...ware-pipeline.global.php => middleware-pipeline.config.php} | 0 module/Rest/config/{routes.global.php => routes.config.php} | 0 .../Rest/config/{services.global.php => services.config.php} | 3 +++ 5 files changed, 4 insertions(+), 2 deletions(-) rename module/Rest/config/{middleware-pipeline.global.php => middleware-pipeline.config.php} (100%) rename module/Rest/config/{routes.global.php => routes.config.php} (100%) rename module/Rest/config/{services.global.php => services.config.php} (88%) 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,