Hi, any particular command of wp cli is failing like this?
At least:
wp plugin list
wp plugin activate
wp plugin deactivate
I’m sure there are more of them.
If I use –skip-plugins=advanced-cron-manager it works normal.
I tried with usual installation and via wpackagist.org.
Ok, I checked this and I assume you had installed the plugin directly via GitHub or wpackagist as you said. This will give you an error, because I’m not storing the vendor directory on Git repository. After downloading it’s required to run composer install to install all the dependencies.
No, I have vendor dir in plugin directory like in this archive:
https://downloads.wp.xz.cn/plugin/advanced-cron-manager.2.2.3.zip
> I tried with usual installation and via wpackagist.org.
wpackagist.org contains all needed files when it installs plugin.
https://image.ibb.co/bYmXWa/Screenshot_1.png
It’s definitely something with WP CLI combination because plugin works normal via web UI.
Hmm, that’s weird then. Error
Class ‘underDEV_Requirements’ not found
points the finger at autoloader. I’m using classmap Composer feature there, maybe that’s not supported?
Or! What PHP version are you running? Any not usual setup?
Composer works fine.
Did you try replicate this?
PHP 7.0.4
Yes, works like a charm here.
All I could find regarding similar errors is to upgrade WP-CLI, can you please do that?
Already have latest (1.3.0).
I found something: maybe it’s related to relative paths and wrong autoload.php including.
If I change line 19 of advanced-cron-manager.php file to:
require_once( __DIR__ . ‘/vendor/autoload.php’ );
it works ok.
I think it loads wrong autoload.php file because you’re using relative paths and I use Composer for whole project. Maybe it loads my /vendor/autoload.php (which doesn’t have underDEV_Requirements class)
Can you make this change please?
Makes sense! I’ll update, you can leave the core edited for now.
Thanks a ton for help with debugging.
Thanks. Will wait for new release 🙂
Yep, it works now, thanks!
Awesome! Please, would you mind to rate the plugin if it helped you?