jamesiarmes / php-ntlm

NTLM authentication library for PHP.
MIT License
53 stars 27 forks source link

PHP 8.1 Compatibility? #13

Open justbaron opened 2 years ago

justbaron commented 2 years ago

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
satalaondrej commented 2 years ago

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

jsakars commented 2 years ago

@jamesiarmes hi! any chance to merge this?

giox069 commented 2 years ago

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