Account for plugin dependencies when storing relevant plugin info#1613
Account for plugin dependencies when storing relevant plugin info#1613westonruter merged 4 commits intorelease/3.5.1from
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
bd14a92 to
f385a43
Compare
| */ | ||
| function perflab_query_plugin_info( string $plugin_slug ) { | ||
| $transient_key = 'perflab_plugins_info'; | ||
| $transient_key = 'perflab_plugins_info-v2'; |
There was a problem hiding this comment.
The transient key needs to be bumped since sites may already have downloaded bad plugin data with the old key.
There was a problem hiding this comment.
Seems like we should include a hash of the plugin version or something so that this type of bump would be unnecessary
There was a problem hiding this comment.
Oh, additionally, we should probably update the logic below so that if a slug is not found in the cache, it tries to request it from the API instead of returning a WP_Error right away.
There was a problem hiding this comment.
We could, but this is analogous to the $wp_db_version in core which doesn't necessarily need to change with each plugin release.
There was a problem hiding this comment.
Oh, additionally, we should probably update the logic below so that if a slug is not found in the cache, it tries to request it from the API instead of returning a
WP_Errorright away.
Yeah, that's a good idea too.
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: swissspidy <[email protected]>
|
Updated build for testing: performance-lab.zip |
Post 3.5.0 release merge
… fix/storing-standalone-plugin-info
adamsilverstein
left a comment
There was a problem hiding this comment.
Looks good, fixes the issue in my testing
|
Pending release diffs from 3.5.0:
|
felixarntz
left a comment
There was a problem hiding this comment.
Thanks @westonruter and everyone involved in fixing this so promptly in a hotfix!
While I understand how this resolves the problem, I wonder why optimization-detective is not part of the perflab_get_standalone_plugin_data() list in the first place. Did we not want to include it only because it's an infrastructure plugin?
| $standalone_plugins = array_flip( perflab_get_standalone_plugins() ); | ||
| $standalone_plugins = array_merge( | ||
| array_flip( perflab_get_standalone_plugins() ), | ||
| array( 'optimization-detective' => array() ) // TODO: Programmatically discover the plugin dependencies and add them here. |
There was a problem hiding this comment.
Is there an issue already for this?
@felixarntz I recall it was to avoid having Optimization Detective as a separate feature listed on the Performance screen since it doesn't provide features on its own. |
This is a follow-up hotfix to #1573 which broke the ability to install the Image Prioritizer plugin from the Performance features screen since the fetched plugin info did not include plugin dependencies, specifically Optimization Detective.
This also bumps the plugin version to 3.5.1.