Skip to content

Commit b3c7e3f

Browse files
Merge branch '5.1'
* 5.1: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public Fix CS Add a warning comment on ldap empty password Bump Symfony version to 4.4.14 Update VERSION for 4.4.13 Update CHANGELOG for 4.4.13 [PhpunitBridge] Fix deprecation type detection
2 parents cd1694e + 1dd98ab commit b3c7e3f

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

Command/AboutCommand.php

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

Command/AbstractConfigCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function listBundles($output)
6363
protected function findExtension(string $name)
6464
{
6565
$bundles = $this->initializeBundles();
66-
$minScore = INF;
66+
$minScore = \INF;
6767

6868
$kernel = $this->getApplication()->getKernel();
6969
if ($kernel instanceof ExtensionInterface && ($kernel instanceof ConfigurationInterface || $kernel instanceof ConfigurationExtensionInterface)) {

Console/Descriptor/JsonDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private function writeData(array $data, array $options)
183183
{
184184
$flags = isset($options['json_encoding']) ? $options['json_encoding'] : 0;
185185

186-
$this->write(json_encode($data, $flags | JSON_PRETTY_PRINT)."\n");
186+
$this->write(json_encode($data, $flags | \JSON_PRETTY_PRINT)."\n");
187187
}
188188

189189
protected function getRouteData(Route $route): array

Controller/RedirectController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function urlRedirectAction(Request $request, string $path, bool $permanen
120120
}
121121

122122
// redirect if the path is a full URL
123-
if (parse_url($path, PHP_URL_SCHEME)) {
123+
if (parse_url($path, \PHP_URL_SCHEME)) {
124124
return new RedirectResponse($path, $statusCode);
125125
}
126126

DependencyInjection/Compiler/ProfilerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function process(ContainerBuilder $container)
3333
$definition = $container->getDefinition('profiler');
3434

3535
$collectors = new \SplPriorityQueue();
36-
$order = PHP_INT_MAX;
36+
$order = \PHP_INT_MAX;
3737
foreach ($container->findTaggedServiceIds('data_collector', true) as $id => $attributes) {
3838
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
3939
$template = null;

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private function addFormSection(ArrayNodeDefinition $rootNode)
196196
->validate()
197197
->ifTrue()
198198
->then(function ($v) {
199-
@trigger_error('Since symfony/framework-bundle 5.2: Setting the "framework.form.legacy_error_messages" option to "true" is deprecated. It will have no effect as of Symfony 6.0.', E_USER_DEPRECATED);
199+
@trigger_error('Since symfony/framework-bundle 5.2: Setting the "framework.form.legacy_error_messages" option to "true" is deprecated. It will have no effect as of Symfony 6.0.', \E_USER_DEPRECATED);
200200

201201
return $v;
202202
})

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ private function createVersion(ContainerBuilder $container, ?string $version, ?s
10931093

10941094
if (null !== $jsonManifestPath) {
10951095
$definitionName = 'assets.json_manifest_version_strategy';
1096-
if (0 === strpos(parse_url($jsonManifestPath, PHP_URL_SCHEME), 'http')) {
1096+
if (0 === strpos(parse_url($jsonManifestPath, \PHP_URL_SCHEME), 'http')) {
10971097
$definitionName = 'assets.remote_json_manifest_version_strategy';
10981098
}
10991099

Secrets/SodiumVault.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function seal(string $name, string $value): void
8989
$list = $this->list();
9090
$list[$name] = null;
9191
uksort($list, 'strnatcmp');
92-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", var_export($list, true), LOCK_EX));
92+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", var_export($list, true), \LOCK_EX));
9393

9494
$this->lastMessage = sprintf('Secret "%s" encrypted in "%s"; you can commit it.', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
9595
}
@@ -141,7 +141,7 @@ public function remove(string $name): bool
141141

142142
$list = $this->list();
143143
unset($list[$name]);
144-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", var_export($list, true), LOCK_EX));
144+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", var_export($list, true), \LOCK_EX));
145145

146146
$this->lastMessage = sprintf('Secret "%s" removed from "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
147147

@@ -205,9 +205,9 @@ private function export(string $file, string $data): void
205205

206206
$this->createSecretsDir();
207207

208-
if (false === file_put_contents($this->pathPrefix.$file.'.php', $data, LOCK_EX)) {
208+
if (false === file_put_contents($this->pathPrefix.$file.'.php', $data, \LOCK_EX)) {
209209
$e = error_get_last();
210-
throw new \ErrorException($e['message'] ?? 'Failed to write secrets data.', 0, $e['type'] ?? E_USER_WARNING);
210+
throw new \ErrorException($e['message'] ?? 'Failed to write secrets data.', 0, $e['type'] ?? \E_USER_WARNING);
211211
}
212212
}
213213

Tests/Console/Descriptor/AbstractDescriptorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ private function assertDescription($expectedDescription, $describedObject, array
242242
$this->getDescriptor()->describe($output, $describedObject, $options);
243243

244244
if ('json' === $this->getFormat()) {
245-
$this->assertEquals(json_encode(json_decode($expectedDescription), JSON_PRETTY_PRINT), json_encode(json_decode($output->fetch()), JSON_PRETTY_PRINT));
245+
$this->assertEquals(json_encode(json_decode($expectedDescription), \JSON_PRETTY_PRINT), json_encode(json_decode($output->fetch()), \JSON_PRETTY_PRINT));
246246
} else {
247-
$this->assertEquals(trim($expectedDescription), trim(str_replace(PHP_EOL, "\n", $output->fetch())));
247+
$this->assertEquals(trim($expectedDescription), trim(str_replace(\PHP_EOL, "\n", $output->fetch())));
248248
}
249249
}
250250

Tests/Controller/AbstractControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function testJsonWithSerializerContextOverride()
224224
$response = $controller->json([], 200, [], ['json_encode_options' => 0, 'other' => 'context']);
225225
$this->assertInstanceOf(JsonResponse::class, $response);
226226
$this->assertEquals('[]', $response->getContent());
227-
$response->setEncodingOptions(JSON_FORCE_OBJECT);
227+
$response->setEncodingOptions(\JSON_FORCE_OBJECT);
228228
$this->assertEquals('{}', $response->getContent());
229229
}
230230

0 commit comments

Comments
 (0)