Skip to content

Commit

Permalink
Merge branch '6.2' into 6.3
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nicolas-grekas committed May 25, 2023
2 parents 100f9ea + 4347520 commit 268e740
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"psr/http-client": "^1.0",
"psr/simple-cache": "^1.0|^2.0|^3.0",
"symfony/mercure-bundle": "^0.3",
"symfony/phpunit-bridge": "^5.4|^6.0",
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0",
"symfony/runtime": "self.version",
"symfony/security-acl": "~2.8|~3.0",
"twig/cssinliner-extra": "^2.12|^3",
Expand All @@ -168,7 +168,7 @@
"masterminds/html5": "<2.6",
"phpdocumentor/reflection-docblock": "<5.2",
"phpdocumentor/type-resolver": "<1.5.1",
"phpunit/phpunit": "<5.4.3"
"phpunit/phpunit": "<7.5|9.1.2"
},
"config": {
"allow-plugins": {
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Bridge/Doctrine/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"doctrine/dbal": "<2.13.1",
"doctrine/lexer": "<1.1",
"doctrine/orm": "<2.12",
"phpunit/phpunit": "<5.4.3",
"symfony/cache": "<5.4",
"symfony/dependency-injection": "<6.2",
"symfony/form": "<5.4.21|>=6,<6.2.7",
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Bundle/FrameworkBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
"doctrine/persistence": "<1.3",
"phpdocumentor/reflection-docblock": "<3.2.2",
"phpdocumentor/type-resolver": "<1.4.0",
"phpunit/phpunit": "<5.4.3",
"symfony/asset": "<5.4",
"symfony/clock": "<6.3",
"symfony/console": "<5.4",
Expand Down
11 changes: 11 additions & 0 deletions src/Symfony/Component/Console/Helper/QuestionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,18 @@ private function doAsk(OutputInterface $output, Question $question): mixed
}

if (false === $ret) {
$isBlocked = stream_get_meta_data($inputStream)['blocked'] ?? true;

if (!$isBlocked) {
stream_set_blocking($inputStream, true);
}

$ret = $this->readInput($inputStream, $question);

if (!$isBlocked) {
stream_set_blocking($inputStream, false);
}

if (false === $ret) {
throw new MissingInputException('Aborted.');
}
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Component/Form/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"symfony/uid": "^5.4|^6.0"
},
"conflict": {
"phpunit/phpunit": "<5.4.3",
"symfony/console": "<5.4",
"symfony/dependency-injection": "<5.4",
"symfony/doctrine-bridge": "<5.4.21|>=6,<6.2.7",
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Component/Validator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"conflict": {
"doctrine/annotations": "<1.13",
"doctrine/lexer": "<1.1",
"phpunit/phpunit": "<5.4.3",
"symfony/dependency-injection": "<5.4",
"symfony/expression-language": "<5.4",
"symfony/http-kernel": "<5.4",
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Component/VarDumper/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"twig/twig": "^2.13|^3.0.4"
},
"conflict": {
"phpunit/phpunit": "<5.4.3",
"symfony/console": "<5.4"
},
"autoload": {
Expand Down

0 comments on commit 268e740

Please sign in to comment.