zendframework/zf2 — pull request #4987 by alexdenvir (2013-08-19 16:50:59+00:00)
Title: PSR-3 Compliance

PSR-3 was accepted months ago (https://github.com/php-fig/fig-standards/commit/43cd71b6b1f46231c513af55386b9ff55fbb00d0), but ZF2 hasn't (yet) been updated for compliance.
Here is my attempt to achieve this.

Unfortunately, this does introduce a BC break in order to implement the PSR\Log\LoggerInterface: the $extras param (renamed to $contect) to the log function (and wrapper functions: err, debug, info etc.) has to be specifically typehinted to array. As such anything currently passing an object implementing Traversable will cause a catchable fatal error.

The log function will now accept a string for a priority, provided the string matches one of the \Psr\Log\LogLevel constants (it immediately remaps the string to the appropriate int priority).

Additional functions introduced by PSR-3 (critical, error, emergency, warning) are simple wrappers around the existing functions.

To sweeten the deal, I've thrown in a bunch of extra tests for the Logger class to improve overall test coverage, though I expect even if this PR is accepted it won't be merged until the next BC breaking release