Improve CI test discovery, parallel checks, and dependency updates
Test discovery
A package test that needed to run on every database used to need a subclass in each driver's directory. Now a single test in tests/Integration/{Package}/Database/ runs on MySQL, MariaDB, PostgreSQL, and SQLite. Tests in a driver subdirectory still run on that driver. The database job selects both sets in one ParaTest run. The NestedSet schema tests also run on MySQL 5.7. The tree tests that use window functions still require MySQL 8.
Redis, Valkey, and Redis Cluster now discover tests/Integration/{Package}/Redis/ the same way. Redis and Valkey share a runner, which also picks up the Permission and Reverb coverage that Valkey was missing. Cluster runs serially because its tests share database zero.
CI and static analysis
Framework tests and package tests can now run in parallel jobs on each supported PHP version. Code style and skeleton configuration run once. The Testbench sample package also resolves the local checkout when CI runs on a feature branch.
composer analyse:tests checks that a test chooses strict() or passthru() before using a Double. A test that intentionally relies on lenient behavior can say why at the call site. The rule runs in its own static analysis job and is opt-in for users of the PHPStan package.
Dependency updates
The workflows use GitHub's native Actions lockfile. The migration preserves the action commits we already use, while letting the workflow files refer to readable release tags. A separate check verifies the lockfile on pull requests and pushes to 0.4. Dependabot updates the tags and lockfile together.
Components, the application skeleton, and the standalone dogfood projects now wait three days before resolving a newly published Composer release, matching our pnpm policy. Installs from an existing lockfile keep their recorded versions. The CI image pulls the latest stable Composer at build time so fresh installs honor the policy.
Verification
Compared database and Redis test discovery with the previous workflows and ran the affected suites against the supported backends. Verified the Actions lockfile, checked that a missing workflow entry fails verification, and tested fresh Composer resolution for each project that sets the cooldown.
[!NOTE]
Split CI jobs into parallel matrices and add test-only PHPStan rule
- Reworks tests.yml into separate parallel jobs: code style on PHP 8.4 only, framework tests and package tests each on a PHP 8.4/8.5 shared matrix
- Adds
RequireExplicitDoubleModeRule, a PHPStan rule that reports Double::for factories without an explicit strict() or passthru() mode, wired through the new phpstan.tests.neon.dist config and composer analyse:tests
- Consolidates database-specific integration test wrappers into a shared
Database directory, with RequiresDatabase attributes declaring MySQL, MariaDB, and PostgreSQL coverage; PHPUnit gains a default suite and driver-specific mysql, mariadb, pgsql, and sqlite suites in phpunit.xml.dist
- Replaces GitHub Actions commit SHAs with version tags across workflows and adds a lockfile verification job using the new actions.lock
- Adds a three-day
policy.cooldown.period to Composer configs and pins Composer 2.11+ in the CI Docker image
- Behavioral Change: several integration tests now run against more databases (e.g. NestedSet and RateLimiter tests on PostgreSQL); NodeTest still excludes MySQL. CI runtime layout changes — check the matrix definitions in tests.yml
Macroscope summarized e4c1c3b.