Releases: graze/parallel-process
Releases · graze/parallel-process
v1.0.1
v1.0.0 — Modernise: PHP 7.4-8.5, Symfony 5, PHPUnit 9, GitHub Actions
First release since 0.8.1 (2018). Modernises the library across the board.
Highlights
- PHP:
^5.5 | ^7.0→^7.4 || ^8.0. CI matrix tests PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5. - Symfony:
symfony/processandsymfony/event-dispatcherare now^5only (Symfony 2.8/3.2/4.x dropped). - Event-dispatcher modernised for Symfony 5: events extend
Symfony\Contracts\EventDispatcher\Event;EventDispatcherTraitusesdispatch($event, $name). - CI: migrated from Travis to GitHub Actions;
--prefer-lowestjob runs only on PHP 7.4 (dep floors live there).
Dev / tooling
- PHPUnit
^9.6(was^5.7 | ^6 | ^7); test suite migrated for PHPUnit 9 (assertRegExp→assertMatchesRegularExpression,@expectedException→\$this->expectException(...),assertArraySubsetvia thedms/phpunit-arraysubset-assertspolyfill). - Mockery
^1.6(was^1.0). graze/console-diff-renderer ^1.0(its v1.1.0 added PHP 8 support and letssymfony/console ^5resolve here).symfony/console(dev) →^5.- New
phpcs.xml.distthat excludesSquiz.Commenting.FunctionComment.TypeHintMissingso PHP 8+ doesn't demandmixedtype hints that PHP 7.4 cannot parse.
Upgrade notes
- PHP 5.x / 7.0 / 7.1 / 7.2 / 7.3 are not supported. Floor is PHP 7.4.
- Symfony 4.x and earlier are not supported. Symfony 5 only.
- Consumers passing
Symfony\Component\EventDispatcher\Eventshould switch toSymfony\Contracts\EventDispatcher\Event.
Merged PRs since 0.8.1
- #32 — Bump phpunit/phpunit from 7.5.4 to 8.5.52
- #33 — Symfony 5 support (drop Symfony 4.4), PHP 7.4, PHPUnit 8
- #34 — Migrate CI from Travis to GitHub Actions
- #35 — Raise mockery/mockery floor to ^1.3.1 for PHPUnit 8 compatibility
- #36 — Add PHP 8.0-8.5 support; PHPUnit 9, console-diff-renderer 1.x, modern actions
PriorityPool Tweaks
Poolwill start/complete when adding runs in a particular state.PriorityPoolwill listen to when the priority changes and re-order its queue
PriorityPool
- [BC] New Pool:
PriorityPoolthat supports:- priority for each run
- maximum number of processes to run at a time
Poolhas become simpler, and just runs all child runs at the same time- [BC]
max simultaneousoption has been moved toPriorityPool
- [BC]
- new event:
SUCCESSFULonly gets triggered when the run succeeds.- [BC] event:
COMPLETEwill get triggered for failed runs now too.
- [BC] event:
- Adds
PoolLoggerto write everything that happens to each pool and run.
Callback Runner
- Adds a
CallbackRunto run some php code. Note this will not be asynchronous.
Events
Quick Quick!
Allows pools to be run instantly (as soon as any process is added, and always run from then on)
:up: add support for symfony v4
0.5.1 Composer: allow Symfony 4 (#14)
lines lines lines
- Adds
Linesclass to show the output of all the processes as they happen in-line. - Modifies the callback definition (backwards compatible) to allow the type of each output from the process.
- Every output from the process is sent via callback now.
- Added flags to determine if
onProgressshould be on call process output or process poll or both.