Resource icon

Guzzle6 for XenForo 2.0 1.3.0

No permission to download
  • Call to undefined method GuzzleHttp\Psr7\Response::json()

Code:
Fehlermeldung des Servers
ErrorException: Fatal Error: Call to undefined method GuzzleHttp\Psr7\Response::json() src/addons/EWR/Discord/Repository/Discord.php:198
Generiert durch: Unbekanntes Benutzerkonto 17. Februar 2018 um 01:05 Uhr
Stapelverfolgung
#0 [internal function]: XF::handleFatalError()
#1 {main}
Benötigter Status
array(4) {
  ["url"] => string(16) "/xenforo/job.php"
  ["referrer"] => string(50) "https://www.url.de/xenforo/admin.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Verify XenForo license Addon


Code:
Oops! Wir haben ein Problem!
InvalidArgumentException: Passing in the "body" request option as an array to send a POST request has been deprecated. Please use the "form_params" request option to send a application/x-www-form-urlencoded request, or the "multipart" request option to send a multipart/form-data request. in src/addons/Guzzle6/vendor/guzzlehttp/guzzle/src/Client.php at line 408
GuzzleHttp\Client->invalidBody() in src/addons/Guzzle6/vendor/guzzlehttp/guzzle/src/Client.php at line 119
GuzzleHttp\Client->requestAsync() in src/addons/Guzzle6/vendor/guzzlehttp/guzzle/src/Client.php at line 131
GuzzleHttp\Client->request() in src/addons/Guzzle6/vendor/guzzlehttp/guzzle/src/Client.php at line 89
GuzzleHttp\Client->__call() in src/addons/LiamW/XenForoLicenseVerification/Service/XenForoLicense/Verifier.php at line 130
GuzzleHttp\Client->post() in src/addons/LiamW/XenForoLicenseVerification/Service/XenForoLicense/Verifier.php at line 130
LiamW\XenForoLicenseVerification\Service\XenForoLicense\Verifier->validate() in src/addons/LiamW/XenForoLicenseVerification/XF/Pub/Controller/Account.php at line 43
LiamW\XenForoLicenseVerification\XF\Pub\Controller\Account->actionXenForoLicenseProcess() in src/XF/Mvc/Dispatcher.php at line 249
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 89
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1889
XF\App->run() in src/XF.php at line 328
XF::runApp() in index.php at line 13
 
Unfortunately, I can't make customisations for every single addon.

You're welcome to submit some pull requests if you come up with a fix yourself and I'll include them in my addon.
 
  • Like
Reactions: Xon
Sim updated Guzzle6 for XenForo 2 with a new update entry:

Updates for XF 2.0.3-2.0.5 and XFMG 2.0.3-2.0.4a

  • update for XF 2.0.3 - no longer need to modify XF\BbCode\ProcessorAction\AutoLink::fetchUrlHtml - but instead need to update new XF\Http\Reader::getCharset function
  • update for XF 2.0.3 - new code in XF\Payment\Stripe
  • update for XF 2.0.5 - no longer need to adjust Stripe class
  • update for XFMG 2.0.3 - no longer need to extend functionality of XFMG\EmbedData\BaseData\getTitleAndDescription
  • update for XFMG 2.0.3 - no longer need to extend functionality of...

Read the rest of this update entry...
 
I came to an alternative solution, for my use case, as I didn't want to affect the currently supported by XenForo guzzle version.

What I did was:
Run composer require 'guzzlehttp/guzzle' on the root dir of my add-on,
Perform case sensitive, recursive replacements for occurrences of 'Guzzle' and 'guzzle' with, say, 'Huzzle' and 'huzzle' in file contents and on file names,
Run composer update to recalculate the file checksums.

Adding other libraries works pretty well, though in my case they don't require guzzle. I'd need to repeat the last two steps from above in case they did.

Screenshot from 2018-07-17 12-16-29.webp
 
Top Bottom