Skip to content

Commit b765226

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 fa5f064 + b893a71 commit b765226

File tree

184 files changed

+1697
-1658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+1697
-1658
lines changed

CONTRIBUTORS.md

Lines changed: 1209 additions & 1167 deletions
Large diffs are not rendered by default.

src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ protected function loadCacheDriver(string $cacheName, string $objectManagerName,
343343
$container->setDefinition($this->getObjectManagerElementName(sprintf('%s_memcached_instance', $objectManagerName)), $memcachedInstance);
344344
$cacheDef->addMethodCall('setMemcached', [new Reference($this->getObjectManagerElementName(sprintf('%s_memcached_instance', $objectManagerName)))]);
345345
break;
346-
case 'redis':
346+
case 'redis':
347347
$redisClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.redis.class').'%';
348348
$redisInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.redis_instance.class').'%';
349349
$redisHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.redis_host').'%';

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,16 @@ public function getTypes(string $class, string $property, array $context = []):
9797
$fieldName = $associationMapping['indexBy'];
9898
if (null === ($typeOfField = $subMetadata->getTypeOfField($fieldName))) {
9999
$fieldName = $subMetadata->getFieldForColumn($associationMapping['indexBy']);
100-
//Not a property, maybe a column name?
100+
// Not a property, maybe a column name?
101101
if (null === ($typeOfField = $subMetadata->getTypeOfField($fieldName))) {
102-
//Maybe the column name is the association join column?
102+
// Maybe the column name is the association join column?
103103
$associationMapping = $subMetadata->getAssociationMapping($fieldName);
104104

105105
/** @var ClassMetadataInfo $subMetadata */
106106
$indexProperty = $subMetadata->getSingleAssociationReferencedJoinColumnName($fieldName);
107107
$subMetadata = $this->entityManager->getClassMetadata($associationMapping['targetEntity']);
108108

109-
//Not a property, maybe a column name?
109+
// Not a property, maybe a column name?
110110
if (null === ($typeOfField = $subMetadata->getTypeOfField($indexProperty))) {
111111
$fieldName = $subMetadata->getFieldForColumn($indexProperty);
112112
$typeOfField = $subMetadata->getTypeOfField($fieldName);

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ public function testExtractEnum()
138138
}
139139
$this->assertEquals([new Type(Type::BUILTIN_TYPE_OBJECT, false, EnumString::class)], $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumString', []));
140140
$this->assertEquals([new Type(Type::BUILTIN_TYPE_OBJECT, false, EnumInt::class)], $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumInt', []));
141-
$this->assertEquals(null, $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumStringArray', []));
141+
$this->assertNull($this->createExtractor()->getTypes(DoctrineEnum::class, 'enumStringArray', []));
142142
$this->assertEquals([new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, EnumInt::class))], $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumIntArray', []));
143-
$this->assertEquals(null, $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumCustom', []));
143+
$this->assertNull($this->createExtractor()->getTypes(DoctrineEnum::class, 'enumCustom', []));
144144
}
145145

146146
public function typesProvider()

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@
6666
$phpunitConfigFilename = $phpunitConfigFilename ?: $getPhpUnitConfig('phpunit.xml');
6767

6868
if ($phpunitConfigFilename) {
69-
$phpunitConfig = new DomDocument();
69+
$phpunitConfig = new DOMDocument();
7070
$phpunitConfig->load($phpunitConfigFilename);
7171
} else {
7272
$phpunitConfig = false;
7373
}
7474
}
7575
if (false !== $phpunitConfig) {
76-
$var = new DOMXpath($phpunitConfig);
76+
$var = new DOMXPath($phpunitConfig);
7777
foreach ($var->query('//php/server[@name="'.$name.'"]') as $var) {
7878
return $var->getAttribute('value');
7979
}

src/Symfony/Bridge/Twig/Extension/CodeExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class CodeExtension extends AbstractExtension
2828

2929
public function __construct(string|FileLinkFormatter $fileLinkFormat, string $projectDir, string $charset)
3030
{
31-
$this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
31+
$this->fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
3232
$this->projectDir = str_replace('\\', '/', $projectDir).'/';
3333
$this->charset = $charset;
3434
}
@@ -204,7 +204,7 @@ public function formatLogMessage(string $message, array $context): string
204204
if ($context && str_contains($message, '{')) {
205205
$replacements = [];
206206
foreach ($context as $key => $val) {
207-
if (is_scalar($val)) {
207+
if (\is_scalar($val)) {
208208
$replacements['{'.$key.'}'] = $val;
209209
}
210210
}

src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testCompile()
6464
sprintf(
6565
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [0 => "tpl1", 1 => "tpl2"], true);',
6666
$this->getVariableGetter('form')
67-
),
67+
),
6868
trim($compiler->compile($node)->getSource())
6969
);
7070

@@ -74,7 +74,7 @@ public function testCompile()
7474
sprintf(
7575
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [0 => "tpl1", 1 => "tpl2"], false);',
7676
$this->getVariableGetter('form')
77-
),
77+
),
7878
trim($compiler->compile($node)->getSource())
7979
);
8080

@@ -86,7 +86,7 @@ public function testCompile()
8686
sprintf(
8787
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, "tpl1", true);',
8888
$this->getVariableGetter('form')
89-
),
89+
),
9090
trim($compiler->compile($node)->getSource())
9191
);
9292

