Skip to content

Raise minimum PHP to 8.3 and migrate to php-db/phpdb-qa-tools (Mago, Infection, Codecov) #10

Description

@simon-mundy

Summary

Two pieces of housekeeping that both touch composer.json and CI, so they are best done together.

The package still advertises ~8.2.0 while the rest of the org has moved to 8.3, and it still uses laminas/laminas-coding-standard and PHPStan rather than the shared php-db/phpdb-qa-tools toolchain. Infection and Codecov are not wired up at all.

Proposed change

  1. Minimum PHP 8.3: require.php~8.3.0 || ~8.4.0 || ~8.5.0, config.platform.php8.3.99, CI matrix ["8.3", "8.4", "8.5"].
  2. Add php-db/phpdb-qa-tools: 0.1.x-dev and infection/infection: ^0.34.1 to require-dev, allow-list infection/extension-installer, and adopt the standard scripts: cs-check/cs-fix (mago format + lint), static-analysis (mago analyze), mutation-test (infection).
  3. Add mago.toml extending vendor/php-db/phpdb-qa-tools/mago.toml and pinning php-version = "8.3.0", infection.json5.dist with staticAnalysisTool: "mago", and codecov.yml.
  4. Remove phpcs.xml.dist, phpstan.neon.dist, phpstan-baseline.neon, stubs/ (PHPStan-only), .laminas-ci.json and coveralls.yml, along with the phpcs and phpstan dev dependencies.
  5. Replace the laminas-ci-matrix-action workflow with a call to php-db/phpdb-qa-tools/.github/workflows/continuous-integration.yml@0.1.x, passing the Postgres service inputs, run-integration: true, Codecov and Infection on, and coverage-php-version: "8.5". phpdb-mysql is the reference caller for a DB-backed driver.

Schema seeding stays with the ListenerExtension PHPUnit bootstrap. test-env-json can override TESTS_PHPDB_PGSQL_HOSTNAME to 127.0.0.1 for CI without disturbing the Compose default in phpunit.xml.dist.

Notes

Mago's analyzer is stricter than PHPStan level 5, so this will surface findings the baseline never reported. Those can be baselined on adoption, as php-db/phpdb does, rather than blocking the swap.

CODECOV_TOKEN is org-wide and already present. INFECTION_DASHBOARD_API_KEY is per-repo and needs generating at dashboard.stryker-mutator.io.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions