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

MAJOR_VERSION undefined class constant in src/utils.php #2744

Closed
kradkahaddi opened this issue Aug 14, 2020 · 4 comments
Closed

MAJOR_VERSION undefined class constant in src/utils.php #2744

kradkahaddi opened this issue Aug 14, 2020 · 4 comments

Comments

@kradkahaddi
Copy link

kradkahaddi commented Aug 14, 2020

Guzzle version(s) affected: *7.0.1
PHP version: 7.2.24
cURL version: 7.58.0

Description
Getting an undefined class constant error when running the "vendor/bin/wp theme update -all" command from this tutorial

How to reproduce
On GAE standard environment, activate the GCS plugin on the live site and try to run any update on the local version. The error does not exist when GCS plugin is deactivated on live site during updates.

Additional context
vendor/bin/wp theme update --all --path=my-wordpress-projectPHP Fatal error: Uncaught Error: Undefined class constant 'MAJOR_VERSION' in /home/val-wp/vendor/guzzlehttp/guzzle/src/Utils.php:121

@GrahamCampbell
Copy link
Member

This is not a bug?

@Nyholm
Copy link
Member

Nyholm commented Sep 22, 2020

Talk with the people writing that tutorial...

It seams like you have more than on guzzle installation loaded.

@Nyholm Nyholm closed this as completed Sep 22, 2020
@zavan
Copy link

zavan commented Oct 26, 2020

Just in case anyone bumps into this too:
In my root project I had guzzle 7 installed, but I also had a legacy subproject that was loaded with the root project that had guzzle 6 installed, upgrading it to 7 too fixed the problem.

Thanks @Nyholm for the tip.

@helloarpitgshah
Copy link

Is there any way that we can use Guzzle Library for all the PHP version >= 7.4

I need general for all the PHP version with latest.

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

5 participants