NullDebugInfoReturnRector

Replaces null return value with empty array in __debugInfo methods

 new class
 {
     public function __debugInfo() {
-        return null;
+        return [];
     }
 };

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Php85\Rector\ClassMethod\NullDebugInfoReturnRector;

return RectorConfig::configure()
    ->withRules([
        NullDebugInfoReturnRector::class,
    ]);
SETS:  PHP 8.5