8000 Merge branch '4.1' · symfony/symfony@5b08019 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5b08019

Browse files
author
Robin Chalas
committed
Merge branch '4.1'
* 4.1: [Console] Fix typo in tests [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions [Console] fixed corrupt error output for unknown multibyte short option [Console] fixed PHPDoc for setArgument/setOption in InputInterface Register the messenger data collector only when the profiler is enabled [Intl] Blacklist Eurozone and United Nations in Region Data Generator
2 parents 8ab7077 + ddde83c commit 5b08019

Some content is hidden

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

107 files changed

+34
-209
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,9 @@
5252
<tag name="kernel.event_listener" event="kernel.controller" method="onKernelController"/>
5353
<tag name="data_collector" template="@WebProfiler/Collector/router.html.twig" id="router" priority="285" />
5454
</service>
55+
56+
<service id="data_collector.messenger" class="Symfony\Component\Messenger\DataCollector\MessengerDataCollector">
57+
<tag name="data_collector" template="@WebProfiler/Collector/messenger.html.twig" id="messenger" priority="100" />
58+
</service>
5559
</services>
5660
</container>

src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,13 @@
3434
<argument type="service" id="validator" />
3535
</service>
3636

37-
<!-- Logging & Debug -->
37+
<!-- Logging -->
3838
<service id="messenger.middleware.logging" class="Symfony\Component\Messenger\Middleware\LoggingMiddleware" abstract="true">
3939
<argument type="service" id="logger" />
4040

4141
<tag name="monolog.logger" channel="messenger" />
4242
</service>
4343

44-
<service id="messenger.data_collector" class="Symfony\Component\Messenger\DataCollector\MessengerDataCollector">
45-
<tag name="data_collector" template="@WebProfiler/Collector/messenger.html.twig" id="messenger" priority="100" />
46-
</service>
47-
4844
<!-- Discovery -->
4945
<service id="messenger.receiver_locator">
5046
<tag name="container.service_locator" />

src/Symfony/Component/Console/Command/Command.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,14 @@ protected function interact(InputInterface $input, OutputInterface $output)
173173
}
174174

175175
/**
176-
* Initializes the command just after the input has been validated.
176+
* Initializes the command after the input has been bound and before the input
177+
* is validated.
177178
*
178179
* This is mainly useful when a lot of commands extends one main command
179180
* where some things need to be initialized based on the input arguments and options.
181+
*
182+
* @see InputInterface::bind()
183+
* @see InputInterface::validate()
180184
*/
181185
protected function initialize(InputInterface $input, OutputInterface $output)
182186
{

src/Symfony/Component/Console/Input/ArgvInput.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ private function parseShortOptionSet($name)
121121
$len = \strlen($name);
122122
for ($i = 0; $i < $len; ++$i) {
123123
if (!$this->definition->hasShortcut($name[$i])) {
124-
throw new RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i]));
124+
$encoding = mb_detect_encoding($name, null, true);
125+
throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding)));
125126
}
126127

127128
$option = $this->definition->getOptionForShortcut($name[$i]);

src/Symfony/Component/Console/Input/InputInterface.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public function getParameterOption($values, $default = false, $onlyParams = fals
6161

6262
/**
6363
* Binds the current Input instance with the given arguments and options.
64+
*
65+
* @throws RuntimeException
6466
*/
6567
public function bind(InputDefinition $definition);
6668

@@ -92,8 +94,8 @@ public function getArgument($name);
9294
/**
9395
* Sets an argument value by name.
9496
*
95-
* @param string $name The argument name
96-
* @param string $value The argument value
97+
* @param string $name The argument name
98+
* @param string|string[] $value The argument value
9799
*
98100
* @throws InvalidArgumentException When argument given doesn't exist
99101
*/
@@ -129,8 +131,8 @@ public function getOption($name);
129131
/**
130132
* Sets an option value by name.
131133
*
132-
* @param string $name The option name
133-
* @param string|bool $value The option value
134+
* @param string $name The option name
135+
* @param string|string[]|bool $value The option value
134136
*
135137
* @throws InvalidArgumentException When option given doesn't exist
136138
*/

src/Symfony/Component/Console/Tests/Helper/TableTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ public function testThrowsWhenTheCellInAnArray()
783783
$table->render();
784784
}
785785

