Skip to content

PHP 8.3 + Mago QA toolchain + Infection + Result test coverage - #40

Merged
simon-mundy merged 8 commits into
php-db:0.3.xfrom
simon-mundy:qa-refactor-0.3.x
Sep 9, 2026
Merged

simon-mundy merged 8 commits into
php-db:0.3.xfrom
simon-mundy:qa-refactor-0.3.x

Conversation

@simon-mundy

Copy link
Copy Markdown
Member

Re-targets #39 at 0.3.x. It was merged into 0.2.x by mistake; the PHP 8.3 minimum is a breaking change and belongs in 0.3.0, not a 0.2.1 patch.

Summary

  • Bumps minimum PHP to 8.3, matching pgsql
  • Swaps laminas-coding-standard/phpstan for the shared php-db/phpdb-qa-tools Mago setup
  • Adds test coverage for the shared core Pdo\Result class, including the new getQueryResult() method
  • Fixes the three findings raised by mago 1.47.6
  • Adds Infection mutation testing to CI at 80% MSI (currently 100% locally)
  • Reformat is its own commit, hash recorded in .git-blame-ignore-revs so git blame stays useful

Pre-existing lint/analyzer findings in untouched code are baselined, not fixed here.

Includes a merge of 0.3.x to pick up the webmozart/assert 1.x support from #38; the only conflict was composer.lock, resolved by re-locking webmozart/assert.

Test plan

  • composer test and composer test-integration (116 tests)
  • mago format --check, mago lint, mago analyze all clean
  • composer mutation-test at 100% MSI

🤖 Generated with Claude Code

https://claude.ai/code/session_01NmnnKBjnrHuCcyRCx4tj1V

simon-mundy and others added 8 commits August 24, 2026 16:11
… coverage

php-db/phpdb 0.6.x added getQueryResult() to Driver\ResultInterface, which
Sqlite already satisfies for free via the shared core Pdo\Result class (no
sqlite-owned Result class exists). Ports the core's exhaustive Pdo\Result
unit test suite to cover it, matching the coverage mysql/pgsql carry for
their own Result classes.

Also replaces laminas-coding-standard/phpstan with the shared
php-db/phpdb-qa-tools Mago toolchain, mirroring phpdb-qa-analysis-sql:
mago.toml extending the shared base, the qa-tools phpunit.xml.dist
template, mago-based composer scripts, and the reusable CI workflow.
Pre-existing lint/analyzer findings in untouched code are captured in
lint-baseline.toml/analyzer-baseline.toml rather than fixed here.
Signed-off-by: Simon Mundy <46739456+simon-mundy@users.noreply.github.com>
- Use setSpecification() in SelectDecorator instead of direct array write
- Ensure Source::loadSchemaData always assigns list<string> to schemas
- Add native type to AdapterPlatform::$resource
- Require infection/infection ^0.34.1 and allow its composer plugin
- Add infection.json5.dist mirroring php-db/phpdb, using mago as static analysis tool
- Add mutation-test composer script and enable the CI mutation job at 80% MSI
- Fix invalid CoversMethod target in DriverTest that failed the coverage run
- Assert the full factories map in ConfigProviderTest to kill an escaped mutant
…e entries

- Use #[Test] attributes and static:: assertions so the new factories test
  does not surface lint warnings beyond the baseline count
- Regenerate lint-baseline.toml to drop entries no longer present
@simon-mundy simon-mundy added this to the 0.3.0 milestone Sep 9, 2026
@simon-mundy
simon-mundy merged commit 8bfcfaa into php-db:0.3.x Sep 9, 2026
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant