Closed oldravian closed 1 year ago
Thanks @oldravian – I'm on 8.2, and I can't get phpenv
to install older versions of PHP properly (I think it's an M1 chip issue), so it's hard to test. I fixed the issue of static
return types in the latest commit – could you change your composer.json
to "highsidelabs/walmart-api": "dev-main"
and see if you run into any other incompatibilities?
@jlevers Thanks for this. There is another issue regards php version. That package requires ramsey/uuid:^4.7 but ramsey/uuid[4.7.0, ..., 4.x-dev] require php ^8.0
So I'm not able to install ramsey/uuid:^4.7 on php 7.4
Is it possible to run walmart-api-php on "ramsey/uuid": "^4.2.2"?
Looks like ramsey/uuid
version 4.2.x
doesn't work with PHP 8.2, which would be an issue. I think I'm just going to remove support for PHP 7.4 altogether, as it's already EOL. I'm not entirely sure how many people this will affect, but supporting EOL PHP versions can be a pretty big headache, as I've learned from supporting PHP 7.3 in my jlevers/selling-partner-api
library.
How about this – I've made a separate php-7.4
branch, moved the commit 7d8e5e2 that I made to remove the static
return types to that branch, and pushed the ramsey/uuid
version change there. From there, if you want to figure out how to handle PHP 7.4 support, feel free to make PRs to that branch and I'll review them.
The composer.json says "php": "^7.4 || >=8.0" but the package itself has some features that are only supported in PHP 8 like static return type of functions.
For example on line 164 of Configutaion.php
public function setApiKey(string $apiKeyIdentifier, string $key): static
https://github.com/highsidelabs/walmart-api-php/blob/35784bf110572064e50c4e3cd3f99c86aa23e9a8/src/Configuration.php#L164C20-L164C77