Skip to content

feat: support MariaDB 10 and 11; default local to 11 LTS, matrix CI#438

Merged
turegjorup merged 2 commits into
release/3.0.0from
feature/mariadb-10-and-11-matrix
May 7, 2026
Merged

feat: support MariaDB 10 and 11; default local to 11 LTS, matrix CI#438
turegjorup merged 2 commits into
release/3.0.0from
feature/mariadb-10-and-11-matrix

Conversation

@turegjorup
Copy link
Copy Markdown
Contributor

Summary

Pins local dev to MariaDB 11.4 LTS (was the moving itkdev/mariadb:latest alias, whose underlying version was undeclared) and adds a 2-leg CI matrix so PHPUnit and the Doctrine schema-validate workflow each run on mariadb:10.11 LTS and mariadb:11.4 LTS.

Also fixes an existing inconsistency: .env claimed serverVersion=10.11.5-MariaDB while .env.test claimed the EOL mariadb-10.5.13. Both now interpolate ${MARIADB_VERSION} from a single source of truth in .env (default 11.4.4-MariaDB), and CI overrides per matrix leg.

Files Changed

  • docker-compose.ymlimage: ${MARIADB_IMAGE:-mariadb:11.4}. Drops the unused commented-out ENCRYPT=1 env (itkdev wrapper-only feature).
  • .env — adds MARIADB_VERSION=11.4.4-MariaDB; DATABASE_URL interpolates it.
  • .env.test — same interpolation; reuses MARIADB_VERSION from .env (or CI override).
  • .github/workflows/phpunit.yamlstrategy.matrix over mariadb:10.11 + mariadb:11.4; fail-fast: false. Forwards MARIADB_VERSION into the phpfpm container via docker compose run -e MARIADB_VERSION.
  • .github/workflows/doctrine.yaml — same matrix shape for the migrate-and-validate job.
  • README.md — adds a ### Database (MariaDB) subsection under Development setup documenting the MARIADB_IMAGE / MARIADB_VERSION overrides with a copy-paste example for testing 10.11 locally.
  • CHANGELOG.md[Unreleased] entry.

Why upstream mariadb: and not itkdev/mariadb?

itkdev/mariadb on Docker Hub publishes only latest and 1.x.y wrapper tags (no major-version tags), so a clean matrix isn't expressible against it. The wrapper's only material extra is an opt-in ENCRYPT=1 that this repo's compose has commented out — MYSQL_* env vars and healthcheck.sh work the same on upstream.

Local verification (already run on 11.4)

Boot + migrate + full PHPUnit suite + schema-validate, all green against mariadb:11.4.10:

  • 143 tests / 607 assertions pass
  • 26 migrations apply cleanly
  • doctrine:schema:validate reports schema in sync

10.11 leg verified by CI matrix once this PR runs.

Test Plan

  • Local 10 LTS override:
    docker compose down -v
    MARIADB_IMAGE=mariadb:10.11 MARIADB_VERSION=10.11.13-MariaDB docker compose up -d mariadb
    docker compose exec mariadb mariadb --version    # expect 10.11.x
    MARIADB_VERSION=10.11.13-MariaDB docker compose run --rm phpfpm composer run test-setup
    MARIADB_VERSION=10.11.13-MariaDB docker compose run --rm phpfpm composer run test
  • CI: confirm the Checks tab shows two PHP Unit tests jobs and two Validate Schema jobs (one per matrix leg), all green. With fail-fast: false, a 10-only or 11-only failure stays visible rather than being masked.

🤖 Generated with Claude Code

@turegjorup turegjorup requested a review from tuj May 6, 2026 19:54
@turegjorup turegjorup self-assigned this May 6, 2026
@turegjorup turegjorup force-pushed the feature/mariadb-10-and-11-matrix branch from ea8b308 to ddcde64 Compare May 7, 2026 08:42
turegjorup and others added 2 commits May 7, 2026 11:21
- docker-compose.yml: pin local default to upstream `mariadb:11.4` (LTS
  until 2029-05); override via `MARIADB_IMAGE`. Drops the unused
  `ENCRYPT=1` toggle that only existed on the itkdev/mariadb wrapper.
- .env / .env.test: parametrize Doctrine `serverVersion` via
  `MARIADB_VERSION` (default `11.4.4-MariaDB`). Also fixes the prior
  inconsistency where .env claimed `10.11.5-MariaDB` and .env.test
  claimed the EOL `mariadb-10.5.13`.
- phpunit.yaml + doctrine.yaml: matrix-test on `mariadb:10.11` (LTS until
  2028-02) and `mariadb:11.4`. `fail-fast: false` so a regression on one
  major doesn't mask the other. Both jobs are renamed to
  `... (matrix.mariadb.image)` for clarity in the Checks tab.
- README: document `MARIADB_IMAGE` / `MARIADB_VERSION` overrides.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous arrangement put MARIADB_VERSION directly above DATABASE_URL
with no intervening comment, which fails scripts/check-env-coverage.sh's
"every variable in .env has a preceding description comment" rule.
Move MARIADB_VERSION (with its own comment block) above the DATABASE_URL
comment block so both variables retain a comment immediately above them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@turegjorup turegjorup force-pushed the feature/mariadb-10-and-11-matrix branch from ddcde64 to 14dae5f Compare May 7, 2026 09:21
@turegjorup turegjorup merged commit e04e49f into release/3.0.0 May 7, 2026
21 checks passed
@turegjorup turegjorup deleted the feature/mariadb-10-and-11-matrix branch May 7, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants