Adds 'parallel' option support to phpcs task.
| Q | A |
|---|---|
| Branch | master for features and deprecations |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Documented? | yes |
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any |
This change adds support for 'parallel' option for the phpcs and phpcbf fixer. By default the option is set to null, which means it runs normally, if it's a positive integer that's the number of processes that will be used. If 'auto' is used the number of processors on the machine will determine the number.
New Task Checklist:
- [x] Are the dependencies added to the composer.json suggestions?
- [x] Is the doc/tasks.md file updated?
- [x] Are the task parameters documented?
- [x] Is the task registered in the tasks.yml file?
- [x] Does the task contains phpunit tests?
- [x] Is the configuration having logical allowed types?
- [x] Does the task run in the correct context?
- [x] Is the
run()method readable? - [x] Is the
run()method using the configuration correctly? - [x] Are all CI services returning green?
Yeah I was also thinking about this, it just adds complexity to the task and there also wasn't a straightforward way to test it. Good point that this should be done in phpcs.
In any case developers can add detection of the number of cores in their build processes and set it as the value for the 'parallel' option.
So with that in mind I have removed the auto detection of the cpu cores. Thank you for the input.
Thanks!