Skip to content

Commit dc845bd

Browse files
authored
Bump php-cs-fixer to version 3.60 (#1743)
1 parent 01b8ed8 commit dc845bd

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Changed
6+
7+
- Enable compiler optimization for the `sprintf` function.
8+
59
## 1.12.2
610

711
### Changed

src/DependencyInjection/AsyncAwsExtension.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private function registerConfiguredServices(ContainerBuilder $container, array $
7474
foreach ($config['clients'] as $name => $data) {
7575
$client = $availableServices[$data['type']]['class'];
7676
if (!class_exists($client)) {
77-
throw new InvalidConfigurationException(sprintf('You have configured "async_aws.%s" but the "%s" package is not installed. Try running "composer require %s"', $name, $data['type'], $availableServices[$data['type']]['package']));
77+
throw new InvalidConfigurationException(\sprintf('You have configured "async_aws.%s" but the "%s" package is not installed. Try running "composer require %s"', $name, $data['type'], $availableServices[$data['type']]['package']));
7878
}
7979

8080
$serviceConfig = array_merge($defaultConfig, $data);
@@ -200,7 +200,7 @@ private function addServiceDefinition(ContainerBuilder $container, string $name,
200200
$logger,
201201
]);
202202
$definition->addTag('monolog.logger', ['channel' => 'async_aws']);
203-
$container->setDefinition(sprintf('async_aws.client.%s', $name), $definition);
203+
$container->setDefinition(\sprintf('async_aws.client.%s', $name), $definition);
204204
}
205205

206206
/**
@@ -230,15 +230,15 @@ private function registerEnvLoader(ContainerBuilder $container, array $config):
230230

231231
$availableServices = AwsPackagesProvider::getAllServices();
232232
if (!class_exists($className = $availableServices['ssm']['class'])) {
233-
throw new InvalidConfigurationException(sprintf('You have enabled "async_aws.secrets" but the "%s" package is not installed. Try running "composer require %s"', 'ssm', $availableServices['ssm']['package']));
233+
throw new InvalidConfigurationException(\sprintf('You have enabled "async_aws.secrets" but the "%s" package is not installed. Try running "composer require %s"', 'ssm', $availableServices['ssm']['package']));
234234
}
235235

236236
if (null !== $client = $config['secrets']['client']) {
237237
if (!isset($config['clients'][$client])) {
238-
throw new InvalidConfigurationException(sprintf('The client "%s" configured in "async_aws.secrets" does not exists. Available clients are "%s"', $client, implode(', ', array_keys($config['clients']))));
238+
throw new InvalidConfigurationException(\sprintf('The client "%s" configured in "async_aws.secrets" does not exists. Available clients are "%s"', $client, implode(', ', array_keys($config['clients']))));
239239
}
240240
if ('ssm' !== $config['clients'][$client]['type']) {
241-
throw new InvalidConfigurationException(sprintf('The client "%s" configured in "async_aws.secrets" is not a SSM client.', $client));
241+
throw new InvalidConfigurationException(\sprintf('The client "%s" configured in "async_aws.secrets" is not a SSM client.', $client));
242242
}
243243
} else {
244244
if (!isset($config['clients']['ssm'])) {
@@ -289,7 +289,7 @@ private function autowireServices(ContainerBuilder $container, array $usedServic
289289
continue;
290290
}
291291

292-
$serviceId = sprintf('async_aws.client.%s', $name);
292+
$serviceId = \sprintf('async_aws.client.%s', $name);
293293
if (isset($awsServices[$name])) {
294294
$container->setAlias($client, $serviceId);
295295

src/DependencyInjection/Configuration.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ private static function validateType(?array $clients): array
7979
foreach ($clients as $name => $config) {
8080
if (\in_array($name, $awsServices)) {
8181
if (isset($config['type']) && $name !== $config['type']) {
82-
throw new InvalidConfigurationException(sprintf('You cannot define a service named "%s" with type "%s". That is super confusing.', $name, $config['type']));
82+
throw new InvalidConfigurationException(\sprintf('You cannot define a service named "%s" with type "%s". That is super confusing.', $name, $config['type']));
8383
}
8484
$clients[$name]['type'] = $name;
8585
} elseif (!isset($config['type'])) {
8686
if (!\in_array($name, $awsServices)) {
87-
throw new InvalidConfigurationException(sprintf('The "async_aws.client.%s" does not have a type. We were unable to guess what AWS service you want. Please add "aws.service.%s.type".', $name, $name));
87+
throw new InvalidConfigurationException(\sprintf('The "async_aws.client.%s" does not have a type. We were unable to guess what AWS service you want. Please add "aws.service.%s.type".', $name, $name));
8888
}
8989

9090
$clients[$name]['type'] = $name;

0 commit comments

Comments
 (0)