metaregistrar / php-epp-client

Object-oriented PHP EPP Client

Home Page:https://www.metaregistrar.com/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 7.4+ syntax incompatibility: Array and string offset access syntax with curly braces is no longer supported

lanthopusx opened this issue · comments

Using PHP 8.0.2 I cannot use any of the calls because of how the response is beeing processed. I think the curly braces should be replaced with bracets.

Array and string offset access syntax with curly braces is no longer supported in metaregistrar/php-epp-client/Protocols/EPP/eppResponses/eppResponse.php on line 126

Good Day,

looks like, this was done a year ago with 69c343d
But i can confirm, that this commit is not present when naivly using php-epp-client as composer package as it downloads version 1.0.6 instead of version 1.0.10.

This is because you (and me too) use php8.
In version 1.0.6 of php-epp-client, the php requirement was >=5.4 which matches to php8.

But as of 1.0.7 this was changed to ^7 which does not match to php8.

A little confusing, i agree.

According to packagist, their version is also 1.0.10

https://packagist.org/packages/metaregistrar/php-epp-client#1.0.10

Hi @metaregistrar

the problem is, that version 1.0.6 has the requirement "bigger/equal than php5.4 and above" (>=5.4)
While 1.0.7 and above requiring "php7.x only" (^7)

When you use php8, composer downloads version 1.0.6 because the php requirement ">=5.4" is valid for php8 and "^7" is not.

This can be fixed by merging pull request #308

Pull request 308 was merged, closing issue