jamesiarmes / php-ntlm

NTLM authentication library for PHP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 8.1 Compatibility?

justbaron opened this issue · comments

PHP version: PHP 8.1.1 (cli) (built: Dec 15 2021 10:31:43) (ZTS Visual C++ 2019 x64)
Microsoft Exchange version: VERSION_2013_SP1

Description of problem:
Is there a compatible version for PHP 8.1?
Using the jamesiarmes/php-ews classes and attempting to "SendMail", my Apache instance crashes.
I have tried adding the #[\ReturnTypeWillChange] attribute above both "__doRequest" and "__getLastRequestHeaders" functions, which suppress the errors, but still crashes my Apache instance.

Error.log:

PHP Deprecated:  Return type of jamesiarmes\PhpNtlm\SoapClient::__doRequest($request, $location, $action, $version, $one_way = 0) should either be compatible with SoapClient::__doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false): ?string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ..\composer\vendor\jamesiarmes\php-ntlm\src\SoapClient.php on line 71

PHP Deprecated:  Return type of jamesiarmes\PhpNtlm\SoapClient::__getLastRequestHeaders() should either be compatible with SoapClient::__getLastRequestHeaders(): ?string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in ..\composer\vendor\jamesiarmes\php-ntlm\src\SoapClient.php on line 106

@justbaron Check this #14 out, it works this way on php 8.1 for me

@jamesiarmes hi! any chance to merge this?

Same problem here after upgrading to PHP8.1.
What is preventing from #14 to be merged ? (I did not test it)