0
votes

I am installing guzzle on my laravel application. But before, guzzle requires whatsapp/chat-api. When i install whatsapp/chat-api by composer require whatsapp/chat-api, it throws the error

whatsapp/chat-api v3.2.0.1 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.

However, i have extension=mcrypt.so in my php.ini for my php. My PHP version is 7.2.1

Why am i still getting the error above even after including extension=mcrypt.so in my php.ini ?

1
mcrypt was removed in PHP 7.0 as it has been abandoned for years and is no longer considered fit for purpose. Any software that relies on it must also be considered unfit for purpose until the dependencies on mcrypt are patched out in favour of more modern encryption libraries.GordonM
Is the extionsion installed on your system? Check by running php -i | grep mcrypt. If the output is empty, it is not.Tobias F.
@GordonM, meaning Guzzle can't work on PHP 7.0 ?CodeNewbie
Wait, since when does Guzzle require whatsapp/chat-api? Thats news to me. You perhaps meant to say: "I tried to install whatsapp/chat-api, which requires guzzle, which in turn requires ext-mcrypt".Tobias F.
Rephrasing the concerns expressed by other commenters: composer require guzzlehttp/guzzle:6.3 triggers the installation of guzzlehttp/promises, ralouphie/getallheaders, psr/http-message, guzzlehttp/psr7 and guzzlehttp/guzzle and suggests (but does not install by itself) psr/log. The whatsapp/chat-api package must come from elsewhere. Are you sure it isn't already inside composer.json as direct dependency set by another team member?Álvaro González

1 Answers

1
votes

the WhatsApp API is and of support in 2016 ther is no way you can use this package but you can use twillo API to send and receive the message from WhatsApp