Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:
curl https://fabbot.io/patch/symfony/symfony/46126/9db6140835ee64e3a13bc670006d5cf5c44073a1/cs.diff | patch -p0
diff -ru src/Symfony/Component/Finder/Iterator/SortableIterator.php src/Symfony/Component/Finder/Iterator/SortableIterator.php
--- src/Symfony/Component/Finder/Iterator/SortableIterator.php 2022-05-30 10:28:08.775166494 +0000
+++ src/Symfony/Component/Finder/Iterator/SortableIterator.php 2022-05-30 10:28:13.836272028 +0000
@@ -86,7 +86,8 @@
} elseif (self::SORT_BY_NONE === $sort) {
$this->sort = $order;
} elseif (\is_callable($sort)) {
- $this->sort = $reverseOrder ? static function (\SplFileInfo $a, \SplFileInfo $b) use ($sort) { return -$sort($a, $b); } : $sort(...);
+ $this->sort = $reverseOrder ? static function (\SplFileInfo $a, \SplFileInfo $b) use ($sort) { return -$sort($a, $b); }
+ : $sort(...);
} else {
throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
}