Symfony 5 support (drop > 4.4)#33
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates graze/parallel-process to support Symfony 5 (while retaining Symfony 4.4 compatibility) by modernizing event-dispatcher usage and tightening Composer platform requirements to a Symfony-5-compatible PHP baseline.
Changes:
- Update event classes/tests to extend/use
Symfony\Contracts\EventDispatcher\Event(Symfony 5 compatible). - Update
EventDispatcherTraitto use the Symfony 5+dispatch($event, $name)argument order. - Update Composer constraints for PHP and Symfony components (
symfony/process,symfony/event-dispatcher) and pin the dev resolution platform to PHP 7.4.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/unit/Event/EventDispatcherTest.php |
Switch test Event base class import to Symfony Contracts. |
tests/src/EventDispatcherFake.php |
Switch fake dispatcher Event base class import to Symfony Contracts. |
src/Event/RunEvent.php |
Switch event base class to Symfony\Contracts\EventDispatcher\Event. |
src/Event/PriorityChangedEvent.php |
Switch event base class to Symfony\Contracts\EventDispatcher\Event. |
src/Event/EventDispatcherTrait.php |
Update dispatch call signature to Symfony 5+ ordering and update Event import. |
composer.json |
Raise PHP requirement, update Symfony package constraints, and set Composer platform PHP to 7.4. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 27, 2026
Allow symfony/process and symfony/event-dispatcher ^4.4 | ^5 and modernise the event-dispatcher usage for Symfony 5, which removed Symfony\Component\EventDispatcher\Event and swapped the dispatch() argument order: - Events extend Symfony\Contracts\EventDispatcher\Event. - EventDispatcherTrait dispatches as dispatch($event, $name). Also raise the PHP floor to ^7.2 (Symfony 4.4/5 minimum) and pin the resolution platform to 7.4. Verified on PHP 7.4 with Symfony 5.4: 131 unit tests pass, phpcs clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- symfony/process & symfony/event-dispatcher: ^4.4 | ^5 -> ^5 (Symfony 5 only)
- php: raise floor to ^7.4; pin Composer platform to 7.4
- symfony/console (dev): ^4 | ^5; graze/console-diff-renderer has no Symfony 5
release yet, so it resolves to console 4.x for the Table/Lines tests
- PHPUnit 8 migration: setUp(): void, assertInternalType('float') -> assertIsFloat
- regenerate composer.lock
Validated on PHP 7.4: 131 tests pass, phpcs clean, no Composer advisories.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e6f6c13 to
1298b98
Compare
This was referenced May 28, 2026
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 the library to Symfony 5 only on PHP 7.4, and migrates the test suite to PHPUnit 8 (bumped on master in #32).
symfony/process&symfony/event-dispatcher:^2.8 | ^3.2 | ^4.0→^5(Symfony 4.4 support dropped).php: →^7.4; Composerplatform.phppinned to 7.4.Symfony\Component\EventDispatcher\Event, swappeddispatch()argument order):RunEvent/PriorityChangedEventextendSymfony\Contracts\EventDispatcher\Event.EventDispatcherTraitdispatches asdispatch($event, $name).setUp()):setUp(): voidacross the unit tests.assertInternalType('float', …)→assertIsFloat(…).symfony/console(dev):^4 | ^5.graze/console-diff-rendererhas no Symfony 5 release yet, so it still resolves to console 4.x for the Table/Lines tests — this is a dev/optional dependency and does not affect the library's Symfony 5 runtime support.composer.lockregenerated for the new constraints.Verification
PHP 7.4 + Symfony 5.4 (process 5.4.51 / event-dispatcher 5.4.45) + PHPUnit 8.5.52:
assertArraySubset/@expectedException, both removed in PHPUnit 9, left as a follow-up).composer updatereports no security advisories.🤖 Generated with Claude Code