I am trying to check for errors via phpcs and PHPCompatibility standard on a laravel project, here is the command:
phpcs -psvw app --extensions=php --standard=PHPCompatibility --runtime-set testVersion 8.0
The command works fine. However, I am supposed to receive following error but I am not:
Deprecated: Method ReflectionParameter::getClass() is deprecated in somefile.php on line 838
The actual code where PHP8 fails but PHPCS does not inform:
$results[] = is_null($dependency->getClass()) ? $this->resolvePrimitive($dependency) : $this->resolveClass($dependency);
The reason PHPCompatibility standard should tell me about this error is that when I try to run my app in PHP 8 I get above error, however PHPCS with PHPCompatibility does not report above error.
Any idea how can I make PHPCompatibility report above error ?