Skip to content

PHP 8.3 + Mago QA toolchain + Result test coverage - #39

Merged
simon-mundy merged 7 commits into
php-db:0.2.xfrom
simon-mundy:qa-refactor
Sep 9, 2026
Merged

simon-mundy merged 7 commits into
php-db:0.2.xfrom
simon-mundy:qa-refactor

Conversation

@simon-mundy

@simon-mundy simon-mundy commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

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 sqlite already gets for free (no sqlite-owned Result class to touch)
  • 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 — that's a separate job.

Test plan

  • composer test (97 unit tests)
  • composer test-integration (18 tests)
  • mago format --check, mago lint, mago analyze all clean

… 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.

@tyrsson tyrsson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base config needs updated to align => in array's. mago supports it. There is also a few missing docblock types reported. If those are supposed to be part of the next set of changes disregard this.

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in @phpdb-sqlite Aug 26, 2026
@tyrsson
tyrsson self-requested a review September 6, 2026 00:11

@tyrsson tyrsson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other then the one comment it looks good.

Comment thread src/AdapterPlatform.php Outdated
simon-mundy and others added 2 commits September 9, 2026 13:34
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
@simon-mundy
simon-mundy requested a review from tyrsson September 9, 2026 03:51
- 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 merged commit 3edbe10 into php-db:0.2.x Sep 9, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in @phpdb-sqlite Sep 9, 2026
@simon-mundy simon-mundy removed this from the 0.2.1 milestone Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants