Skip to content

Commit 09f5778

Browse files
Merge branch '6.2' into 6.3
* 6.2: [Security] Allow custom scheme to be used as redirection URIs [Validator] Do not mock metadata factory on debug command tests [HttpKernel][WebProfilerBundle] Fix search feature update Intl component to take into account B-variant when converting Alpha3 to Alpha2. fixing issue with Darwin. [VarDumper] Fix dumping `ArrayObject` with `DumpDataCollector` [VarDumper] Add tests to demonstrate a bug when dumping ArrayObject with full stack fmk [DebugBundle][FrameworkBundle] Fix using the framework without the Console component [FrameworkBundle] Add missing monolog channel tag to the `messenger:failed:retry` command fetch all known ChoiceType values at once [RateLimiter] fix incorrect retryAfter of FixedWindow Fix Finder phpdoc
2 parents 8cbe646 + e267665 commit 09f5778

File tree

23 files changed

+316
-169
lines changed

23 files changed

+316
-169
lines changed

src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Bridge\Monolog\Command\ServerLogCommand;
1515
use Symfony\Bundle\DebugBundle\Command\ServerDumpPlaceholderCommand;
1616
use Symfony\Component\Config\FileLocator;
17+
use Symfony\Component\Console\Command\Command;
1718
use Symfony\Component\DependencyInjection\ContainerBuilder;
1819
use Symfony\Component\DependencyInjection\Extension\Extension;
1920
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
@@ -92,7 +93,7 @@ public function load(array $configs, ContainerBuilder $container)
9293
;
9394
}
9495

95-
if (!class_exists(ServerLogCommand::class)) {
96+
if (!class_exists(Command::class) || !class_exists(ServerLogCommand::class)) {
9697
$container->removeDefinition('monolog.command.server_log');
9798
}
9899
}

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,12 +2289,14 @@ private function registerMessengerConfiguration(array $config, ContainerBuilder
22892289
}
22902290

22912291
if (\count($failureTransports) > 0) {
2292-
$container->getDefinition('console.command.messenger_failed_messages_retry')
2293-
->replaceArgument(0, $config['failure_transport']);
2294-
$container->getDefinition('console.command.messenger_failed_messages_show')
2295-
->replaceArgument(0, $config['failure_transport']);
2296-
$container->getDefinition('console.command.messenger_failed_messages_remove')
2297-
->replaceArgument(0, $config['failure_transport']);
2292+
if ($this->hasConsole()) {
2293+
$container->getDefinition('console.command.messenger_failed_messages_retry')
2294+
->replaceArgument(0, $config['failure_transport']);
2295+
$container->getDefinition('console.command.messenger_failed_messages_show')
2296+
->replaceArgument(0, $config['failure_transport']);
2297+
$container->getDefinition('console.command.messenger_failed_messages_remove')
2298+
->replaceArgument(0, $config['failure_transport']);
2299+
}
22982300

22992301
$failureTransportsByTransportNameServiceLocator = ServiceLocatorTagPass::register($container, $failureTransportReferencesByTransportName);
23002302
$container->getDefinition('messenger.failure.send_failed_message_to_failure_transport_listener')

src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,11 @@
192192
abstract_arg('Receivers'),
193193
service('messenger.routable_message_bus'),
194194
service('event_dispatcher'),
195-
service('logger'),
195+
service('logger')->nullOnInvalid(),
196196
service('messenger.transport.native_php_serializer')->nullOnInvalid(),
197197
])
198198
->tag('console.command')
199+
->tag('monolog.logger', ['channel' => 'messenger'])
199200

200201
->set('console.command.messenger_failed_messages_show', FailedMessagesShowCommand::class)
201202
->args([

src/Symfony/Component/Finder/Finder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ public function date(string|array $dates): static
162162
*
163163
* You can use patterns (delimited with / sign), globs or simple strings.
164164
*
165-
* $finder->name('*.php')
166-
* $finder->name('/\.php$/') // same as above
165+
* $finder->name('/\.php$/')
166+
* $finder->name('*.php') // same as above, without dot files
167167
* $finder->name('test.php')
168168
* $finder->name(['test.py', 'test.php'])
169169
*

src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
147147
}
148148
}
149149
} else {
150-
foreach ($choiceList->getChoicesForValues($data) as $index => $choice) {
151-
$value = $data[$index];
152-
$knownValues[] = $value;
153-
unset($unknownValues[$value]);
150+
foreach ($choiceList->getChoicesForValues($data) as $key => $choice) {
151+
$knownValues[] = $data[$key];
152+
unset($unknownValues[$data[$key]]);
154153
}
155154
}
156155

src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ public function find(?string $ip, ?string $url, ?int $limit, ?string $method, in
5656
$result = [];
5757
while (\count($result) < $limit && $line = $this->readLineFromFile($file)) {
5858
$values = str_getcsv($line);
59+
60+
if (7 !== \count($values)) {
61+
// skip invalid lines
62+
continue;
63+
}
64+
5965
[$csvToken, $csvIp, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode] = $values;
6066
$csvTime = (int) $csvTime;
6167

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private function generateAlpha3ToAlpha2Mapping(ArrayAccessibleResourceBundle $me
223223

224224
foreach ($metadataBundle['alias']['language'] as $alias => $data) {
225225
$language = $data['replacement'];
226-
if (2 === \strlen($language) && 3 === \strlen($alias) && 'overlong' === $data['reason']) {
226+
if (2 === \strlen($language) && 3 === \strlen($alias) && \in_array($data['reason'], ['overlong', 'bibliographic'], true)) {
227227
$alpha3ToAlpha2[$alias] = $language;
228228
}
229229
}

src/Symfony/Component/Intl/Resources/bin/update-data.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@
158158
}
159159

160160
$genrb = $buildDir.'/bin/genrb';
161-
$genrbEnv = 'LD_LIBRARY_PATH='.$buildDir.'/lib ';
161+
if (\PHP_OS === 'Darwin') {
162+
$genrbEnv = 'DYLD_LIBRARY_PATH='.$buildDir.'/lib ';
163+
} else {
164+
$genrbEnv = 'LD_LIBRARY_PATH='.$buildDir.'/lib ';
165+
}
162166

163167
echo "Using $genrb.\n";
164168

src/Symfony/Component/Intl/Resources/data/languages/meta.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,7 @@
14831483
'bam' => 'bm',
14841484
'ben' => 'bn',
14851485
'bod' => 'bo',
1486+
'tib' => 'bo',
14861487
'bre' => 'br',
14871488
'bos' => 'bs',
14881489
'cat' => 'ca',
@@ -1491,26 +1492,33 @@
14911492
'cos' => 'co',
14921493
'cre' => 'cr',
14931494
'ces' => 'cs',
1495+
'cze' => 'cs',
14941496
'chu' => 'cu',
14951497
'chv' => 'cv',
14961498
'cym' => 'cy',
1499+
'wel' => 'cy',
14971500
'dan' => 'da',
14981501
'deu' => 'de',
1502+
'ger' => 'de',
14991503
'div' => 'dv',
15001504
'dzo' => 'dz',
15011505
'ewe' => 'ee',
15021506
'ell' => 'el',
1507+
'gre' => 'el',
15031508
'eng' => 'en',
15041509
'epo' => 'eo',
15051510
'spa' => 'es',
15061511
'est' => 'et',
1512+
'baq' => 'eu',
15071513
'eus' => 'eu',
15081514
'fas' => 'fa',
1515+
'per' => 'fa',
15091516
'ful' => 'ff',
15101517
'fin' => 'fi',
15111518
'fij' => 'fj',
15121519
'fao' => 'fo',
15131520
'fra' => 'fr',
1521+
'fre' => 'fr',
15141522
'fry' => 'fy',
15151523
'gle' => 'ga',
15161524
'gla' => 'gd',
@@ -1525,6 +1533,7 @@
15251533
'hrv' => 'hr',
15261534
'hat' => 'ht',
15271535
'hun' => 'hu',
1536+
'arm' => 'hy',
15281537
'hye' => 'hy',
15291538
'her' => 'hz',
15301539
'ina' => 'ia',
@@ -1534,11 +1543,13 @@
15341543
'iii' => 'ii',
15351544
'ipk' => 'ik',
15361545
'ido' => 'io',
1546+
'ice' => 'is',
15371547
'isl' => 'is',
15381548
'ita' => 'it',
15391549
'iku' => 'iu',
15401550
'jpn' => 'ja',
15411551
'jav' => 'jv',
1552+
'geo' => 'ka',
15421553
'kat' => 'ka',
15431554
'kon' => 'kg',
15441555
'kik' => 'ki',
@@ -1565,19 +1576,24 @@
15651576
'lav' => 'lv',
15661577
'mlg' => 'mg',
15671578
'mah' => 'mh',
1579+
'mao' => 'mi',
15681580
'mri' => 'mi',
1581+
'mac' => 'mk',
15691582
'mkd' => 'mk',
15701583
'mal' => 'ml',
15711584
'mon' => 'mn',
15721585
'mar' => 'mr',
1586+
'may' => 'ms',
15731587
'msa' => 'ms',
15741588
'mlt' => 'mt',
1589+
'bur' => 'my',
15751590
'mya' => 'my',
15761591
'nau' => 'na',
15771592
'nob' => 'nb',
15781593
'nde' => 'nd',
15791594
'nep' => 'ne',
15801595
'ndo' => 'ng',
1596+
'dut' => 'nl',
15811597
'nld' => 'nl',
15821598
'nno' => 'nn',
15831599
'nor' => 'no',
@@ -1599,6 +1615,7 @@
15991615
'run' => 'rn',
16001616
'mol' => 'ro',
16011617
'ron' => 'ro',
1618+
'rum' => 'ro',
16021619
'rus' => 'ru',
16031620
'kin' => 'rw',
16041621
'san' => 'sa',
@@ -1608,10 +1625,12 @@
16081625
'sag' => 'sg',
16091626
'sin' => 'si',
16101627
'slk' => 'sk',
1628+
'slo' => 'sk',
16111629
'slv' => 'sl',
16121630
'smo' => 'sm',
16131631
'sna' => 'sn',
16141632
'som' => 'so',
1633+
'alb' => 'sq',
16151634
'sqi' => 'sq',
16161635
'srp' => 'sr',
16171636
'ssw' => 'ss',
@@ -1644,6 +1663,7 @@
16441663
'yid' => 'yi',
16451664
'yor' => 'yo',
16461665
'zha' => 'za',
1666+
'chi' => 'zh',
16471667
'zho' => 'zh',
16481668
'zul' => 'zu',
16491669
],

src/Symfony/Component/Intl/Tests/LanguagesTest.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,7 @@ class LanguagesTest extends ResourceBundleTestCase
15061506
'bam' => 'bm',
15071507
'ben' => 'bn',
15081508
'bod' => 'bo',
1509+
'tib' => 'bo',
15091510
'bre' => 'br',
15101511
'bos' => 'bs',
15111512
'cat' => 'ca',
@@ -1514,26 +1515,33 @@ class LanguagesTest extends ResourceBundleTestCase
15141515
'cos' => 'co',
15151516
'cre' => 'cr',
15161517
'ces' => 'cs',
1518+
'cze' => 'cs',
15171519
'chu' => 'cu',
15181520
'chv' => 'cv',
15191521
'cym' => 'cy',
1522+
'wel' => 'cy',
15201523
'dan' => 'da',
15211524
'deu' => 'de',
1525+
'ger' => 'de',
15221526
'div' => 'dv',
15231527
'dzo' => 'dz',
15241528
'ewe' => 'ee',
15251529
'ell' => 'el',
1530+
'gre' => 'el',
15261531
'eng' => 'en',
15271532
'epo' => 'eo',
15281533
'spa' => 'es',
15291534
'est' => 'et',
1535+
'baq' => 'eu',
15301536
'eus' => 'eu',
15311537
'fas' => 'fa',
1538+
'per' => 'fa',
15321539
'ful' => 'ff',
15331540
'fin' => 'fi',
15341541
'fij' => 'fj',
15351542
'fao' => 'fo',
15361543
'fra' => 'fr',
1544+
'fre' => 'fr',
15371545
'fry' => 'fy',
15381546
'gle' => 'ga',
15391547
'gla' => 'gd',
@@ -1548,6 +1556,7 @@ class LanguagesTest extends ResourceBundleTestCase
15481556
'hrv' => 'hr',
15491557
'hat' => 'ht',
15501558
'hun' => 'hu',
1559+
'arm' => 'hy',
15511560
'hye' => 'hy',
15521561
'her' => 'hz',
15531562
'ina' => 'ia',
@@ -1557,11 +1566,13 @@ class LanguagesTest extends ResourceBundleTestCase
15571566
'iii' => 'ii',
15581567
'ipk' => 'ik',
15591568
'ido' => 'io',
1569+
'ice' => 'is',
15601570
'isl' => 'is',
15611571
'ita' => 'it',
15621572
'iku' => 'iu',
15631573
'jpn' => 'ja',
15641574
'jav' => 'jv',
1575+
'geo' => 'ka',
15651576
'kat' => 'ka',
15661577
'kon' => 'kg',
15671578
'kik' => 'ki',
@@ -1588,22 +1599,27 @@ class LanguagesTest extends ResourceBundleTestCase
15881599
'lav' => 'lv',
15891600
'mlg' => 'mg',
15901601
'mah' => 'mh',
1602+
'mao' => 'mi',
15911603
'mri' => 'mi',
1604+
'mac' => 'mk',
15921605
'mkd' => 'mk',
15931606
'mal' => 'ml',
15941607
'mon' => 'mn',
15951608
'mar' => 'mr',
1609+
'may' => 'ms',
15961610
'msa' => 'ms',
15971611
'mlt' => 'mt',
1612+
'bur' => 'my',
15981613
'mya' => 'my',
15991614
'nau' => 'na',
16001615
'nob' => 'nb',
1601-
'nor' => 'no',
16021616
'nde' => 'nd',
16031617
'nep' => 'ne',
16041618
'ndo' => 'ng',
1619+
'dut' => 'nl',
16051620
'nld' => 'nl',
16061621
'nno' => 'nn',
1622+
'nor' => 'no',
16071623
'nbl' => 'nr',
16081624
'nav' => 'nv',
16091625
'nya' => 'ny',
@@ -1622,6 +1638,7 @@ class LanguagesTest extends ResourceBundleTestCase
16221638
'run' => 'rn',
16231639
'mol' => 'ro',
16241640
'ron' => 'ro',
1641+
'rum' => 'ro',
16251642
'rus' => 'ru',
16261643
'kin' => 'rw',
16271644
'san' => 'sa',
@@ -1631,10 +1648,12 @@ class LanguagesTest extends ResourceBundleTestCase
16311648
'sag' => 'sg',
16321649
'sin' => 'si',
16331650
'slk' => 'sk',
1651+
'slo' => 'sk',
16341652
'slv' => 'sl',
16351653
'smo' => 'sm',
16361654
'sna' => 'sn',
16371655
'som' => 'so',
1656+
'alb' => 'sq',
16381657
'sqi' => 'sq',
16391658
'srp' => 'sr',
16401659
'ssw' => 'ss',
@@ -1667,6 +1686,7 @@ class LanguagesTest extends ResourceBundleTestCase
16671686
'yid' => 'yi',
16681687
'yor' => 'yo',
16691688
'zha' => 'za',
1689+
'chi' => 'zh',
16701690
'zho' => 'zh',
16711691
'zul' => 'zu',
16721692
];

0 commit comments

Comments
 (0)