Skip to content

Commit d814e1d

Browse files
authored
fix: Remove hooks API deprecations (#275)
This part of the API should not be deprecated. The idea of `ParallelCommand` is to provide a leaner and alternative API, not to replace the `Parallelization` trait. A number of configuration methods are and should remain deprecated as they can now be easily configured via `configureParallelExecutableFactory()` instead*. *: the interest here is not so much to provide a difference from a user perspective, but rather to have one central point of customization, the `ParallelExecutorFactory`. Otherwise if we add/change a setting there we need to change it both in the factory and the trait.
1 parent 37ec5e7 commit d814e1d

2 files changed

Lines changed: 0 additions & 31 deletions

File tree

UPGRADE.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@
3434
- `::getSegmentSize()`
3535
- `::getBatchSize()`
3636
- `::getConsolePath()`
37-
- As part of the previous point, the following methods will no longer be declared
38-
in the `Parallelization` trait in 3.0. It is perfectly fine to still have a
39-
method with those names, but you need to register them to the factory (it will
40-
no longer be done automatically in 3.0) and you should not extend the current
41-
ones. The following methods are affected:
42-
- `::runBeforeFirstCommand()`
43-
- `::runAfterLastCommand()`
44-
- `::runBeforeBatch()`
45-
- `::runAfterBatch()`
4637
- The following methods have been removed from `Parallelization` and have no
4738
replacement (the existing and new extension points should be enough to cover
4839
those):

src/Parallelization.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -372,36 +372,19 @@ protected function getEnvironmentVariables(ContainerInterface $container): array
372372
];
373373
}
374374

375-
/**
376-
* @deprecated Deprecated since 2.0.0 and will be removed in 3.0.0. Override
377-
* ::getParallelExecutableFactory() to register your own callable. Note that having
378-
* a method with the same name is still fine, but it needs to be registered to the
379-
* factory and not extend the original one.
380-
*/
381375
protected function runBeforeFirstCommand(
382376
InputInterface $input,
383377
OutputInterface $output
384378
): void {
385379
}
386380

387-
/**
388-
* @deprecated Deprecated since 2.0.0 and will be removed in 3.0.0. Override
389-
* ::getParallelExecutableFactory() to register your own callable. Note that having
390-
* a method with the same name is still fine, but it needs to be registered to the
391-
* factory and not extend the original one.
392-
*/
393381
protected function runAfterLastCommand(
394382
InputInterface $input,
395383
OutputInterface $output
396384
): void {
397385
}
398386

399387
/**
400-
* @deprecated Deprecated since 2.0.0 and will be removed in 3.0.0. Override
401-
* ::getParallelExecutableFactory() to register your own callable. Note that having
402-
* a method with the same name is still fine, but it needs to be registered to the
403-
* factory and not extend the original one.
404-
*
405388
* @param list<string> $items
406389
*/
407390
protected function runBeforeBatch(
@@ -412,11 +395,6 @@ protected function runBeforeBatch(
412395
}
413396

414397
/**
415-
* @deprecated Deprecated since 2.0.0 and will be removed in 3.0.0. Override
416-
* ::getParallelExecutableFactory() to register your own callable. Note that having
417-
* a method with the same name is still fine, but it needs to be registered to the
418-
* factory and not extend the original one.
419-
*
420398
* @param list<string> $items
421399
*/
422400
protected function runAfterBatch(

0 commit comments

Comments
 (0)