Skip to content

Commit 37c194a

Browse files
Merge branch '3.4' into 4.2
* 3.4: (24 commits) Apply php-cs-fixer rule for array_key_exists() [Security] Change FormAuthenticator if condition handles multi-byte characters in autocomplete speed up tests running them without debug flag [Translations] added missing Croatian validators Fix getItems() performance issue with RedisCluster (php-redis) [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning IntegerType: reject submitted non-integer numbers be keen to newcomers [HttpKernel] Fix possible infinite loop of exceptions fixed CS [Validator] Added missing translations for Afrikaans do not validate non-submitted form fields in PATCH requests Update usage example in ArrayInput doc block. [Console] Prevent ArgvInput::getFirstArgument() from returning an option value [Validator] Fixed duplicate UUID fixed CS [EventDispatcher] Fix unknown priority Avoid mutating the Finder when building the iterator [Validator] Add the missing translations for the Greek (el) locale ...
2 parents 6581640 + 4dcd928 commit 37c194a

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

Command/ConfigDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ private function getConfigForPath(array $config, string $path, string $alias)
138138
$steps = explode('.', $path);
139139

140140
foreach ($steps as $step) {
141-
if (!array_key_exists($step, $config)) {
141+
if (!\array_key_exists($step, $config)) {
142142
throw new LogicException(sprintf('Unable to find configuration for "%s.%s"', $alias, $path));
143143
}
144144

Console/Descriptor/Descriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ protected function resolveServiceDefinition(ContainerBuilder $builder, $serviceI
227227
return $builder->getDefinition($serviceId);
228228
}
229229

230-
// Some service IDs don't have a Definition, they're simply an Alias
230+
// Some service IDs don't have a Definition, they're aliases
231231
if ($builder->hasAlias($serviceId)) {
232232
return $builder->getAlias($serviceId);
233233
}

Console/Descriptor/JsonDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ protected function describeContainerAlias(Alias $alias, array $options = [], Con
156156
*/
157157
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
158158
{
159-
$this->writeData($this->getEventDispatcherListenersData($eventDispatcher, array_key_exists('event', $options) ? $options['event'] : null), $options);
159+
$this->writeData($this->getEventDispatcherListenersData($eventDispatcher, \array_key_exists('event', $options) ? $options['event'] : null), $options);
160160
}
161161

162162
/**

Console/Descriptor/MarkdownDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ protected function describeContainerParameter($parameter, array $options = [])
274274
*/
275275
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
276276
{
277-
$event = array_key_exists('event', $options) ? $options['event'] : null;
277+
$event = \array_key_exists('event', $options) ? $options['event'] : null;
278278

279279
$title = 'Registered listeners';
280280
if (null !== $event) {

Console/Descriptor/TextDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ protected function describeContainerParameter($parameter, array $options = [])
385385
*/
386386
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
387387
{
388-
$event = array_key_exists('event', $options) ? $options['event'] : null;
388+
$event = \array_key_exists('event', $options) ? $options['event'] : null;
389389

390390
if (null !== $event) {
391391
$title = sprintf('Registered Listeners for "%s" Event', $event);

Console/Descriptor/XmlDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected function describeContainerAlias(Alias $alias, array $options = [], Con
112112
*/
113113
protected function describeEventDispatcherListeners(EventDispatcherInterface $eventDispatcher, array $options = [])
114114
{
115-
$this->writeDocument($this->getEventDispatcherListenersDocument($eventDispatcher, array_key_exists('event', $options) ? $options['event'] : null));
115+
$this->writeDocument($this->getEventDispatcherListenersDocument($eventDispatcher, \array_key_exists('event', $options) ? $options['event'] : null));
116116
}
117117

118118
/**

DependencyInjection/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
327327
}
328328

329329
foreach ($places as $name => $place) {
330-
if (\is_array($place) && array_key_exists('name', $place)) {
330+
if (\is_array($place) && \array_key_exists('name', $place)) {
331331
continue;
332332
}
333333
$place['name'] = $name;
@@ -365,7 +365,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
365365
}
366366

367367
foreach ($transitions as $name => $transition) {
368-
if (\is_array($transition) && array_key_exists('name', $transition)) {
368+
if (\is_array($transition) && \array_key_exists('name', $transition)) {
369369
continue;
370370
}
371371
$transition['name'] = $name;

DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ private function registerAssetsConfiguration(array $config, ContainerBuilder $co
919919
foreach ($config['packages'] as $name => $package) {
920920
if (null !== $package['version_strategy']) {
921921
$version = new Reference($package['version_strategy']);
922-
} elseif (!array_key_exists('version', $package) && null === $package['json_manifest_path']) {
922+
} elseif (!\array_key_exists('version', $package) && null === $package['json_manifest_path']) {
923923
// if neither version nor json_manifest_path are specified, use the default
924924
$version = $defaultVersion;
925925
} else {
@@ -1117,15 +1117,15 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
11171117
$definition = $container->findDefinition('validator.email');
11181118
$definition->replaceArgument(0, $config['email_validation_mode']);
11191119

1120-
if (array_key_exists('enable_annotations', $config) && $config['enable_annotations']) {
1120+
if (\array_key_exists('enable_annotations', $config) && $config['enable_annotations']) {
11211121
if (!$this->annotationsConfigEnabled) {
11221122
throw new \LogicException('"enable_annotations" on the validator cannot be set as Annotations support is disabled.');
11231123
}
11241124

11251125
$validatorBuilder->addMethodCall('enableAnnotationMapping', [new Reference('annotation_reader')]);
11261126
}
11271127

1128-
if (array_key_exists('static_method', $config) && $config['static_method']) {
1128+
if (\array_key_exists('static_method', $config) && $config['static_method']) {
11291129
foreach ($config['static_method'] as $methodName) {
11301130
$validatorBuilder->addMethodCall('addMethodMapping', [$methodName]);
11311131
}

Tests/Command/CacheClearCommand/CacheClearCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function testCacheIsFreshAfterCacheClearedWithWarmup()
5151
// Ensure that all *.meta files are fresh
5252
$finder = new Finder();
5353
$metaFiles = $finder->files()->in($this->kernel->getCacheDir())->name('*.php.meta');
54-
// simply check that cache is warmed up
54+
// check that cache is warmed up
5555
$this->assertNotEmpty($metaFiles);
5656
$configCacheFactory = new ConfigCacheFactory(true);
5757

Tests/Functional/ContainerDebugCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ContainerDebugCommandTest extends WebTestCase
2222
{
2323
public function testDumpContainerIfNotExists()
2424
{
25-
static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']);
25+
static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml', 'debug' => true]);
2626

2727
$application = new Application(static::$kernel);
2828
$application->setAutoExit(false);

Tests/Functional/WebTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected static function createKernel(array $options = [])
6262
$options['test_case'],
6363
isset($options['root_config']) ? $options['root_config'] : 'config.yml',
6464
isset($options['environment']) ? $options['environment'] : strtolower(static::getVarDir().$options['test_case']),
65-
isset($options['debug']) ? $options['debug'] : true
65+
isset($options['debug']) ? $options['debug'] : false
6666
);
6767
}
6868

0 commit comments

Comments
 (0)