Skip to content

Commit

Permalink
Merge branch '4.4' into 5.0
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
nicolas-grekas committed Feb 24, 2020
2 parents 27bd166 + 25d6c1f commit cdc910e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Controller/ControllerResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getController(Request $request)
try {
$callable = $this->createController($controller);
} catch (\InvalidArgumentException $e) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $e->getMessage()));
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $e->getMessage()), 0, $e);
}

if (!\is_callable($callable)) {
Expand Down
5 changes: 4 additions & 1 deletion EventListener/DebugHandlersListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ public function __construct(callable $exceptionHandler = null, LoggerInterface $
*/
public function configure(object $event = null)
{
if ($event instanceof ConsoleEvent && !\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
return;
}
if (!$event instanceof KernelEvent ? !$this->firstCall : !$event->isMasterRequest()) {
return;
}
Expand Down Expand Up @@ -144,7 +147,7 @@ public static function getSubscribedEvents(): array
{
$events = [KernelEvents::REQUEST => ['configure', 2048]];

if ('cli' === \PHP_SAPI && \defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
if (\defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) {
$events[ConsoleEvents::COMMAND] = ['configure', 2048];
}

Expand Down

0 comments on commit cdc910e

Please sign in to comment.