Skip to content

Commit c489123

Browse files
committed
Merge branch '4.2'
* 4.2: [Console] Fix auto-complete for ChoiceQuestion (multi-select answers) Translated form, security, validators resources into Belarusian (be) [WebProfilerBundle] Don't filter submitted IP values [Intl] Cleanup bumped Symfony version to 4.2.9 updated VERSION for 4.2.8 updated CHANGELOG for 4.2.8 bumped Symfony version to 3.4.28 updated VERSION for 3.4.27 update CONTRIBUTORS for 3.4.27 updated CHANGELOG for 3.4.27
2 parents 5dd2d2f + 29c62ec commit c489123

14 files changed

+43
-175
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 91 deletions
This file was deleted.

Data/Generator/CurrencyDataGenerator.php

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,37 +25,20 @@
2525
*/
2626
class CurrencyDataGenerator extends AbstractDataGenerator
2727
{
28-
const UNKNOWN_CURRENCY_ID = 'XXX';
29-
const EUROPEAN_COMPOSITE_UNIT_ID = 'XBA';
30-
const EUROPEAN_MONETARY_UNIT_ID = 'XBB';
31-
const EUROPEAN_UNIT_OF_ACCOUNT_XBC_ID = 'XBC';
32-
const EUROPEAN_UNIT_OF_ACCOUNT_XBD_ID = 'XBD';
33-
const TESTING_CURRENCY_CODE_ID = 'XTS';
34-
const ADB_UNIT_OF_ACCOUNT_ID = 'XUA';
35-
const GOLD_ID = 'XAU';
36-
const SILVER_ID = 'XAG';
37-
const PLATINUM_ID = 'XPT';
38-
const PALLADIUM_ID = 'XPD';
39-
const SUCRE_ID = 'XSU';
40-
const SPECIAL_DRAWING_RIGHTS_ID = 'XDR';
41-
42-
/**
43-
* Monetary units excluded from generation.
44-
*/
4528
private static $blacklist = [
46-
self::UNKNOWN_CURRENCY_ID => true,
47-
self::EUROPEAN_COMPOSITE_UNIT_ID => true,
48-
self::EUROPEAN_MONETARY_UNIT_ID => true,
49-
self::EUROPEAN_UNIT_OF_ACCOUNT_XBC_ID => true,
50-
self::EUROPEAN_UNIT_OF_ACCOUNT_XBD_ID => true,
51-
self::TESTING_CURRENCY_CODE_ID => true,
52-
self::ADB_UNIT_OF_ACCOUNT_ID => true,
53-
self::GOLD_ID => true,
54-
self::SILVER_ID => true,
55-
self::PLATINUM_ID => true,
56-
self::PALLADIUM_ID => true,
57-
self::SUCRE_ID => true,
58-
self::SPECIAL_DRAWING_RIGHTS_ID => true,
29+
'XBA' => true, // European Composite Unit
30+
'XBB' => true, // European Monetary Unit
31+
'XBC' => true, // European Unit of Account (XBC)
32+
'XBD' => true, // European Unit of Account (XBD)
33+
'XUA' => true, // ADB Unit of Account
34+
'XAU' => true, // Gold
35+
'XAG' => true, // Silver
36+
'XPT' => true, // Platinum
37+
'XPD' => true, // Palladium
38+
'XSU' => true, // Sucre
39+
'XDR' => true, // Special Drawing Rights
40+
'XTS' => true, // Testing Currency Code
41+
'XXX' => true, // Unknown Currency
5942
];
6043

6144
/**

Data/Generator/RegionDataGenerator.php

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,18 @@
2727
*/
2828
class RegionDataGenerator extends AbstractDataGenerator
2929
{
30-
const UNKNOWN_REGION_ID = 'ZZ';
31-
const OUTLYING_OCEANIA_REGION_ID = 'QO';
32-
const EUROPEAN_UNION_ID = 'EU';
33-
const NETHERLANDS_ANTILLES_ID = 'AN';
34-
const BOUVET_ISLAND_ID = 'BV';
35-
const HEARD_MCDONALD_ISLANDS_ID = 'HM';
36-
const CLIPPERTON_ISLAND_ID = 'CP';
37-
const EUROZONE_ID = 'EZ';
38-
const UNITED_NATIONS_ID = 'UN';
39-
40-
/**
41-
* Regions excluded from generation.
42-
*/
4330
private static $blacklist = [
44-
self::UNKNOWN_REGION_ID => true,
4531
// Look like countries, but are sub-continents
46-
self::OUTLYING_OCEANIA_REGION_ID => true,
47-
self::EUROPEAN_UNION_ID => true,
48-
self::EUROZONE_ID => true,
49-
self::UNITED_NATIONS_ID => true,
50-
// No longer exists
51-
self::NETHERLANDS_ANTILLES_ID => true,
32+
'QO' => true, // Outlying Oceania
33+
'EU' => true, // European Union
34+
'EZ' => true, // Eurozone
35+
'UN' => true, // United Nations
5236
// Uninhabited islands
53-
self::BOUVET_ISLAND_ID => true,
54-
self::HEARD_MCDONALD_ISLANDS_ID => true,
55-
self::CLIPPERTON_ISLAND_ID => true,
37+
'BV' => true, // Bouvet Island
38+
'HM' => true, // Heard & McDonald Islands
39+
'CP' => true, // Clipperton Island
40+
// Misc
41+
'ZZ' => true, // Unknown Region
5642
];
5743

5844
/**

Data/Provider/CurrencyDataProvider.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface;
1515
use Symfony\Component\Intl\Exception\MissingResourceException;
16-
use Symfony\Component\Intl\Locale;
1716

1817
/**
1918
* Data provider for currency-related data.
@@ -53,7 +52,7 @@ public function getCurrencies()
5352
public function getSymbol($currency, $displayLocale = null)
5453
{
5554
if (null === $displayLocale) {
56-
$displayLocale = Locale::getDefault();
55+
$displayLocale = \Locale::getDefault();
5756
}
5857

5958
return $this->reader->readEntry($this->path, $displayLocale, ['Names', $currency, static::INDEX_SYMBOL]);
@@ -62,7 +61,7 @@ public function getSymbol($currency, $displayLocale = null)
6261
public function getName($currency, $displayLocale = null)
6362
{
6463
if (null === $displayLocale) {
65-
$displayLocale = Locale::getDefault();
64+
$displayLocale = \Locale::getDefault();
6665
}
6766

6867
return $this->reader->readEntry($this->path, $displayLocale, ['Names', $currency, static::INDEX_NAME]);
@@ -71,7 +70,7 @@ public function getName($currency, $displayLocale = null)
7170
public function getNames($displayLocale = null)
7271
{
7372
if (null === $displayLocale) {
74-
$displayLocale = Locale::getDefault();
73+
$displayLocale = \Locale::getDefault();
7574
}
7675

7776
// ====================================================================

Data/Provider/LanguageDataProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Intl\Data\Provider;
1313

1414
use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface;
15-
use Symfony\Component\Intl\Locale;
1615

1716
/**
1817
* Data provider for language-related ICU data.
@@ -57,7 +56,7 @@ public function getAliases()
5756
public function getName($language, $displayLocale = null)
5857
{
5958
if (null === $displayLocale) {
60-
$displayLocale = Locale::getDefault();
59+
$displayLocale = \Locale::getDefault();
6160
}
6261

6362
return $this->reader->readEntry($this->path, $displayLocale, ['Names', $language]);
@@ -69,7 +68,7 @@ public function getName($language, $displayLocale = null)
6968
public function getNames($displayLocale = null)
7069
{
7170
if (null === $displayLocale) {
72-
$displayLocale = Locale::getDefault();
71+
$displayLocale = \Locale::getDefault();
7372
}
7473

7574
$languages = $this->reader->readEntry($this->path, $displayLocale, ['Names']);

Data/Provider/LocaleDataProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Intl\Data\Provider;
1313

1414
use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface;
15-
use Symfony\Component\Intl\Locale;
1615

1716
/**
1817
* Data provider for locale-related ICU data.
@@ -57,7 +56,7 @@ public function getAliases()
5756
public function getName($locale, $displayLocale = null)
5857
{
5958
if (null === $displayLocale) {
60-
$displayLocale = Locale::getDefault();
59+
$displayLocale = \Locale::getDefault();
6160
}
6261

6362
return $this->reader->readEntry($this->path, $displayLocale, ['Names', $locale]);
@@ -66,7 +65,7 @@ public function getName($locale, $displayLocale = null)
6665
public function getNames($displayLocale = null)
6766
{
6867
if (null === $displayLocale) {
69-
$displayLocale = Locale::getDefault();
68+
$displayLocale = \Locale::getDefault();
7069
}
7170

7271
$names = $this->reader->readEntry($this->path, $displayLocale, ['Names']);

Data/Provider/RegionDataProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Intl\Data\Provider;
1313

1414
use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface;
15-
use Symfony\Component\Intl\Locale;
1615

1716
/**
1817
* Data provider for region-related ICU data.
@@ -49,7 +48,7 @@ public function getRegions()
4948
public function getName($region, $displayLocale = null)
5049
{
5150
if (null === $displayLocale) {
52-
$displayLocale = Locale::getDefault();
51+
$displayLocale = \Locale::getDefault();
5352
}
5453

5554
return $this->reader->readEntry($this->path, $displayLocale, ['Names', $region]);
@@ -61,7 +60,7 @@ public function getName($region, $displayLocale = null)
6160
public function getNames($displayLocale = null)
6261
{
6362
if (null === $displayLocale) {
64-
$displayLocale = Locale::getDefault();
63+
$displayLocale = \Locale::getDefault();
6564
}
6665

6766
$names = $this->reader->readEntry($this->path, $displayLocale, ['Names']);

Data/Provider/ScriptDataProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Intl\Data\Provider;
1313

1414
use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface;
15-
use Symfony\Component\Intl\Locale;
1615

1716
/**
1817
* Data provider for script-related ICU data.
@@ -49,7 +48,7 @@ public function getScripts()
4948
public function getName($script, $displayLocale = null)
5049
{
5150
if (null === $displayLocale) {
52-
$displayLocale = Locale::getDefault();
51+
$displayLocale = \Locale::getDefault();
5352
}
5453

5554
return $this->reader->readEntry($this->path, $displayLocale, ['Names', $script]);
@@ -61,7 +60,7 @@ public function getName($script, $displayLocale = null)
6160
public function getNames($displayLocale = null)
6261
{
6362
if (null === $displayLocale) {
64-
$displayLocale = Locale::getDefault();
63+
$displayLocale = \Locale::getDefault();
6564
}
6665

6766
$names = $this->reader->readEntry($this->path, $displayLocale, ['Names']);

Tests/Data/Provider/AbstractCurrencyDataProviderTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Intl\Data\Provider\CurrencyDataProvider;
1515
use Symfony\Component\Intl\Intl;
16-
use Symfony\Component\Intl\Locale;
1716

1817
/**
1918
* @author Bernhard Schussek <[email protected]>
@@ -633,7 +632,7 @@ public function testGetNames($displayLocale)
633632

634633
public function testGetNamesDefaultLocale()
635634
{
636-
Locale::setDefault('de_AT');
635+
\Locale::setDefault('de_AT');
637636

638637
$this->assertSame(
639638
$this->dataProvider->getNames('de_AT'),
@@ -672,7 +671,7 @@ public function testGetName($displayLocale)
672671

673672
public function testGetNameDefaultLocale()
674673
{
675-
Locale::setDefault('de_AT');
674+
\Locale::setDefault('de_AT');
676675

677676
$expected = $this->dataProvider->getNames('de_AT');
678677
$actual = [];

Tests/Data/Provider/AbstractDataProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ abstract class AbstractDataProviderTest extends TestCase
705705

706706
protected function setUp()
707707
{
708-
Locale::setDefault('en');
708+
\Locale::setDefault('en');
709709
Locale::setDefaultFallback('en');
710710
}
711711

0 commit comments

Comments
 (0)