Commit 3206654e authored by Fabien Potencier's avatar Fabien Potencier

merged branch igorw/psr-log-typehint (PR #741)

This PR was squashed before being merged into the master branch (closes #741).

Discussion
----------

Change the ControllerResolver type hint to Psr\\Log\\LoggerInterface

This allows it to work with any logger, in particular, it un-breaks the case where the monolog bridge is not installed.

See also 817240e4. This should resolve #740.

Commits
-------

b85d610d Change the ControllerResolver type hint to Psr\Log\LoggerInterface
parents 5755194c b85d610d
......@@ -4,6 +4,8 @@ Changelog
1.1.0 (2013-XX-XX)
------------------
* Support for any ``Psr\Log\LoggerInterface`` as opposed to the monolog-bridge
one.
* Made dispatcher proxy methods ``on``, ``before``, ``after`` and ``error``
lazy, so that they will not instantiate the dispatcher early.
* Dropped support for 2.1 and 2.2 versions of symfony.
......
......@@ -143,7 +143,7 @@ those definitions.
This also works for shared services.
Going back to our initial example, here's how we could use the container
Going back to our initial example, here's how we could use the container
to manage its dependencies::
$app['user.persist_path'] = '/tmp/users';
......@@ -225,12 +225,12 @@ don't want to mess with most of them.
does not return a Response. Disable it with
``$app['exception_handler']->disable()``.
* **logger**: A
`LoggerInterface
<http://api.symfony.com/master/Symfony/Component/HttpKernel/Log/LoggerInterface.html>`_
instance. By default, logging is disabled as the value is set to ``null``.
When the Symfony2 Monolog bridge is installed, Monolog is automatically used
as the default logger.
* **logger**: A ``Psr\Log\LoggerInterface`` instance. By default, logging is
disabled as the value is set to ``null``. When the Symfony2 Monolog bridge is
installed, Monolog is automatically used as the default logger.
In versions of Silex before 1.1 this must be a
``Symfony\Component\HttpKernel\Log\LoggerInterface``.
.. note::
......
......@@ -11,8 +11,8 @@
namespace Silex;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpKernel\Controller\ControllerResolver as BaseControllerResolver;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Request;
/**
......
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