Detect WP-Stash in wp_get_cache_type() util#6183
Merged
swissspidy merged 9 commits intomainfrom Jan 20, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Support WP-Stash in wp cache type command
Add WP-Stash support and enhanced unknown cache detection to wp_get_cache_type()
Jan 5, 2026
This comment was marked as resolved.
This comment was marked as resolved.
…che.php Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…bject_cache Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
wp_get_cache_type() util
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for detecting WP-Stash cache type in the wp_get_cache_type() utility function and enhances unknown cache type reporting to include the class name for better debugging.
Changes:
- Added WP-Stash detection logic with driver information retrieval
- Enhanced unknown cache type messages to include the object cache class name
- Added comprehensive Behat test scenarios for default, unknown custom, and WP-Stash cache types
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| php/utils-wp.php | Added WP-Stash detection with try-catch error handling and enhanced unknown cache type reporting with class name |
| features/utils-wp.feature | Added three test scenarios validating default cache, unknown custom cache, and WP-Stash cache type detection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
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.Suggestion cannot be applied right now. Please check back later.
wp_get_cache_type()function implementation inphp/utils-wp.phpSummary
Successfully implemented support for WP-Stash cache type detection and enhanced unknown cache type reporting.
Latest Fix
Fixed two critical test issues:
$_wp_using_ext_object_cacheglobal is now set inside thenamespace {}block for the WP-Stash test.global $_wp_using_ext_object_cache;declaration to ensure the variable is properly accessible in the global scope, which is required for WordPress to detect external object caches.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.