Skip to content

test: accept MariaDB version strings in GetVersionTest - #10642

Open
paulbalandan wants to merge 1 commit into
codeigniter4:developfrom
paulbalandan:mariadb-version-test
Open

paulbalandan wants to merge 1 commit into
codeigniter4:developfrom
paulbalandan:mariadb-version-test

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
Closes #7929 error no. 2. Error no. 1 was fixed by #7989 , error no. 3 was judged not a bug.
Supersedes and closes #10208

The pattern is now /\A\d+(\.\d+)*(-\S+)?\z/. It allows an optional suffix after the first - and keeps both anchors, so junk such as 1.2garbage or a trailing space still fails.

Example Driver Matches
8.0.36, 5.7.44 MySQLi (MySQL) ✅
16.4 Postgre ✅
3.45.1 SQLite3 ✅
16.00.4135 SQLSRV ✅
23.0.0.0.0 OCI8 ✅
10.11.4-MariaDB-1 MySQLi (MariaDB), from #7929 ✅
11.8.5-MariaDB-ubu2404 MySQLi (MariaDB), from #10208 ✅
10.11.6-MariaDB-0+deb12u1 MySQLi (MariaDB) ✅
5.5.5-10.11.4-MariaDB MySQLi (MariaDB) ✅
1.2garbage, 8.0.36 , abc, '' invalid ❌

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added the testing Pull requests that changes tests only label Oct 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Pull requests that changes tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: [MariaDB] phpunit test errors

3 participants