-
Notifications
You must be signed in to change notification settings - Fork 56
Add wp core check-update-db command
#294
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: swissspidy <[email protected]>
wp core check-update-db command
This comment was marked as resolved.
This comment was marked as resolved.
- Revert README.md changes (file is auto-generated) - Restore composer/semver version range to "^1.4 || ^2 || ^3" Co-authored-by: swissspidy <[email protected]>
Co-authored-by: swissspidy <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a new wp core check-update-db command that checks whether a WordPress database update is needed without actually performing the update. The command compares the current database version with the version required by WordPress core and returns appropriate exit codes (1 if update needed, 0 if up to date).
Changes:
- Added
check_update_dbmethod toCore_Commandclass that checks database version compatibility - Implemented support for
--networkflag to check all sites in a multisite installation - Registered the new command in
composer.json - Created comprehensive Behat tests covering single site, multisite, and error scenarios
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Core_Command.php | Implements the new check_update_db method that compares database versions and handles both single site and multisite scenarios |
| features/core-check-update-db.feature | Comprehensive test coverage including single site checks, multisite checks, and error handling for non-multisite installations |
| composer.json | Registers the new core check-update-db command in the package configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
check-update-dbmethod to Core_Command classSummary
Successfully implemented
wp core check-update-dbcommand that checks whether a WordPress database update is needed. The command:wp_db_versionwith currentdb_versionoption--networkflag to check all sites in a multisite installationwp core check-updatecommandAll PR feedback has been addressed.
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.