Skip to content

Commit 25d6c1f

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: [ExpressionLanguage] Fixed collisions of character operators with object properties [Validator] Remove specific check for Valid targets [PhpUnitBridge] Use trait instead of extending deprecated class fix remember me Use strict assertion in asset tests [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types Do not rely on the current locale when dumping a Graphviz object fix typo [Ldap] force default network timeout [Config] don't throw on missing excluded paths Docs: Typo, grammar [Validator] Add the missing translations for the Polish ("pl") locale [Console] Inline exact-match handling with 4.4 Set previous exception when rethrown from controller resolver [VarDumper] fixed DateCaster not displaying additional fields [HttpKernel] fix registering DebugHandlersListener regardless of the PHP_SAPI
2 parents 29ec950 + 1628638 commit 25d6c1f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Controller/ControllerResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function getController(Request $request)
8585
try {
8686
$callable = $this->createController($controller);
8787
} catch (\InvalidArgumentException $e) {
88-
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $e->getMessage()));
88+
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $e->getMessage()), 0, $e);
8989
}
9090

9191
if (!\is_callable($callable)) {

EventListener/DebugHandlersListener.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public function __construct(callable $exceptionHandler = null, LoggerInterface $
6666
*/
6767
public function configure(Event $event = null)
6868
{
69+
if ($event instanceof ConsoleEvent && !\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
70+
return;
71+
}
6972
if (!$event instanceof KernelEvent ? !$this->firstCall : !$event->isMasterRequest()) {
7073
return;
7174
}
@@ -146,7 +149,7 @@ public static function getSubscribedEvents()
146149
{
147150
$events = [KernelEvents::REQUEST => ['configure', 2048]];
148151

149-
if ('cli' === \PHP_SAPI && \defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
152+
if (\defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
150153
$events[ConsoleEvents::COMMAND] = ['configure', 2048];
151154
}
152155

0 commit comments

Comments
 (0)