Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error due to old version of GuzzleHttp #75

Open
Prihod opened this issue May 17, 2022 · 5 comments
Open

Error due to old version of GuzzleHttp #75

Prihod opened this issue May 17, 2022 · 5 comments

Comments

@Prihod
Copy link

Prihod commented May 17, 2022

The component uses an old version of GuzzleHttp which results in a "Fatal error: Uncaught Error: Undefined class constant 'MAJOR_VERSION' in" error if another component uses a newer version of GuzzleHttp

@BobRay
Copy link
Owner

BobRay commented May 18, 2022

Thanks for the heads up. Some questions:

  1. Can you tell me what file and line the MAJOR_VERSION error occurs on (or at least whether it's in Guzzle, UpgradeMODX, or somewhere else).
  2. Do you happen to know what other extra has the newer version of Guzzle?
  3. Do you have a way to try updating the UpgradeMODX Guzzle version with composer?

@Prihod
Copy link
Author

Prihod commented May 18, 2022

  1. Fatal error: Uncaught Error: Undefined class constant 'MAJOR_VERSION' in /www/wwwroot/site.com/core/components/my/vendor/guzzlehttp/guzzle/src/Utils.php:113 Stack trace: #0 /www/wwwroot/site.com/core/components/polylang/vendor/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent() #1 /www/wwwroot/site.com/core/components/upgrademodx/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent() #2 /www/wwwroot/site.com/core/components/upgrademodx/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults() #3 /www/wwwroot/site.com/core/components/upgrademodx/model/upgrademodx/upgrademodx.class.php(189): GuzzleHttp\Client->__construct() #4 /www/wwwroot/site.com/core/cache/includes/elements/modsnippet/19.include.cache.php(75): UpgradeMODX->init() #5 /www/wwwroot/site.com/core/model/modx/modscript.class.php(76): include('/www/wwwroot/de...') #6 /www/wwwroot/site.com/core/model/modx/moddas in /www/wwwroot/site.com/core/components/polylang/vendor/guzzlehttp/guzzle/src/Utils.php on line 113
  1. No
  2. No

@BobRay
Copy link
Owner

BobRay commented May 18, 2022

Thanks! It looks like GuzzleHttp doesn't much care about backward compatibility. This would have been really easy for them to avoid, imo.

@BobRay
Copy link
Owner

BobRay commented May 18, 2022

One more question, you're on MODX 2, right?

@Prihod
Copy link
Author

Prihod commented May 18, 2022

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants