Skip to content
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

Cannot create MailApi #61

Open
aleygues opened this issue May 23, 2024 · 1 comment
Open

Cannot create MailApi #61

aleygues opened this issue May 23, 2024 · 1 comment

Comments

@aleygues
Copy link

Hi there,

I'm trying to create a MailApi but I'm struggling on some missing params. I don't think it relates on the package itself, but on a PHP configuration issue maybe?

The code I want to use:

$mailApi = new MailApi($url); // this line is the error
$response = $mailApi->auth($mail, null, null, $token);

The fatal error I'm getting:

Fatal error:  Uncaught TypeError: Zimbra\Common\Soap\Client::__construct(): Argument #2 ($httpClient) must be of type Psr\Http\Client\ClientInterface, null given, called in /app/src/main/php/vendor/zimbra-api/soap-api/src/Common/Soap/ClientFactory.php on line 44 and defined in /app/src/main/php/vendor/zimbra-api/soap-api/src/Common/Soap/Client.php:86

The code is executed by PHP 8.3 (internal PHP server).

Do you have any clue on how to make PHP handles optional parameter correctly?

Thanks!

@nguyennv
Copy link
Contributor

nguyennv commented Jun 3, 2024

You must install one of http client implementations
https://packagist.org/providers/psr/http-client-implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants