Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1bbc35a

Browse files
committed
Merge branch '3.2'
* 3.2: removed unneeded annotation in tests [Intl][Form] Update tests, TimeZoneTransformer, and DateTimeToLocalizedStringTransformer for the GMT and UTC split in ICU remove Security deps from the require section [Intl] Update ICU data to 59.1
2 parents af4ec23 + 94871fa commit 1bbc35a

File tree

922 files changed

+1467
-1096
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

922 files changed

+1467
-1096
lines changed

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
"symfony/filesystem": "~2.8|~3.0",
3030
"symfony/finder": "~2.8|~3.0",
3131
"symfony/routing": "~3.3",
32-
"symfony/security-core": "~2.8|~3.0",
33-
"symfony/security-csrf": "~2.8|~3.0",
3432
"symfony/stopwatch": "~2.8|~3.0",
3533
"doctrine/cache": "~1.0"
3634
},

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ public function dataProvider()
6161
array(\IntlDateFormatter::FULL, \IntlDateFormatter::NONE, null, 'Mittwoch, 3. Februar 2010', '2010-02-03 00:00:00 UTC'),
6262
array(null, \IntlDateFormatter::SHORT, null, '03.02.2010, 04:05', '2010-02-03 04:05:00 UTC'),
6363
array(null, \IntlDateFormatter::MEDIUM, null, '03.02.2010, 04:05:06', '2010-02-03 04:05:06 UTC'),
64-
array(null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 GMT', '2010-02-03 04:05:06 UTC'),
64+
array(null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 UTC', '2010-02-03 04:05:06 UTC'),
65+
array(null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 UTC', '2010-02-03 04:05:06 GMT'),
6566
// see below for extra test case for time format FULL
6667
array(\IntlDateFormatter::NONE, \IntlDateFormatter::SHORT, null, '04:05', '1970-01-01 04:05:00 UTC'),
6768
array(\IntlDateFormatter::NONE, \IntlDateFormatter::MEDIUM, null, '04:05:06', '1970-01-01 04:05:06 UTC'),
68-
array(\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 GMT', '1970-01-01 04:05:06 UTC'),
69+
array(\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 UTC', '1970-01-01 04:05:06 GMT'),
70+
array(\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 UTC', '1970-01-01 04:05:06 UTC'),
6971
array(null, null, 'yyyy-MM-dd HH:mm:00', '2010-02-03 04:05:00', '2010-02-03 04:05:00 UTC'),
7072
array(null, null, 'yyyy-MM-dd HH:mm', '2010-02-03 04:05', '2010-02-03 04:05:00 UTC'),
7173
array(null, null, 'yyyy-MM-dd HH', '2010-02-03 04', '2010-02-03 04:00:00 UTC'),
@@ -85,6 +87,9 @@ public function dataProvider()
8587
*/
8688
public function testTransform($dateFormat, $timeFormat, $pattern, $output, $input)
8789
{
90+
IntlTestHelper::requireFullIntl($this, '59.1');
91+
\Locale::setDefault('de_AT');
92+
8893
$transformer = new DateTimeToLocalizedStringTransformer(
8994
'UTC',
9095
'UTC',
@@ -101,9 +106,12 @@ public function testTransform($dateFormat, $timeFormat, $pattern, $output, $inpu
101106

102107
public function testTransformFullTime()
103108
{
109+
IntlTestHelper::requireFullIntl($this, '59.1');
110+
\Locale::setDefault('de_AT');
111+
104112
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, \IntlDateFormatter::FULL);
105113

106-
$this->assertEquals('03.02.2010, 04:05:06 GMT', $transformer->transform($this->dateTime));
114+
$this->assertEquals('03.02.2010, 04:05:06 Koordinierte Weltzeit', $transformer->transform($this->dateTime));
107115
}
108116

109117
public function testTransformToDifferentLocale()

src/Symfony/Component/Intl/DateFormatter/DateFormat/TimezoneTransformer.php

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,29 @@ public function format(\DateTime $dateTime, $length)
3535
throw new NotImplementedException('Time zone different than GMT or UTC is not supported as a formatting output.');
3636
}
3737

38-
// From ICU >= 4.8, the zero offset is not more used, example: GMT instead of GMT+00:00
39-
$format = (0 !== (int) $dateTime->format('O')) ? '\G\M\TP' : '\G\M\T';
38+
if ('Etc' === $timeZone) {
39+
// i.e. Etc/GMT+1, Etc/UTC, Etc/Zulu
40+
$timeZone = substr($dateTime->getTimezone()->getName(), 4);
41+
}
42+
43+
// From ICU >= 59.1 GMT and UTC are no longer unified
44+
if (in_array($timeZone, array('UTC', 'UCT', 'Universal', 'Zulu'))) {
45+
// offset is not supported with UTC
46+
return $length > 3 ? 'Coordinated Universal Time' : 'UTC';
47+
}
48+
49+
$offset = (int) $dateTime->format('O');
50+
51+
// From ICU >= 4.8, the zero offset is no more used, example: GMT instead of GMT+00:00
52+
if (0 === $offset) {
53+
return $length > 3 ? 'Greenwich Mean Time' : 'GMT';
54+
}
55+
56+
if ($length > 3) {
57+
return $dateTime->format('\G\M\TP');
58+
}
4059

41-
return $dateTime->format($format);
60+
return sprintf('GMT%s%d', ($offset >= 0 ? '+' : ''), $offset / 100);
4261
}
4362

4463
/**

src/Symfony/Component/Intl/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ Resources
1515
* [Report issues](https://github.com/symfony/symfony/issues) and
1616
[send Pull Requests](https://github.com/symfony/symfony/pulls)
1717
in the [main Symfony repository](https://github.com/symfony/symfony)
18+
* [Docker images with intl support](https://hub.docker.com/r/jakzal/php-intl)
19+
(for the Intl component development)
1820

1921
[0]: http://www.php.net/manual/en/intl.setup.php

src/Symfony/Component/Intl/Resources/bin/icu.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
55 = http://source.icu-project.org/repos/icu/icu/tags/release-55-1/source
1515
57 = http://source.icu-project.org/repos/icu/icu/tags/release-57-1/source
1616
58 = http://source.icu-project.org/repos/icu/tags/release-58-2/icu4c/source
17+
59 = http://source.icu-project.org/repos/icu/tags/release-59-1/icu4c/source

src/Symfony/Component/Intl/Resources/data/currencies/af.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.29.44",
2+
"Version": "2.1.32.59",
33
"Names": {
44
"AED": [
55
"AED",
@@ -451,7 +451,7 @@
451451
],
452452
"PEN": [
453453
"PEN",
454-
"Peruaanse nuwe sol"
454+
"Peruaanse sol"
455455
],
456456
"PGK": [
457457
"PGK",

src/Symfony/Component/Intl/Resources/data/currencies/af_NA.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"NAD": [
55
"$",

src/Symfony/Component/Intl/Resources/data/currencies/ak.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"AED": [
55
"AED",

src/Symfony/Component/Intl/Resources/data/currencies/am.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.28.79",
2+
"Version": "2.1.32.59",
33
"Names": {
44
"AED": [
55
"AED",
@@ -439,7 +439,7 @@
439439
],
440440
"PEN": [
441441
"PEN",
442-
"የፔሩቪያ ኑኤቮ ሶል"
442+
"የፔሩቪያ ሶል"
443443
],
444444
"PGK": [
445445
"PGK",

src/Symfony/Component/Intl/Resources/data/currencies/ar.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.28.79",
2+
"Version": "2.1.32.86",
33
"Names": {
44
"ADP": [
55
"ADP",
@@ -647,7 +647,7 @@
647647
],
648648
"PEN": [
649649
"PEN",
650-
"سول جديد البيرو"
650+
"سول البيرو"
651651
],
652652
"PGK": [
653653
"PGK",

src/Symfony/Component/Intl/Resources/data/currencies/ar_DJ.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"DJF": [
55
"Fdj",

src/Symfony/Component/Intl/Resources/data/currencies/ar_ER.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"ERN": [
55
"Nfk",

src/Symfony/Component/Intl/Resources/data/currencies/ar_LB.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"SDG": [
55
"SDG",

src/Symfony/Component/Intl/Resources/data/currencies/ar_SO.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"SOS": [
55
"S",

src/Symfony/Component/Intl/Resources/data/currencies/ar_SS.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"GBP": [
55
"GB£",

src/Symfony/Component/Intl/Resources/data/currencies/az.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.28.79",
2+
"Version": "2.1.32.59",
33
"Names": {
44
"ADP": [
55
"ADP",
@@ -703,11 +703,11 @@
703703
],
704704
"PEN": [
705705
"PEN",
706-
"Peru Nuevo Solu"
706+
"Peru Solu"
707707
],
708708
"PES": [
709709
"PES",
710-
"Peru Solu"
710+
"Peru Solu (1863–1965)"
711711
],
712712
"PGK": [
713713
"PGK",

src/Symfony/Component/Intl/Resources/data/currencies/az_Cyrl.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.74",
33
"Names": {
44
"AZN": [
55
"",

src/Symfony/Component/Intl/Resources/data/currencies/be.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.29.66",
2+
"Version": "2.1.31.86",
33
"Names": {
44
"AED": [
55
"AED",
@@ -423,7 +423,7 @@
423423
],
424424
"PEN": [
425425
"PEN",
426-
"перуанскі новы соль"
426+
"перуанскі соль"
427427
],
428428
"PGK": [
429429
"PGK",

src/Symfony/Component/Intl/Resources/data/currencies/bg.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.30.6",
2+
"Version": "2.1.33.75",
33
"Names": {
44
"ADP": [
55
"ADP",
@@ -687,11 +687,11 @@
687687
],
688688
"PEN": [
689689
"PEN",
690-
"Перуански нов сол"
690+
"Перуански сол"
691691
],
692692
"PES": [
693693
"PES",
694-
"Перуански сол"
694+
"Перуански сол (1863–1965)"
695695
],
696696
"PGK": [
697697
"PGK",

src/Symfony/Component/Intl/Resources/data/currencies/bm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"AED": [
55
"AED",

src/Symfony/Component/Intl/Resources/data/currencies/bn.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.29.44",
2+
"Version": "2.1.32.59",
33
"Names": {
44
"ADP": [
55
"ADP",
@@ -707,11 +707,11 @@
707707
],
708708
"PEN": [
709709
"PEN",
710-
"পেরুভিয়ান সোল নুয়েভো"
710+
"পেরুভিয়ান সোল"
711711
],
712712
"PES": [
713713
"PES",
714-
"পেরুভিয়ান সোল"
714+
"পেরুভিয়ান সোল (1863–1965)"
715715
],
716716
"PGK": [
717717
"PGK",

src/Symfony/Component/Intl/Resources/data/currencies/bo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"CNY": [
55
"¥",

src/Symfony/Component/Intl/Resources/data/currencies/bo_IN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"CNY": [
55
"CN¥",

src/Symfony/Component/Intl/Resources/data/currencies/br.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.28.76",
2+
"Version": "2.1.31.86",
33
"Names": {
44
"ADP": [
55
"ADP",
@@ -779,7 +779,7 @@
779779
],
780780
"PEN": [
781781
"PEN",
782-
"nuevo sol Perou"
782+
"sol Perou"
783783
],
784784
"PES": [
785785
"PES",

src/Symfony/Component/Intl/Resources/data/currencies/bs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.28.79",
2+
"Version": "2.1.31.86",
33
"Names": {
44
"ADP": [
55
"ADP",
@@ -739,7 +739,7 @@
739739
],
740740
"PEN": [
741741
"PEN",
742-
"Peruanski novi sol"
742+
"Peruanski sol"
743743
],
744744
"PES": [
745745
"PES",

src/Symfony/Component/Intl/Resources/data/currencies/bs_Cyrl.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.28.76",
2+
"Version": "2.1.32.72",
33
"Names": {
44
"ADP": [
55
"ADP",
@@ -715,11 +715,11 @@
715715
],
716716
"PEN": [
717717
"PEN",
718-
"Перуански нуево сол"
718+
"Перуански сол"
719719
],
720720
"PES": [
721721
"PES",
722-
"Перуански сол"
722+
"Перуански сол (1863–1965)"
723723
],
724724
"PGK": [
725725
"PGK",

src/Symfony/Component/Intl/Resources/data/currencies/ca.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.28.79",
2+
"Version": "2.1.32.59",
33
"Names": {
44
"ADP": [
55
"ADP",
@@ -772,11 +772,11 @@
772772
],
773773
"PEN": [
774774
"PEN",
775-
"nou sol peruà"
775+
"sol peruà"
776776
],
777777
"PES": [
778778
"PES",
779-
"sol peruà"
779+
"sol peruà (1863–1965)"
780780
],
781781
"PGK": [
782782
"PGK",

src/Symfony/Component/Intl/Resources/data/currencies/ca_FR.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.27.40",
2+
"Version": "2.1.31.33",
33
"Names": {
44
"FRF": [
55
"F",

src/Symfony/Component/Intl/Resources/data/currencies/ce.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Version": "2.1.28.76",
2+
"Version": "2.1.31.86",
33
"Names": {
44
"AED": [
55
"AED",
@@ -423,7 +423,7 @@
423423
],
424424
"PEN": [
425425
"PEN",
426-
"Перун керла соль"
426+
"Перун соль"
427427
],
428428
"PGK": [
429429
"PGK",

0 commit comments

Comments
 (0)