Skip to content

Commit 82e315e

Browse files
Merge branch '3.4' into 4.4
* 3.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents 6407cd3 + 0781446 commit 82e315e

29 files changed

+85
-85
lines changed

AbstractExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private function initTypeExtensions()
183183
$extendedTypes[] = $extendedType;
184184
}
185185
} else {
186-
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, \get_class($extension)), E_USER_DEPRECATED);
186+
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, \get_class($extension)), \E_USER_DEPRECATED);
187187

188188
$extendedTypes = [$extension->getExtendedType()];
189189
}

AbstractTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getExtendedType()
5858
throw new LogicException(sprintf('You need to implement the static getExtendedTypes() method when implementing the "%s" in "%s".', FormTypeExtensionInterface::class, static::class));
5959
}
6060

61-
@trigger_error(sprintf('The %s::getExtendedType() method is deprecated since Symfony 4.2 and will be removed in 5.0. Use getExtendedTypes() instead.', static::class), E_USER_DEPRECATED);
61+
@trigger_error(sprintf('The %s::getExtendedType() method is deprecated since Symfony 4.2 and will be removed in 5.0. Use getExtendedTypes() instead.', static::class), \E_USER_DEPRECATED);
6262

6363
foreach (static::getExtendedTypes() as $extendedType) {
6464
return $extendedType;

ButtonBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ public function __construct(?string $name, array $options = [])
6363

6464
if (preg_match('/^([^a-zA-Z0-9_].*)?(.*[^a-zA-Z0-9_\-:].*)?$/D', $name, $matches)) {
6565
if (isset($matches[1])) {
66-
@trigger_error(sprintf('Using names for buttons that do not start with a letter, a digit, or an underscore is deprecated since Symfony 4.3 and will throw an exception in 5.0 ("%s" given).', $name), E_USER_DEPRECATED);
66+
@trigger_error(sprintf('Using names for buttons that do not start with a letter, a digit, or an underscore is deprecated since Symfony 4.3 and will throw an exception in 5.0 ("%s" given).', $name), \E_USER_DEPRECATED);
6767
}
6868
if (isset($matches[2])) {
69-
@trigger_error(sprintf('Using names for buttons that do not contain only letters, digits, underscores ("_"), hyphens ("-") and colons (":") ("%s" given) is deprecated since Symfony 4.3 and will throw an exception in 5.0.', $name), E_USER_DEPRECATED);
69+
@trigger_error(sprintf('Using names for buttons that do not contain only letters, digits, underscores ("_"), hyphens ("-") and colons (":") ("%s" given) is deprecated since Symfony 4.3 and will throw an exception in 5.0.', $name), \E_USER_DEPRECATED);
7070
}
7171
}
7272

Command/DebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private function findAlternatives(string $name, array $collection): array
237237

238238
$threshold = 1e3;
239239
$alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; });
240-
ksort($alternatives, SORT_NATURAL | SORT_FLAG_CASE);
240+
ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE);
241241

242242
return array_keys($alternatives);
243243
}

Console/Descriptor/JsonDescriptor.php

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

99-
$this->output->write(json_encode($data, $flags | JSON_PRETTY_PRINT)."\n");
99+
$this->output->write(json_encode($data, $flags | \JSON_PRETTY_PRINT)."\n");
100100
}
101101

102102
private function sortOptions(array &$options)

DependencyInjection/FormPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private function processFormTypeExtensions(ContainerBuilder $container): array
9797

9898
if (isset($tag[0]['extended_type'])) {
9999
if (!method_exists($typeExtensionClass, 'getExtendedTypes')) {
100-
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, $typeExtensionClass), E_USER_DEPRECATED);
100+
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, $typeExtensionClass), \E_USER_DEPRECATED);
101101
}
102102

