Hello,
I'm trying to write a hook which then requires a PHP Composer module. The issue I'm encountering is that the module I'm including (Smartwiaver) requires Guzzle. This causes conflicts with the Guzzle which WHMCS uses and creates exceptions when using WHMCS (see exception below)
I've opened a support ticket, but they weren't able to assist and suggested I post here. Has anyone experienced this issue and have a suggested workaround?
[Sun Sep 27 22:51:03.985192 2020] [php7:notice] [pid 51] [client 172.18.0.2:33996] [WHMCS Application] ERROR: Error: Call to undefined method GuzzleHttp\\Utils::chooseHandler() in /var/www/html/vendor/guzzlehttp/guzzle/src/functions.php:53 Stack trace: #0 /var/www/html/includes/hooks/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\\choose_handler() #1 /var/www/html/includes/hooks/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\\HandlerStack::create() #2 /var/www/html/includes/hooks/vendor/smartwaiver/smartwaiver-sdk/src/Smartwaiver/Smartwaiver.php(85): GuzzleHttp\\Client->__construct(Array) #3 /var/www/html/includes/hooks/waiver_controller.php(13): Smartwaiver\\Smartwaiver->__construct('66956a00a428e69...') #4 /var/www/html/includes/hooks/add_client.php(19): WaiverController->__construct('66956a00a428e69...') #5 /var/www/html/vendor/whmcs/whmcs-foundation/lib/Hook/Manager.php(0): WHMCS\\Utility\\SafeInclude::{closure}(Array) #6 /var/www/html/vendor/illuminate/support/Facades/Facade.php(261): WHMCS\\Hook\\Manager->run('ClientEdit', Array, false) #7 /var/www/html/includes/functions.php(0): Illuminate\\Support\\Facades\\Facade::__callStatic('run', Array) #8 /var/www/html/admin/clientsprofile.php(0): run_hook('ClientEdit', Array) #9 {main} {"exception":"[object] (Error(code: 0): Call to undefined method GuzzleHttp\\\\Utils::chooseHandler() at /var/www/html/vendor/guzzlehttp/guzzle/src/functions.php:53)"} [], referer: https://<REMOVED URL>/admin/clientsprofile.php?userid=1