<blockquote>
<p dir="auto">PHP Fatal error:  Can't inherit abstract function Symfony\Component\HttpKernel\Log\LoggerInterface::alert() (previously declared abstract in Psr\Log\LoggerInterface) in /home/olaurendeau/git/lafourchette-core/vendor/symfony/symfony/src/Symfony/Bridge/Monolog/Logger.php on line 23</p>
</blockquote>
<p dir="auto">Symfony interface <a href="https://github.com/symfony/symfony/blob/2.1/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php">LoggerInterface</a> seems to conflict with Psr interface <a href="https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php">LoggerInterface</a> .</p>
<p dir="auto">Between Symfony class <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Monolog/Logger.php">Logger</a></p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Logger</span> <span class="pl-k">extends</span> <span class="pl-v">BaseLogger</span> <span class="pl-k">implements</span> <span class="pl-v">LoggerInterface</span>, <span class="pl-v">DebugLoggerInterface</span></pre></div>
<p dir="auto">And freshly updated Monolog class <a href="https://github.com/Seldaek/monolog/blob/master/src/Monolog/Logger.php">Logger</a></p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Logger implements LoggerInterface"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Logger</span> <span class="pl-k">implements</span> <span class="pl-v">LoggerInterface</span></pre></div>
<p dir="auto">As of today, we have a <code class="notranslate">LoggerInterface</code> declared in the HttpKernel component. This can be problematic for components that need a logger but do not depend on HttpKernel.</p>
<p dir="auto">There are several options here to fix this "issue":</p>
<p dir="auto">1/ Let the FIG group decide on an interface and rely on the FIG package that would declare this interface (keep in mind that we need to have something stable by the end of December for Symfony 2.2);<br>
2/ Create a new Symfony component with just the <code class="notranslate">LoggerInterface</code> file;<br>
3/ Remove the interface altogether and rely on Monolog instead;<br>
4/ Create a Symfony Logger component that support both Monolog and the Zend Logger;<br>
5/ Do nothing.</p>
<p dir="auto">see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="8106307" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/5911" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/5911/hovercard" href="https://github.com/symfony/symfony/issues/5911">#5911</a> for the start of the discussion.</p>
<p dir="auto">I tend to prefer option 3 for the many reasons:</p>
<ul dir="auto">
<li>If we had created a Logger component when we decided to create Monolog (switching from the Zend Logger at that time), we wouldn't have this discussion about this today. So, I like to think of Monolog as being the Symfony Logger component;</li>
<li>There aren' that many other logger libraries in PHP and this is not the kind of problems that need to have the flexibility to be replaced by something else;</li>
<li>Monolog is flexible enough to cover all the use cases you will ever need;</li>
<li>If this is a must, we can also add support for the Zend Logger library within Monolog (<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Seldaek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Seldaek">@Seldaek</a> agreed with this possibility);</li>
<li>Thanks to Composer, relying on an external library like Monolog is not a problem anymore.</li>
</ul>