hexanet / monologextrabundle Goto Github PK
View Code? Open in Web Editor NEW:memo: Symfony bundle with extra processors and logger to log request/response
License: MIT License
:memo: Symfony bundle with extra processors and logger to log request/response
License: MIT License
For old versions of Symfony, we have a compatibility codeto get the token storage or the security context.
This code should be deleted for the 2.0 of the bundle
Nice bundle !
Can a CommandProcessor
be useful (see https://github.com/otobank/monolog-console-processor/blob/master/src/ConsoleProcessor.php) ?
We could add 3 informations:
TODO:
TODO :
The 2.0 version will support only php > 7 so we can use type hinting
TODO :
See http://symfony.com/doc/current/components/console/events.html#the-consoleevents-exception-event
New in version 3.3: The ConsoleEvents::EXCEPTION event was deprecated in Symfony 3.3. Use the ConsoleEvents::ERROR event instead.
In a project without web :
In DefinitionErrorExceptionPass.php line 37:
Cannot autowire service "Hexanet\Common\MonologExtraBundle\Provider\Session
\SymfonySessionIdProvider": argument "$session" of method "__construct()" r
eferences interface "Symfony\Component\HttpFoundation\Session\SessionInterf
ace" but no such service exists. It cannot be auto-registered because it is
from a different root namespace.
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
In DefinitionErrorExceptionPass.php line 37:
Cannot autowire service "Hexanet\Common\MonologExtraBundle\Provider\Session
\SymfonySessionIdProvider": argument "$session" of method "__construct()" r
eferences interface "Symfony\Component\HttpFoundation\Session\SessionInterf
ace" but no such service exists. It cannot be auto-registered because it is
from a different root namespace.
Related to @nclsHart comment :
public function __construct(bool $startSession = false, SessionInterface $session)
This is not directly related to this PR, but arguments with default value should be at end of arguments list.
Release a new major after the merge
Not quoting the scalar "%hexanet_monolog_extra.session_start%" starting with the "%" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0.
$ sf hexaenet:doctor
Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getName() on null in /Users/floranbrutel/dev/si/applications/citadel/vendor/hexanet/monolog-extra-bundle/src/EventListener/ConsoleExceptionListener.php:42
Stack trace:
#0 [internal function]: Hexanet\Common\MonologExtraBundle\EventListener\ConsoleExceptionListener->onConsoleException(Object(Symfony\Component\Console\Event\ConsoleErrorEvent), 'console.error', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher))
#1 /Users/floranbrutel/dev/si/applications/citadel/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php(104): call_user_func(Array, Object(Symfony\Component\Console\Event\ConsoleErrorEvent), 'console.error', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher))
#2 /Users/floranbrutel/dev/si/applications/citadel/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php(212): Symfony\Component\EventDispatcher\Debug\WrappedListener in /Users/floranbrutel/dev/si/applications/citadel/vendor/hexanet/monolog-extra-bundle/src/EventListener/ConsoleExceptionListener.php on line 42
$event->getCommand();
return Command or null : we need to adapt the ConsoleExceptionListener
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.