Problem/Motivation
There are a few issues with PHP 8.4, all of them related to the implicitly nullable parameter being deprecated now, requiring an explicit marking declaration.
Checking the code using PHPCompatibility code sniffer:
FILE: /var/www/html/web/modules/contrib/storybook/src/Asset/UnoptimizedAssetResolver.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
49 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter: $language.
60 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter: $language.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/storybook/src/PathProcessor/AbsolutePathProcessor.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter: $request.
18 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly nullable instead. Found implicitly nullable parameter:
| | $bubbleable_metadata.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 82ms; Memory: 6MB
exit status 1
Steps to reproduce
Test the code base with PHPCompatibility code sniffer.
Proposed resolution
Fix deprecations.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #4
maursilveira commentedI've created a merge request with the fixes for the PHP 8.4 deprecations.
I'm also attaching here a patch file for the same fixes, for composer patches.
Please let me know if you have any questions. Thank you.
Comment #5
webflo commentedLooks great!
Comment #6
rajab natshahThank you, Tested the fix.
Hoping for a commit and release.
Comment #7
fjgarlin commented+1 for that commit and release.
Comment #9
e0ipso