wp-cli / doctor-command

Diagnose problems within WordPress by running a series of checks for symptoms
MIT License
146 stars 22 forks source link

Missing "Mustangostang\Spyc" #111

Closed alistek closed 7 years ago

alistek commented 7 years ago

Hello,

I was attempting to test this out using an up to date version of wp-cli (1.1.0) but on two separate servers, I get the same error:

PHP Fatal error: Uncaught Error: Class 'Mustangostang\Spyc' not found in ~/.wp-cli/packages/vendor/wp-cli/doctor-command/inc/class-checks.php:32

I attempted to add this dependency to the "composer.json" file:

"mustangostang/spyc": "*"

I then ran an update but it would not work still. Would you have an idea as to how to get this missing dependency added, or what to modify to make this work? Thanks so much!

-Adam

Full Stack Trace: PHP Fatal error: Uncaught Error: Class 'Mustangostang\Spyc' not found in ~/.wp-cli/packages/vendor/wp-cli/doctor-command/inc/class-checks.php:32 Stack trace:

0 ~/.wp-cli/packages/vendor/wp-cli/doctor-command/inc/class-command.php(75): runcommand\Doctor\Checks::register_config('/root/.wp-cli/p...')

1 [internal function]: runcommand\Doctor\Command->check(Array, Array)

2 phar:///usr/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php(67): call_user_func(Array, Array, Array)

3 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher{closure}(Array, Array)

4 phar:///usr/bin/wp/php/WP_CLI/Dispatcher/Subcommand.php(390): call_user_func(Object(Closure), Array, Array)

5 phar:///usr/bin/wp/php/WP_CLI/Runner.php(316): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)

6 phar:///usr/bin/wp/php/WP_CLI/Runner.php(323): WP_CLI\Runner->run_command(Array, Array)

7 phar:///usr/bin/wp/php/WP_CLI/Runner.php(62): WP_CLI\Runner->_run_command()

8 phar:///usr/bin/wp/php/WP_CLI/Runner.php(885): WP_CLI\Runner->do_e in ~/.wp-cli/packages/vendor/wp-cli/doctor-command/inc/class-checks.php on line 32

gitlost commented 7 years ago

The whole components/composer system is in a state of flux at the moment and doctor's dev-master isn't compatible with the latest released wp-cli 1.1.0 so try

wp package uninstall wp-cli/doctor-command
wp package install wp-cli/doctor-command:0.1.0
alistek commented 7 years ago

That worked, thank you very much. Good to know the status of everything.

-Adam