metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
209 stars 153 forks source link

Fix deprecation warnings in PHP 8.1 #346

Closed W0rma closed 11 months ago

W0rma commented 1 year ago

This PR tackles at least some of the deprecation warnings which I noticed when using the package with PHP 8.1:

Deprecated: Return type of Metaregistrar\EPP\eppResponse::saveXML(?DOMNode $node = null, $options = null) should either be compatible with DOMDocument::saveXML(?DOMNode $node = null, int $options = 0): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated
W0rma commented 1 year ago

@metaregistrar Please let me know if there's anything I can do to move this PR forward.

We are already using this package with PHP 8.1 without any problems.