DowngradeArrowFunctionNeverReturnTypeRector

Remove "never" return type from arrow functions, which PHP 8.1 rejects at compile time

-$callable = fn (): never => throw new \RuntimeException();
+$callable = fn () => throw new \RuntimeException();

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DowngradePhp82\Rector\ArrowFunction\DowngradeArrowFunctionNeverReturnTypeRector;

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