Skip to content

Migrate to Mago, add Codecov and Infection (drops PHP 8.2) - #53

Merged
tyrsson merged 1 commit into
0.5.xfrom
mago-migration
Aug 10, 2026
Merged

Migrate to Mago, add Codecov and Infection (drops PHP 8.2)#53
tyrsson merged 1 commit into
0.5.xfrom
mago-migration

Conversation

@tyrsson

Copy link
Copy Markdown
Member

What

Migrates phpdb-mysql's tooling to Mago, consuming php-db/phpdb-qa-tools#3, plus adds Codecov and Infection.

  • composer.json: drop laminas/laminas-coding-standard + phpstan/*, add php-db/phpdb-qa-tools (0.1.x-dev) and infection/infection (^0.34.1). Scripts rewritten to call mago directly — kept for local/end-user convenience only, CI never invokes mago through composer.
  • Drops PHP 8.2 support (reaches EOL in ~4 months): infection/infection >=0.33 requires PHP >=8.3, and this repo's config.platform.php override applies that floor to the entirerequire-dev tree regardless of which CI job actually uses a given dependency — confirmed empirically, there's no way to keep 8.2 and add Infection's Mago integration at the same time.
  • mago.toml: new, extends the shared qa-tools base (php-version = "8.3.0").
  • Removed phpcs.xml.dist, phpstan.neon.dist, phpstan-baseline.neon, .laminas-ci.json.
  • Swapped coveralls.ymlcodecov.yml; dropped the upload-coverage script.
  • Added infection.json5.dist (staticAnalysisTool: "mago", mirrors webinertia/message-bus's pattern).
  • .github/workflows/continuous-integration.yml: thin caller into qa-tools' reusable workflow — run-integration: true, MySQL DB-service inputs, enable-codecov: true, enable-infection: true, secrets: inherit.
  • CI triggers narrowed to pull_request (targeting numbered release branches only, [0-9]+.[0-9]+.x) and push of version tags ([0-9]+.[0-9]+.[0-9]+) — no push:branches, since branch protection blocks direct pushes and pull_request already re-triggers on every commit via synchronize.

Why

See php-db/phpdb-qa-tools#3 for the shared workflow side of this. This PR is the first driver package to consume it, and doubles as the reference example other driver packages (Postgres, SQLite, ...) can copy from for wiring up their own DB service.

Scope notes

  • No source or test file changes — pure tooling/config swap. mago format/mago lint --fix has deliberately not been run yet; that mechanical reformat is its own follow-up PR, isolated + .git-blame-ignore-revs.
  • CI is expected to show real mago lint/analyze/guard findings once this merges — those are not triaged here, by design.
  • phpunit.xml.dist is unchanged (custom MySQL env vars + ListenerExtension bootstrap for integration tests) — every php-db driver package needs its own PHPUnit config for its seeded RDBMS, not a shared template.

Depends on php-db/phpdb-qa-tools#3.

Replaces laminas/laminas-coding-standard + PHPStan with php-db/phpdb-qa-tools'
shared Mago config, and swaps the CI workflow from laminas-ci-matrix-action
to phpdb-qa-tools' reusable continuous-integration.yml.
- composer.json: drop phpcs/phpstan deps, add php-db/phpdb-qa-tools
(0.1.x-dev) and infection/infection (^0.34.1), rewrite scripts to call
mago directly (composer scripts are for local convenience only, CI never
invokes mago through composer)
- Drop PHP 8.2 support (EOL ~4 months out): infection/infection >=0.33
requires PHP >=8.3, and composer.json's platform.php override applies
that floor across the whole require-dev tree regardless of which CI job
actually uses a given dependency
- mago.toml: new file extending the shared qa-tools base
- Remove phpcs.xml.dist, phpstan.neon.dist, phpstan-baseline.neon,
.laminas-ci.json
- Swap coveralls.yml for codecov.yml; drop the upload-coverage script
- Add infection.json5.dist (staticAnalysisTool: mago, mirrors the pattern
from webinertia/message-bus)
- .github/workflows/continuous-integration.yml: thin caller into
phpdb-qa-tools' reusable workflow (mago + test jobs, enable-codecov,
enable-infection, MySQL DB-service inputs), plus a standalone integration
job workaround is no longer needed now that the reusable workflow
supports a DB service natively
- Narrow CI triggers to pull_request (targeting numbered release branches
only) and push of version tags; no push:branches (branch protection
blocks direct pushes, and pull_request already re-triggers on synchronize)
No source or test file changes in this commit — pure tooling/config swap.
Depends on php-db/phpdb-qa-tools#3.
@tyrssontyrsson added this to the 0.6.0 milestone Aug 10, 2026
@tyrssontyrsson self-assigned this Aug 10, 2026
@tyrsson
tyrsson merged commit 78edda8 into 0.5.xAug 10, 2026
@github-project-automationgithub-project-automationBot moved this from Todo to Done in @phpdb-mysqlAug 10, 2026
@tyrssontyrsson modified the milestones: 0.6.0, 0.5.0Aug 10, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant

@tyrsson