-
Notifications
You must be signed in to change notification settings - Fork 102
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
Deprecated error when passing null to non-nullable argument for PHP 8.1 #252
Comments
This has been fixed in our master branch already. vfsStream/src/vfsStreamFile.php Lines 65 to 70 in f2b8d8c
I've back ported the fix to the v1.x branch in 1483c50. We'll tag a new v1.6.x or 1.7.x release with this fix before or around PHP 8.1's release. |
I hadn't thought about this! I'll tag a new release this week, just want to do some cleanup/organization first. |
I've tagged v1.6.9 which includes this fix. |
@allejo thanks for release! Nice one :) |
Hi, this line is causing deprecated error when executed in PHP 8.1 (with GitHub Actions):
vfsStream/src/vfsFile.php
Line 63 in 7299174
The problem is the null value passed to substr function later. Example:
vfsStream/src/content/StringBasedFileContent.php
Line 70 in 7299174
Passing null to non-nullable arguments is deprecated since PHP 8.1.
Souce: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
The text was updated successfully, but these errors were encountered: