Raise minimum PHP to 8.3 and migrate QA tooling to phpdb-qa-tools (Mago, Infection, Codecov) - #11
Open
simon-mundy wants to merge 3 commits into
Open
Raise minimum PHP to 8.3 and migrate QA tooling to phpdb-qa-tools (Mago, Infection, Codecov)#11simon-mundy wants to merge 3 commits into
simon-mundy wants to merge 3 commits into
Conversation
This was referenced Aug 24, 2026
Replaces laminas-coding-standard and PHPStan with mago via php-db/phpdb-qa-tools 0.1.x-dev, and turns on the shared workflow's codecov and mutation-test jobs, which need secrets: inherit and a coverage-php-version to nominate the canonical matrix leg — without the latter no clover artifact is produced and both jobs break. Infection 0.33+ requires PHP ^8.3, so 8.2 goes: the php constraint, config.platform.php, mago.toml and the CI matrix all move with it. mago.toml extends the shared config. infection.json5.dist sets staticAnalysisTool: "mago" and badges the versioned release branches. codecov.yml reports project and patch status at target: auto. Composer scripts follow the shared convention of cs-check/cs-fix, static-analysis and mutation-test. phpcs.xml.dist, phpstan.neon.dist, phpstan-baseline.neon, stubs/ (PHPStan-only), .laminas-ci.json and coveralls.yml go, with the phpcs and phpstan dev dependencies. test-env-json points TESTS_PHPDB_PGSQL_HOSTNAME at 127.0.0.1 for CI, since the jobs are not containerised, leaving phpunit.xml.dist on the Compose default for local dev. Schema seeding stays with the ListenerExtension bootstrap. composer.lock moves for the new dev dependencies only. Current php-db/phpdb 0.6.x-dev adds ResultInterface::getQueryResult(), which Pgsql\Result does not implement, so a wholesale update fatals before any test runs. Also applies mago formatting and the safe lint fixes across src and test.
Mago is stricter than the PHPStan level 5 baseline it replaces, so the 123 linter and 231 analyzer findings already present are recorded in lint-baseline.toml and analyzer-baseline.toml, matching the rest of the org. format --check, lint, analyze and guard all pass, and new findings in new code still fail.
simon-mundy
force-pushed
the
qa-tools-migration-php83
branch
from
August 24, 2026 05:25
f57b5ae to
02eb97a
Compare
AdapterInterface declares no __construct, so CoversMethod named a target that cannot exist and PHPUnit raised "is not a valid target for code coverage" once per test. With failOnWarning="true" that failed the coverage leg of the matrix, the only leg where coverage metadata is validated, which is why this surfaced with the qa-tools workflow and not before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #10: raises the minimum PHP to 8.3 and replaces laminas-coding-standard and PHPStan with the shared
php-db/phpdb-qa-toolstoolchain, with Infection and Codecov wired in.require.php→~8.3.0 || ~8.4.0 || ~8.5.0,config.platform.php→8.3.99, CI matrix["8.3", "8.4", "8.5"].php-db/phpdb-qa-tools: 0.1.x-devandinfection/infection: ^0.34.1added torequire-dev,infection/extension-installerallow-listed.mago.toml— extends the shared config,php-version = "8.3.0", source pathssrcandtest.infection.json5.dist—staticAnalysisTool: "mago", Stryker badge on\d+\.\d+\.xbranches.codecov.yml— project and patch status attarget: auto,threshold: 0%.cs-check/cs-fix(mago format + lint),static-analysis(mago analyze),mutation-test(infection).phpcs.xml.dist,phpstan.neon.dist,phpstan-baseline.neon,stubs/(PHPStan-only),.laminas-ci.jsonandcoveralls.yml, plus the phpcs and phpstan dev dependencies..github/workflows/continuous-integration.ymlbecomes a caller of the shared reusable workflow at@0.1.x, with the Postgres service inputs,run-integration: true, Codecov and Infection enabled andcoverage-php-version: "8.5".test-env-jsonoverridesTESTS_PHPDB_PGSQL_HOSTNAMEto127.0.0.1sophpunit.xml.distkeeps its Compose default for local dev.Two commits: the migration, then the baselines.
Baselines
Mago is stricter than the PHPStan level 5 baseline it replaces, so the 354 existing findings are recorded in
lint-baseline.toml(123) andanalyzer-baseline.toml(231), asphp-db/phpdbalready does. New findings in new code still fail. Working them down is tracked in #13.Test plan
mago format --check,lint,analyzeandguardall clean. Unit suite green. Integration suite not run locally — no Docker daemon here, so it runs for the first time under the new workflow.Notes
composer.lockwas updated withcomposer update php-db/phpdb-qa-tools infection/infectionrather than wholesale. Currentphp-db/phpdb0.6.x-devaddsResultInterface::getQueryResult(), whichPgsql\Resultdoes not implement, so a full update fatals before any test runs — see #12. Thelatestlegs of the matrix will hit this.INFECTION_DASHBOARD_API_KEYneeds generating for this repo before mutation-test can report.