786-
public function testColumnWith()
786+
public function testColumnWidth()
787787
{
788788
$table = new Table($output = $this->getOutputStream());
789789
$table
@@ -815,7 +815,7 @@ public function testColumnWith()
815815
$this->assertEquals($expected, $this->getOutputContent($output));
816816
}
817817

818-
public function testColumnWiths()
818+
public function testColumnWidths()
819819
{
820820
$table = new Table($output = $this->getOutputStream());
821821
$table

src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@ public function provideInvalidInput()
246246
new InputDefinition(array(new InputArgument('number'))),
247247
'The "-1" option does not exist.',
248248
),
249+
array(
250+
array('cli.php', '-fЩ'),
251+
new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))),
252+
'The "-Щ" option does not exist.',
253+
),
249254
);
250255
}
251256

src/Symfony/Component/Intl/Data/Generator/RegionDataGenerator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class RegionDataGenerator extends AbstractDataGenerator
3434
const BOUVET_ISLAND_ID = 'BV';
3535
const HEARD_MCDONALD_ISLANDS_ID = 'HM';
3636
const CLIPPERTON_ISLAND_ID = 'CP';
37+
const EUROZONE_ID = 'EZ';
38+
const UNITED_NATIONS_ID = 'UN';
3739

3840
/**
3941
* Regions excluded from generation.
@@ -43,6 +45,8 @@ class RegionDataGenerator extends AbstractDataGenerator
4345
// Look like countries, but are sub-continents
4446
self::OUTLYING_OCEANIA_REGION_ID => true,
4547
self::EUROPEAN_UNION_ID => true,
48+
self::EUROZONE_ID => true,
49+
self::UNITED_NATIONS_ID => true,
4650
// No longer exists
4751
self::NETHERLANDS_ANTILLES_ID => true,
4852
// Uninhabited islands

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Eritrea",
7373
"ES": "Spanje",
7474
"ET": "Ethiopië",
75-
"EZ": "Eurosone",
7675
"FI": "Finland",
7776
"FJ": "Fidji",
7877
"FK": "Falklandeilande",
@@ -237,7 +236,6 @@
237236
"UA": "Oekraïne",
238237
"UG": "Uganda",
239238
"UM": "Klein afgeleë eilande van die VSA",
240-
"UN": "Verenigde Nasies",
241239
"US": "Verenigde State van Amerika",
242240
"UY": "Uruguay",
243241
"UZ": "Oesbekistan",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "ኤርትራ",
7373
"ES": "ስፔን",
7474
"ET": "ኢትዮጵያ",
75-
"EZ": "የአውሮፓ ዞን",
7675
"FI": "ፊንላንድ",
7776
"FJ": "ፊጂ",
7877
"FK": "የፎክላንድ ደሴቶች",
@@ -237,7 +236,6 @@
237236
"UA": "ዩክሬን",
238237
"UG": "ዩጋንዳ",
239238
"UM": "የዩ ኤስ ጠረፍ ላይ ያሉ ደሴቶች",
240-
"UN": "የተባበሩት መንግስታት",
241239
"US": "ዩናይትድ ስቴትስ",
242240
"UY": "ኡራጓይ",
243241
"UZ": "ኡዝቤኪስታን",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "إريتريا",
7373
"ES": "إسبانيا",
7474
"ET": "إثيوبيا",
75-
"EZ": "منطقة اليورو",
7675
"FI": "فنلندا",
7776
"FJ": "فيجي",
7877
"FK": "جزر فوكلاند",
@@ -237,7 +236,6 @@
237236
"UA": "أوكرانيا",
238237
"UG": "أوغندا",
239238
"UM": "جزر الولايات المتحدة النائية",
240-
"UN": "الأمم المتحدة",
241239
"US": "الولايات المتحدة",
242240
"UY": "أورغواي",
243241
"UZ": "أوزبكستان",

src/Symfony/Component/Intl/Resources/data/regions/as.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "এৰিত্ৰিয়া",
7373
"ES": "স্পেইন",
7474
"ET": "ইথিঅ’পিয়া",
75-
"EZ": "ইউৰোজ’ন",
7675
"FI": "ফিনলেণ্ড",
7776
"FJ": "ফিজি",
7877
"FK": "ফকলেণ্ড দ্বীপপুঞ্জ",
@@ -237,7 +236,6 @@
237236
"UA": "ইউক্ৰেইন",
238237
"UG": "উগাণ্ডা",
239238
"UM": "ইউ. এছ. আউটলায়িং দ্বীপপুঞ্জ",
240-
"UN": "ৰাষ্ট্ৰসংঘ",
241239
"US": "মাৰ্কিন যুক্তৰাষ্ট্ৰ",
242240
"UY": "উৰুগুৱে",
243241
"UZ": "উজবেকিস্তান",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Eritreya",
7373
"ES": "İspaniya",
7474
"ET": "Efiopiya",
75-
"EZ": "Avrozona",
7675
"FI": "Finlandiya",
7776
"FJ": "Fici",
7877
"FK": "Folklend adaları",
@@ -237,7 +236,6 @@
237236
"UA": "Ukrayna",
238237
"UG": "Uqanda",
239238
"UM": "ABŞ-a bağlı kiçik adacıqlar",
240-
"UN": "Birləşmiş Millətlər Təşkilatı",
241239
"US": "Amerika Birləşmiş Ştatları",
242240
"UY": "Uruqvay",
243241
"UZ": "Özbəkistan",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Эрытрэя",
7373
"ES": "Іспанія",
7474
"ET": "Эфіопія",
75-
"EZ": "Еўразона",
7675
"FI": "Фінляндыя",
7776
"FJ": "Фіджы",
7877
"FK": "Фалклендскія астравы",
@@ -237,7 +236,6 @@
237236
"UA": "Украіна",
238237
"UG": "Уганда",
239238
"UM": "Малыя Аддаленыя астравы ЗША",
240-
"UN": "ААН",
241239
"US": "Злучаныя Штаты Амерыкі",
242240
"UY": "Уругвай",
243241
"UZ": "Узбекістан",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Еритрея",
7373
"ES": "Испания",
7474
"ET": "Етиопия",
75-
"EZ": "Еврозона",
7675
"FI": "Финландия",
7776
"FJ": "Фиджи",
7877
"FK": "Фолклендски острови",
@@ -237,7 +236,6 @@
237236
"UA": "Украйна",
238237
"UG": "Уганда",
239238
"UM": "Отдалечени острови на САЩ",
240-
"UN": "Организация на обединените нации",
241239
"US": "Съединени щати",
242240
"UY": "Уругвай",
243241
"UZ": "Узбекистан",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "ইরিত্রিয়া",
7373
"ES": "স্পেন",
7474
"ET": "ইথিওপিয়া",
75-
"EZ": "ইউরোজোন",
7675
"FI": "ফিনল্যান্ড",
7776
"FJ": "ফিজি",
7877
"FK": "ফকল্যান্ড দ্বীপপুঞ্জ",
@@ -237,7 +236,6 @@
237236
"UA": "ইউক্রেন",
238237
"UG": "উগান্ডা",
239238
"UM": "যুক্তরাষ্ট্রের পার্শ্ববর্তী দ্বীপপুঞ্জ",
240-
"UN": "জাতিসংঘ",
241239
"US": "মার্কিন যুক্তরাষ্ট্র",
242240
"UY": "উরুগুয়ে",
243241
"UZ": "উজবেকিস্তান",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Eritrea",
7373
"ES": "Spagn",
7474
"ET": "Etiopia",
75-
"EZ": "takad an euro",
7675
"FI": "Finland",
7776
"FJ": "Fidji",
7877
"FK": "Inizi Falkland",
@@ -237,7 +236,6 @@
237236
"UA": "Ukraina",
238237
"UG": "Ouganda",
239238
"UM": "Inizi diabell ar Stadoù-Unanet",
240-
"UN": "Broadoù unanet",
241239
"US": "Stadoù-Unanet",
242240
"UY": "Uruguay",
243241
"UZ": "Ouzbekistan",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Eritreja",
7373
"ES": "Španija",
7474
"ET": "Etiopija",
75-
"EZ": "Eurozona",
7675
"FI": "Finska",
7776
"FJ": "Fidži",
7877
"FK": "Folklandska ostrva",
@@ -237,7 +236,6 @@
237236
"UA": "Ukrajina",
238237
"UG": "Uganda",
239238
"UM": "Američka Vanjska Ostrva",
240-
"UN": "Ujedinjene Nacije",
241239
"US": "Sjedinjene Američke Države",
242240
"UY": "Urugvaj",
243241
"UZ": "Uzbekistan",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Еритреја",
7373
"ES": "Шпанија",
7474
"ET": "Етиопија",
75-
"EZ": "Еурозона",
7675
"FI": "Финска",
7776
"FJ": "Фиџи",
7877
"FK": "Фокландска острва",
@@ -236,7 +235,6 @@
236235
"UA": "Украјина",
237236
"UG": "Уганда",
238237
"UM": "Мања удаљена острва САД",
239-
"UN": "Уједињене нације",
240238
"US": "Сједињене Америчке Државе",
241239
"UY": "Уругвај",
242240
"UZ": "Узбекистан",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Eritrea",
7373
"ES": "Espanya",
7474
"ET": "Etiòpia",
75-
"EZ": "zona euro",
7675
"FI": "Finlàndia",
7776
"FJ": "Fiji",
7877
"FK": "Illes Malvines",
@@ -237,7 +236,6 @@
237236
"UA": "Ucraïna",
238237
"UG": "Uganda",
239238
"UM": "Illes Perifèriques Menors dels EUA",
240-
"UN": "Nacions Unides",
241239
"US": "Estats Units",
242240
"UY": "Uruguai",
243241
"UZ": "Uzbekistan",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Эритрей",
7373
"ES": "Испани",
7474
"ET": "Эфиопи",
75-
"EZ": "еврозона",
7675
"FI": "Финлянди",
7776
"FJ": "Фиджи",
7877
"FK": "Фолклендан гӀайренаш",
@@ -237,7 +236,6 @@
237236
"UA": "Украина",
238237
"UG": "Уганда",
239238
"UM": "АЦШн арахьара кегийн гӀайренаш",
240-
"UN": "Вовшахкхетта Къаьмнийн Организаци",
241239
"US": "Цхьанатоьхна Штаташ",
242240
"UY": "Уругвай",
243241
"UZ": "Узбекистан",

src/Symfony/Component/Intl/Resources/data/regions/cs.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Eritrea",
7373
"ES": "Španělsko",
7474
"ET": "Etiopie",
75-
"EZ": "eurozóna",
7675
"FI": "Finsko",
7776
"FJ": "Fidži",
7877
"FK": "Falklandské ostrovy",
@@ -237,7 +236,6 @@
237236
"UA": "Ukrajina",
238237
"UG": "Uganda",
239238
"UM": "Menší odlehlé ostrovy USA",
240-
"UN": "Organizace spojených národů",
241239
"US": "Spojené státy",
242240
"UY": "Uruguay",
243241
"UZ": "Uzbekistán",

src/Symfony/Component/Intl/Resources/data/regions/cy.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Eritrea",
7373
"ES": "Sbaen",
7474
"ET": "Ethiopia",
75-
"EZ": "Ardal yr Ewro",
7675
"FI": "Y Ffindir",
7776
"FJ": "Fiji",
7877
"FK": "Ynysoedd y Falkland\/Malvinas",
@@ -237,7 +236,6 @@
237236
"UA": "Wcráin",
238237
"UG": "Uganda",
239238
"UM": "Ynysoedd Pellennig UDA",
240-
"UN": "y Cenhedloedd Unedig",
241239
"US": "Yr Unol Daleithiau",
242240
"UY": "Uruguay",
243241
"UZ": "Uzbekistan",

src/Symfony/Component/Intl/Resources/data/regions/da.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"ER": "Eritrea",
7373
"ES": "Spanien",
7474
"ET": "Etiopien",
75-
"EZ": "eurozonen",
7675
"FI": "Finland",
7776
"FJ": "Fiji",
7877
"FK": "Falklandsøerne",
@@ -237,7 +236,6 @@
237236
"UA": "Ukraine",
238237
"UG": "Uganda",
239238
"UM": "Amerikanske oversøiske øer",
240-
"UN": "De Forenede Nationer",
241239
"US": "USA",
242240
"UY": "Uruguay",
243241
"UZ": "Usbekistan",

0 commit comments

Comments
 (0)
0