vinkla / wordplate

A boilerplate for WordPress, built with Composer and designed with sensible defaults.
2.11k stars 155 forks source link

WP-CLI fatal error on use #274

Closed azralth closed 3 years ago

azralth commented 3 years ago

Hi, I get a fatal error on using activate plugin command with wp-cli. Strange thing, i have no error with wp --info --help and other :

Fatal error: Uncaught Error: Class 'WordPlate\Application' not found in phar://C:/laragon/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 28

Error: Class 'WordPlate\Application' not found in phar://C:/laragon/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 28

Call Stack:
    0.0156    1025880   1. {main}() C:\laragon\bin\wp-cli.phar:0
    0.0157    1021016   2. include('phar://C:/laragon/bin/wp-cli.phar/php/boot-phar.php') C:\laragon\bin\wp-cli.phar:4
    0.0159    1031720   3. include('phar://C:/laragon/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/wp-cli.php') phar://C:/laragon/bin/wp-cli.phar/php/boot-phar.php:11
    0.0161    1058336   4. WP_CLI\bootstrap() phar://C:/laragon/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/wp-cli.php:27
    0.0842    8915432   5. WP_CLI\Bootstrap\LaunchRunner->process() phar://C:/laragon/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/bootstrap.php:74
    0.0842    8915472   6. WP_CLI\Runner->start() phar://C:/laragon/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23
    0.0849    8916592   7. WP_CLI\Runner->load_wordpress() phar://C:/laragon/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1158
    0.0853    8922656   8. eval('declare(strict_types=1);

I am on windows 10, I get tha latest version of wp-cli via curl command.

Hope you can help me with this.

vinkla commented 3 years ago

@Azralth what version of WordPlate and PHP are you running? Which command trigger the error?

Not running Windows. We could maybe as @fiskhandlarn if he has experienced this issue?

azralth commented 3 years ago

Hi,

I'm runing on WordPlate 9.5.2 with 7.3 php Version. Right now, i'm facing with the wp plugin activate command.

I try to add the server path in wp-cli.yml with no success.

Thanks for your help.

fiskhandlarn commented 3 years ago

@azralth I'm not getting any errors when running executing docker-compose run --rm wpcli --info --help on WordPlate 9.5.2 through Docker with php7.3-fpm-alpine and wordpress:cli-php7.3. Can you please push your local setup to a repo so that I may have a look and reproduce the problem?

azralth commented 3 years ago

Hi,

I'm not using Docker for my local development. And i'm pretty sur if i do i'll not facing with this problem. Seems that windows is causing this error.

vinkla commented 3 years ago

Then I'll go ahead and close this issue. If you find anything we can improve for Windows, please open a pull request.