Skip to content

Commit 14bd8a4

Browse files
Merge branch '5.4' into 6.0
* 5.4: CS fixes Bump Symfony version to 5.4.11 Update VERSION for 5.4.10 Update CHANGELOG for 5.4.10 Bump Symfony version to 4.4.44 Update VERSION for 4.4.43 Update CONTRIBUTORS for 4.4.43 Update CHANGELOG for 4.4.43
2 parents 07a7de3 + b1974e7 commit 14bd8a4

10 files changed

+16
-16
lines changed

DataCollector/ConfigDataCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public function collect(Request $request, Response $response, \Throwable $except
5757
'php_intl_locale' => class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a',
5858
'php_timezone' => date_default_timezone_get(),
5959
'xdebug_enabled' => \extension_loaded('xdebug'),
60-
'apcu_enabled' => \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN),
61-
'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN),
60+
'apcu_enabled' => \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN),
61+
'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN),
6262
'bundles' => [],
6363
'sapi_name' => \PHP_SAPI,
6464
];

DataCollector/DumpDataCollector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
4646
public function __construct(Stopwatch $stopwatch = null, string|FileLinkFormatter $fileLinkFormat = null, string $charset = null, RequestStack $requestStack = null, DataDumperInterface|Connection $dumper = null)
4747
{
4848
$this->stopwatch = $stopwatch;
49-
$this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
50-
$this->charset = $charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8';
49+
$this->fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
50+
$this->charset = $charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8';
5151
$this->requestStack = $requestStack;
5252
$this->dumper = $dumper;
5353

@@ -228,7 +228,7 @@ public function __destruct()
228228

229229
$h = headers_list();
230230
$i = \count($h);
231-
array_unshift($h, 'Content-Type: '.ini_get('default_mimetype'));
231+
array_unshift($h, 'Content-Type: '.\ini_get('default_mimetype'));
232232
while (0 !== stripos($h[$i], 'Content-Type:')) {
233233
--$i;
234234
}

DataCollector/MemoryDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function reset()
4141
{
4242
$this->data = [
4343
'memory' => 0,
44-
'memory_limit' => $this->convertToBytes(ini_get('memory_limit')),
44+
'memory_limit' => $this->convertToBytes(\ini_get('memory_limit')),
4545
];
4646
}
4747

Debug/FileLinkFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class FileLinkFormatter
4444
*/
4545
public function __construct(string $fileLinkFormat = null, RequestStack $requestStack = null, string $baseDir = null, string|\Closure $urlFormat = null)
4646
{
47-
$fileLinkFormat = (self::FORMATS[$fileLinkFormat] ?? $fileLinkFormat) ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: false;
47+
$fileLinkFormat = (self::FORMATS[$fileLinkFormat] ?? $fileLinkFormat) ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: false;
4848
if ($fileLinkFormat && !\is_array($fileLinkFormat)) {
4949
$i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f);
5050
$fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, \PREG_SPLIT_DELIM_CAPTURE);

Fragment/AbstractSurrogateFragmentRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function containsNonScalars(array $values): bool
9191
foreach ($values as $value) {
9292
if (\is_array($value)) {
9393
return $this->containsNonScalars($value);
94-
} elseif (!is_scalar($value) && null !== $value) {
94+
} elseif (!\is_scalar($value) && null !== $value) {
9595
return true;
9696
}
9797
}

Fragment/FragmentUriGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private function checkNonScalar(array $values): void
8585
foreach ($values as $key => $value) {
8686
if (\is_array($value)) {
8787
$this->checkNonScalar($value);
88-
} elseif (!is_scalar($value) && null !== $value) {
88+
} elseif (!\is_scalar($value) && null !== $value) {
8989
throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key));
9090
}
9191
}

Log/Logger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private function format(string $level, string $message, array $context, bool $pr
9494
if (str_contains($message, '{')) {
9595
$replacements = [];
9696
foreach ($context as $key => $val) {
97-
if (null === $val || is_scalar($val) || $val instanceof \Stringable) {
97+
if (null === $val || \is_scalar($val) || $val instanceof \Stringable) {
9898
$replacements["{{$key}}"] = $val;
9999
} elseif ($val instanceof \DateTimeInterface) {
100100
$replacements["{{$key}}"] = $val->format(\DateTime::RFC3339);

Tests/DataCollector/ConfigDataCollectorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public function testCollect()
3939
$this->assertSame(4 === Kernel::MINOR_VERSION, $c->isSymfonyLts());
4040
$this->assertNull($c->getToken());
4141
$this->assertSame(\extension_loaded('xdebug'), $c->hasXDebug());
42-
$this->assertSame(\extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache());
43-
$this->assertSame(\extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu());
42+
$this->assertSame(\extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache());
43+
$this->assertSame(\extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu());
4444
$this->assertSame(sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION), $c->getSymfonyMinorVersion());
4545
$this->assertContains($c->getSymfonyState(), ['eol', 'eom', 'dev', 'stable']);
4646

@@ -67,8 +67,8 @@ public function testCollectWithoutKernel()
6767
$this->assertSame(4 === Kernel::MINOR_VERSION, $c->isSymfonyLts());
6868
$this->assertNull($c->getToken());
6969
$this->assertSame(\extension_loaded('xdebug'), $c->hasXDebug());
70-
$this->assertSame(\extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache());
71-
$this->assertSame(\extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu());
70+
$this->assertSame(\extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), $c->hasZendOpcache());
71+
$this->assertSame(\extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), $c->hasApcu());
7272
$this->assertSame(sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION), $c->getSymfonyMinorVersion());
7373
$this->assertContains($c->getSymfonyState(), ['eol', 'eom', 'dev', 'stable']);
7474

Tests/KernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ public function testKernelStartTimeIsResetWhileBootingAlreadyBootedKernel()
593593
$kernel->boot();
594594
$preReBoot = $kernel->getStartTime();
595595

596-
sleep(3600); //Intentionally large value to detect if ClockMock ever breaks
596+
sleep(3600); // Intentionally large value to detect if ClockMock ever breaks
597597
$kernel->reboot(null);
598598

599599
$this->assertGreaterThan($preReBoot, $kernel->getStartTime());

Tests/Profiler/FileProfilerStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public function testDuplicates()
297297
$profile->setUrl('http://example.net/');
298298
$profile->setMethod('GET');
299299

300-
///three duplicates
300+
// three duplicates
301301
$this->storage->write($profile);
302302
$this->storage->write($profile);
303303
$this->storage->write($profile);

0 commit comments

Comments
 (0)