Skip to content

Commit 2b39472

Browse files
Merge branch '3.4' into 4.4
* 3.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents 18e708f + f066415 commit 2b39472

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

Collator/Collator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ public static function create($locale)
109109
public function asort(&$array, $sortFlag = self::SORT_REGULAR)
110110
{
111111
$intlToPlainFlagMap = [
112-
self::SORT_REGULAR => SORT_REGULAR,
113-
self::SORT_NUMERIC => SORT_NUMERIC,
114-
self::SORT_STRING => SORT_STRING,
112+
self::SORT_REGULAR => \SORT_REGULAR,
113+
self::SORT_NUMERIC => \SORT_NUMERIC,
114+
self::SORT_STRING => \SORT_STRING,
115115
];
116116

117117
$plainSortFlag = isset($intlToPlainFlagMap[$sortFlag]) ? $intlToPlainFlagMap[$sortFlag] : self::SORT_REGULAR;

Data/Bundle/Writer/JsonBundleWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function write($path, $locale, $data)
3535
}
3636
});
3737

38-
$contents = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)."\n";
38+
$contents = json_encode($data, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE)."\n";
3939

4040
file_put_contents($path.'/'.$locale.'.json', $contents);
4141
}

Data/Generator/LocaleDataGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function preGenerate()
6767
// Write parents locale file for the Translation component
6868
file_put_contents(
6969
__DIR__.'/../../../Translation/Resources/data/parents.json',
70-
json_encode($this->localeParents, JSON_PRETTY_PRINT).PHP_EOL
70+
json_encode($this->localeParents, \JSON_PRETTY_PRINT).\PHP_EOL
7171
);
7272
}
7373

Data/Util/LocaleScanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class LocaleScanner
4040
*/
4141
public function scanLocales(string $sourceDir): array
4242
{
43-
$locales = glob($sourceDir.'/*.txt', GLOB_NOSORT);
43+
$locales = glob($sourceDir.'/*.txt', \GLOB_NOSORT);
4444

4545
// Remove file extension and sort
4646
array_walk($locales, function (&$locale) { $locale = basename($locale, '.txt'); });

DateFormatter/DateFormat/Transformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ abstract public function extractDateOptions(string $matched, int $length): array
6060
*/
6161
protected function padLeft(string $value, int $length): string
6262
{
63-
return str_pad($value, $length, '0', STR_PAD_LEFT);
63+
return str_pad($value, $length, '0', \STR_PAD_LEFT);
6464
}
6565
}

Intl.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static function isExtensionLoaded(): bool
123123
*/
124124
public static function getCurrencyBundle(): CurrencyBundleInterface
125125
{
126-
@trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Currencies::class), E_USER_DEPRECATED);
126+
@trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Currencies::class), \E_USER_DEPRECATED);
127127

128128
if (null === self::$currencyBundle) {
129129
self::$currencyBundle = new CurrencyBundle(
@@ -145,7 +145,7 @@ public static function getCurrencyBundle(): CurrencyBundleInterface
145145
*/
146146
public static function getLanguageBundle(): LanguageBundleInterface
147147
{
148-
@trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" or "%s" instead.', __METHOD__, Languages::class, Scripts::class), E_USER_DEPRECATED);
148+
@trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" or "%s" instead.', __METHOD__, Languages::class, Scripts::class), \E_USER_DEPRECATED);
149149

150150
if (null === self::$languageBundle) {
151151
self::$languageBundle = new LanguageBundle(
@@ -171,7 +171,7 @@ public static function getLanguageBundle(): LanguageBundleInterface
171171
*/
172172
public static function getLocaleBundle(): LocaleBundleInterface
173173
{
174-
@trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Locales::class), E_USER_DEPRECATED);
174+
@trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Locales::class), \E_USER_DEPRECATED);
175175

176176
if (null === self::$localeBundle) {
177177
self::$localeBundle = new LocaleBundle(
@@ -192,7 +192,7 @@ public static function getLocaleBundle(): LocaleBundleInterface
192192
*/
193193
public static function getRegionBundle(): RegionBundleInterface
194194
{
195-
@trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Countries::class), E_USER_DEPRECATED);
195+
@trigger_error(sprintf('The method "%s()" is deprecated since Symfony 4.3, use "%s" instead.', __METHOD__, Countries::class), \E_USER_DEPRECATED);
196196

197197
if (null === self::$regionBundle) {
198198
self::$regionBundle = new RegionBundle(
@@ -216,7 +216,7 @@ public static function getIcuVersion(): ?string
216216
if (!self::isExtensionLoaded()) {
217217
self::$icuVersion = self::getIcuStubVersion();
218218
} elseif (\defined('INTL_ICU_VERSION')) {
219-
self::$icuVersion = INTL_ICU_VERSION;
219+
self::$icuVersion = \INTL_ICU_VERSION;
220220
} else {
221221
try {
222222
$reflector = new \ReflectionExtension('intl');

NumberFormatter/NumberFormatter.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ abstract class NumberFormatter
201201
* @see https://php.net/round
202202
*/
203203
private static $phpRoundingMap = [
204-
self::ROUND_HALFDOWN => PHP_ROUND_HALF_DOWN,
205-
self::ROUND_HALFEVEN => PHP_ROUND_HALF_EVEN,
206-
self::ROUND_HALFUP => PHP_ROUND_HALF_UP,
204+
self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN,
205+
self::ROUND_HALFEVEN => \PHP_ROUND_HALF_EVEN,
206+
self::ROUND_HALFUP => \PHP_ROUND_HALF_UP,
207207
];
208208

209209
/**
@@ -357,7 +357,7 @@ public function format($value, $type = self::TYPE_DEFAULT)
357357

358358
// The original NumberFormatter does not support this format type
359359
if (self::TYPE_CURRENCY === $type) {
360-
trigger_error(__METHOD__.'(): Unsupported format type '.$type, E_USER_WARNING);
360+
trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING);
361361

362362
return false;
363363
}
@@ -513,7 +513,7 @@ public function parse($value, $type = self::TYPE_DOUBLE, &$position = 0)
513513
$type = (int) $type;
514514

515515
if (self::TYPE_DEFAULT === $type || self::TYPE_CURRENCY === $type) {
516-
trigger_error(__METHOD__.'(): Unsupported format type '.$type, E_USER_WARNING);
516+
trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING);
517517

518518
return false;
519519
}

Resources/bin/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function get_icu_version_from_genrb($genrb)
6868
return $matches[1];
6969
}
7070

71-
error_reporting(E_ALL);
71+
error_reporting(\E_ALL);
7272

7373
set_error_handler(function ($type, $msg, $file, $line) {
7474
throw new \ErrorException($msg, 0, $type, $file, $line);

0 commit comments

Comments
 (0)