Use PHP_OS_FAMILY if possible

This commit is contained in:
Javier Eguiluz 2021-07-13 11:11:08 +02:00 committed by Nicolas Grekas
parent 0cc054ce1d
commit 0d107cf2c0
3 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ class SymfonyQuestionHelper extends QuestionHelper
private function getEofShortcut(): string
{
if (false !== strpos(\PHP_OS, 'WIN')) {
if ('Windows' === \PHP_OS_FAMILY) {
return '<comment>Ctrl+Z</comment> then <comment>Enter</comment>';
}

View File

@ -218,7 +218,7 @@ EOT
{
$expected = 'Write an essay (press Ctrl+D to continue)';
if (false !== strpos(\PHP_OS, 'WIN')) {
if ('Windows' === \PHP_OS_FAMILY) {
$expected = 'Write an essay (press Ctrl+Z then Enter to continue)';
}

View File

@ -208,7 +208,7 @@ class DebugClassLoader
} elseif (substr($test, -\strlen($file)) === $file) {
// filesystem is case insensitive and realpath() normalizes the case of characters
self::$caseCheck = 1;
} elseif (false !== stripos(\PHP_OS, 'darwin')) {
} elseif ('Darwin' === \PHP_OS_FAMILY) {
// on MacOSX, HFS+ is case insensitive but realpath() doesn't normalize the case of characters
self::$caseCheck = 2;
} else {