Move to Symfony 5 and add PHP 8 support - #23
Merged
Merged
Conversation
Requires Symfony-5 releases of graze/parallel-process (>=0.8.2) and graze/console-diff-renderer (>=0.6.3); composer.lock and final CI verification are pending those tags. - composer.json: symfony/console + symfony/yaml -> ^5; bump the graze deps to their Symfony-5 lines. - Adopt the parallel-process 0.8 API: Pool -> PriorityPool (the max-simultaneous behaviour moved there) and Table -> Display\Table. - Replace the Symfony-5-removed Process::setCommandLine()/string ctor with Process::fromShellCommandline() in the chop/seed/dump runners (+ matching unit test expectations). Verified end-to-end on MySQL 8.4 with Symfony 5.4 via composer path repositories to the local libs: chop, seed (250 rows) and dump all succeed; 48 unit tests + phpcs pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- graze/parallel-process ^0.8 -> ^1.0, graze/console-diff-renderer ^0.6 -> ^1.1 (pulls Symfony stack up to 5.4 to satisfy symfony/process ^5) - phpunit/phpunit ^8.5 -> ^9, mockery/mockery ^1.3 -> ^1.6 (PHP 8 mock support) - Migrate phpunit.xml.dist to the PHPUnit 9 schema (coverage/include) and pin error_reporting to exclude deprecations (target runtime is PHP 7.4) - Replace removed @ExpectedException annotations with expectException() calls - Return bool from mocked PDOStatement::execute() (PHP 8 enforces the type) - Make implicitly-nullable params explicit (?Type) for PHP 8.4+ compatibility - Ignore PHPUnit 9 .phpunit.result.cache Unit suite green on PHP 7.4.26 and PHP 8.5.6 (48 tests, 101 assertions). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PHPUnit 9.6 errors out (exit 2) when a configured testsuite directory is missing, breaking bare `vendor/bin/phpunit` runs in CI. There are no integration tests, so remove the suite. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Widen the php constraint to ^7.4 || ^8.0 and add the PHP 8.x line to the CI matrix. The lowest-dependency variant stays on 7.4 only, since older tooling (e.g. phpcs 3.3) cannot run on PHP 8. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
graze/config-validation 0.2 caps at PHP 7, blocking dependency resolution on the new PHP 8 CI runners. v1 requires respect/validation ^2.2, so bump that too (the validator rules sprout uses are unchanged in v2; both each() calls already use the single-argument form). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verified locally; the ^8.0 constraint already covers it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates sprout’s dependency stack to Symfony 5.x while widening runtime compatibility to PHP 7.4 and PHP 8.x, including necessary code and test adaptations for upstream API changes (Symfony Process + graze/parallel-process) and PHPUnit 9.
Changes:
- Upgrade dependencies to Symfony Console/Yaml
^5, update Graze libraries, and widenphpconstraint to^7.4 || ^8.0(with updated lockfile). - Adopt
graze/parallel-processv1 API (PriorityPool,Display\Table) and update MySQL runner process creation toProcess::fromShellCommandline(). - Migrate test suite to PHPUnit 9 conventions (exception expectations, coverage config) and expand CI matrix to PHP 7.4–8.5.
Reviewed changes
Copilot reviewed 21 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Command/SeedCommand.php |
Switches to PriorityPool and new display Table for parallel-process v1 compatibility. |
src/Command/DumpCommand.php |
Switches to PriorityPool and new display Table for parallel-process v1 compatibility. |
src/Command/ChopCommand.php |
Switches to PriorityPool and new display Table for parallel-process v1 compatibility. |
src/Db/Mysql/MysqlTableSeeder.php |
Uses Process::fromShellCommandline() for Symfony Process v5 compatibility. |
src/Db/Mysql/MysqlTableDumper.php |
Uses Process::fromShellCommandline() for Symfony Process v5 compatibility. |
src/Db/Mysql/MysqlTableChopper.php |
Uses Process::fromShellCommandline() for Symfony Process v5 compatibility. |
src/Parser/SchemaParser.php |
Makes nullable parameter explicit for PHP 8.4+ compatibility. |
src/Parser/FileTablePopulator.php |
Makes nullable parameter explicit for PHP 8.4+ compatibility. |
src/Db/DbTablePopulator.php |
Makes nullable parameters explicit for PHP 8.4+ compatibility. |
src/Config/Config.php |
Makes nullable parameter explicit for PHP 8.4+ compatibility. |
tests/unit/** |
Updates PHPUnit exception assertions and adjusts mocks for Symfony Process + PDO return-type enforcement. |
phpunit.xml.dist |
Updates to PHPUnit 9 schema and modern coverage configuration. |
.github/workflows/ci.yml |
Expands CI matrix to PHP 7.4–8.5 and scopes prefer-lowest to 7.4. |
composer.json |
Bumps Symfony + Graze dependencies and widens PHP constraint to include PHP 8. |
composer.lock |
Lockfile updated for new dependency set and platform constraints. |
.gitignore |
Ignores PHPUnit 9 result cache file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Moves sprout to
symfony/console+symfony/yaml^5, adopts the tagged Symfony-5-compatible releases of the graze libraries, and adds PHP 8 support (CI now runs 7.4 through 8.5).Changes
Dependencies
symfony/console+symfony/yaml→^5(pulls the Symfony stack up to 5.4).graze/parallel-process→^1.0(v1.0.1) — Symfony 5 support; requiressymfony/process ^5.graze/console-diff-renderer→^1.1(v1.1.1).graze/config-validation→^1.0(0.2 capped at PHP 7, blocking PHP 8 resolution).respect/validation→^2.2(required by config-validation v1).phpunit/phpunit→^9,mockery/mockery→^1.6(PHP 8 mock support).phpconstraint widened to^7.4 || ^8.0.parallel-process API adoption (BC vs the 0.7 sprout previously locked)
Pool→PriorityPool(setMaxSimultaneous/ max-simultaneous behaviour moved toPriorityPool).Graze\ParallelProcess\Table→Graze\ParallelProcess\Display\Table.Process::setCommandLine()/ string constructor withProcess::fromShellCommandline()in the chop/seed/dump runners (+ matching unit-test expectations).PHPUnit 9 migration
phpunit.xml.distto the PHPUnit 9 schema (<coverage><include>replaces<filter><whitelist>); drop the unusedintegrationsuite (PHPUnit 9.6 errors on the missing directory); pinerror_reportingto exclude deprecations.@expectedExceptionannotations withexpectException()calls.boolfrom mockedPDOStatement::execute()(PHP 8 enforces the return type).?Type) for PHP 8.4+ compatibility..phpunit.result.cache.CI
7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5. The lowest-dependency variant runs on 7.4 only (older tooling such as phpcs 3.3 cannot run on PHP 8).Verification
chop✓,seed✓ (250 rows),dump✓ as the least-privilege user.🤖 Generated with Claude Code