pint
pint copied to clipboard
Pint fails on `use` with closure in 8.4
Pint Version
1.19.0
PHP Version
8.4.2
Description
When running Pint on PHP 8.4 we're getting Cannot access offset of type null on SplFixedArray on the reproduction case (Index invalid or out of range on the original file, before narrowing it down to this specific case).
We don't get the error on PHP 8.3, if we remove the contents of the closure, remove the use() statement or if we add a return statement.
Steps To Reproduce
<?php
function () use ($bookings) {
get();
};
./vendor/laravel/pint --no-config --test test.php
Pending https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/milestone/173