extension-command icon indicating copy to clipboard operation
extension-command copied to clipboard

Function compatibility UpgraderSkin

Open kgfeuerherm opened this issue 4 years ago • 2 comments

  • [ X] Yes, I reviewed the contribution guidelines.
  • [ X] Yes, more specifically, I reviewed the guidelines on [how to write clear bug reports]

Describe the current, buggy behavior

After a long period of not using WP CLI, did a wp cli update, which apparently succeeded, then proceeded to instal plug-ins on a new WP multisite.

So far as I can see, the plug-ins do get installed, however, I see the following warning each time:

Warning: Declaration of WP_CLI\UpgraderSkin::feedback($string) should be compatible with WP_Upgrader_Skin::feedback($string, ...$args) in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/UpgraderSkin.php on line 59

Note that PHP 7.3 is being forced as in the following example:

/opt/cpanel/ea-php73/root/usr/bin/php /usr/local/bin/wp plugin install ns-cloner-site-copier --activate

(There was a reason I had to do this as of last year, but I don't remember the details.)

Let us know what environment you are running this on

/opt/cpanel/ea-php73/root/usr/bin/php /usr/local/bin/wp cli info
OS:	Linux 3.10.0-693.11.6.1.ELK.el6.x86_64 #1 SMP Tue Jan 23 10:30:30 MST 2018 x86_64
Shell:	/usr/local/cpanel/bin/jailshell
PHP binary:	/opt/cpanel/ea-php73/root/usr/bin/php
PHP version:	7.3.21
php.ini used:	/opt/cpanel/ea-php73/root/etc/php.ini
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	/home2/wludh/public_html/2020
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version:	2.0.0

stat /usr/local/bin/wp
  File: `/usr/local/bin/wp'
  Size: 4668571   	Blocks: 9128       IO Block: 4096   regular file
Device: 851h/2129d	Inode: 2144626     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-08-28 20:15:28.935285373 -0500
Modify: 2018-08-10 13:18:01.000000000 -0500
Change: 2018-08-14 15:53:58.558452013 -0500

kgfeuerherm avatar Aug 29 '20 19:08 kgfeuerherm

Hi @kgfeuerherm Please update WP-CLI to version 2.4.0. In 2.4.0 there are simular issus related to WordPress 5.5 changes witch will be fixed in next WP-CLI release.

wojsmol avatar Sep 01 '20 12:09 wojsmol

  1. Ah, I see. My local WP-CLI is 2.4.0, but the server is at 2.0.0. I will have to post a ticket for that, I guess.
  2. Having trouble getting the hosting provider to make the update, but have found that by installing wp-cli.phar in a directory of my own, marking executable, and running it in lieu of the installed wp, I seem to be able to do what I need to do, e.g: /opt/cpanel/ea-php74/root/usr/bin/php ~/wpcli/wp-cli.phar plugin install contact-form --activate

So I think I can confirm that this resolves the issue. (I have tried a few commands and I assume on that basis that it will work with all of them.)

kgfeuerherm avatar Sep 01 '20 15:09 kgfeuerherm