exchanger icon indicating copy to clipboard operation
exchanger copied to clipboard

fix: use explicit nullable types for PHP 8.4 compatibility

Open alies-dev opened this issue 2 months ago • 0 comments

Summary

PHP 8.4 deprecates implicitly nullable parameter types. This PR adds explicit ? nullable type syntax to fix deprecation warnings.

Changes

  • Exchanger::__construct(): CacheInterface $cache = null?CacheInterface $cache = null
  • HttpService::__construct(): RequestFactoryInterface $requestFactory = null?RequestFactoryInterface $requestFactory = null

PHP 8.4 Deprecation

PHP Deprecated: Exchanger\Service\HttpService::__construct(): Implicitly marking parameter $requestFactory as nullable is deprecated, the explicit nullable type must be used instead
PHP Deprecated: Exchanger\Exchanger::__construct(): Implicitly marking parameter $cache as nullable is deprecated, the explicit nullable type must be used instead

This is a backwards-compatible change that works with PHP 7.1+.

alies-dev avatar Dec 10 '25 14:12 alies-dev