diff --git a/CHANGELOG-6.0.md b/CHANGELOG-6.0.md
index 6afc9fc5e27b7..ee6636841aa4a 100644
--- a/CHANGELOG-6.0.md
+++ b/CHANGELOG-6.0.md
@@ -7,6 +7,25 @@ in 6.0 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v6.0.0...v6.0.1
+* 6.0.15 (2022-10-28)
+
+ * bug #47990 [HttpClient] Fix retrying requests when the content is used by the strategy (nicolas-grekas)
+ * bug #48005 [ErrorHandler] s//
(PhilETaylor)
+ * bug #47907 [Console] Update Application.php (aleksandr-shevchenko)
+ * bug #47955 [Security][Serializer] Add missing args to trigger_deprecation (alamirault)
+ * bug #47932 Throw LogicException instead of Error when trying to generate logout-… (addiks)
+ * bug #47918 [Intl] Update the ICU data to 72.1 - 5.4 (jderusse)
+ * bug #47857 [HttpKernel] Fix empty request stack when terminating with exception (krzyc)
+ * bug #47879 [HttpClient] Fix buffering after calling AsyncContext::passthru() (nicolas-grekas, lubo13)
+ * bug #47878 [HttpKernel] Remove EOL when using error_log() in HttpKernel Logger (cyve)
+ * bug #47883 [Console] Fix error output on windows cli (Maximilian.Beckers)
+ * bug #47884 [Cache] Reserve numeric keys when doing memory leak prevention (simoheinonen)
+ * bug #47863 [DoctrineBridge] Allow doctrine/event-manager 2 (derrabus)
+ * bug #47831 [Messenger] Fix amqp socket lost (GurvanVgx)
+ * bug #47855 [Routing] TypeError in Router when using UrlGenerator (Maximilian.Beckers)
+ * bug #47822 [Mailer] fix: use message object from event (rogamoore)
+ * bug #47858 [DoctrineBridge] Implement `EventManager::getAllListeners()` (derrabus)
+
* 6.0.14 (2022-10-12)
* bug #47621 [Serializer] Allow getting discriminated type by class name (TamasSzigeti)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index d652d3de50a5c..baf049c540d1d 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -90,21 +90,21 @@ The Symfony Connect username in parenthesis allows to get more information
- Florin Patan (florinpatan)
- Peter Rehm (rpet)
- Henrik Bjørnskov (henrikbjorn)
+ - David Buchmann (dbu)
- Konstantin Myakshin (koc)
- Andrej Hudec (pulzarraider)
- Julien Falque (julienfalque)
- Massimiliano Arione (garak)
- Douglas Greenshields (shieldo)
- - David Buchmann (dbu)
- Christian Raue
- Jáchym Toušek (enumag)
+ - Mathias Arlaud (mtarld)
- Graham Campbell (graham)
- Michel Weimerskirch (mweimerskirch)
- Eric Clemmons (ericclemmons)
- Issei Murasawa (issei_m)
- Fran Moreno (franmomu)
- Malte Schlüter (maltemaltesich)
- - Mathias Arlaud (mtarld)
- Vasilij Dusko
- Denis (yethee)
- Arnout Boks (aboks)
@@ -122,12 +122,12 @@ The Symfony Connect username in parenthesis allows to get more information
- Lee McDermott
- Brandon Turner
- Luis Cordova (cordoval)
+ - Antoine Lamirault
- Daniel Holmes (dholmes)
- Toni Uebernickel (havvg)
- Bart van den Burg (burgov)
- Jordan Alliot (jalliot)
- Smaine Milianni (ismail1432)
- - Antoine Lamirault
- John Wards (johnwards)
- Dariusz Ruminski
- Lars Strojny (lstrojny)
@@ -210,6 +210,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Martin Hujer (martinhujer)
- Wouter J
- Guilliam Xavier
+ - Antonio Pauletich (x-coder264)
- Timo Bakx (timobakx)
- Juti Noppornpitak (shiroyuki)
- Joe Bennett (kralos)
@@ -226,7 +227,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Arnaud Kleinpeter (nanocom)
- Guilherme Blanco (guilhermeblanco)
- Chi-teck
- - Antonio Pauletich (x-coder264)
- Michael Voříšek
- SpacePossum
- Pablo Godel (pgodel)
@@ -479,6 +479,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Quynh Xuan Nguyen (seriquynh)
- Ray
- Philipp Cordes (corphi)
+ - Andrii Dembitskyi
- Chekote
- bhavin (bhavin4u)
- Pavel Popov (metaer)
@@ -575,7 +576,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Adrian Rudnik (kreischweide)
- Pavel Batanov (scaytrase)
- Francesc Rosàs (frosas)
- - Andrii Dembitskyi
- Bongiraud Dominique
- janschoenherr
- Marko Kaznovac (kaznovac)
@@ -642,6 +642,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Vitaliy Zakharov (zakharovvi)
- Tobias Sjösten (tobiassjosten)
- Gyula Sallai (salla)
+ - Stefan Gehrig (sgehrig)
- Benjamin Cremer (bcremer)
- rtek
- Inal DJAFAR (inalgnu)
@@ -870,7 +871,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Dirk Pahl (dirkaholic)
- Cédric Lombardot (cedriclombardot)
- Jonas Flodén (flojon)
- - Stefan Gehrig (sgehrig)
- Adrien Lucas (adrienlucas)
- Dominik Zogg
- Kai Dederichs
@@ -1037,6 +1037,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Quentin Dequippe (qdequippe)
- Yewhen Khoptynskyi (khoptynskyi)
- Jérôme Nadaud (jnadaud)
+ - wuchen90
- Alexandre Tranchant (alexandre_t)
- Anthony Moutte
- shreyadenny
@@ -1050,6 +1051,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Grégoire Hébert (gregoirehebert)
- alcaeus
- Fred Cox
+ - Matheo Daninos (mathdns)
- Iliya Miroslavov Iliev (i.miroslavov)
- Safonov Nikita (ns3777k)
- Simon DELICATA
@@ -1975,7 +1977,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Kirill Nesmeyanov (serafim)
- Reece Fowell (reecefowell)
- Guillaume Gammelin
- - wuchen90
- Valérian Galliat
- d-ph
- Renan Taranto (renan-taranto)
@@ -2051,6 +2052,7 @@ The Symfony Connect username in parenthesis allows to get more information
- boite
- Silvio Ginter
- MGDSoft
+ - joris
- Vadim Tyukov (vatson)
- David Wolter (davewww)
- Sortex
@@ -2099,6 +2101,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Thomas
- Norbert Schultheisz
- Maximilian Berghoff (electricmaxxx)
+ - SOEDJEDE Felix (fsoedjede)
- Piotr Antosik (antek88)
- Nacho Martin (nacmartin)
- Sergey Novikov (s12v)
@@ -2225,6 +2228,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Nicolas Fabre (nfabre)
- Raul Rodriguez (raul782)
- mshavliuk
+ - Jesper Skytte
- MightyBranch
- Kacper Gunia (cakper)
- Derek Lambert (dlambert)
@@ -2413,6 +2417,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Daniel González Zaballos (dem3trio)
- Emmanuel Vella (emmanuel.vella)
- Guillaume BRETOU (guiguiboy)
+ - Ibon Conesa (ibonkonesa)
- nuryagdy mustapayev (nueron)
- Carsten Nielsen (phreaknerd)
- Jay Severson
@@ -2598,6 +2603,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Andrew Coulton
- Ulugbek Miniyarov
- Jeremy Benoist
+ - sdrewergutland
- Michal Gebauer
- Phil Davis
- Gleb Sidora
@@ -2635,6 +2641,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Mike Francis
- Nil Borodulia
- Almog Baku (almogbaku)
+ - Benjamin Schultz (bschultz)
- Gerd Christian Kunze (derdu)
- Ionel Scutelnicu (ionelscutelnicu)
- Kamil Madejski (kmadejski)
@@ -2801,6 +2808,7 @@ The Symfony Connect username in parenthesis allows to get more information
- David Christmann
- root
- pf
+ - Zoli Konta
- Vincent Chalnot
- Patrizio Bekerle
- Tom Maguire
@@ -2917,7 +2925,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Kevin Verschaeve (keversc)
- Kevin Herrera (kherge)
- Luis Ramón López López (lrlopez)
- - Matheo Daninos (mathdns)
- Mehdi Mabrouk (mehdidev)
- Bart Reunes (metalarend)
- Muriel (metalmumu)
@@ -2936,6 +2943,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Lajos Veres (vlajos)
- Vladimir Chernyshev (volch)
- Yorkie Chadwick (yorkie76)
+ - Pavel Barton
- GuillaumeVerdon
- ureimers
- akimsko
@@ -3203,6 +3211,7 @@ The Symfony Connect username in parenthesis allows to get more information
- emilienbouard (neime)
- Nicholas Byfleet (nickbyfleet)
- Nicolas Bondoux (nsbx)
+ - Cedric Kastner (nurtext)
- ollie harridge (ollietb)
- Pawel Szczepanek (pauluz)
- Philippe Degeeter (pdegeeter)
diff --git a/composer.json b/composer.json
index 5bd56865240b1..fbf13863ca55c 100644
--- a/composer.json
+++ b/composer.json
@@ -36,7 +36,7 @@
"composer-runtime-api": ">=2.1",
"ext-xml": "*",
"friendsofphp/proxy-manager-lts": "^1.0.2",
- "doctrine/event-manager": "~1.0",
+ "doctrine/event-manager": "^1|^2",
"doctrine/persistence": "^2|^3",
"twig/twig": "^2.13|^3.0.4",
"psr/cache": "^2.0|^3.0",
diff --git a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php
index 0b979dbea3d47..bc9f9adbec8ae 100644
--- a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php
+++ b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php
@@ -74,15 +74,23 @@ public function dispatchEvent($eventName, EventArgs $eventArgs = null): void
*/
public function getListeners($event = null): array
{
+ if (null === $event) {
+ return $this->getAllListeners();
+ }
if (!$this->initializedSubscribers) {
$this->initializeSubscribers();
}
- if (null !== $event) {
- if (!isset($this->initialized[$event])) {
- $this->initializeListeners($event);
- }
+ if (!isset($this->initialized[$event])) {
+ $this->initializeListeners($event);
+ }
- return $this->listeners[$event];
+ return $this->listeners[$event];
+ }
+
+ public function getAllListeners(): array
+ {
+ if (!$this->initializedSubscribers) {
+ $this->initializeSubscribers();
}
foreach ($this->listeners as $event => $listeners) {
diff --git a/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php b/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php
index 1631fa8ae37e7..9d86eeed54ef1 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php
@@ -180,6 +180,15 @@ public function testGetListeners()
$this->assertSame([$listener1, $listener2], array_values($this->evm->getListeners()['foo']));
}
+ public function testGetAllListeners()
+ {
+ $this->container->set('lazy', $listener1 = new MyListener());
+ $this->evm->addEventListener('foo', 'lazy');
+ $this->evm->addEventListener('foo', $listener2 = new MyListener());
+
+ $this->assertSame([$listener1, $listener2], array_values($this->evm->getAllListeners()['foo']));
+ }
+
public function testRemoveEventListener()
{
$this->container->set('lazy', $listener1 = new MyListener());
diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json
index c146cadf72d54..9b6bbbe659a12 100644
--- a/src/Symfony/Bridge/Doctrine/composer.json
+++ b/src/Symfony/Bridge/Doctrine/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=8.0.2",
- "doctrine/event-manager": "~1.0",
+ "doctrine/event-manager": "^1|^2",
"doctrine/persistence": "^2|^3",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-ctype": "~1.8",
diff --git a/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php b/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php
index c80177c5d39c0..b591b986fc51c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php
+++ b/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php
@@ -119,7 +119,7 @@ public function loginUser(object $user, string $firewallContext = 'main'): stati
}
$token = new TestBrowserToken($user->getRoles(), $user, $firewallContext);
- // required for compatibilty with Symfony 5.4
+ // required for compatibility with Symfony 5.4
if (method_exists($token, 'isAuthenticated')) {
$token->setAuthenticated(true, false);
}
diff --git a/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php
index df524c3a4e5e5..74515927915db 100644
--- a/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php
+++ b/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php
@@ -203,7 +203,7 @@ protected function doInvalidate(array $tagIds): bool
// and removes the linked items. When the set is still not empty after
// the scan, it means we're in cluster mode and that the linked items
// are on other nodes: we move the links to a temporary set and we
- // gargage collect that set from the client side.
+ // garbage collect that set from the client side.
$lua = <<<'EOLUA'
redis.replicate_commands()
diff --git a/src/Symfony/Component/Cache/Marshaller/TagAwareMarshaller.php b/src/Symfony/Component/Cache/Marshaller/TagAwareMarshaller.php
index 6a21a1ab9505a..d32c9946e70f8 100644
--- a/src/Symfony/Component/Cache/Marshaller/TagAwareMarshaller.php
+++ b/src/Symfony/Component/Cache/Marshaller/TagAwareMarshaller.php
@@ -51,7 +51,7 @@ public function marshall(array $values, ?array &$failed): array
$serialized[$id][9] = "\x5F";
}
} else {
- // other arbitratry values are serialized using the decorated marshaller below
+ // other arbitrary values are serialized using the decorated marshaller below
$notSerialized[$id] = $value;
}
}
diff --git a/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php b/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php
index 300125354d99e..baffec7ef3cda 100644
--- a/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php
+++ b/src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php
@@ -341,6 +341,19 @@ public function testNullByteInKey()
$this->assertSame(123, $cache->getItem("a\0b")->get());
}
+
+ public function testNumericKeysWorkAfterMemoryLeakPrevention()
+ {
+ $cache = $this->createCachePool(0, __FUNCTION__);
+
+ for ($i = 0; $i < 1001; ++$i) {
+ $cacheItem = $cache->getItem((string) $i);
+ $cacheItem->set('value-'.$i);
+ $cache->save($cacheItem);
+ }
+
+ $this->assertEquals('value-50', $cache->getItem((string) 50)->get());
+ }
}
class NotUnserializable
diff --git a/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php b/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php
index 171016fcb189c..749217c6a52f6 100644
--- a/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php
+++ b/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php
@@ -373,7 +373,7 @@ private function getId(mixed $key)
$this->ids[$key] = $key;
if (\count($this->ids) > 1000) {
- array_splice($this->ids, 0, 500); // stop memory leak if there are many keys
+ $this->ids = \array_slice($this->ids, 500, null, true); // stop memory leak if there are many keys
}
if (null === $this->maxIdLength) {
diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php
index c388427b70d8d..9d5eedb68b982 100644
--- a/src/Symfony/Component/Console/Application.php
+++ b/src/Symfony/Component/Console/Application.php
@@ -276,7 +276,9 @@ public function doRun(InputInterface $input, OutputInterface $output)
$alternative = $alternatives[0];
$style = new SymfonyStyle($input, $output);
- $style->block(sprintf("\nCommand \"%s\" is not defined.\n", $name), null, 'error');
+ $output->writeln('');
+ $formattedBlock = (new FormatterHelper())->formatBlock(sprintf('Command "%s" is not defined.', $name), 'error', true);
+ $output->writeln($formattedBlock);
if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) {
if (null !== $this->dispatcher) {
$event = new ConsoleErrorEvent($input, $output, $e);
@@ -907,11 +909,21 @@ protected function configureIO(InputInterface $input, OutputInterface $output)
}
switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) {
- case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break;
- case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break;
- case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break;
- case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break;
- default: $shellVerbosity = 0; break;
+ case -1:
+ $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
+ break;
+ case 1:
+ $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
+ break;
+ case 2:
+ $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
+ break;
+ case 3:
+ $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
+ break;
+ default:
+ $shellVerbosity = 0;
+ break;
}
if (true === $input->hasParameterOption(['--quiet', '-q'], true)) {
diff --git a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php
index 466c04644eb27..3db15b8fb1595 100644
--- a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php
+++ b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php
@@ -46,7 +46,7 @@ public function add(FormField $field)
}
/**
- * Removes a field based on the fully qualifed name and its children from the registry.
+ * Removes a field based on the fully qualified name and its children from the registry.
*/
public function remove(string $name)
{
@@ -63,7 +63,7 @@ public function remove(string $name)
}
/**
- * Returns the value of the field based on the fully qualifed name and its children.
+ * Returns the value of the field based on the fully qualified name and its children.
*
* @return FormField|FormField[]|FormField[][]
*
diff --git a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTest.php
index 6e408626cab8e..737d682207628 100644
--- a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTest.php
@@ -1062,8 +1062,6 @@ public function testChildren()
$this->assertTrue(true, '->children() does not trigger a notice if the node has no children');
} catch (\PHPUnit\Framework\Error\Notice $e) {
$this->fail('->children() does not trigger a notice if the node has no children');
- } catch (\PHPUnit\Framework\Error\Notice $e) {
- $this->fail('->children() does not trigger a notice if the node has no children');
}
}
diff --git a/src/Symfony/Component/ErrorHandler/Resources/views/traces.html.php b/src/Symfony/Component/ErrorHandler/Resources/views/traces.html.php
index f64d917138258..4eef59a6c6a35 100644
--- a/src/Symfony/Component/ErrorHandler/Resources/views/traces.html.php
+++ b/src/Symfony/Component/ErrorHandler/Resources/views/traces.html.php
@@ -12,7 +12,7 @@
$class = substr($exception['class'], $separator);
?>
-
+