Skip to content

Commit b5c7fc9

Browse files
Merge branch '6.4' into 7.0
* 6.4: Skip Twig v3.9-dev for now [Validator] Update Dutch (nl) translation Update Albanian translations [Validator] Update translation [FrameworkBundle] Prevent silenced warning by checking if /proc/mount exists [VarDumper][PhpUnitBridge] Fix color detection prevent throwing NOT_FOUND error when tube is empty [Validator] Update missing validator translation for Swedish [FrameworkBundle] Fix eager-loading of env vars in ConfigBuilderCacheWarmer [Messenger] Fix failing Redis test [Validator] Update Italian (it) translations [Validator] Missing translations for Hungarian (hu) #53769 revert to native PHP union types [Validator] Missing translations for Russian (ru) #53775 fix syntax errors on PHP 7
2 parents e3aeb7f + 2868d0d commit b5c7fc9

File tree

25 files changed

+165
-184
lines changed

25 files changed

+165
-184
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"ext-xml": "*",
4040
"doctrine/event-manager": "^2",
4141
"doctrine/persistence": "^3.1",
42-
"twig/twig": "^3.0.4",
42+
"twig/twig": "~3.8.0",
4343
"psr/cache": "^2.0|^3.0",
4444
"psr/clock": "^1.0",
4545
"psr/container": "^1.1|^2.0",

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -400,29 +400,29 @@ private static function hasColorSupport(): bool
400400
return false;
401401
}
402402

