Skip to content

Commit 4274b5a

Browse files
committed
PHPCBF now disables parallel running if you are passing content on STDIN
1 parent 1784eb4 commit 4274b5a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

package.xml

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
5151
--- e.g., property name="forbiddenFunctionNames" type="array" extend="true"
5252
-- Thanks to Michael Moravec for the patch
5353
- If $XDG_CACHE_HOME is set and points to a valid directory, it will be used for caching instead of the system temp directory
54+
- PHPCBF now disables parallel running if you are passing content on STDIN
55+
-- Stops an error from being shown after the fixed output is printed
5456
- The progress report now shows files with tokenizer errors as skipped (S) instead of a warning (W)
5557
-- The tokenizer error is still displayed in reports as normal
5658
-- Thanks to Juliette Reinders Folmer for the patch

src/Runner.php

+7
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,13 @@ public function runPHPCBF()
175175
// Init the run and load the rulesets to set additional config vars.
176176
$this->init();
177177

178+
// When processing STDIN, we only process one file at a time and
179+
// we don't process all the way through, so we can't use the parallel
180+
// running system.
181+
if ($this->config->stdin === true) {
182+
$this->config->parallel = 1;
183+
}
184+
178185
// Override some of the command line settings that might break the fixes.
179186
$this->config->generator = null;
180187
$this->config->explain = false;

0 commit comments

Comments
 (0)