Skip to content

Conversation

@hostep
Copy link
Contributor

@hostep hostep commented Apr 22, 2025

…with PHP 8.4

Found with PHPCompatibility phpcs standard (develop branch)

$ vendor/bin/phpcs --standard=PHPCompatibility --extensions=php,phtml --runtime-set testVersion 7.4- .

FILE: Plugin/TriggerAddGuestPaymentInfoDataLayerEvent.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 34 | 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: $billingAddress.
 52 | 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: $billingAddress.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: Plugin/TriggerAddPaymentInfoDataLayerEvent.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 37 | 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: $billingAddress.
 61 | 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: $billingAddress.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Time: 608ms; Memory: 6MB

Ref: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

@jissereitsma
Copy link
Collaborator

Thanks for addressing this. Earlier, I checked things with the PHPCompatibility rules already, but not the development version. And the Magento clone is strongly outdated. I now incorporated the dev branch in my own release tool, so future checking upon compat is guaranteed.

Sorry for closing the PR. I already fixed this myself, only to find that you had a fix as well. A new release is now available with these fixes.

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

Successfully merging this pull request may close these issues.

2 participants