XF 2.2 Upgrading the Guzzle 7.x

robdog

Well-known member
Guzzle 6.x doesn't support PHP8.x. Are there plans to upgrade Guzzle to start using Guzzle 7? I have tried to use my own version of Guzzle with a different composer install, but ran into conflicts if there were CLI scripts attempting to use the later version of Guzzle.

If there are no plans, has anyone been able to successfully use a later version of Guzzle? Thanks.
 
Guzzle 6 works fine with PHP 8.x. What difficulty are you experiencing specifically?
 
@Chris D , thank you for the fast response! But this is the issue I am running into with Guzzle 6. I know the include path is our custom composer folder, but the version that is in the vendor folder for XF matches what we have in our own folder.

Here is a link to an issue that someone reported to the Guzzle team and their suggestion is to upgrade to v7... :confused:

Screenshot 2023-12-25 at 10.09.19 AM.webp
 
This is just a deprecation notice. We handle these specially in XF. These are only logged with debug/development mode enabled and are silenced otherwise. These don’t interrupt execution or affect users in any way.
 
Guzzle 6.x doesn't support PHP8.x. Are there plans to upgrade Guzzle to start using Guzzle 7? I have tried to use my own version of Guzzle with a different composer install, but ran into conflicts if there were CLI scripts attempting to use the later version of Guzzle.

If there are no plans, has anyone been able to successfully use a later version of Guzzle? Thanks.

Using your own version of Guzzle goes against the Resource Standards

See #27:

If an add-on needs to make HTTP requests, it must use the XF HTTP client rather than making cURL requests manually.

You should be using the built in HTTP client to make HTTP requests. The fact that it uses Guzzle 6 should be largely transparent to your app in most cases.

\XF::app()->http()->reader()->get() or \XF::app()->http()->reader()->request()
 
Forgot to mention earlier but XF 2.3 ships with Guzzle 7.5. In the meantime, for the reasons I mentioned, the deprecation notice is safe to ignore.
 
Using your own version of Guzzle goes against the Resource Standards

See #27:



You should be using the built in HTTP client to make HTTP requests. The fact that it uses Guzzle 6 should be largely transparent to your app in most cases.

\XF::app()->http()->reader()->get() or \XF::app()->http()->reader()->request()

Other composer packages such as Google's API Client, AWS SDK, PubNub SDK use Guzzle. But within my custom code, I am very familiar with that command...
 
This is just a deprecation notice. We handle these specially in XF. These are only logged with debug/development mode enabled and are silenced otherwise. These don’t interrupt execution or affect users in any way.

For jobs that are run through a CLI command, it is breaking out of jobs and not completing them. Possibly due to my PHP setup, so I'll keep doing some digging.
 
Back
Top Bottom