Change restore_include_path() to ini_restore("include_path")
-restore_include_path();
+ini_restore('include_path');
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\FuncCall\RestoreIncludePathToIniRestoreRector;
return RectorConfig::configure()
->withRules([
RestoreIncludePathToIniRestoreRector::class,
]);