DowngradeReflectionGetAttributesRector

Remove reflection getAttributes() class method code

 function run(ReflectionClass $reflectionClass)
 {
-    return $reflectionClass->getAttributes();
+    return method_exists($reflectionClass, 'getAttributes') ? $reflectionClass->getAttributes() ? [];
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionGetAttributesRector;

return RectorConfig::configure()
    ->withRules([
        DowngradeReflectionGetAttributesRector::class,
    ]);