103103
$typeExtensions[$tag[0]['extended_type']][] = new Reference($serviceId);

Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class IntegerToLocalizedStringTransformer extends NumberToLocalizedStringTransfo
3030
public function __construct($grouping = false, $roundingMode = self::ROUND_DOWN)
3131
{
3232
if (\is_int($grouping) || \is_bool($roundingMode) || 2 < \func_num_args()) {
33-
@trigger_error(sprintf('Passing a precision as the first value to %s::__construct() is deprecated since Symfony 4.2 and support for it will be dropped in 5.0.', __CLASS__), E_USER_DEPRECATED);
33+
@trigger_error(sprintf('Passing a precision as the first value to %s::__construct() is deprecated since Symfony 4.2 and support for it will be dropped in 5.0.', __CLASS__), \E_USER_DEPRECATED);
3434

3535
$grouping = $roundingMode;
3636
$roundingMode = 2 < \func_num_args() ? func_get_arg(2) : self::ROUND_DOWN;

Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function reverseTransform($value)
179179
throw new TransformationFailedException($formatter->getErrorMessage());
180180
}
181181

182-
if ($result >= PHP_INT_MAX || $result <= -PHP_INT_MAX) {
182+
if ($result >= \PHP_INT_MAX || $result <= -\PHP_INT_MAX) {
183183
throw new TransformationFailedException('I don\'t have a clear idea what infinity looks like.');
184184
}
185185

@@ -269,13 +269,13 @@ private function round($number)
269269
$number = $number > 0 ? floor($number) : ceil($number);
270270
break;
271271
case self::ROUND_HALF_EVEN:
272-
$number = round($number, 0, PHP_ROUND_HALF_EVEN);
272+
$number = round($number, 0, \PHP_ROUND_HALF_EVEN);
273273
break;
274274
case self::ROUND_HALF_UP:
275-
$number = round($number, 0, PHP_ROUND_HALF_UP);
275+
$number = round($number, 0, \PHP_ROUND_HALF_UP);
276276
break;
277277
case self::ROUND_HALF_DOWN:
278-
$number = round($number, 0, PHP_ROUND_HALF_DOWN);
278+
$number = round($number, 0, \PHP_ROUND_HALF_DOWN);
279279
break;
280280
}
281281

Extension/Core/Type/CountryType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function getBlockPrefix()
8080
*/
8181
public function loadChoiceList($value = null)
8282
{
83-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
83+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), \E_USER_DEPRECATED);
8484

8585
if (null !== $this->choiceList) {
8686
return $this->choiceList;
@@ -96,7 +96,7 @@ public function loadChoiceList($value = null)
9696
*/
9797
public function loadChoicesForValues(array $values, $value = null)
9898
{
99-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
99+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), \E_USER_DEPRECATED);
100100

101101
// Optimize
102102
$values = array_filter($values);
@@ -114,7 +114,7 @@ public function loadChoicesForValues(array $values, $value = null)
114114
*/
115115
public function loadValuesForChoices(array $choices, $value = null)
116116
{
117-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
117+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), \E_USER_DEPRECATED);
118118

119119
// Optimize
120120
$choices = array_filter($choices);

Extension/Core/Type/CurrencyType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getBlockPrefix()
7777
*/
7878
public function loadChoiceList($value = null)
7979
{
80-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
80+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), \E_USER_DEPRECATED);
8181

8282
if (null !== $this->choiceList) {
8383
return $this->choiceList;
@@ -93,7 +93,7 @@ public function loadChoiceList($value = null)
9393
*/
9494
public function loadChoicesForValues(array $values, $value = null)
9595
{
96-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
96+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), \E_USER_DEPRECATED);
9797

9898
// Optimize
9999
$values = array_filter($values);
@@ -111,7 +111,7 @@ public function loadChoicesForValues(array $values, $value = null)
111111
*/
112112
public function loadValuesForChoices(array $choices, $value = null)
113113
{
114-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
114+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), \E_USER_DEPRECATED);
115115

116116
// Optimize
117117
$choices = array_filter($choices);

0 commit comments

Comments
 (0)