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

Remove specific configuration for array_fill() with PHP 8 #701

Merged
merged 1 commit into from Oct 7, 2021
Merged

Remove specific configuration for array_fill() with PHP 8 #701

merged 1 commit into from Oct 7, 2021

Conversation

steevanb
Copy link
Contributor

@steevanb steevanb commented Oct 6, 2021

PHP 8 allow array_fill() $start_key parameter to be less than 0, as PHP 7.x does:
http://sandbox.onlinephpfunctions.com/code/f41f7ca4e9acd877de048ff3d7905f8d354d99c2

A little difference is: with PHP 7.x if you have a negative number for $start_index, first index will be your number but next one will be 0:
http://sandbox.onlinephpfunctions.com/code/f41f7ca4e9acd877de048ff3d7905f8d354d99c2

With PHP 8 it will not be 0 but the next number:
http://sandbox.onlinephpfunctions.com/code/f41f7ca4e9acd877de048ff3d7905f8d354d99c2

@ondrejmirtes ondrejmirtes merged commit 98f0b02 into phpstan:master Oct 7, 2021
@ondrejmirtes
Copy link
Member

Thank you! /cc @staabm

@steevanb
Copy link
Contributor Author

steevanb commented Oct 7, 2021

Thanks!

Do you know when 0.12.100 will be available with this fix?

@ondrejmirtes
Copy link
Member

There isn't gonna be one. This fix is going to be out with PHPStan 1.0 in a few weeks.

@steevanb
Copy link
Contributor Author

steevanb commented Oct 7, 2021

Great news, finally the 1.0!

Thanks for this awesome tool!

@ondrejmirtes
Copy link
Member

You're welcome :)

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