DowngradeArrayAllRector

Downgrade array_all() to foreach loop

-$found = array_all($animals, fn($animal) => str_starts_with($animal, 'c'));
+$found = true;
+foreach ($animals as $animal) {
+    if (!str_starts_with($animal, 'c')) {
+        $found = false;
+        break;
+    }
+}

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DowngradePhp84\Rector\Expression\DowngradeArrayAllRector;

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