@@ -96,7 +96,7 @@ public function testCompile()
9696
sprintf(
9797
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, "tpl1", false);',
9898
$this->getVariableGetter('form')
99-
),
99+
),
100100
trim($compiler->compile($node)->getSource())
101101
);
102102
}

src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testCompileWidget()
3838
sprintf(
3939
'$this->env->getRuntime(\'Symfony\Component\Form\FormRenderer\')->searchAndRenderBlock(%s, \'widget\')',
4040
$this->getVariableGetter('form')
41-
),
41+
),
4242
trim($compiler->compile($node)->getSource())
4343
);
4444
}

src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public function testCompileStrict()
3838
'echo $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->trans("trans %%var%%", array_merge(["%%var%%" => %s], %s), "messages");',
3939
$this->getVariableGetterWithoutStrictCheck('var'),
4040
$this->getVariableGetterWithStrictCheck('foo')
41-
),
42-
trim($compiler->compile($node)->getSource())
41+
),
42+
trim($compiler->compile($node)->getSource())
4343
);
4444
}
4545

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8787
['Architecture', (\PHP_INT_SIZE * 8).' bits'],
8888
['Intl locale', class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'],
8989
['Timezone', date_default_timezone_get().' (<comment>'.(new \DateTime())->format(\DateTime::W3C).'</>)'],
90-
['OPcache', \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
91-
['APCu', \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
90+
['OPcache', \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
91+
['APCu', \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
9292
['Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'],
9393
];
9494

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ protected function configure()
5757
<info>php %command.full_name% @AcmeDemoBundle</info>
5858

5959
EOF
60-
);
60+
);
6161
}
6262
}

src/Symfony/Bundle/FrameworkBundle/Routing/Router.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,14 @@ private function resolve(mixed $value): mixed
175175

176176
$resolved = ($this->paramFetcher)($match[1]);
177177

