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

WP_CLI\Core\CoreUpgrader::download_package needs to add $hook_extra parameter #167

Closed
afragen opened this issue Aug 10, 2020 · 1 comment
Closed

Comments

@afragen
Copy link

@afragen afragen commented Aug 10, 2020

Bug Report

--- If you are in the correct location now... --->

Describe the current, buggy behavior

In WP 5.5 an additional parameter was added to WP_Upgrader::download_package( $package, $check_signatures, $hook_extra ). When trying to force an update to a previous verison eg wp core update --force --version=beta1 a PHP warning about the difference between WP_CLI\Core\CoreUpgrader::download_package and WP_Upgrader::download_package.

This is using WP-CLI 2.5.0-alpha

PHP Warning: Declaration of WP_CLI\Core\CoreUpgrader::download_package($package, $check_signatures = true) should be compatible with WP_Upgrader::download_package($package, $check_signatures = false, $hook_extra = Array) in phar:///Applications/Local Beta.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/core-command/src/WP_CLI/Core/CoreUpgrader.php on line 30

Downloading update from https://wordpress.org/wordpress-beta1.zip...
Error: Download failed.

Describe how other contributors can replicate this bug

wp core update --force --version=beta1

Describe what you would expect as the correct outcome

Update occurs.

Let us know what environment you are running this on

OS:	Darwin 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul  5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64
Shell:	/bin/zsh
PHP binary:	/Users/afragen/Library/Application Support/Local Beta/lightning-services/php-7.4.1+12/bin/darwin/bin/php
PHP version:	7.4.1
php.ini used:	/Users/afragen/Library/Application Support/Local Beta/run/HJwKJqoPU/conf/php/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:	/Users/afragen/Local_Beta_Sites/lightning/app/public
WP-CLI packages dir:	
WP-CLI global config:	/Applications/Local Beta.app/Contents/Resources/extraResources/bin/wp-cli/config.yaml
WP-CLI project config:	
WP-CLI version:	2.5.0-alpha
@kkmuffme
Copy link

@kkmuffme kkmuffme commented Aug 11, 2020

Issue is reproducable for us too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.