From c3c092de0f51f442b1c4287fdac17c0b4bf77468 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Mon, 4 Apr 2016 10:38:46 +0200 Subject: [PATCH 1/3] [FrameworkBundle] fixes grammar in container:debug command manual. --- .../Bundle/FrameworkBundle/Command/ContainerDebugCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index 67d7451fb5..d8fde9fe58 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -75,7 +75,7 @@ Use the --parameters option to display all parameters: php %command.full_name% --parameters -Display a specific parameter by specifying his name with the --parameter option: +Display a specific parameter by specifying its name with the --parameter option: php %command.full_name% --parameter=kernel.debug EOF From a30e1662d865cce9212e0f60dd48f825bab87148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Sun, 3 Apr 2016 23:45:45 +0200 Subject: [PATCH 2/3] [EventDispatcher] Try first if the event is Stopped --- src/Symfony/Component/EventDispatcher/EventDispatcher.php | 2 +- .../Component/HttpKernel/Debug/TraceableEventDispatcher.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcher.php b/src/Symfony/Component/EventDispatcher/EventDispatcher.php index 8ec832e8a9..58535f2416 100644 --- a/src/Symfony/Component/EventDispatcher/EventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/EventDispatcher.php @@ -155,10 +155,10 @@ class EventDispatcher implements EventDispatcherInterface protected function doDispatch($listeners, $eventName, Event $event) { foreach ($listeners as $listener) { - call_user_func($listener, $event); if ($event->isPropagationStopped()) { break; } + call_user_func($listener, $event); } } diff --git a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php index 81e17da627..b387c95006 100644 --- a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -136,6 +136,10 @@ class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEve $event = new Event(); } + if (null !== $this->logger && $event->isPropagationStopped()) { + $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName)); + } + $eventId = ++$this->lastEventId; $this->preDispatch($eventName, $eventId, $event); From 472a7bffee94dd2617995af1464f7713beea95a7 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Thu, 31 Mar 2016 17:27:25 +0200 Subject: [PATCH 3/3] Detect CLI color support for Windows 10 build 10586 --- src/Symfony/Component/Console/Output/StreamOutput.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php index cc39ea108c..ceb6c971bb 100644 --- a/src/Symfony/Component/Console/Output/StreamOutput.php +++ b/src/Symfony/Component/Console/Output/StreamOutput.php @@ -85,7 +85,7 @@ class StreamOutput extends Output * * Colorization is disabled if not supported by the stream: * - * - Windows without Ansicon, ConEmu or Mintty + * - Windows before 10.0.10586 without Ansicon, ConEmu or Mintty * - non tty consoles * * @return bool true if the stream supports colorization, false otherwise @@ -94,7 +94,11 @@ class StreamOutput extends Output { // @codeCoverageIgnoreStart if (DIRECTORY_SEPARATOR === '\\') { - return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); + return + 0 >= version_compare('10.0.10586', PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD) + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM'); } return function_exists('posix_isatty') && @posix_isatty($this->stream);