diff --git a/lib/Alchemy/Phrasea/Core/Provider/ConfigurationServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/ConfigurationServiceProvider.php index 9da4ebfe5b..7fb7ca1b11 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/ConfigurationServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/ConfigurationServiceProvider.php @@ -41,7 +41,13 @@ class ConfigurationServiceProvider implements ServiceProviderInterface $app['debug'] ); }); + } + /** + * {@inheritDoc} + */ + public function boot(SilexApplication $app) + { $app['dispatcher'] = $app->share( $app->extend('dispatcher', function($dispatcher, SilexApplication $app){ $dispatcher->addSubscriber(new TrustedProxySubscriber($app['phraseanet.configuration'])); @@ -50,8 +56,4 @@ class ConfigurationServiceProvider implements ServiceProviderInterface }) ); } - - public function boot(SilexApplication $app) - { - } } diff --git a/lib/Alchemy/Phrasea/Core/Provider/FileServeServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/FileServeServiceProvider.php index 3125e12ff2..8327f0ba6d 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/FileServeServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/FileServeServiceProvider.php @@ -31,7 +31,13 @@ class FileServeServiceProvider implements ServiceProviderInterface $app['phraseanet.file-serve'] = $app->share(function (Application $app) { return ServeFileResponseFactory::create($app); }); + } + /** + * {@inheritDoc} + */ + public function boot(Application $app) + { $app['dispatcher'] = $app->share( $app->extend('dispatcher', function($dispatcher, Application $app){ $dispatcher->addSubscriber(new XSendFileSubscriber($app)); @@ -40,11 +46,4 @@ class FileServeServiceProvider implements ServiceProviderInterface }) ); } - - /** - * {@inheritDoc} - */ - public function boot(Application $app) - { - } }