-
Notifications
You must be signed in to change notification settings - Fork 26
Fix database type detection to query server version instead of client binary #281
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]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@copilot A couple of PHPCS issues: "When a multi-item array uses associative keys, each value should start on a new line." Verify with |
Co-authored-by: swissspidy <[email protected]>
Fixed in dae93cf. All multi-item arrays with associative keys now have each value on a new line per PHPCS standards. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@swissspidy There is an issue with Bahat tags - see https://github.com/wp-cli/wp-cli-tests/actions/runs/19002353519/job/54271486123?pr=281 |
|
@copilot see above, one unit test is currently failing: sounds like getting the mysql version is not working as expected? maybe incorporating some changes from #274 helps? |
Co-authored-by: swissspidy <[email protected]>
... Fixed in 515b014. The issue was that when no database server is running (common in test environments), the function returned an empty version. Now it falls back to the client binary version ( |
Fix MariaDB detection to query server version instead of client version
Problem: The current implementation queries the version of the mysql/mariadb client binary, but we need the database server version to determine the correct SQL dialect.
Changes Made:
get_db_version()function in utils/behat-tags.phpImplementation Details:
utils/behat-tags.php:
get_db_type_and_version()function that:mysqlormariadb)SELECT VERSION()on the serverget_db_version()for backward compatibilityWP_CLI_TEST_DBTYPEWP_CLI_TEST_DBTYPE=sqliteexplicitlybin/install-package-tests:
mysqlandmariadbCLIENT_BINARYvariable consistently throughout scriptCLIENT_BINARYinstead of hardcoded client namesTesting:
php -lbash -nOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.