UpgradeMODX
UpgradeMODX copied to clipboard
Error due to old version of GuzzleHttp
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
Thanks for the heads up. Some questions:
- 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).
- Do you happen to know what other extra has the newer version of Guzzle?
- Do you have a way to try updating the UpgradeMODX Guzzle version with composer?
-
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
- No
- No
Thanks! It looks like GuzzleHttp doesn't much care about backward compatibility. This would have been really easy for them to avoid, imo.
One more question, you're on MODX 2, right?
Yes