Skip to content

Commit cdc910e

Browse files
Merge branch '4.4' into 5.0
* 4.4: (25 commits) [DoctrineBridge] Use new Types::* constants and support new json type [Debug][ErrorHandler] improved deprecation notices for methods new args and return type [BrowserKit] Nested file array prevents uploading file [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 versioned namespace clears 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 [PhpUnitBridge] Add compatibility to PHPUnit 9 #35662 [Routing] Add locale requirement for localized routes [Console] Inline exact-match handling with 4.4 Set previous exception when rethrown from controller resolver ...
2 parents 27bd166 + 25d6c1f commit cdc910e

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
@@ -64,6 +64,9 @@ public function __construct(callable $exceptionHandler = null, LoggerInterface $
6464
*/
6565
public function configure(object $event = null)
6666
{
67+
if ($event instanceof ConsoleEvent && !\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
68+
return;
69+
}
6770
if (!$event instanceof KernelEvent ? !$this->firstCall : !$event->isMasterRequest()) {
6871
return;
6972
}
@@ -144,7 +147,7 @@ public static function getSubscribedEvents(): array
144147
{
145148
$events = [KernelEvents::REQUEST => ['configure', 2048]];
146149

147-
if ('cli' === \PHP_SAPI && \defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
150+
if (\defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
148151
$events[ConsoleEvents::COMMAND] = ['configure', 2048];
149152
}
150153

0 commit comments

Comments
 (0)