Skip to content

Commit a344075

Browse files
committed
fix reported class when deprecated method is static
1 parent cf3a3e5 commit a344075

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DeprecationErrorHandler/Deprecation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function __construct($message, array $trace, $file)
7979
$this->getOriginalFilesStack();
8080
array_splice($this->originalFilesStack, 0, $j, [$this->triggeringFile]);
8181

82-
if (preg_match('/(?|"([^"]++)" that is deprecated|should implement method "([^:]++))/', $message, $m) || preg_match('/^(?:The|Method) "([^":]++)/', $message, $m)) {
82+
if (preg_match('/(?|"([^"]++)" that is deprecated|should implement method "(?:static )?([^:]++))/', $message, $m) || preg_match('/^(?:The|Method) "([^":]++)/', $message, $m)) {
8383
$this->triggeringFile = (new \ReflectionClass($m[1]))->getFileName();
8484
array_unshift($this->originalFilesStack, $this->triggeringFile);
8585
}

0 commit comments

Comments
 (0)