fix reported class when deprecated method is static
This commit is contained in:
parent
1665555dd5
commit
aa80df609f
@ -79,7 +79,7 @@ class Deprecation
|
||||
$this->getOriginalFilesStack();
|
||||
array_splice($this->originalFilesStack, 0, $j, [$this->triggeringFile]);
|
||||
|
||||
if (preg_match('/(?|"([^"]++)" that is deprecated|should implement method "([^:]++))/', $message, $m) || preg_match('/^(?:The|Method) "([^":]++)/', $message, $m)) {
|
||||
if (preg_match('/(?|"([^"]++)" that is deprecated|should implement method "(?:static )?([^:]++))/', $message, $m) || preg_match('/^(?:The|Method) "([^":]++)/', $message, $m)) {
|
||||
$this->triggeringFile = (new \ReflectionClass($m[1]))->getFileName();
|
||||
array_unshift($this->originalFilesStack, $this->triggeringFile);
|
||||
}
|
||||
|
Reference in New Issue
Block a user