Commit 5f9716d8 authored by Fabien Potencier's avatar Fabien Potencier

made the logger optional in all providers

parent 349dcf97
...@@ -65,8 +65,6 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte ...@@ -65,8 +65,6 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
$app = $this; $app = $this;
$this['logger'] = null;
$this['routes'] = $this->share(function () { $this['routes'] = $this->share(function () {
return new RouteCollection(); return new RouteCollection();
}); });
...@@ -123,6 +121,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte ...@@ -123,6 +121,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
$this['request.https_port'] = 443; $this['request.https_port'] = 443;
$this['debug'] = false; $this['debug'] = false;
$this['charset'] = 'UTF-8'; $this['charset'] = 'UTF-8';
$this['logger'] = null;
$this->register(new RoutingServiceProvider()); $this->register(new RoutingServiceProvider());
......
...@@ -74,7 +74,7 @@ class RememberMeServiceProvider implements ServiceProviderInterface, EventListen ...@@ -74,7 +74,7 @@ class RememberMeServiceProvider implements ServiceProviderInterface, EventListen
'remember_me_parameter' => '_remember_me', 'remember_me_parameter' => '_remember_me',
), $options); ), $options);
return new TokenBasedRememberMeServices(array($app['security.user_provider.'.$providerKey]), $options['key'], $providerKey, $options, $app['logger']); return new TokenBasedRememberMeServices(array($app['security.user_provider.'.$providerKey]), $options['key'], $providerKey, $options, isset($app['logger']) ? $app['logger'] : null);
}); });
}); });
...@@ -84,7 +84,7 @@ class RememberMeServiceProvider implements ServiceProviderInterface, EventListen ...@@ -84,7 +84,7 @@ class RememberMeServiceProvider implements ServiceProviderInterface, EventListen
$app['security'], $app['security'],
$app['security.remember_me.service.'.$providerKey], $app['security.remember_me.service.'.$providerKey],
$app['security.authentication_manager'], $app['security.authentication_manager'],
$app['logger'] isset($app['logger']) ? $app['logger'] : null
); );
return $listener; return $listener;
......
...@@ -53,7 +53,7 @@ class RoutingServiceProvider implements ServiceProviderInterface, EventListenerP ...@@ -53,7 +53,7 @@ class RoutingServiceProvider implements ServiceProviderInterface, EventListenerP
return $app['url_matcher']; return $app['url_matcher'];
}); });
return new RouterListener($urlMatcher, $app['request_context'], $app['logger'], $app['request_stack']); return new RouterListener($urlMatcher, $app['request_context'], isset($app['logger']) ? $app['logger'] : null, $app['request_stack']);
}); });
} }
......
...@@ -124,7 +124,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -124,7 +124,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
isset($app['request.http_port']) ? $app['request.http_port'] : 80, isset($app['request.http_port']) ? $app['request.http_port'] : 80,
isset($app['request.https_port']) ? $app['request.https_port'] : 443 isset($app['request.https_port']) ? $app['request.https_port'] : 443
), ),
$app['logger'] isset($app['logger']) ? $app['logger'] : null
); );
}); });
...@@ -282,7 +282,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -282,7 +282,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
$app['security.access_manager'], $app['security.access_manager'],
$app['security.access_map'], $app['security.access_map'],
$app['security.authentication_manager'], $app['security.authentication_manager'],
$app['logger'] isset($app['logger']) ? $app['logger'] : null
); );
}); });
...@@ -334,7 +334,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -334,7 +334,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
$app['security'], $app['security'],
$userProviders, $userProviders,
$providerKey, $providerKey,
$app['logger'], isset($app['logger']) ? $app['logger'] : null,
$app['dispatcher'] $app['dispatcher']
); );
}); });
...@@ -361,7 +361,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -361,7 +361,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
$app[$entryPoint], $app[$entryPoint],
null, // errorPage null, // errorPage
null, // AccessDeniedHandlerInterface null, // AccessDeniedHandlerInterface
$app['logger'] isset($app['logger']) ? $app['logger'] : null
); );
}); });
}); });
...@@ -384,7 +384,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -384,7 +384,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
$app, $app,
$app['security.http_utils'], $app['security.http_utils'],
$options, $options,
$app['logger'] isset($app['logger']) ? $app['logger'] : null
); );
}); });
}); });
...@@ -416,7 +416,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -416,7 +416,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
$app['security.authentication.success_handler.'.$name], $app['security.authentication.success_handler.'.$name],
$app['security.authentication.failure_handler.'.$name], $app['security.authentication.failure_handler.'.$name],
$options, $options,
$app['logger'], isset($app['logger']) ? $app['logger'] : null,
$app['dispatcher'], $app['dispatcher'],
isset($options['with_csrf']) && $options['with_csrf'] && isset($app['form.csrf_provider']) ? $app['form.csrf_provider'] : null isset($options['with_csrf']) && $options['with_csrf'] && isset($app['form.csrf_provider']) ? $app['form.csrf_provider'] : null
); );
...@@ -430,7 +430,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -430,7 +430,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
$app['security.authentication_manager'], $app['security.authentication_manager'],
$providerKey, $providerKey,
$app['security.entry_point.'.$providerKey.'.http'], $app['security.entry_point.'.$providerKey.'.http'],
$app['logger'] isset($app['logger']) ? $app['logger'] : null
); );
}); });
}); });
...@@ -440,7 +440,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -440,7 +440,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
return new AnonymousAuthenticationListener( return new AnonymousAuthenticationListener(
$app['security'], $app['security'],
$providerKey, $providerKey,
$app['logger'] isset($app['logger']) ? $app['logger'] : null
); );
}); });
}); });
...@@ -488,7 +488,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -488,7 +488,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
$app['security.user_checker'], $app['security.user_checker'],
$name, $name,
$app['security.access_manager'], $app['security.access_manager'],
$app['logger'], isset($app['logger']) ? $app['logger'] : null,
isset($options['parameter']) ? $options['parameter'] : '_switch_user', isset($options['parameter']) ? $options['parameter'] : '_switch_user',
isset($options['role']) ? $options['role'] : 'ROLE_ALLOWED_TO_SWITCH', isset($options['role']) ? $options['role'] : 'ROLE_ALLOWED_TO_SWITCH',
$app['dispatcher'] $app['dispatcher']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment