Skip to content

Commit 35b81c2

Browse files
committed
Disabled STDIN detection on Windows (ref #1799)
1 parent 40922d8 commit 35b81c2

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

package.xml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,17 @@ http://pear.php.net/dtd/package-2.0.xsd">
1717
<date>2017-12-18</date>
1818
<time>11:00:00</time>
1919
<version>
20-
<release>3.2.1</release>
21-
<api>3.2.1</api>
20+
<release>3.2.2</release>
21+
<api>3.2.2</api>
2222
</version>
2323
<stability>
2424
<release>stable</release>
2525
<api>stable</api>
2626
</stability>
2727
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
2828
<notes>
29-
- Fixed problems with some scripts and plugins waiting for STDIN
30-
-- This was a notable problem with IDE plugins (e.g., PHPStorm) and build systems
31-
- Empty diffs are no longer followed by a newline character (request #1781)
32-
- Generic.Functions.OpeningFunctionBraceKernighanRitchie no longer complains when the open brace is followed by a close tag
33-
-- This makes the sniff more useful when used in templates
34-
-- Thanks to Joseph Zidell for the patch
35-
- Fixed bug #1782 : Incorrect detection of operator in ternary + anonymous function
29+
- Disabled STDIN detection on Windows
30+
-- This fixes a problem with IDE plugins (e.g., PHPStorm) hanging on Windows
3631
</notes>
3732
<contents>
3833
<dir name="/">

src/Config.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Config
2323
*
2424
* @var string
2525
*/
26-
const VERSION = '3.2.1';
26+
const VERSION = '3.2.2';
2727

2828
/**
2929
* Package stability; either stable, beta or alpha.
@@ -360,7 +360,9 @@ public function __construct(array $cliArgs=[], $dieOnUnknownArg=true)
360360
} while ($currentDir !== '.' && $currentDir !== $lastDir);
361361
}//end if
362362

363-
if (defined('STDIN') === false) {
363+
if (defined('STDIN') === false
364+
|| strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'
365+
) {
364366
return;
365367
}
366368

0 commit comments

Comments
 (0)