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
Change CoreUpgrader::download_package signature
#166
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
schlessera
requested changes
Jul 23, 2020
|
How is this called and what is the behavior on older Core versions? I'm wondering whether we might need to support two different versions of the signature to maintain BC... |
Co-authored-by: Alain Schlesser <alain.schlesser@gmail.com>
|
The |
schlessera
approved these changes
Aug 26, 2020
TimothyBJacobs
added a commit
to TimothyBJacobs/core-command
that referenced
this pull request
Nov 5, 2020
WordPress 5.5 added a new parameter to `WP_Upgrader::download_package()`. WP-CLI subclasses the `Core_Upgrader` class to customize this behavior. This causes a PHP warning on 7.4 and fatal error on 8.0 if the method signatures do not match. In wp-cli#166 the method signature was adjusted to account for this new parameter, however this causes the same incompatible signature issue on sites running WP versions before 5.5. This commit introduces a trait-based compatibility shim to use the correct method signature depending on the WP version being run. This is patterned off the implementation used in the `FeedbackMethodTrait`.
|
Please see wp-cli/wp-cli#5494 - This seems related and still an issue, somehow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Fixes #167