- Issue created by @tmusika
- Merge request !28Issue #3532497: Fix PHP 8.4 implicit nullable types → (Open) created by Unnamed author
After updating PHP to 8.4 deprecation errors for implicitly nullable method parameters are thrown, primarily with the SmartIp class and classes implementing WebServiceUtilityInterface.
This is now part of Drupal standards, but the ticket for phpcs fixes has stalled. This ticket is to address the deprecation errors only.
- Install, enable and configure smart_ip module
- Update PHP to 8.4.
- Witness error messages in the browser.
Deprecated: Drupal\smart_ip\SmartIp::query(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /var/www/web/modules/contrib/smart_ip/src/SmartIp.php on line 31
Deprecated: Drupal\smart_ip\SmartIp::isUserDebugMode(): Implicitly marking parameter $uid as nullable is deprecated, the explicit nullable type must be used instead in /var/www/web/modules/contrib/smart_ip/src/SmartIp.php on line 203
Deprecated: Drupal\smart_ip\SmartIp::ipAddressVersion(): Implicitly marking parameter $ipAddress as nullable is deprecated, the explicit nullable type must be used instead in /var/www/web/modules/contrib/smart_ip/src/SmartIp.php on line 439
Deprecated: Drupal\smart_ip\SmartIpLocation::get(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /var/www/web/modules/contrib/smart_ip/src/SmartIpLocation.php on line 156
...
Update various method signatures with explicitly nullable types.