Problem/Motivation
PHP 8.4 has deprecated implicit nullable types.
Steps to reproduce
Use in a PHP 8.4 environment
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3500340-11-mr69.patch | 3.76 KB | webflo |
Issue fork s3fs-3500340
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pcambraComment #4
cmlaraPostponed on #3500147: Set minimum supported PHP version to 7.1 being solved first.
We also might need to work around #3496517: Improve phpunit default configuration and make it customisable to get working tests before any new code changes go in.
Comment #5
pcambraJust realised I had missed a few
Comment #6
cmlaraNote:
This issue contains fixes that are detected by phpcs and automatically fixed by phpcbf.
This issue will not receive D.O. issue credit under Abuse of the Contribution Credit system.
Comment #7
pcambraI don't think phpcbf fixes this one, I wish :(
Just trying to update a project to 8.4 and share it, don't need you to give me credit but I am definitely not abusing the system.
To further proof that this is not automated (sadly) with a concrete example, as it doesn't fall in any of the categories of abuse linked above:
Comment #8
cmlaraThe sniff is: SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.Null
The sniff is part of the Drupal standard published in recent druapl/coder releases.
The sniff is marked as fixable by phpcbf in the logs: https://git.drupalcode.org/project/s3fs/-/jobs/4029235#L119
I belive you mean PHP9 (which has not yet been announced) as a deprecations do not stop the code from working in PHP 8.4,
Comment #9
pcambra> The sniff is: SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.Null
You are right :facepalm: sorry for the noise.
> do not stop the code from working in PHP 8.4
I'm seeing warnings in the interface and drush, just wanted to fix those.
Feel free to close this one if you think it's not useful.
Comment #10
cmlaraThat is usually error_reporting including E_DEPRECATED, often used in debug labs however not generally recommended in production or any other location that warnings are not significantly useful.
To be fair I’m surprised this made it into the Drupal standard, I really expected it to be more likely to make it into a Rector rule.
This will eventually get fixed (either in a new major or we make the decision to drop PHP7.0)
Just more pointing out that with existing automation this deprecation is already well know and we are attempting to avoid dealing with the routine credit farming that we see on D.O.
Even with the warning I wouldn’t be surprised to see one of the companies listed in #3432188: [META] Tracking issue for organisations who received educational messages do a drive-by of adding RTBC that the patch applies (gitlab already tells us that) and that the issue is solved (PHPCS already confirms that).
Comment #11
webflo commentedStable patch for 3.x / PHP 8.4.
Comment #12
cmlaraPHP Min is now committed at 7.1 allowing this to proceed.
Comment #13
cmlaraCommitted to dev. We will likely have a new release to add D11.2/D10.4 support in the near future.
Tagging for 4.x as we likely need this there eventually.