N°9319 increase php min. version to 8.2 (#887)

* Update minimum PHP version to 8.2
* Fix previous wrong resolution of merge conflict
This commit is contained in:
jf-cbd
2026-04-20 14:47:44 +02:00
committed by GitHub
parent f439490bfc
commit 805087a01b
171 changed files with 5629 additions and 1446 deletions

View File

@@ -142,12 +142,27 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
*/
private function openOutputStream()
{
static $stdout;
if ($stdout) {
return $stdout;
}
if (!$this->hasStdoutSupport()) {
return fopen('php://output', 'w');
return $stdout = fopen('php://output', 'w');
}
// Use STDOUT when possible to prevent from opening too many file descriptors
return \defined('STDOUT') ? \STDOUT : (@fopen('php://stdout', 'w') ?: fopen('php://output', 'w'));
if (!\defined('STDOUT')) {
return $stdout = @fopen('php://stdout', 'w') ?: fopen('php://output', 'w');
}
// On Windows, STDOUT is opened in text mode; reopen in binary mode to prevent \n to \r\n conversion
if ('\\' === \DIRECTORY_SEPARATOR) {
return $stdout = @fopen('php://stdout', 'w') ?: \STDOUT;
}
return $stdout = \STDOUT;
}
/**
@@ -155,11 +170,26 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
*/
private function openErrorStream()
{
static $stderr;
if ($stderr) {
return $stderr;
}
if (!$this->hasStderrSupport()) {
return fopen('php://output', 'w');
return $stderr = fopen('php://output', 'w');
}
// Use STDERR when possible to prevent from opening too many file descriptors
return \defined('STDERR') ? \STDERR : (@fopen('php://stderr', 'w') ?: fopen('php://output', 'w'));
if (!\defined('STDERR')) {
return $stderr = @fopen('php://stderr', 'w') ?: fopen('php://output', 'w');
}
// On Windows, STDERR is opened in text mode; reopen in binary mode to prevent \n → \r\n conversion
if ('\\' === \DIRECTORY_SEPARATOR) {
return $stderr = @fopen('php://stderr', 'w') ?: \STDERR;
}
return $stderr ??= \STDERR;
}
}