php-ntlm icon indicating copy to clipboard operation
php-ntlm copied to clipboard

PHP 8.1 Compatibility?

Open justbaron opened this issue 2 years ago • 3 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 avatar Feb 28 '22 14:02 justbaron

@justbaron Check this https://github.com/jamesiarmes/php-ntlm/pull/14 out, it works this way on php 8.1 for me

satalaondrej avatar Mar 28 '22 22:03 satalaondrej

@jamesiarmes hi! any chance to merge this?

jsakars avatar May 11 '22 10:05 jsakars

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

giox069 avatar Aug 30 '22 07:08 giox069