Merge branch '4.4' into 5.2

* 4.4:
  fix reported class when deprecated method is static
This commit is contained in:
Nicolas Grekas 2021-03-23 21:42:04 +01:00
commit 5e9644fae4
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,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);
}