From a10652422998fceb17ad390d36a418509cb9eba3 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 29 Nov 2023 11:08:20 +0100 Subject: [PATCH 01/16] Update CHANGELOG for 5.4.32 --- CHANGELOG-5.4.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/CHANGELOG-5.4.md b/CHANGELOG-5.4.md index d3f4945eb5436..ef84b0a355fcf 100644 --- a/CHANGELOG-5.4.md +++ b/CHANGELOG-5.4.md @@ -7,6 +7,32 @@ in 5.4 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/v5.4.0...v5.4.1 +* 5.4.32 (2023-11-29) + + * bug #52786 [Serializer] Revert allowed attributes fix (mtarld) + * bug #52780 [DependencyInjection] don't check parameter values if they are not set (xabbuh) + * bug #52767 [Serializer] Fix normalization relying on allowed attributes only (mtarld) + * bug #52727 [String] Fix Inflector for 'icon' (podhy) + * bug #52677 [Translation] [Lokalise] Fix language format on Lokalise Provider (welcoMattic) + * bug #52715 [Cache] fix detecting the database server version (xabbuh) + * bug #52688 [Cache] Add url decoding of password in `RedisTrait` DSN (alexandre-daubois) + * bug #52172 [Serializer] Fix denormalizing empty string into `object|null` parameter (Jeroeny) + * bug #52681 [Serializer] Fix support for DiscriminatorMap in PropertyNormalizer (mtarld) + * bug #52680 [Serializer] Fix access to private properties/getters when using the ``@Ignore`` annotation (mtarld) + * bug #52713 [Serializer] Fix deserialization_path missing using contructor (mtarld) + * bug #52683 [Serializer] Fix constructor deserialization path (mtarld) + * bug #52707 [HttpKernel] Fix logging deprecations to the "php" channel when channel "deprecation" is not defined (nicolas-grekas) + * bug #52589 [Serializer] Fix XML attributes not added on empty node (mtarld) + * bug #52686 [Cache] fix detecting the server version with Doctrine DBAL 4 (xabbuh) + * bug #52459 [Cache][HttpFoundation][Lock] Fix PDO store not creating table + add tests (HypeMC) + * bug #52626 [Serializer] Fix denormalizing date intervals having both weeks and days (oneNevan) + * bug #52578 [Serializer] Fix denormalize constructor arguments (mtarld) + * bug #52526 Add some more non-countable English nouns (paullallier) + * bug #52631 [DomCrawler] Revert "bug #52579 UriResolver support path with colons" (lyrixx) + * bug #52618 [VarExporter] Fix handling mangled property names returned by __sleep() (nicolas-grekas) + * bug #52579 [DomCrawler] UriResolver support path with colons (vdauchy) + * bug #52581 [Messenger] attach all required parameters to query (xabbuh) + * 5.4.31 (2023-11-10) * security #cve-2023-46734 [TwigBridge] Ensure CodeExtension's filters properly escape their input (nicolas-grekas, GromNaN) From 6ddbbda4e4c72b5e05d1384b68e3ef185fe56725 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 29 Nov 2023 11:08:30 +0100 Subject: [PATCH 02/16] Update CONTRIBUTORS for 5.4.32 --- CONTRIBUTORS.md | 72 ++++++++++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index b7f58c00c8501..ce074d555f730 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,45 +6,45 @@ Symfony is the result of the work of many people who made the code better. The Symfony Connect username in parenthesis allows to get more information - Fabien Potencier (fabpot) - Nicolas Grekas (nicolas-grekas) - - Christian Flothmann (xabbuh) - Alexander M. Turek (derrabus) + - Christian Flothmann (xabbuh) - Bernhard Schussek (bschussek) - Robin Chalas (chalas_r) - Tobias Schultze (tobion) - Grégoire Pineau (lyrixx) - Thomas Calvet (fancyweb) - Christophe Coevoet (stof) - - Jordi Boggiano (seldaek) - Wouter de Jong (wouterj) + - Jordi Boggiano (seldaek) - Maxime Steinhausser (ogizanagi) - Kévin Dunglas (dunglas) - Victor Berchet (victor) - Ryan Weaver (weaverryan) - - Jérémy DERUSSÉ (jderusse) + - Alexandre Daubois (alexandre-daubois) - Javier Eguiluz (javier.eguiluz) + - Jérémy DERUSSÉ (jderusse) - Roland Franssen + - Jules Pietri (heah) - Johannes S (johannes) - Kris Wallsmith (kriswallsmith) - Jakub Zalas (jakubzalas) - - Alexandre Daubois (alexandre-daubois) - - Jules Pietri (heah) - Oskar Stark (oskarstark) - Yonel Ceruto (yonelceruto) - Hugo Hamon (hhamon) - Tobias Nyholm (tobias) - Samuel ROZE (sroze) - Pascal Borreli (pborreli) + - Jérôme Tamarelle (gromnan) - Romain Neutron + - Antoine Lamirault (alamirault) - Joseph Bielawski (stloyd) - Drak (drak) - Abdellatif Ait boudad (aitboudad) - - Jérôme Tamarelle (gromnan) - Lukas Kahwe Smith (lsmith) - - Antoine Lamirault (alamirault) - - Hamza Amrouche (simperfit) - Kevin Bond (kbond) - - Martin Hasoň (hason) - HypeMC (hypemc) + - Hamza Amrouche (simperfit) + - Martin Hasoň (hason) - Jeremy Mikola (jmikola) - Jean-François Simon (jfsimon) - Benjamin Eberlei (beberlei) @@ -72,26 +72,27 @@ The Symfony Connect username in parenthesis allows to get more information - Bulat Shakirzyanov (avalanche123) - Iltar van der Berg - Miha Vrhovnik (mvrhov) + - Gary PEGEOT (gary-p) - Saša Stamenković (umpirsky) + - Vincent Langlet (deviling) + - Allison Guilhem (a_guilhem) - Mathieu Piot (mpiot) - Alexander Schranz (alexander-schranz) - Vasilij Duško (staff) - - Vincent Langlet (deviling) + - Mathieu Santostefano (welcomattic) - Sarah Khalil (saro0h) - Laurent VOULLEMIER (lvo) - Konstantin Kudryashov (everzet) - Guilhem N (guilhemn) - Bilal Amarni (bamarni) - Eriksen Costa - - Gary PEGEOT (gary-p) - - Mathieu Santostefano (welcomattic) - Florin Patan (florinpatan) - Vladimir Reznichenko (kalessil) - Peter Rehm (rpet) - Henrik Bjørnskov (henrikbjorn) - - Allison Guilhem (a_guilhem) - Andrej Hudec (pulzarraider) - Jáchym Toušek (enumag) + - Mathias Arlaud (mtarld) - David Buchmann (dbu) - Dariusz Ruminski - Christian Raue @@ -103,6 +104,8 @@ The Symfony Connect username in parenthesis allows to get more information - Alex Pott - Fran Moreno (franmomu) - Arnout Boks (aboks) + - Frank A. Fiebig (fafiebig) + - Baldini - Charles Sarrazin (csarrazi) - Ruud Kamphuis (ruudk) - Henrik Westphal (snc) @@ -114,7 +117,6 @@ The Symfony Connect username in parenthesis allows to get more information - Brandon Turner - Luis Cordova (cordoval) - Antoine Makdessi (amakdessi) - - Mathias Arlaud (mtarld) - Konstantin Myakshin (koc) - Daniel Holmes (dholmes) - Julien Falque (julienfalque) @@ -134,14 +136,14 @@ The Symfony Connect username in parenthesis allows to get more information - Joel Wurtz (brouznouf) - Sebastiaan Stok (sstok) - Maxime STEINHAUSSER - - Frank A. Fiebig (fafiebig) - gnito-org - - Baldini + - Jeroen Spee (jeroens) - Tim Nagel (merk) - Chris Wilkinson (thewilkybarkid) - Jérôme Vasseur (jvasseur) - Peter Kokot (peterkokot) - Brice BERNARD (brikou) + - Simon André (simonandre) - Michal Piotrowski - marc.weistroff - Rokas Mikalkėnas (rokasm) @@ -149,9 +151,8 @@ The Symfony Connect username in parenthesis allows to get more information - lenar - Jacob Dreesen (jdreesen) - Włodzimierz Gajda (gajdaw) - - Simon André (simonandre) - Adrien Brault (adrienbrault) - - Jeroen Spee (jeroens) + - Tac Tacelosky (tacman1123) - Théo FIDRY - Florian Voutzinos (florianv) - Teoh Han Hui (teohhanhui) @@ -159,8 +160,10 @@ The Symfony Connect username in parenthesis allows to get more information - Colin Frei - Javier Spagnoletti (phansys) - excelwebzone + - Vladimir Tsykun (vtsykun) - Paráda József (paradajozsef) - Baptiste Clavié (talus) + - Martin Auswöger - Alexander Schwenn (xelaris) - Fabien Pennequin (fabienpennequin) - Gordon Franke (gimler) @@ -190,6 +193,7 @@ The Symfony Connect username in parenthesis allows to get more information - Jonathan Scheiber (jmsche) - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) + - Niels Keurentjes (curry684) - Arnaud Kleinpeter (nanocom) - Guilherme Blanco (guilhermeblanco) - Saif Eddin Gmati (azjezz) @@ -216,7 +220,6 @@ The Symfony Connect username in parenthesis allows to get more information - Sokolov Evgeniy (ewgraf) - Andréia Bohner (andreia) - Tom Van Looy (tvlooy) - - Niels Keurentjes (curry684) - Vyacheslav Pavlov - Albert Casademont (acasademont) - George Mponos (gmponos) @@ -229,6 +232,7 @@ The Symfony Connect username in parenthesis allows to get more information - Vincent Touzet (vincenttouzet) - Olivier Dolbeau (odolbeau) - Rouven Weßling (realityking) + - Valtteri R (valtzu) - Ben Davies (bendavies) - YaFou - Clemens Tolboom @@ -237,7 +241,6 @@ The Symfony Connect username in parenthesis allows to get more information - Alessandro Lai (jean85) - 77web - Gocha Ossinkine (ossinkine) - - Martin Auswöger - Jesse Rushlow (geeshoe) - Matthieu Ouellette-Vachon (maoueh) - Michał Pipa (michal.pipa) @@ -252,25 +255,23 @@ The Symfony Connect username in parenthesis allows to get more information - Roland Franssen :) - GDIBass - Samuel NELA (snela) - - Tac Tacelosky (tacman1123) - Vincent AUBERT (vincent) - Fabien Bourigault (fbourigault) - Michael Voříšek - zairig imad (zairigimad) - Colin O'Dell (colinodell) - Sébastien Alfaiate (seb33300) - - Valtteri R (valtzu) - James Halsall (jaitsu) - Christian Scheb - Guillaume (guill) - Mikael Pajunen - Warnar Boekkooi (boekkooi) - Justin Hileman (bobthecow) + - Tomasz Kowalczyk (thunderer) - Anthony GRASSIOT (antograssiot) - Dmitrii Chekaliuk (lazyhammer) - Clément JOBEILI (dator) - Andreas Möller (localheinz) - - Vladimir Tsykun (vtsykun) - Marek Štípek (maryo) - Daniel Espendiller - Arnaud PETITPAS (apetitpa) @@ -341,7 +342,6 @@ The Symfony Connect username in parenthesis allows to get more information - Marcin Sikoń (marphi) - Michele Orselli (orso) - Sven Paulus (subsven) - - Tomasz Kowalczyk (thunderer) - Daniel Burger - Maxime Veber (nek-) - Bastien Jaillot (bastnic) @@ -365,6 +365,7 @@ The Symfony Connect username in parenthesis allows to get more information - Florent Morselli (spomky_) - dFayet - Rob Frawley 2nd (robfrawley) + - Bram Leeda (bram123) - Nikita Konstantinov (unkind) - Dariusz - Francois Zaninotto @@ -413,6 +414,7 @@ The Symfony Connect username in parenthesis allows to get more information - Jurica Vlahoviček (vjurica) - Bob den Otter (bopp) - Thomas Schulz (king2500) + - Dariusz Rumiński - Philippe SEGATORI (tigitz) - Frank de Jonge - Dane Powell @@ -472,6 +474,7 @@ The Symfony Connect username in parenthesis allows to get more information - Warxcell (warxcell) - Atsuhiro KUBO (iteman) - rudy onfroy (ronfroy) + - Marvin Petker - Serkan Yildiz (srknyldz) - Andrew Moore (finewolf) - Bertrand Zuchuat (garfield-fr) @@ -503,7 +506,6 @@ The Symfony Connect username in parenthesis allows to get more information - janschoenherr - Emanuele Gaspari (inmarelibero) - Marko Kaznovac (kaznovac) - - Dariusz Rumiński - Andrii Bodnar - Artem (artemgenvald) - Thierry T (lepiaf) @@ -515,6 +517,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ahmed Raafat - Philippe Segatori - Thibaut Cheymol (tcheymol) + - Herberto Graca - Erin Millard - Matthew Lewinski (lewinski) - Islam Israfilov (islam93) @@ -535,6 +538,7 @@ The Symfony Connect username in parenthesis allows to get more information - Dmytro Borysovskyi (dmytr0) - Johann Pardanaud - Pavel Kirpitsov (pavel-kirpichyov) + - Robert Meijers - Artur Eshenbrener - Harm van Tilborg (hvt) - Thomas Perez (scullwm) @@ -676,13 +680,13 @@ The Symfony Connect username in parenthesis allows to get more information - Toni Rudolf (toooni) - Stefan Gehrig (sgehrig) - vagrant + - Matthias Krauser (mkrauser) - Benjamin Cremer (bcremer) - Maarten de Boer (mdeboer) - Asier Illarramendi (doup) - AKeeman (akeeman) - Martijn Cuppens - Restless-ET - - Robert Meijers - Vlad Gregurco (vgregurco) - Artem Stepin (astepin) - Boris Vujicic (boris.vujicic) @@ -945,7 +949,6 @@ The Symfony Connect username in parenthesis allows to get more information - EStyles (insidestyles) - Christophe Villeger (seragan) - Krystian Marcisz (simivar) - - Matthias Krauser (mkrauser) - Julien Fredon - Xavier Leune (xleune) - Hany el-Kerdany @@ -1192,6 +1195,7 @@ The Symfony Connect username in parenthesis allows to get more information - John Bohn (jbohn) - Jason Tan (jt2k) - Edvin Hultberg + - shubhalgupta - Felds Liscia (felds) - Sergey Panteleev - Andrew Hilobok (hilobok) @@ -1368,6 +1372,7 @@ The Symfony Connect username in parenthesis allows to get more information - Emil Einarsson - 243083df - Thibault Duplessis + - katario - Rimas Kudelis - Marc Abramowitz - Matthias Schmidt @@ -1827,7 +1832,6 @@ The Symfony Connect username in parenthesis allows to get more information - Matthias Neid - Yannick - Kuzia - - Bram Leeda - Vladimir Luchaninov (luchaninov) - spdionis - maxime.perrimond @@ -1841,6 +1845,7 @@ The Symfony Connect username in parenthesis allows to get more information - Dmitry Derepko - Rémi Leclerc - Jan Vernarsky + - Ionut Cioflan - Sergio - Jonas Hünig - Mehrdad @@ -1852,6 +1857,7 @@ The Symfony Connect username in parenthesis allows to get more information - Jan Walther (janwalther) - Juan Miguel Besada Vidal (soutlink) - Takashi Kanemoto (ttskch) + - Aleksei Lebedev - dlorek - Stuart Fyfe - Jason Schilling (chapterjason) @@ -1982,6 +1988,7 @@ The Symfony Connect username in parenthesis allows to get more information - Tobias Feijten (tobias93) - mohammadreza honarkhah - Jessica F Martinez + - paullallier - Artem Oliinyk (artemoliynyk) - Andrea Quintino (dirk39) - Andreas Heigl (heiglandreas) @@ -2231,8 +2238,10 @@ The Symfony Connect username in parenthesis allows to get more information - Michael Olšavský - Jay Severson - Benny Born + - Vincent Vermeulen - Stefan Moonen - Emirald Mateli + - Robert - René Kerner - Nathaniel Catchpole - upchuk @@ -2305,6 +2314,7 @@ The Symfony Connect username in parenthesis allows to get more information - rkerner - Alex Silcock - Raphael Hardt + - Ivan Nemets - Qingshan Luo - Ergie Gonzaga - Matthew J Mucklo @@ -2452,6 +2462,7 @@ The Symfony Connect username in parenthesis allows to get more information - Martin Schophaus (m_schophaus_adcada) - Martynas Sudintas (martiis) - Anton Sukhachev (mrsuh) + - Pavlo Pelekh (pelekh) - Stefan Kleff (stefanxl) - Thijs-jan Veldhuizen (tjveldhuizen) - Vitaliy Zhuk (zhukv) @@ -2707,6 +2718,7 @@ The Symfony Connect username in parenthesis allows to get more information - Rénald Casagraude (rcasagraude) - Robin Duval (robin-duval) - Mohammad Ali Sarbanha (sarbanha) + - Sergii Dolgushev (sergii-swds) - Steeve Titeca (stiteca) - Artem Lopata (bumz) - alex @@ -2781,6 +2793,7 @@ The Symfony Connect username in parenthesis allows to get more information - Chansig - Tischoi - divinity76 + - vdauchy - Andreas Hasenack - J Bruni - Alexey Prilipko @@ -2827,6 +2840,7 @@ The Symfony Connect username in parenthesis allows to get more information - Vladimir Sadicov (xtech) - Marcel Berteler - sdkawata + - Frederik Schmitt - Peter van Dommelen - Tim van Densen - Andrzej @@ -3148,6 +3162,7 @@ The Symfony Connect username in parenthesis allows to get more information - Tema Yud - Matt Fields - Olatunbosun Egberinde + - Johannes - Andras Debreczeni - Knallcharge - Vladimir Sazhin @@ -3360,6 +3375,7 @@ The Symfony Connect username in parenthesis allows to get more information - Lin Lu - arduanov - sualko + - Marc Bennewitz - Fabien - Martin Komischke - Yendric From 6fa492573f46da37d3e14f9e9f711e0bd15103c8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 29 Nov 2023 11:12:28 +0100 Subject: [PATCH 03/16] Update VERSION for 5.4.32 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index ed855c2e0403b..c4675f51ef41c 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static $freshCache = []; - public const VERSION = '5.4.32-DEV'; + public const VERSION = '5.4.32'; public const VERSION_ID = 50432; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; public const RELEASE_VERSION = 32; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From 92513d3d55d18a7eab41373dfd17949f45c1e45c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 29 Nov 2023 11:18:28 +0100 Subject: [PATCH 04/16] Bump Symfony version to 5.4.33 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index c4675f51ef41c..b7482dc108b27 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static $freshCache = []; - public const VERSION = '5.4.32'; - public const VERSION_ID = 50432; + public const VERSION = '5.4.33-DEV'; + public const VERSION_ID = 50433; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 32; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 33; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From adf9251288761d4dde8446f5bc598a78dc66e2b2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 29 Nov 2023 11:34:21 +0100 Subject: [PATCH 05/16] Bump Symfony version to 6.3.10 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 41f48a3a56d29..ddbb1b8423ec9 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.3.9'; - public const VERSION_ID = 60309; + public const VERSION = '6.3.10-DEV'; + public const VERSION_ID = 60310; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 3; - public const RELEASE_VERSION = 9; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 10; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '01/2024'; public const END_OF_LIFE = '01/2024'; From 7c7adab82f68ee7623541bf386a7962a712d9519 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 29 Nov 2023 14:11:05 +0100 Subject: [PATCH 06/16] [VarExporter] Fix lazy ghost trait when using nullsafe operator --- src/Symfony/Component/VarExporter/LazyGhostTrait.php | 5 +++-- .../Tests/Fixtures/LazyGhost/ChildMagicClass.php | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/VarExporter/LazyGhostTrait.php b/src/Symfony/Component/VarExporter/LazyGhostTrait.php index cd2dc71da879c..f875a0d2e1c53 100644 --- a/src/Symfony/Component/VarExporter/LazyGhostTrait.php +++ b/src/Symfony/Component/VarExporter/LazyGhostTrait.php @@ -175,8 +175,9 @@ public function &__get($name): mixed if ($state && (null === $scope || isset($propertyScopes["\0$scope\0$name"]))) { if (LazyObjectState::STATUS_INITIALIZED_FULL === $state->status) { // Work around php/php-src#12695 - $property = $propertyScopes[null === $scope ? $name : "\0$scope\0$name"][3] - ?? (Hydrator::$propertyScopes[$this::class] = Hydrator::getPropertyScopes($this::class))[3]; + $property = null === $scope ? $name : "\0$scope\0$name"; + $property = $propertyScopes[$property][3] + ?? Hydrator::$propertyScopes[$this::class][$property][3] = new \ReflectionProperty($scope ?? $class, $name); } else { $property = null; } diff --git a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildMagicClass.php b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildMagicClass.php index 6cac9ffc03d01..ca6b235eba66d 100644 --- a/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildMagicClass.php +++ b/src/Symfony/Component/VarExporter/Tests/Fixtures/LazyGhost/ChildMagicClass.php @@ -18,5 +18,14 @@ class ChildMagicClass extends MagicClass implements LazyObjectInterface { use LazyGhostTrait; + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + "\0".self::class."\0".'data' => [self::class, 'data', null], + "\0".self::class."\0".'lazyObjectState' => [self::class, 'lazyObjectState', null], + "\0".parent::class."\0".'data' => [parent::class, 'data', null], + 'cloneCounter' => [self::class, 'cloneCounter', null], + 'data' => [self::class, 'data', null], + 'lazyObjectState' => [self::class, 'lazyObjectState', null], + ]; + private int $data = 123; } From 238894bdc0d866d5ec14c89004e30991a3e17c28 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Wed, 29 Nov 2023 17:36:07 +0100 Subject: [PATCH 07/16] [Routing] Fix removing aliases pointing to removed route in RouteCollection::remove() --- src/Symfony/Component/Routing/RouteCollection.php | 11 +++++++++-- .../Component/Routing/Tests/RouteCollectionTest.php | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Routing/RouteCollection.php b/src/Symfony/Component/Routing/RouteCollection.php index a0700bba3d681..d59a5a3bda1cf 100644 --- a/src/Symfony/Component/Routing/RouteCollection.php +++ b/src/Symfony/Component/Routing/RouteCollection.php @@ -157,8 +157,15 @@ public function get(string $name) */ public function remove($name) { - foreach ((array) $name as $n) { - unset($this->routes[$n], $this->priorities[$n], $this->aliases[$n]); + $names = (array) $name; + foreach ($names as $n) { + unset($this->routes[$n], $this->priorities[$n]); + } + + foreach ($this->aliases as $k => $alias) { + if (\in_array($alias->getId(), $names, true)) { + unset($this->aliases[$k]); + } } } diff --git a/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php b/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php index a191c88a61849..db5125b5ab43e 100644 --- a/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php @@ -225,11 +225,13 @@ public function testRemove() $collection1->add('bar', $bar = new Route('/bar')); $collection->addCollection($collection1); $collection->add('last', $last = new Route('/last')); + $collection->addAlias('ccc_my_custom_alias', 'foo'); $collection->remove('foo'); $this->assertSame(['bar' => $bar, 'last' => $last], $collection->all(), '->remove() can remove a single route'); $collection->remove(['bar', 'last']); $this->assertSame([], $collection->all(), '->remove() accepts an array and can remove multiple routes at once'); + $this->assertNull($collection->getAlias('ccc_my_custom_alias')); } public function testSetHost() From 45a5994b9d1f0fb0b5111324e85e6478b83df74e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 15 Nov 2023 16:28:27 +0100 Subject: [PATCH 08/16] [DependencyInjection] Fix dumping containers with null-referenced services --- src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php | 1 + .../Tests/Fixtures/php/services10_as_files.txt | 1 + .../Tests/Fixtures/php/services9_as_files.txt | 1 + .../Fixtures/php/services_deprecated_parameters_as_files.txt | 1 + .../Tests/Fixtures/php/services_non_shared_lazy_as_files.txt | 1 + 5 files changed, 5 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 38270e16b0e38..8867369b2f4d2 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -259,6 +259,7 @@ public function dump(array $options = []): string|array docStar} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10_as_files.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10_as_files.txt index 25d0b3257f0d9..2c8a6d23174eb 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10_as_files.txt +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10_as_files.txt @@ -13,6 +13,7 @@ return [ namespace Container%s; use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; +use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt index c3fddf9e67175..f8f5f78b1fb56 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt @@ -23,6 +23,7 @@ return [ namespace Container%s; use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; +use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deprecated_parameters_as_files.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deprecated_parameters_as_files.txt index 98476a4c1a171..d0c7c96e6206f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deprecated_parameters_as_files.txt +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deprecated_parameters_as_files.txt @@ -5,6 +5,7 @@ Array namespace Container%s; use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; +use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt index fd9d7b20c4002..10e92ce468aee 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt @@ -5,6 +5,7 @@ Array namespace Container%s; use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; +use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** From 37eec22078a18cf94adc8c451f0a179e9b6d8369 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 9 Nov 2023 10:10:20 +0100 Subject: [PATCH 09/16] remove duplicated service definition --- .../DependencyInjection/Tests/Fixtures/xml/services14.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services14.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services14.xml index bad2ec0ab377c..cc0310ceb2931 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services14.xml +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services14.xml @@ -3,10 +3,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd"> - - app - - From 6e9d9abd2d85d08cf7ce011ba0ce2b1932fd785b Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 23 Oct 2023 10:01:15 +0200 Subject: [PATCH 10/16] skip tests that do not work with ICU 71.1 --- .../Extension/Core/Type/DateTypeTest.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php index 32bf613037992..b892a1c34ea6e 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php @@ -14,6 +14,7 @@ use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormInterface; +use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Util\IntlTestHelper; use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; @@ -90,6 +91,10 @@ public function testSubmitFromSingleTextDateTime() // we test against "de_DE", so we need the full implementation IntlTestHelper::requireFullIntl($this, false); + if ('71.1' === Intl::getIcuVersion()) { + $this->markTestSkipped('Skipping test due to a bug in ICU 71.1.'); + } + \Locale::setDefault('de_DE'); $form = $this->factory->create(static::TESTED_TYPE, null, [ @@ -112,6 +117,10 @@ public function testSubmitFromSingleTextDateTimeImmutable() // we test against "de_DE", so we need the full implementation IntlTestHelper::requireFullIntl($this, false); + if ('71.1' === Intl::getIcuVersion()) { + $this->markTestSkipped('Skipping test due to a bug in ICU 71.1.'); + } + \Locale::setDefault('de_DE'); $form = $this->factory->create(static::TESTED_TYPE, null, [ @@ -135,6 +144,10 @@ public function testSubmitFromSingleTextString() // we test against "de_DE", so we need the full implementation IntlTestHelper::requireFullIntl($this, false); + if ('71.1' === Intl::getIcuVersion()) { + $this->markTestSkipped('Skipping test due to a bug in ICU 71.1.'); + } + \Locale::setDefault('de_DE'); $form = $this->factory->create(static::TESTED_TYPE, null, [ @@ -157,6 +170,10 @@ public function testSubmitFromSingleTextTimestamp() // we test against "de_DE", so we need the full implementation IntlTestHelper::requireFullIntl($this, false); + if ('71.1' === Intl::getIcuVersion()) { + $this->markTestSkipped('Skipping test due to a bug in ICU 71.1.'); + } + \Locale::setDefault('de_DE'); $form = $this->factory->create(static::TESTED_TYPE, null, [ @@ -181,6 +198,10 @@ public function testSubmitFromSingleTextRaw() // we test against "de_DE", so we need the full implementation IntlTestHelper::requireFullIntl($this, false); + if ('71.1' === Intl::getIcuVersion()) { + $this->markTestSkipped('Skipping test due to a bug in ICU 71.1.'); + } + \Locale::setDefault('de_DE'); $form = $this->factory->create(static::TESTED_TYPE, null, [ From abd3a9e1b1c68f50b991507768e7c502ac57316c Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 30 Nov 2023 12:57:55 +0100 Subject: [PATCH 11/16] add parameter types in query builder --- .../Messenger/Bridge/Doctrine/Transport/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php index 875f985cd038b..bb322e760fbdb 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -182,7 +182,7 @@ public function get(): ?array if ($this->driverConnection->getDatabasePlatform() instanceof OraclePlatform) { $query = $this->createQueryBuilder('w') ->where('w.id IN ('.str_replace('SELECT a.* FROM', 'SELECT a.id FROM', $sql).')') - ->setParameters($query->getParameters()); + ->setParameters($query->getParameters(), $query->getParameterTypes()); if (method_exists(QueryBuilder::class, 'forUpdate')) { $query->forUpdate(); From 763add71f8d6bba5fa73fe7d9080bd5cc4f42ca0 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 1 Dec 2023 09:55:03 +0100 Subject: [PATCH 12/16] run composer update for compatibility with PHPUnit versions shipping composer.lock --- src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php index bc251877d7cdf..816e8d9c2158c 100644 --- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php +++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php @@ -262,7 +262,7 @@ putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99"); $q = '\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 80000 ? '"' : ''; // --no-suggest is not in the list to keep compat with composer 1.0, which is shipped with Ubuntu 16.04LTS - $exit = proc_close(proc_open("$q$COMPOSER install --no-dev --prefer-dist --no-progress $q", [], $p, getcwd())); + $exit = proc_close(proc_open("$q$COMPOSER update --no-dev --prefer-dist --no-progress $q", [], $p, getcwd())); putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : '')); if ($prevCacheDir) { putenv("COMPOSER_CACHE_DIR=$prevCacheDir"); From 3c6dc17befb750488a99c9a2bed1c48282556fc3 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Fri, 1 Dec 2023 09:42:15 +0100 Subject: [PATCH 13/16] [Routing] Restore aliases removal in RouteCollection::remove() --- .../Component/Routing/RouteCollection.php | 16 ++++++++++++---- .../Routing/Tests/RouteCollectionTest.php | 9 ++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Routing/RouteCollection.php b/src/Symfony/Component/Routing/RouteCollection.php index d59a5a3bda1cf..b1219f844b7c0 100644 --- a/src/Symfony/Component/Routing/RouteCollection.php +++ b/src/Symfony/Component/Routing/RouteCollection.php @@ -157,13 +157,21 @@ public function get(string $name) */ public function remove($name) { - $names = (array) $name; - foreach ($names as $n) { - unset($this->routes[$n], $this->priorities[$n]); + $routes = []; + foreach ((array) $name as $n) { + if (isset($this->routes[$n])) { + $routes[] = $n; + } + + unset($this->routes[$n], $this->priorities[$n], $this->aliases[$n]); + } + + if (!$routes) { + return; } foreach ($this->aliases as $k => $alias) { - if (\in_array($alias->getId(), $names, true)) { + if (\in_array($alias->getId(), $routes, true)) { unset($this->aliases[$k]); } } diff --git a/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php b/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php index db5125b5ab43e..7625bcf54ebdb 100644 --- a/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteCollectionTest.php @@ -219,19 +219,22 @@ public function testGet() public function testRemove() { $collection = new RouteCollection(); - $collection->add('foo', $foo = new Route('/foo')); + $collection->add('foo', new Route('/foo')); $collection1 = new RouteCollection(); $collection1->add('bar', $bar = new Route('/bar')); $collection->addCollection($collection1); $collection->add('last', $last = new Route('/last')); - $collection->addAlias('ccc_my_custom_alias', 'foo'); + $collection->addAlias('alias_removed_when_removing_route_foo', 'foo'); + $collection->addAlias('alias_directly_removed', 'bar'); $collection->remove('foo'); $this->assertSame(['bar' => $bar, 'last' => $last], $collection->all(), '->remove() can remove a single route'); + $collection->remove('alias_directly_removed'); + $this->assertNull($collection->getAlias('alias_directly_removed')); $collection->remove(['bar', 'last']); $this->assertSame([], $collection->all(), '->remove() accepts an array and can remove multiple routes at once'); - $this->assertNull($collection->getAlias('ccc_my_custom_alias')); + $this->assertNull($collection->getAlias('alias_removed_when_removing_route_foo')); } public function testSetHost() From 4a728f70dcdfd953f35e0eedeb95851bf61247c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anderson=20M=C3=BCller?= Date: Wed, 29 Nov 2023 16:14:43 +0100 Subject: [PATCH 14/16] Fix support to denormalize plain object types When denormalizing properties with a plain `object` type without a class the `ObjectNormalizer` would fail with a `TypeError`. --- .../Normalizer/AbstractObjectNormalizer.php | 2 +- .../Normalizer/AbstractObjectNormalizerTest.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index 732586bd85f9b..79ede1a90e698 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -584,7 +584,7 @@ private function validateAndDenormalize(array $types, string $currentClass, stri $expectedTypes[Type::BUILTIN_TYPE_OBJECT === $builtinType && $class ? $class : $builtinType] = true; - if (Type::BUILTIN_TYPE_OBJECT === $builtinType) { + if (Type::BUILTIN_TYPE_OBJECT === $builtinType && null !== $class) { if (!$this->serializer instanceof DenormalizerInterface) { throw new LogicException(sprintf('Cannot denormalize attribute "%s" for class "%s" because injected serializer is not a denormalizer.', $attribute, $class)); } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index 35616b658ba78..4e781c5d81175 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -113,6 +113,17 @@ public function testDenormalizeWithExtraAttributesAndNoGroupsWithMetadataFactory ); } + public function testDenormalizePlainObject() + { + $extractor = new PhpDocExtractor(); + $normalizer = new ObjectNormalizer(null, null, null, $extractor); + $dummy = $normalizer->denormalize(['plainObject' => (object) ['foo' => 'bar']], DummyWithPlainObject::class); + + $this->assertInstanceOf(DummyWithPlainObject::class, $dummy); + $this->assertInstanceOf(\stdClass::class, $dummy->plainObject); + $this->assertSame('bar', $dummy->plainObject->foo); + } + public function testDenormalizeCollectionDecodedFromXmlWithOneChild() { $denormalizer = $this->getDenormalizerForDummyCollection(); @@ -598,6 +609,12 @@ protected function setAttributeValue(object $object, string $attribute, $value, } } +class DummyWithPlainObject +{ + /** @var object */ + public $plainObject; +} + class ObjectWithBasicProperties { /** @var bool */ From 4ee2955d659a3539323e5fecdaf0360ca6928d4f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 1 Dec 2023 17:57:18 +0100 Subject: [PATCH 15/16] Update CHANGELOG for 6.3.10 --- CHANGELOG-6.3.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG-6.3.md b/CHANGELOG-6.3.md index a7490b8179172..d53b170cca7a1 100644 --- a/CHANGELOG-6.3.md +++ b/CHANGELOG-6.3.md @@ -7,6 +7,16 @@ in 6.3 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.3.0...v6.3.1 +* 6.3.10 (2023-12-01) + + * bug #52804 [Serializer] Fix support of plain object types denormalization (andersonamuller) + * bug #52845 [Routing] Restore aliases removal in RouteCollection::remove() (fancyweb) + * bug #52846 [PhpUnitBridge]  run composer update for compatibility with PHPUnit versions shipping composer.lock (xabbuh) + * bug #52823 add parameter types in query builder (javiercno) + * bug #52808 [DependencyInjection] Fix dumping containers with null-referenced services (nicolas-grekas) + * bug #52797 [VarExporter] Fix lazy ghost trait when using nullsafe operator (nicolas-grekas) + * bug #52806 [Routing] Fix removing aliases pointing to removed route in `RouteCollection::remove()` (fancyweb) + * 6.3.9 (2023-11-29) * bug #52786 [Serializer] Revert allowed attributes fix (mtarld) From 2b250884526c1b45ed72d93721987b9787daa256 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 1 Dec 2023 17:57:27 +0100 Subject: [PATCH 16/16] Update VERSION for 6.3.10 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index ddbb1b8423ec9..f7b33bab29be8 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.3.10-DEV'; + public const VERSION = '6.3.10'; public const VERSION_ID = 60310; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 3; public const RELEASE_VERSION = 10; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '01/2024'; public const END_OF_LIFE = '01/2024';