DowngradeUnionTypeDeclarationRector

Remove the union type params and returns, add @param/@return tags instead

 class SomeClass
 {
-    public function echoInput(string|int $input): int|bool
+    /**
+     * @param string|int $input
+     * @return int|bool
+     */
+    public function echoInput($input)
     {
         echo $input;
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeDeclarationRector;

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