Verified Commit bc0acf73 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3304991 by bradjones1, andypost, catch: [Symfony 6] HttpKernel should...

Issue #3304991 by bradjones1, andypost, catch: [Symfony 6] HttpKernel should opt-in to catching `\Throwable`

(cherry picked from commit c86d7ad0)
parent 44a6c2a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -736,7 +736,7 @@ services:
    class: Drupal\Core\StackMiddleware\StackedHttpKernel
  http_kernel.basic:
    class: Symfony\Component\HttpKernel\HttpKernel
    arguments: ['@event_dispatcher', '@controller_resolver', '@request_stack', '@http_kernel.controller.argument_resolver']
    arguments: ['@event_dispatcher', '@controller_resolver', '@request_stack', '@http_kernel.controller.argument_resolver', true]
  http_kernel.controller.argument_resolver:
    class: Symfony\Component\HttpKernel\Controller\ArgumentResolver
    arguments: ['@http_kernel.controller.argument_metadata_factory', ['@argument_resolver.request_attribute', '@argument_resolver.request', '@argument_resolver.psr7_request', '@argument_resolver.route_match', '@argument_resolver.default']]
+2 −2
Original line number Diff line number Diff line
@@ -124,13 +124,13 @@ public function onException(ExceptionEvent $event) {
  /**
   * Extracts a form AJAX exception.
   *
   * @param \Exception $e
   * @param \Throwable $e
   *   A generic exception that might contain a form AJAX exception.
   *
   * @return \Drupal\Core\Form\FormAjaxException|null
   *   Either the form AJAX exception, or NULL if none could be found.
   */
  protected function getFormAjaxException(\Exception $e) {
  protected function getFormAjaxException(\Throwable $e) {
    $exception = NULL;
    while ($e) {
      if ($e instanceof FormAjaxException) {
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ protected function isCli() {
  /**
   * Determines if an exception handler should redirect to the installer.
   *
   * @param \Exception $exception
   * @param \Throwable $exception
   *   The exception to check.
   * @param \Drupal\Core\Database\Connection|null $connection
   *   (optional) The default database connection. If not provided, a less
@@ -38,7 +38,7 @@ protected function isCli() {
   *   TRUE if the exception handler should redirect to the installer because
   *   Drupal is not installed yet, or FALSE otherwise.
   */
  protected function shouldRedirectToInstaller(\Exception $exception, Connection $connection = NULL) {
  protected function shouldRedirectToInstaller(\Throwable $exception, Connection $connection = NULL) {
    // Never redirect on the command line.
    if ($this->isCli()) {
      return FALSE;