403-
if ('Hyper' === getenv('TERM_PROGRAM')) {
403+
// Detect msysgit/mingw and assume this is a tty because detection
404+
// does not work correctly, see https://github.com/composer/composer/issues/9690
405+
if (!@stream_isatty($stream) && !\in_array(strtoupper((string) getenv('MSYSTEM')), ['MINGW32', 'MINGW64'], true)) {
404406
return true;
405407
}
406408

407-
if (\DIRECTORY_SEPARATOR === '\\') {
408-
return (\function_exists('sapi_windows_vt100_support')
409-
&& sapi_windows_vt100_support(\STDOUT))
410-
|| false !== getenv('ANSICON')
411-
|| 'ON' === getenv('ConEmuANSI')
412-
|| 'xterm' === getenv('TERM');
409+
if ('\\' === \DIRECTORY_SEPARATOR && @sapi_windows_vt100_support(\STDOUT)) {
410+
return true;
413411
}
414412

415-
if (\function_exists('stream_isatty')) {
416-
return @stream_isatty(\STDOUT);
413+
if ('Hyper' === getenv('TERM_PROGRAM')
414+
|| false !== getenv('COLORTERM')
415+
|| false !== getenv('ANSICON')
416+
|| 'ON' === getenv('ConEmuANSI')
417+
) {
418+
return true;
417419
}
418420

419-
if (\function_exists('posix_isatty')) {
420-
return @posix_isatty(\STDOUT);
421+
if ('dumb' === $term = (string) getenv('TERM')) {
422+
return false;
421423
}
422424

423-
$stat = fstat(\STDOUT);
424-
425-
// Check if formatted mode is S_IFCHR
426-
return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
425+
// See https://github.com/chalk/supports-color/blob/d4f413efaf8da045c5ab440ed418ef02dbb28bf1/index.js#L157
426+
return preg_match('/^((screen|xterm|vt100|vt220|putty|rxvt|ansi|cygwin|linux).*)|(.*-256(color)?(-bce)?)$/', $term);
427427
}
428428
}

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=8.2",
2020
"symfony/translation-contracts": "^2.5|^3",
21-
"twig/twig": "^3.0.4"
21+
"twig/twig": "~3.8.0"
2222
},
2323
"require-dev": {
2424
"egulias/email-validator": "^2.1.10|^3|^4",

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
use Symfony\Component\Config\Builder\ConfigBuilderGenerator;
1616
use Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface;
1717
use Symfony\Component\Config\Definition\ConfigurationInterface;
18+
use Symfony\Component\DependencyInjection\Container;
1819
use Symfony\Component\DependencyInjection\ContainerBuilder;
1920
use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface;
2021
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
22+
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBag;
23+
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
2124
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
2225
use Symfony\Component\HttpKernel\KernelInterface;
2326

@@ -68,7 +71,8 @@ private function dumpExtension(ExtensionInterface $extension, ConfigBuilderGener
6871
if ($extension instanceof ConfigurationInterface) {
6972
$configuration = $extension;
7073
} elseif ($extension instanceof ConfigurationExtensionInterface) {
71-
$configuration = $extension->getConfiguration([], new ContainerBuilder($this->kernel->getContainer()->getParameterBag()));
74+
$container = $this->kernel->getContainer();
75+
$configuration = $extension->getConfiguration([], new ContainerBuilder($container instanceof Container ? new ContainerBag($container) : new ParameterBag()));
7276
}
7377

7478
if (!$configuration) {

src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private function isNfs(string $dir): bool
200200

201201
if (null === $mounts) {
202202
$mounts = [];
203-
if ('/' === \DIRECTORY_SEPARATOR && $files = @file('/proc/mounts')) {
203+
if ('/' === \DIRECTORY_SEPARATOR && is_readable('/proc/mounts') && $files = @file('/proc/mounts')) {
204204
foreach ($files as $mount) {
205205
$mount = \array_slice(explode(' ', $mount), 1, -3);
206206
if (!\in_array(array_pop($mount), ['vboxsf', 'nfs'])) {

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"symfony/uid": "^6.4|^7.0",
7272
"symfony/web-link": "^6.4|^7.0",
7373
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
74-
"twig/twig": "^3.0.4"
74+
"twig/twig": "~3.8.0"
7575
},
7676
"conflict": {
7777
"doctrine/persistence": "<1.3",

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"symfony/twig-bridge": "^6.4|^7.0",
5151
"symfony/validator": "^6.4|^7.0",
5252
"symfony/yaml": "^6.4|^7.0",
53-
"twig/twig": "^3.0.4",
53+
"twig/twig": "~3.8.0",
5454
"web-token/jwt-checker": "^3.1",
5555
"web-token/jwt-signature-algorithm-hmac": "^3.1",
5656
"web-token/jwt-signature-algorithm-ecdsa": "^3.1",

src/Symfony/Bundle/TwigBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/twig-bridge": "^6.4|^7.0",
2424
"symfony/http-foundation": "^6.4|^7.0",
2525
"symfony/http-kernel": "^6.4|^7.0",
26-
"twig/twig": "^3.0.4"
26+
"twig/twig": "~3.8.0"
2727
},
2828
"require-dev": {
2929
"symfony/asset": "^6.4|^7.0",

src/Symfony/Bundle/WebProfilerBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"symfony/http-kernel": "^6.4|^7.0",
2323
"symfony/routing": "^6.4|^7.0",
2424
"symfony/twig-bundle": "^6.4|^7.0",
25-
"twig/twig": "^3.0.4"
25+
"twig/twig": "~3.8.0"
2626
},
2727
"require-dev": {
2828
"symfony/browser-kit": "^6.4|^7.0",

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -495,19 +495,7 @@ private function isInteractiveInput($inputStream): bool
495495
return self::$stdinIsInteractive;
496496
}
497497

498-
if (\function_exists('stream_isatty')) {
499-
return self::$stdinIsInteractive = @stream_isatty(fopen('php://stdin', 'r'));
500-
}
501-
502-
if (\function_exists('posix_isatty')) {
503-
return self::$stdinIsInteractive = @posix_isatty(fopen('php://stdin', 'r'));
504-
}
505-
506-
if (!\function_exists('shell_exec')) {
507-
return self::$stdinIsInteractive = true;
508-
}
509-
510-
return self::$stdinIsInteractive = (bool) shell_exec('stty 2> '.('\\' === \DIRECTORY_SEPARATOR ? 'NUL' : '/dev/null'));
498+
return self::$stdinIsInteractive = @stream_isatty(fopen('php://stdin', 'r'));
511499
}
512500

513501
/**

0 commit comments

Comments
 (0)