From d2b5209ef7a17c686596d005e32b45f8b5290d13 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 1 Jun 2023 13:00:48 +0200 Subject: [PATCH] [PhpUnitBridge] Fix classifying doctrine/deprecations as direct/indirect --- .../DeprecationErrorHandler/Deprecation.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php index e18d9b1a289f2..f53cfc9b197a4 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php @@ -11,6 +11,7 @@ namespace Symfony\Bridge\PhpUnit\DeprecationErrorHandler; +use Doctrine\Deprecations\Deprecation as DoctrineDeprecation; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestSuite; use PHPUnit\Metadata\Api\Groups; @@ -60,9 +61,18 @@ class Deprecation */ public function __construct($message, array $trace, $file, $languageDeprecation = false) { - if (isset($trace[2]['function']) && 'trigger_deprecation' === $trace[2]['function']) { - $file = $trace[2]['file']; - array_splice($trace, 1, 1); + switch ($trace[2]['function'] ?? '') { + case 'trigger_deprecation': + $file = $trace[2]['file']; + array_splice($trace, 1, 1); + break; + + case 'delegateTriggerToBackend': + if (DoctrineDeprecation::class === ($trace[2]['class'] ?? '')) { + $file = $trace[3]['file']; + array_splice($trace, 1, 2); + } + break; } $this->trace = $trace; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy