8000 Merge branch '4.4' into 5.4 · symfony/symfony@b893a71 · GitHub
[go: up one dir, main page]

Skip to content

Commit b893a71

Browse files
Merge branch '4.4' into 5.4
* 4.4: CS fixes 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 a6af0dd + 0c38f36 commit b893a71

File tree

187 files changed

+1706
-1667
lines changed

Some content is hidden

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

187 files changed

+1706
-1667
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
@@ -362,7 +362,7 @@ protected function loadCacheDriver(string $cacheName, string $objectManagerName,
362362
$container->setDefinition($this->getObjectManagerElementName(sprintf('%s_memcached_instance', $objectManagerName)), $memcachedInstance);
363363
$cacheDef->addMethodCall('setMemcached', [new Reference($this->getObjectManagerElementName(sprintf('%s_memcached_instance', $objectManagerName)))]);
364364
break;
365-
case 'redis':
365+
case 'redis':
366366
$redisClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.redis.class').'%';
367367
$redisInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.redis_instance.class').'%';
368368
$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
@@ -31,7 +31,7 @@ final class CodeExtension extends AbstractExtension
3131
*/
3232
public function __construct($fileLinkFormat, string $projectDir, string $charset)
3333
{
34-
$this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
34+
$this->fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
3535
$this->projectDir = str_replace('\\', '/', $projectDir).'/';
3636
$this->charset = $charset;
3737
}
@@ -212,7 +212,7 @@ public function formatLogMessage(string $message, array $context): string
212212
if ($context && str_contains($message, '{')) {
213213
$replacements = [];
214214
foreach ($context as $key => $val) {
215-
if (is_scalar($val)) {
215+
if (\is_scalar($val)) {
216216
$replacements['{'.$key.'}'] = $val;
217217
}
218218
}

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
@@ -89,8 +89,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8989
['Architecture', (\PHP_INT_SIZE * 8).' bits'],
9090
['Intl locale', class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'],
9191
['Timezone', date_default_timezone_get().' (<comment>'.(new \DateTime())->format(\DateTime::W3C).'</>)'],
92-
['OPcache', \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
93-
['APCu', \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
92+
['OPcache', \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
93+
['APCu', \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
9494
['Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'],
9595
];
9696

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

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

6060
EOF
61-
);
61+
);
6262
}
6363
}

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

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

181181
$resolved = ($this->paramFetcher)($match[1]);
182182

183-
if (is_scalar($resolved)) {
183+
if (\is_scalar($resolved)) {
184184
$this->collectedParameters[$match[1]] = $resolved;
185185

186186
if (\is_string($resolved)) {
187187
$resolved = $this->resolve($resolved);
188188
}
189189

190-
if (is_scalar($resolved)) {
190+
if (\is_scalar($resolved)) {
191191
return false === $resolved ? '0' : (string) $resolved;
192192
}
193193
}

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

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

11831183
public function testFileLinkFormat()
11841184
{
1185-
if (ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
1185+
if (\ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
11861186
$this->markTestSkipped('A custom file_link_format is defined.');
11871187
}
11881188

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

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

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

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
/**
@@ -94,8 +94,8 @@ protected function doHave(string $id)
9494
*/
9595
protected function doClear(string $namespace)
9696
{
97-
return isset($namespace[0]) && class_exists(\APCuIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN))
98-
? apcu_delete(new \APCuIterator(sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY))
97+
return isset($namespace[0]) && class_exists(\APCUIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN))
98+
? apcu_delete(new \APCUIterator(sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY))
9999
: apcu_clear_cache();
100100
}
101101

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ private function freeze($value, string $key)
349349
if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) {
350350
return serialize($value);
351351
}
352-
} elseif (!is_scalar($value)) {
352+
} elseif (!\is_scalar($value)) {
353353
try {
354354
$serialized = serialize($value);
355355
} 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
@@ -345,7 +345,7 @@ public function warmUp(array $values)
345345
$isStaticValue = false;
346346
}
347347
$value = var_export($value, true);
348-
} elseif (!is_scalar($value)) {
348+
} elseif (!\is_scalar($value)) {
349349
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)));
350350
} else {
351351
$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
/**
@@ -234,7 +234,7 @@ protected function doSave(array $values, int $lifetime)
234234
$isStaticValue = false;
235235
}
236236
$value = var_export($value, true);
237-
} elseif (!is_scalar($value)) {
237+
} elseif (!\is_scalar($value)) {
238238
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)));
239239
} else {
240240
$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
@@ -182,7 +182,7 @@ public static function log(?LoggerInterface $logger, string $message, array $con
182182
} else {
183183
$replace = [];
184184
foreach ($context as $k => $v) {
185-
if (is_scalar($v)) {
185+
if (\is_scalar($v)) {
186186
$replace['{'.$k.'}'] = $v;
187187
}
188188
}

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
@@ -147,7 +147,7 @@ public function provideServersSetting(): iterable
147147
'localhost',
148148
11222,
149149
];
150-
if (filter_var(ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
150+
if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
151151
yield [
152152
'memcached://user:password@127.0.0.1?weight=50',
153153
'127.0.0.1',
@@ -164,7 +164,7 @@ public function provideServersSetting(): iterable
164164
'/var/local/run/memcached.socket',
165165
0,
166166
];
167-
if (filter_var(ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
167+
if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
168168
yield [
169169
'memcached://user:password@/var/local/run/memcached.socket?weight=25',
170170
'/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
@@ -42,7 +42,7 @@ trait ContractsTrait
4242
public function setCallbackWrapper(?callable $callbackWrapper): callable
4343
{
4444
if (!isset($this->callbackWrapper)) {
45-
$this->callbackWrapper = \Closure::fromCallable([LockRegistry::class, 'compute']);;
45+
$this->callbackWrapper = \Closure::fromCallable([LockRegistry::class, 'compute']);
4646

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

0 commit comments

Comments
 (0)
0