Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pint fails on use with closure in 8.4 #324

Open
simon-tma opened this issue Jan 2, 2025 · 0 comments
Open

Pint fails on use with closure in 8.4 #324

simon-tma opened this issue Jan 2, 2025 · 0 comments

Comments

@simon-tma
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant