JeremyDunn / php-fedex-api-wrapper

This library provides a fluid interface for constructing requests to the FedEx web service API.
269 stars 184 forks source link

PHP 8 Compatibility? #164

Closed GenericHero01 closed 3 years ago

GenericHero01 commented 3 years ago

Howdy!

This looks like a great package for an upcoming project, however, I ran into some compatibility/deprecation issues when attempting a RateQuote.

ErrorException Method ReflectionParameter::getClass() is deprecated

Line 72 of AbstracComplexType.php is the culprit, though that's also used later down the file:

$parameterClass = $reflectionClass->getMethod($setterMethodName)->getParameters()[0]->getClass();

I can suppress error messages on my end and get it working, however, that doesn't feel great. Are there any plans to refactor for PHP 8 support? I'm poking at it on my end as well, though I'll be the first to admit I'm a relative PHP newbie.

Thanks!

JeremyDunn commented 3 years ago

These deprecated warnings should be fixed now in version 5.0.1.

GenericHero01 commented 3 years ago

Excellent, I just updated and see no errors. Thanks!