php-epp-client
php-epp-client copied to clipboard
$version must be ?string
I tried running the code on PHP 8.1 and received the following error: PHP Fatal error: Type of Metaregistrar\EPP\eppResponse::$version must be ?string (as in class DOMDocument) in /Protocols/EPP/eppResponses/eppResponse.php on line 9
I can't find the exact spot where to fix this.
Difficult to say, as there is so little information. From your statement, it would seem to me that the login response of the registry is not formatted as expected. But since the version variable is hardly ever used in the php-epp-client code, i cannot imagine where this error is coming from.
Do you have a log of what is sent and received from the registry?
I do not have any log available at this moment.
I decided to stay at version PHP 8.0, because this php client is clearly not ready for PHP 8.1.
So this issue is related to the variable handling of PHP 8.1? I will start testing with 8.1 soon
PHP 8.0 is working fine for me.
any update?
Just noticed this on PHP 8.1.7, downgrading my interpreter
Same on plain Ubuntu 22.04 with PHP 8.1.2
PHP Fatal error: Type of Metaregistrar\EPP\eppResponse::$version must be ?string (as in class DOMDocument) in /Protocols/EPP/eppResponses/eppResponse.php on line 9
@bessone @tpimh @sayoki Which version of metaregistrar/php-epp-client are you using?
eppResponse::$version was used prior to 1.0.11 but 2cdb917899fc3126e18b33d50ea8fffadf49b773 changed the property name to $versions.
The error message sounds like you are using a version < 1.0.11. Can you confirm this?
I can't find the version of this code.
I can't find the version of this code.
If you have used composer to install the package you can see the currently installed version in the output of composer show metaregistrar/php-epp-client.
If composer is not used please navigate to the source file of the class eppResponse (<root-dir-of-php-epp-client>/Protocols/EPP/eppReponses/eppResponse.php) in your local repository and check if there is still a property called $version. In this case you are using an old version of this package which does not contain the fix in 2cdb917899fc3126e18b33d50ea8fffadf49b773.
Rule 79 - 82
/*
* @var array of supported versions
*/
public $version;
Alright, seems like my assumption was correct and you are currently using an older version of this package.
Have you already tried updating to the most recent version?
No, because our programmers added and changed code wich was not pushed towards github.
No, because our programmers added and changed code wich was not pushed towards github.
In this case I don't think that the maintainer of this package can help you. You/your programmers need to update the code on your side.
What do we change?
We give it up, too much errors:
Array ( [type] => 64 [message] => Type of Metaregistrar\EPP\eppResponse::$version must be ?string (as in class DOMDocument) [file] => /Protocols/EPP/eppResponses/eppResponse.php [line] => 9 )
[X] Array ( [type] => 8192 [message] => Creation of dynamic property Metaregistrar\EPP\eppLogoutResponse::$resultCode is deprecated [file] => /Protocols/EPP/eppConnection.php [line] => 316 )
Array ( [type] => 8192 [message] => Creation of dynamic property nusoap_client::$return is deprecated [file] =>
Array ( [type] => 8192 [message] => 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 [file] => /Protocols/EPP/eppResponses/eppResponse.php [line] => 114 )
PHP 8.0 works fine, PHP 8.2 gives multiple errors.