Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 268e740

Browse files
Merge branch '6.2' into 6.3
* 6.2: [5.4] Allow PhpUnitBridge v7 [Console] block input stream if needed When the input stream used in the question helper is not blocking, the default value is always used as the stream return false. In order to fix that, we force the stream to be in blocking state and go back to the old state after so other logic is not impacted by this change
2 parents 100f9ea + 4347520 commit 268e740

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
"psr/http-client": "^1.0",
151151
"psr/simple-cache": "^1.0|^2.0|^3.0",
152152
"symfony/mercure-bundle": "^0.3",
153-
"symfony/phpunit-bridge": "^5.4|^6.0",
153+
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0",
154154
"symfony/runtime": "self.version",
155155
"symfony/security-acl": "~2.8|~3.0",
156156
"twig/cssinliner-extra": "^2.12|^3",
@@ -168,7 +168,7 @@
168168
"masterminds/html5": "<2.6",
169169
"phpdocumentor/reflection-docblock": "<5.2",
170170
"phpdocumentor/type-resolver": "<1.5.1",
171-
"phpunit/phpunit": "<5.4.3"
171+
"phpunit/phpunit": "<7.5|9.1.2"
172172
},
173173
"config": {
174174
"allow-plugins": {

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"doctrine/dbal": "<2.13.1",
5656
"doctrine/lexer": "<1.1",
5757
"doctrine/orm": "<2.12",
58-
"phpunit/phpunit": "<5.4.3",
5958
"symfony/cache": "<5.4",
6059
"symfony/dependency-injection": "<6.2",
6160
"symfony/form": "<5.4.21|>=6,<6.2.7",

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
"doctrine/persistence": "<1.3",
7878
"phpdocumentor/reflection-docblock": "<3.2.2",
7979
"phpdocumentor/type-resolver": "<1.4.0",
80-
"phpunit/phpunit": "<5.4.3",
8180
"symfony/asset": "<5.4",
8281
"symfony/clock": "<6.3",
8382
"symfony/console": "<5.4",

src/Symfony/Component/Console/Helper/QuestionHelper.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,18 @@ private function doAsk(OutputInterface $output, Question $question): mixed
123123
}
124124

125125
if (false === $ret) {
126+
$isBlocked = stream_get_meta_data($inputStream)['blocked'] ?? true;
127+
128+
if (!$isBlocked) {
129+
stream_set_blocking($inputStream, true);
130+
}
131+
126132
$ret = $this->readInput($inputStream, $question);
133+
134+
if (!$isBlocked) {
135+
stream_set_blocking($inputStream, false);
136+
}
137+
127138
if (false === $ret) {
128139
throw new MissingInputException('Aborted.');
129140
}

src/Symfony/Component/Form/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"symfony/uid": "^5.4|^6.0"
4545
},
4646
"conflict": {
47-
"phpunit/phpunit": "<5.4.3",
4847
"symfony/console": "<5.4",
4948
"symfony/dependency-injection": "<5.4",
5049
"symfony/doctrine-bridge": "<5.4.21|>=6,<6.2.7",

src/Symfony/Component/Validator/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"conflict": {
4646
"doctrine/annotations": "<1.13",
4747
"doctrine/lexer": "<1.1",
48-
"phpunit/phpunit": "<5.4.3",
4948
"symfony/dependency-injection": "<5.4",
5049
"symfony/expression-language": "<5.4",
5150
"symfony/http-kernel": "<5.4",

src/Symfony/Component/VarDumper/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"twig/twig": "^2.13|^3.0.4"
2828
},
2929
"conflict": {
30-
"phpunit/phpunit": "<5.4.3",
3130
"symfony/console": "<5.4"
3231
},
3332
"autoload": {

0 commit comments

Comments
 (0)