Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 720975e

Browse filesBrowse files
[PhpUnitBridge] fix reporting deprecations from DebugClassLoader
1 parent a78fb18 commit 720975e
Copy full SHA for 720975e

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ public function __construct($message, array $trace, $file)
7676
$this->triggeringFile = isset($trace[1 + $j]['args'][1]) ? realpath($trace[1 + $j]['args'][1]) : (new \ReflectionClass($class))->getFileName();
7777
$this->getOriginalFilesStack();
7878
array_splice($this->originalFilesStack, 0, $j, [$this->triggeringFile]);
79+
80+
if (preg_match('/(?|"([^"]++)" that is deprecated|should implement method "([^:]++))/', $message, $m) || preg_match('/^(?:The|Method) "([^":]++)/', $message, $m)) {
81+
$this->triggeringFile = (new \ReflectionClass($m[1]))->getFileName();
82+
array_unshift($this->originalFilesStack, $this->triggeringFile);
83+
}
7984
}
8085

8186
break;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.