-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated to work with PHP8's SoapClient #4
Conversation
Thanks for your contribution! It does raise the minimum PHP to version 8. I think it's a little too early to require that PHP version. I'm not using PHP 8 in any of my projects yet. I think to support both PHP 7 and PHP 8, we need to conditional define classes and interfaces: if (version_compare(PHP_VERSION, '8.0.0') >= 0) {
/**
* Provides an interface for handling Soap Requests.
*/
interface SoapClientInterface {
/**
* Performs A SOAP request.
*
* {@inheritdoc}
*/
public function __doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false);
(...)
}
else {
/**
* Provides an interface for handling Soap Requests.
*/
interface SoapClientInterface {
/**
* Performs A SOAP request.
*
* {@inheritdoc}
*/
public function __doRequest($request, $location, $action, $version, $one_way = 0);
(...)
} It's not pretty, but I think it's the easiest solution. I'm open to other ideas though. |
Yeah I fully agree, there is no other way to make it work for both versions sadly. |
@MegaChriz fixed to work that way |
@MegaChriz any updates? |
Oops, forgot about this one. In composer.json PHP 8 still gets required. The requirement should stay PHP 7 for now. |
@MegaChriz fixed |
Thanks, now I would like to add running tests with PHP 8, but I see lots have changed with Travis. It's now travis-ci.com instead of travis-ci.org. I don't use Travis actively for any other projects, so that would take me some time to figure out, I guess. |
Hi @MegaChriz, any news? |
I've tried to update the travis config now in branch "202111_travis". It's failing tests on PHP 7.4. To get these tests passing on that version, I need to make the tests compatible with PHPUnit 8.2.3+ and drop support for PHP versions lower than PHP 7.2 (because PHPUnit requires at least that version). |
Your changes are merged in! Things I did:
Tests passed on PHP 8! And they still also passed on the other PHP versions that were tested. So the issue is resolved now. 😀 |
Appreciate this a lot @MegaChriz 👍 |
Don't forget to tag a new release :-) |
@MegaChriz could you also tag a release on packagist? https://packagist.org/packages/megachriz/afasprofit |
I've created a new release and did an update on packagist. Thanks for reminding me. I hadn't thought of updating packagist. Apparently, there is a way to auto-update packagist using a GitHub Hook. |
See https://www.php.net/manual/en/class.soapclient.php