You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PHP 8.4 deprecation: implicitly nullable parameter $labelSuffix in ApiClientHelper #129
On PHP 8.4, running setup:di:compile (Magento 2) produces the following deprecation warning:
PHP Deprecated: PostcodeEu\AddressValidation\Helper\ApiClientHelper::_formatHouseNumberAdditionOption():
Implicitly marking parameter $labelSuffix as nullable is deprecated,
the explicit nullable type must be used instead
in Helper/ApiClientHelper.php on line 375
Root cause
PHP 8.4 deprecated implicitly nullable parameter types (RFC).
The signature on line 375 uses string $labelSuffix = null, which is no longer allowed without an explicit ?.
Affected file
Helper/ApiClientHelper.php, line 375:
// Current (deprecated in PHP 8.4)privatefunction _formatHouseNumberAdditionOption(int$houseNumber, string$addition, string$labelSuffix = null): array// Fixed
private function _formatHouseNumberAdditionOption(int$houseNumber, string$addition, ?string$labelSuffix = null): array
Activity