metaregistrar / php-epp-client

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

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

Closed lanthopusx closed 2 years ago

lanthopusx commented 3 years ago

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

bendre90 commented 3 years ago

Good Day,

looks like, this was done a year ago with 69c343d000a6ea949ffb9bf7b8deee786f25881e 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.

metaregistrar commented 3 years ago

According to packagist, their version is also 1.0.10

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

bendre90 commented 3 years ago

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

metaregistrar commented 2 years ago

Pull request 308 was merged, closing issue