FoxyCart / foxyclient-php

FoxyClient - a PHP Guzzle based API Client for working with the Foxy Hypermedia API
MIT License
9 stars 11 forks source link

Project Status? #14

Open matdave opened 2 years ago

matdave commented 2 years ago

Just checking if this is still a maintained project. Seems to break in PHP 8.

adamjudd commented 2 years ago

@matdave - thanks for checking in. At this point this project is still supported, so thanks for letting us know about the issues with PHP8. We'll look into that and see what might be causing issues there.

In terms of the future for the PHP foxyclient, we're not sure at this stage if this will stay as it is or be redeveloped in the same approach as our newer javascript SDK that has been the focus of development lately.

adamjudd commented 2 years ago

@matdave - can I confirm with you what errors you were seeing in PHP 8? I did some local testing and everything appeared to work ok for me, but I may have missed a portion that you're using in your set up.

matdave commented 2 years ago
[18-Apr-2022 17:30:32 America/New_York] PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:67
Stack trace:
#0 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(67): count()
#1 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(107): GuzzleHttp\Handler\CurlFactory->release()
#2 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish()
#3 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke()
#4 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}()
#5 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(42): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}()
#6 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Middleware.php(30): GuzzleHttp\PrepareBodyMiddleware->__invoke()
#7 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(68): GuzzleHttp\Middleware::GuzzleHttp\{closure}()
#8 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Middleware.php(59): GuzzleHttp\RedirectMiddleware->__invoke()
#9 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/HandlerStack.php(67): GuzzleHttp\Middleware::GuzzleHttp\{closure}()
#10 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Client.php(275): GuzzleHttp\HandlerStack->__invoke()
#11 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Client.php(123): GuzzleHttp\Client->transfer()
#12 /www/core/components/foxycart/model/vendor/guzzlehttp/guzzle/src/Client.php(129): GuzzleHttp\Client->requestAsync()
#13 /www/core/components/foxycart/model/vendor/foxycart/foxyclient/src/Foxy/FoxyClient/FoxyClient.php(265): GuzzleHttp\Client->request()
#14 /www/core/components/foxycart/model/vendor/foxycart/foxyclient/src/Foxy/FoxyClient/FoxyClient.php(246): Foxy\FoxyClient\FoxyClient->processRequest()
#15 /www/core/components/foxycart/model/vendor/foxycart/foxyclient/src/Foxy/FoxyClient/FoxyClient.php(190): Foxy\FoxyClient\FoxyClient->go()
#16 /www/core/components/foxycart/model/vendor/foxycart/foxyclient/src/Foxy/FoxyClient/FoxyClient.php(509): Foxy\FoxyClient\FoxyClient->get()
#17 /www/core/components/foxycart/model/vendor/foxycart/foxyclient/src/Foxy/FoxyClient/FoxyClient.php(459): Foxy\FoxyClient\FoxyClient->getOAuthTokenEndpoint()
#18 /www/core/components/foxycart/model/foxycart/foxycart.class.php(123): Foxy\FoxyClient\FoxyClient->refreshTokenAsNeeded()
#19 /www/core/components/foxycart/model/foxycart/src/Snippet/ManageSubscriptions.php(29): FoxyCart->initFoxyCart()

These are some initial errors i get if i switch to php 8

brettflorio commented 2 years ago

Related PR: https://github.com/FoxyCart/foxyclient-php/pull/15

brettflorio commented 1 year ago

Fwiw to anybody visiting this thread: The project is still active, but since it's a light wrapper on top of the API, there aren't many updates necessary. If you have any questions or issues, just let us know.