lastcoolnameleft Posted September 30, 2020 Share Posted September 30, 2020 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 0 Quote Link to comment Share on other sites More sharing options...
Artesia Posted October 13, 2020 Share Posted October 13, 2020 We have the same problem here, guzzle seems to be outdated. 0 Quote Link to comment Share on other sites More sharing options...
heapmaster Posted January 20, 2021 Share Posted January 20, 2021 Same problem here too 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted January 20, 2021 Share Posted January 20, 2021 Are you guys still on WHMCS v7.x? WHMCS v.8.x uses Guzzle 7. 0 Quote Link to comment Share on other sites More sharing options...
heapmaster Posted January 22, 2021 Share Posted January 22, 2021 WHMCS 8, and I just excluded Guzzle from the module so that it uses Guzzle included with WHMCS instead, thus fixing my issue 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.