178-
if (is_scalar($resolved)) {
178+
if (\is_scalar($resolved)) {
179179
$this->collectedParameters[$match[1]] = $resolved;
180180

181181
if (\is_string($resolved)) {
182182
$resolved = $this->resolve($resolved);
183183
}
184184

185-
if (is_scalar($resolved)) {
185+
if (\is_scalar($resolved)) {
186186
return false === $resolved ? '0' : (string) $resolved;
187187
}
188188
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ public function testAnnotations()
11091109

11101110
public function testFileLinkFormat()
11111111
{
1112-
if (ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
1112+
if (\ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
11131113
$this->markTestSkipped('A custom file_link_format is defined.');
11141114
}
11151115

src/Symfony/Component/Cache/Adapter/AbstractAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static function createSystemCache(string $namespace, int $defaultLifetime
110110
return $opcache;
111111
}
112112

113-
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
113+
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
114114
return $opcache;
115115
}
116116

src/Symfony/Component/Cache/Adapter/ApcuAdapter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct(string $namespace = '', int $defaultLifetime = 0, st
4949

5050
public static function isSupported()
5151
{
52-
return \function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN);
52+
return \function_exists('apcu_fetch') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN);
5353
}
5454

5555
/**
@@ -87,8 +87,8 @@ protected function doHave(string $id): bool
8787
*/
8888
protected function doClear(string $namespace): bool
8989
{
90-
return isset($namespace[0]) && class_exists(\APCuIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN))
91-
? apcu_delete(new \APCuIterator(sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY))
90+
return isset($namespace[0]) && class_exists(\APCUIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN))
91+
? apcu_delete(new \APCUIterator(sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY))
9292
: apcu_clear_cache();
9393
}
9494

src/Symfony/Component/Cache/Adapter/ArrayAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ private function freeze($value, string $key)
333333
if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) {
334334
return serialize($value);
335335
}
336-
} elseif (!is_scalar($value)) {
336+
} elseif (!\is_scalar($value)) {
337337
try {
338338
$serialized = serialize($value);
339339
} catch (\Exception $e) {

src/Symfony/Component/Cache/Adapter/ChainAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(array $adapters, int $defaultLifetime = 0)
5353
if (!$adapter instanceof CacheItemPoolInterface) {
5454
throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', get_debug_type($adapter), CacheItemPoolInterface::class));
5555
}
56-
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $adapter instanceof ApcuAdapter && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
56+
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $adapter instanceof ApcuAdapter && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
5757
continue; // skip putting APCu in the chain when the backend is disabled
5858
}
5959

src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public function warmUp(array $values): array
329329
$isStaticValue = false;
330330
}
331331
$value = var_export($value, true);
332-
} elseif (!is_scalar($value)) {
332+
} elseif (!\is_scalar($value)) {
333333
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)));
334334
} else {
335335
$value = var_export($value, true);

src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static function isSupported()
5858
{
5959
self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time();
6060

61-
return \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN));
61+
return \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN));
6262
}
6363

6464
public function prune(): bool
@@ -231,7 +231,7 @@ protected function doSave(array $values, int $lifetime): array|bool
231231
$isStaticValue = false;
232232
}
233233
$value = var_export($value, true);
234-
} elseif (!is_scalar($value)) {
234+
} elseif (!\is_scalar($value)) {
235235
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)));
236236
} else {
237237
$value = var_export($value, true);

src/Symfony/Component/Cache/CacheItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public static function log(?LoggerInterface $logger, string $message, array $con
174174
} else {
175175
$replace = [];
176176
foreach ($context as $k => $v) {
177-
if (is_scalar($v)) {
177+
if (\is_scalar($v)) {
178178
$replace['{'.$k.'}'] = $v;
179179
}
180180
}

src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,19 @@ public function testDontSaveWhenAskedNotTo()
116116

117117
$cache = $this->createCachePool(0, __FUNCTION__);
118118

119-
$v1 = $cache->get('some-key', function($item, &$save){
120-
$save = false;
121-
return 1;
119+
$v1 = $cache->get('some-key', function ($item, &$save) {
120+
$save = false;
121+
122+
return 1;
122123
});
123124
$this->assertSame($v1, 1);
124125

125-
$v2 = $cache->get('some-key', function(){
126+
$v2 = $cache->get('some-key', function () {
126127
return 2;
127128
});
128129
$this->assertSame($v2, 2, 'First value was cached and should not have been');
129130

130-
$v3 = $cache->get('some-key', function(){
131+
$v3 = $cache->get('some-key', function () {
131132
$this->fail('Value should have come from cache');
132133
});
133134
$this->assertSame($v3, 2);

src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ class ApcuAdapterTest extends AdapterTestCase
2626

2727
public function createCachePool(int $defaultLifetime = 0): CacheItemPoolInterface
2828
{
29-
if (!\function_exists('apcu_fetch') || !filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN)) {
29+
if (!\function_exists('apcu_fetch') || !filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN)) {
3030
$this->markTestSkipped('APCu extension is required.');
3131
}
32-
if ('cli' === \PHP_SAPI && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
32+
if ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
3333
if ('testWithCliSapi' !== $this->getName()) {
3434
$this->markTestSkipped('apc.enable_cli=1 is required.');
3535
}

src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function provideServersSetting(): iterable
142142
'localhost',
143143
11222,
144144
];
145-
if (filter_var(ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
145+
if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
146146
yield [
147147
'memcached://user:[email protected]?weight=50',
148148
'127.0.0.1',
@@ -159,7 +159,7 @@ public function provideServersSetting(): iterable
159159
'/var/local/run/memcached.socket',
160160
0,
161161
];
162-
if (filter_var(ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
162+
if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
163163
yield [
164164
'memcached://user:password@/var/local/run/memcached.socket?weight=25',
165165
'/var/local/run/memcached.socket',

src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterSentinelTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use PHPUnit\Framework\SkippedTestSuiteError;
1515
use Symfony\Component\Cache\Adapter\AbstractAdapter;
1616
use Symfony\Component\Cache\Adapter\RedisAdapter;
17-
use Symfony\Component\Cache\Exception\CacheException;
1817
use Symfony\Component\Cache\Exception\InvalidArgumentException;
1918

2019
/**

src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Cache\Tests\Adapter;
1313

1414
use PHPUnit\Framework\MockObject\MockObject;
15-
use Psr\Cache\CacheItemInterface;
1615
use Psr\Cache\CacheItemPoolInterface;
1716
use Symfony\Component\Cache\Adapter\AdapterInterface;
1817
use Symfony\Component\Cache\Adapter\ArrayAdapter;
@@ -101,7 +100,7 @@ public function testHasItemReturnsFalseWhenPoolDoesNotHaveItemTags()
101100
$anotherPool = $this->createCachePool();
102101

103102
$adapter = new FilesystemAdapter();
104-
$adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); //simulate item losing tags pair
103+
$adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); // simulate item losing tags pair
105104

106105
$this->assertFalse($anotherPool->hasItem($itemKey));
107106
}
@@ -117,7 +116,7 @@ public function testGetItemReturnsCacheMissWhenPoolDoesNotHaveItemTags()
117116
$anotherPool = $this->createCachePool();
118117

119118
$adapter = new FilesystemAdapter();
120-
$adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); //simulate item losing tags pair
119+
$adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); // simulate item losing tags pair
121120

122121
$item = $anotherPool->getItem($itemKey);
123122
$this->assertFalse($item->isHit());
@@ -134,7 +133,7 @@ public function testHasItemReturnsFalseWhenPoolDoesNotHaveItemAndOnlyHasTags()
134133
$anotherPool = $this->createCachePool();
135134

136135
$adapter = new FilesystemAdapter();
137-
$adapter->deleteItem($itemKey); //simulate losing item but keeping tags
136+
$adapter->deleteItem($itemKey); // simulate losing item but keeping tags
138137

139138
$this->assertFalse($anotherPool->hasItem($itemKey));
140139
}
@@ -169,7 +168,7 @@ public function testGetItemReturnsCacheMissWhenPoolDoesNotHaveItemAndOnlyHasTags
169168
$anotherPool = $this->createCachePool();
170169

171170
$adapter = new FilesystemAdapter();
172-
$adapter->deleteItem($itemKey); //simulate losing item but keeping tags
171+
$adapter->deleteItem($itemKey); // simulate losing item but keeping tags
173172

174173
$item = $anotherPool->getItem($itemKey);
175174
$this->assertFalse($item->isHit());

src/Symfony/Component/Cache/Traits/ContractsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ trait ContractsTrait
4545
public function setCallbackWrapper(?callable $callbackWrapper): callable
4646
{
4747
if (!isset($this->callbackWrapper)) {
48-
$this->callbackWrapper = \Closure::fromCallable([LockRegistry::class, 'compute']);;
48+
$this->callbackWrapper = \Closure::fromCallable([LockRegistry::class, 'compute']);
4949

5050
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
5151
$this->setCallbackWrapper(null);

0 commit comments

Comments
 (0)