From 5938c0582f58c48d47d09adc9d9dd8524c54ef43 Mon Sep 17 00:00:00 2001 From: Tomasz Kowalczyk Date: Wed, 8 Nov 2023 15:25:27 +0100 Subject: [PATCH 01/26] [Validator] updated Lithuanian translation --- .../Resources/translations/validators.lt.xlf | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf index 7a2c4c521b56a..32b379e300495 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf @@ -402,6 +402,30 @@ The value of the netmask should be between {{ min }} and {{ max }}. Tinklo kaukės reikšmė turi būti nuo {{ min }} iki {{ max }}. + + The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less. + Failo pavadinimas per ilgas. Jame turėtų būti {{ filename_max_length }} simbolis arba mažiau.|Failo pavadinimas per ilgas. Jame turėtų būti {{ filename_max_length }} simbolių arba mažiau. + + + The password strength is too low. Please use a stronger password. + Slaptažodis per silpnas. Naudokite stipresnį slaptažodį. + + + This value contains characters that are not allowed by the current restriction-level. + Šioje reikšmėje yra simbolių, kurių neleidžia dabartinis apribojimo lygis. + + + Using invisible characters is not allowed. + Naudoti nematomus simbolius draudžiama. + + + Mixing numbers from different scripts is not allowed. + Draudžiama maišyti skaičius iš skirtingų scenarijų. + + + Using hidden overlay characters is not allowed. + Draudžiama naudoti paslėptus perdangos simbolius. + From fc84efbfeb53c2d849f2ae2a270c0b95426c9259 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:31:23 +0100 Subject: [PATCH 02/26] Update CHANGELOG for 4.4.51 --- CHANGELOG-4.4.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG-4.4.md b/CHANGELOG-4.4.md index 5a261d439826d..7ef838934633d 100644 --- a/CHANGELOG-4.4.md +++ b/CHANGELOG-4.4.md @@ -7,6 +7,10 @@ in 4.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/v4.4.0...v4.4.1 +* 4.4.51 (2023-11-10) + + * security #cve-2023-46734 [TwigBridge] Ensure CodeExtension's filters properly escape their input (nicolas-grekas, GromNaN) + * 4.4.50 (2023-02-01) * security #cve-2022-24895 [Security/Http] Remove CSRF tokens from storage on successful login (nicolas-grekas) From 40eb71ed9a2712ed64f9a90ef0ea05a7a1616535 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:31:29 +0100 Subject: [PATCH 03/26] Update VERSION for 4.4.51 --- src/Symfony/Component/HttpKernel/Kernel.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 7064edefbe456..3268a06310eb2 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,11 +76,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - public const VERSION = '4.4.50'; - public const VERSION_ID = 40450; + public const VERSION = '4.4.51'; + public const VERSION_ID = 40451; public const MAJOR_VERSION = 4; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 50; + public const RELEASE_VERSION = 51; public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2022'; From 531e7338089ab10ae2ab934c2b32a61dbc8a81e2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:38:55 +0100 Subject: [PATCH 04/26] Update CHANGELOG for 5.4.31 --- CHANGELOG-5.4.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG-5.4.md b/CHANGELOG-5.4.md index 3760dbcc28667..d3f4945eb5436 100644 --- a/CHANGELOG-5.4.md +++ b/CHANGELOG-5.4.md @@ -7,6 +7,23 @@ 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.31 (2023-11-10) + + * security #cve-2023-46734 [TwigBridge] Ensure CodeExtension's filters properly escape their input (nicolas-grekas, GromNaN) + * security #cve-2023-46733 [Security] Fix possible session fixation when only the *token* changes (RobertMe) + * bug #52506 [SecurityBundle] wire the secret for Symfony 6.4 compatibility (xabbuh) + * bug #52502 [Config] Prefixing `FileExistenceResource::__toString()` to avoid conflict with `FileResource` (weaverryan) + * bug #52491 [String] Method toByteString conversion using iconv is unreachable (Vincentv92) + * bug #52488 [HttpKernel] Fix PHP deprecation (nicolas-grekas) + * bug #52476 [Messenger] fix compatibility with Doctrine DBAL 4 (xabbuh) + * bug #52474 [HttpFoundation] ensure string type with mbstring func overloading enabled (xabbuh) + * bug #52457 [Cache][HttpFoundation][Lock] Fix empty username/password for PDO PostgreSQL (HypeMC) + * bug #52443 [Yaml] Fix uid binary parsing (mRoca) + * bug #52444 Remove full DSNs from exception messages (nicolas-grekas) + * bug #52428 [HttpKernel] Preventing error 500 when function putenv is disabled (ShaiMagal) + * bug #52408 [Yaml] Fix block scalar array parsing (NickSdot) + * bug #52329 [HttpClient] Psr18Client: parse HTTP Reason Phrase for Response (Hanmac) + * 5.4.30 (2023-10-29) * bug #52332 [Yaml] Fix deprecated passing null to trim() (javaDeveloperKid) From a66ae886c7f28b3395d933ed63732f413119df2e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:39:06 +0100 Subject: [PATCH 05/26] Update CONTRIBUTORS for 5.4.31 --- CONTRIBUTORS.md | 55 ++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4e0d9c4150104..b7f58c00c8501 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -15,39 +15,39 @@ The Symfony Connect username in parenthesis allows to get more information - Thomas Calvet (fancyweb) - Christophe Coevoet (stof) - Jordi Boggiano (seldaek) - - Maxime Steinhausser (ogizanagi) - Wouter de Jong (wouterj) + - Maxime Steinhausser (ogizanagi) - Kévin Dunglas (dunglas) - Victor Berchet (victor) - Ryan Weaver (weaverryan) - Jérémy DERUSSÉ (jderusse) - - Roland Franssen - Javier Eguiluz (javier.eguiluz) + - Roland Franssen - Johannes S (johannes) - Kris Wallsmith (kriswallsmith) - Jakub Zalas (jakubzalas) - - Yonel Ceruto (yonelceruto) + - Alexandre Daubois (alexandre-daubois) - Jules Pietri (heah) - Oskar Stark (oskarstark) - - Tobias Nyholm (tobias) + - Yonel Ceruto (yonelceruto) - Hugo Hamon (hhamon) - - Alexandre Daubois (alexandre-daubois) + - Tobias Nyholm (tobias) - Samuel ROZE (sroze) - Pascal Borreli (pborreli) - Romain Neutron - Joseph Bielawski (stloyd) - Drak (drak) - Abdellatif Ait boudad (aitboudad) + - Jérôme Tamarelle (gromnan) - Lukas Kahwe Smith (lsmith) + - Antoine Lamirault (alamirault) - Hamza Amrouche (simperfit) - - Martin Hasoň (hason) - Kevin Bond (kbond) - - Jérôme Tamarelle (gromnan) + - Martin Hasoň (hason) + - HypeMC (hypemc) - Jeremy Mikola (jmikola) - - Antoine Lamirault (alamirault) - Jean-François Simon (jfsimon) - Benjamin Eberlei (beberlei) - - HypeMC (hypemc) - Igor Wiedler - Jan Schädlich (jschaedl) - Mathieu Lechat (mat_the_cat) @@ -76,28 +76,30 @@ The Symfony Connect username in parenthesis allows to get more information - Mathieu Piot (mpiot) - Alexander Schranz (alexander-schranz) - Vasilij Duško (staff) + - Vincent Langlet (deviling) - Sarah Khalil (saro0h) - Laurent VOULLEMIER (lvo) - Konstantin Kudryashov (everzet) - - Vincent Langlet (deviling) - 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) - David Buchmann (dbu) + - Dariusz Ruminski - Christian Raue - Eric Clemmons (ericclemmons) - Denis (yethee) - Michel Weimerskirch (mweimerskirch) - Issei Murasawa (issei_m) - Douglas Greenshields (shieldo) - - Gary PEGEOT (gary-p) - Alex Pott - Fran Moreno (franmomu) - Arnout Boks (aboks) @@ -105,9 +107,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ruud Kamphuis (ruudk) - Henrik Westphal (snc) - Dariusz Górecki (canni) - - Allison Guilhem (a_guilhem) - Ener-Getick - - Dariusz Ruminski - Graham Campbell (graham) - Tugdual Saunier (tucksaun) - Lee McDermott @@ -134,7 +134,9 @@ 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 - Tim Nagel (merk) - Chris Wilkinson (thewilkybarkid) - Jérôme Vasseur (jvasseur) @@ -178,8 +180,6 @@ The Symfony Connect username in parenthesis allows to get more information - Ion Bazan (ionbazan) - OGAWA Katsuhiro (fivestar) - Jhonny Lidfors (jhonne) - - Frank A. Fiebig (fafiebig) - - Baldini - Juti Noppornpitak (shiroyuki) - Gregor Harlan (gharlan) - Michael Babker (mbabker) @@ -237,6 +237,7 @@ 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) @@ -251,12 +252,14 @@ 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) @@ -298,7 +301,6 @@ The Symfony Connect username in parenthesis allows to get more information - Andreas Hucks (meandmymonkey) - Jan Rosier (rosier) - Noel Guilbert (noel) - - Martin Auswöger - Stadly - Stepan Anchugov (kix) - bronze1man @@ -329,7 +331,6 @@ The Symfony Connect username in parenthesis allows to get more information - François Zaninotto (fzaninotto) - Dustin Whittle (dustinwhittle) - Timothée Barray (tyx) - - Valtteri R (valtzu) - jeff - Bob van de Vijver (bobvandevijver) - John Kary (johnkary) @@ -340,6 +341,7 @@ 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) @@ -448,7 +450,6 @@ The Symfony Connect username in parenthesis allows to get more information - Wouter Van Hecke - Baptiste Lafontaine (magnetik) - Iker Ibarguren (ikerib) - - Tomasz Kowalczyk (thunderer) - Indra Gunawan (indragunawan) - Michael Holm (hollo) - Arjen van der Meijden @@ -537,6 +538,7 @@ The Symfony Connect username in parenthesis allows to get more information - Artur Eshenbrener - Harm van Tilborg (hvt) - Thomas Perez (scullwm) + - Cédric Anne - smoench - Felix Labrecque - mondrake (mondrake) @@ -577,6 +579,7 @@ The Symfony Connect username in parenthesis allows to get more information - SiD (plbsid) - Greg Thornton (xdissent) - Alex Bowers + - Michel Roca (mroca) - Fabien S (bafs) - Costin Bereveanu (schniper) - Andrii Dembitskyi @@ -618,6 +621,7 @@ The Symfony Connect username in parenthesis allows to get more information - Oscar Cubo Medina (ocubom) - Karel Souffriau - Christophe L. (christophelau) + - a.dmitryuk - Anthon Pang (robocoder) - Julien Galenski (ruian) - Ben Scott (bpscott) @@ -685,7 +689,6 @@ The Symfony Connect username in parenthesis allows to get more information - Dries Vints - Judicaël RUFFIEUX (axanagor) - Chris Sedlmayr (catchamonkey) - - Cédric Anne - DerManoMann - Jérôme Tanghe (deuchnord) - Mathias STRASSER (roukmoute) @@ -735,6 +738,7 @@ The Symfony Connect username in parenthesis allows to get more information - Axel Guckelsberger (guite) - Sam Fleming (sam_fleming) - Alex Bakhturin + - Belhassen Bouchoucha (crownbackend) - Patrick Reimers (preimers) - Brayden Williams (redstar504) - insekticid @@ -860,7 +864,6 @@ The Symfony Connect username in parenthesis allows to get more information - Ilija Tovilo (ilijatovilo) - Sander Toonen (xatoo) - Zach Badgett (zachbadgett) - - a.dmitryuk - Loïc Faugeron - Aurélien Fredouelle - Pavel Campr (pcampr) @@ -872,7 +875,6 @@ The Symfony Connect username in parenthesis allows to get more information - Benjamin Morel - Guilherme Ferreira - Geoffrey Tran (geoff) - - Tac Tacelosky (tacman1123) - Jannik Zschiesche - Bernd Stellwag - Jan Ole Behrens (deegital) @@ -1050,6 +1052,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ruben Jacobs (rubenj) - Simon Schick (simonsimcity) - Tristan Roussel + - NickSdot - Niklas Keller - Alexandre parent - Cameron Porter @@ -1094,7 +1097,6 @@ The Symfony Connect username in parenthesis allows to get more information - Raphaëll Roussel - Michael Lutz - jochenvdv - - Michel Roca (mroca) - Reedy - Arturas Smorgun (asarturas) - Aleksandr Volochnev (exelenz) @@ -1141,7 +1143,6 @@ The Symfony Connect username in parenthesis allows to get more information - kylekatarnls (kylekatarnls) - Steve Grunwell - Yuen-Chi Lian - - Belhassen Bouchoucha (crownbackend) - Mathias Brodala (mbrodala) - Robert Fischer (sandoba) - Tarjei Huse (tarjei) @@ -1222,6 +1223,7 @@ The Symfony Connect username in parenthesis allows to get more information - Mike Meier (mykon) - Pedro Miguel Maymone de Resende (pedroresende) - stlrnz + - javaDeveloperKid - Masterklavi - Adrien Wilmet (adrienfr) - Franco Traversaro (belinde) @@ -1361,6 +1363,7 @@ The Symfony Connect username in parenthesis allows to get more information - Simon Heimberg (simon_heimberg) - Morten Wulff (wulff) - Don Pinkster + - Jonas Elfering - Maksim Muruev - Emil Einarsson - 243083df @@ -1390,6 +1393,7 @@ The Symfony Connect username in parenthesis allows to get more information - Markus S. (staabm) - Marc Laporte - Michał Jusięga + - Dominik Ulrich - den - Gábor Tóth - ouardisoft @@ -1668,6 +1672,7 @@ The Symfony Connect username in parenthesis allows to get more information - Vedran Mihočinec (v-m-i) - Sergey Novikov (s12v) - creiner + - Jan Pintr - ProgMiner - Marcos Quesada (marcos_quesada) - Matthew (mattvick) @@ -1714,6 +1719,7 @@ The Symfony Connect username in parenthesis allows to get more information - Mikkel Paulson - Michał Strzelecki - Bert Ramakers + - Hans Mackowiak - Hugo Fonseca (fonsecas72) - Marc Duboc (icemad) - Martynas Narbutas @@ -2200,6 +2206,7 @@ The Symfony Connect username in parenthesis allows to get more information - Evan C - BrokenSourceCode - Fabian Haase + - roog - parinz1234 - Romain Geissler - Adrien Moiruad @@ -2269,7 +2276,6 @@ The Symfony Connect username in parenthesis allows to get more information - Thomas Counsell - BilgeXA - mmokhi - - javaDeveloperKid - Serhii Smirnov - Robert Queck - Peter Bouwdewijn @@ -2488,6 +2494,7 @@ The Symfony Connect username in parenthesis allows to get more information - AntoineDly - Konstantinos Alexiou - Andrii Boiko + - louismariegaborit - Dilek Erkut - Harold Iedema - WaiSkats From f9fdd064d39efcc4b906b25a56da8549bd8bfcaf Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:39:09 +0100 Subject: [PATCH 06/26] Update VERSION for 5.4.31 --- 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 c31a4b7ca33f2..21e1b67a8acd0 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.31-DEV'; + public const VERSION = '5.4.31'; public const VERSION_ID = 50431; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; public const RELEASE_VERSION = 31; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From 5f0f2df3bcc3a5260dd786b33eb392d9e5d304bf Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:43:24 +0100 Subject: [PATCH 07/26] Bump Symfony version to 5.4.32 --- 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 21e1b67a8acd0..ed855c2e0403b 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.31'; - public const VERSION_ID = 50431; + public const VERSION = '5.4.32-DEV'; + public const VERSION_ID = 50432; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 31; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 32; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From 346efa9e1a681d33d9ec03304c5f6228b9ca19b2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:47:26 +0100 Subject: [PATCH 08/26] Update CHANGELOG for 6.3.8 --- CHANGELOG-6.3.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/CHANGELOG-6.3.md b/CHANGELOG-6.3.md index b42b158c1056c..d50e65ef16b3f 100644 --- a/CHANGELOG-6.3.md +++ b/CHANGELOG-6.3.md @@ -7,6 +7,32 @@ 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.8 (2023-11-10) + + * bug #51666 [RateLimiter] CompoundLimiter was accepting requests even when some limiters already consumed all tokens (10n) + * security #cve-2023-46734 [TwigBridge] Ensure CodeExtension's filters properly escape their input (nicolas-grekas, GromNaN) + * security #cve-2023-46735 [Webhook] Remove user-submitted type from HTTP response (nicolas-grekas) + * security #cve-2023-46733 [Security] Fix possible session fixation when only the *token* changes (RobertMe) + * bug #52514 [FrameworkBundle] Don't reference SYMFONY_IDE env var in non-debug mode (nicolas-grekas) + * bug #52506 [SecurityBundle] wire the secret for Symfony 6.4 compatibility (xabbuh) + * bug #52496 [VarDumper] Accept mixed key on `DsPairStub` (marc-mabe) + * bug #52502 [Config] Prefixing `FileExistenceResource::__toString()` to avoid conflict with `FileResource` (weaverryan) + * bug #52491 [String] Method toByteString conversion using iconv is unreachable (Vincentv92) + * bug #52488 [HttpKernel] Fix PHP deprecation (nicolas-grekas) + * bug #52476 [Messenger] fix compatibility with Doctrine DBAL 4 (xabbuh) + * bug #52474 [HttpFoundation] ensure string type with mbstring func overloading enabled (xabbuh) + * bug #52472 [HttpClient][WebProfilerBundle] Do not generate cURL command when files are uploaded (MatTheCat) + * bug #52457 [Cache][HttpFoundation][Lock] Fix empty username/password for PDO PostgreSQL (HypeMC) + * bug #52443 [Yaml] Fix uid binary parsing (mRoca) + * bug #52429 [HttpClient] Replace `escapeshellarg` to prevent overpassing `ARG_MAX` (alexandre-daubois) + * bug #52442 Disable the "Copy as cURL" button when the debug info are disabled (stof) + * bug #52444 Remove full DSNs from exception messages (nicolas-grekas) + * bug #52428 [HttpKernel] Preventing error 500 when function putenv is disabled (ShaiMagal) + * bug #52408 [Yaml] Fix block scalar array parsing (NickSdot) + * bug #52132 [Console] Fix horizontal table top border is incorrectly rendered (OskarStark) + * bug #52367 [Uid] Fix UuidV7 collisions within the same ms (nicolas-grekas) + * bug #52222 [MonologBridge] Fix support for monolog 3.0 (louismariegaborit) + * 6.3.7 (2023-10-29) * bug #52329 [HttpClient] Psr18Client: parse HTTP Reason Phrase for Response (Hanmac) From 40d66112cd6db99be14a2d349c849e9bbb3fd0fa Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:47:32 +0100 Subject: [PATCH 09/26] Update VERSION for 6.3.8 --- 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 86c8c0e2855e4..ae1343252eef6 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.8-DEV'; + public const VERSION = '6.3.8'; public const VERSION_ID = 60308; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 3; public const RELEASE_VERSION = 8; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '01/2024'; public const END_OF_LIFE = '01/2024'; From 7398334d2cea318cb95318344341a6d36c6f2133 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:52:27 +0100 Subject: [PATCH 10/26] Bump Symfony version to 6.3.9 --- 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 ae1343252eef6..1fa48bd3b4897 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.8'; - public const VERSION_ID = 60308; + public const VERSION = '6.3.9-DEV'; + public const VERSION_ID = 60309; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 3; - public const RELEASE_VERSION = 8; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 9; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '01/2024'; public const END_OF_LIFE = '01/2024'; From 82b88ba66784002cbcca7b7e110883c4a274dc2e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:57:06 +0100 Subject: [PATCH 11/26] Update CHANGELOG for 6.4.0-BETA3 --- CHANGELOG-6.4.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/CHANGELOG-6.4.md b/CHANGELOG-6.4.md index f93f009930604..5d3ff258c8376 100644 --- a/CHANGELOG-6.4.md +++ b/CHANGELOG-6.4.md @@ -7,6 +7,44 @@ in 6.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/v6.4.0...v6.4.1 +* 6.4.0-BETA3 (2023-11-10) + + * bug #51666 [RateLimiter] CompoundLimiter was accepting requests even when some limiters already consumed all tokens (10n) + * bug #52524 [AssetMapper] Only download a CSS file if it is explicitly advertised (weaverryan) + * bug #52523 [AssetMapper] avoid caching MappedAsset inside JavaScript Import (weaverryan) + * bug #52519 [AssetMapper] If assets are served from a subdirectory or CDN, also adjust importmap keys (weaverryan) + * bug #52508 [AssetMapper] Fix jsdelivr import parsing with no imported value (weaverryan) + * security #cve-2023-46734 [TwigBridge] Ensure CodeExtension's filters properly escape their input (nicolas-grekas, GromNaN) + * security #cve-2023-46735 [Webhook] Remove user-submitted type from HTTP response (nicolas-grekas) + * security #cve-2023-46733 [Security] Fix possible session fixation when only the *token* changes (RobertMe) + * bug #52514 [FrameworkBundle] Don't reference SYMFONY_IDE env var in non-debug mode (nicolas-grekas) + * bug #52506 [SecurityBundle] wire the secret for Symfony 6.4 compatibility (xabbuh) + * bug #52496 [VarDumper] Accept mixed key on `DsPairStub` (marc-mabe) + * bug #52502 [Config] Prefixing `FileExistenceResource::__toString()` to avoid conflict with `FileResource` (weaverryan) + * bug #52491 [String] Method toByteString conversion using iconv is unreachable (Vincentv92) + * bug #52488 [HttpKernel] Fix PHP deprecation (nicolas-grekas) + * bug #52469 Check whether secrets are empty and mark them all as sensitive (nicolas-grekas) + * feature #52471 [HttpKernel] Add `ControllerResolver::allowControllers()` to define which callables are legit controllers when the `_check_controller_is_allowed` request attribute is set (nicolas-grekas) + * bug #52476 [Messenger] fix compatibility with Doctrine DBAL 4 (xabbuh) + * bug #52434 [Console][FrameworkBundle] Fix missing `profile` option for console commands (keulinho) + * bug #52474 [HttpFoundation] ensure string type with mbstring func overloading enabled (xabbuh) + * bug #52472 [HttpClient][WebProfilerBundle] Do not generate cURL command when files are uploaded (MatTheCat) + * bug #52457 [Cache][HttpFoundation][Lock] Fix empty username/password for PDO PostgreSQL (HypeMC) + * bug #52443 [Yaml] Fix uid binary parsing (mRoca) + * feature #52449 [TwigBridge] Mark CodeExtension as `@internal` (fabpot) + * bug #52429 [HttpClient] Replace `escapeshellarg` to prevent overpassing `ARG_MAX` (alexandre-daubois) + * bug #52442 Disable the "Copy as cURL" button when the debug info are disabled (stof) + * bug #52444 Remove full DSNs from exception messages (nicolas-grekas) + * feature #52336 [HttpFoundation][Lock] Makes MongoDB adapters usable with `ext-mongodb` only (GromNaN) + * bug #52428 [HttpKernel] Preventing error 500 when function putenv is disabled (ShaiMagal) + * bug #52427 [Console][Process] do not let context classes extend the message classes (xabbuh) + * bug #52408 [Yaml] Fix block scalar array parsing (NickSdot) + * bug #52132 [Console] Fix horizontal table top border is incorrectly rendered (OskarStark) + * bug #52368 [AssetMapper] Fixing bug where JSCompiler used non-absolute importmap entry path (weaverryan) + * bug #52367 [Uid] Fix UuidV7 collisions within the same ms (nicolas-grekas) + * bug #52287 [FrameworkBundle] Fix deprecation layer for "enable_annotations" in validation and serializer configuration (lyrixx) + * bug #52222 [MonologBridge] Fix support for monolog 3.0 (louismariegaborit) + * 6.4.0-BETA2 (2023-10-29) * bug #52329 [HttpClient] Psr18Client: parse HTTP Reason Phrase for Response (Hanmac) From c5de9eb2346cd8d775fe43d344aad5e6f6e5a83a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 14:57:13 +0100 Subject: [PATCH 12/26] Update VERSION for 6.4.0-BETA3 --- 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 7825b57cf2148..864374162e5cc 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.4.0-DEV'; + public const VERSION = '6.4.0-BETA3'; public const VERSION_ID = 60400; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 4; public const RELEASE_VERSION = 0; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = 'BETA3'; public const END_OF_MAINTENANCE = '11/2026'; public const END_OF_LIFE = '11/2027'; From 862b7017d3b76c1561d65bc9b7b199175f3eda80 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 15:31:26 +0100 Subject: [PATCH 13/26] Bump Symfony version to 6.4.0 --- 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 864374162e5cc..7825b57cf2148 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.4.0-BETA3'; + public const VERSION = '6.4.0-DEV'; public const VERSION_ID = 60400; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 4; public const RELEASE_VERSION = 0; - public const EXTRA_VERSION = 'BETA3'; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '11/2026'; public const END_OF_LIFE = '11/2027'; From 21673dcf027fbad425142e78f87bd8978d6fa2fa Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Nov 2023 15:44:56 +0100 Subject: [PATCH 14/26] Bump Symfony version to 7.0.0 --- 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 f92e1b6384261..db2c1de9cc351 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 = '7.0.0-BETA3'; + public const VERSION = '7.0.0-DEV'; public const VERSION_ID = 70000; public const MAJOR_VERSION = 7; public const MINOR_VERSION = 0; public const RELEASE_VERSION = 0; - public const EXTRA_VERSION = 'BETA3'; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '07/2024'; public const END_OF_LIFE = '07/2024'; From 1799ed2bb9556053d28e53a88bf7269310de524a Mon Sep 17 00:00:00 2001 From: katario Date: Sun, 12 Nov 2023 18:59:00 +0100 Subject: [PATCH 15/26] [Mailer] Update default Mailjet port --- .../Mailer/Bridge/Mailjet/Transport/MailjetSmtpTransport.php | 2 +- src/Symfony/Component/Mailer/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetSmtpTransport.php b/src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetSmtpTransport.php index 281f7b39c05c5..328a60b192eb4 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetSmtpTransport.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetSmtpTransport.php @@ -19,7 +19,7 @@ class MailjetSmtpTransport extends EsmtpTransport { public function __construct(string $username, #[\SensitiveParameter] string $password, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null) { - parent::__construct('in-v3.mailjet.com', 465, true, $dispatcher, $logger); + parent::__construct('in-v3.mailjet.com', 587, true, $dispatcher, $logger); $this->setUsername($username); $this->setPassword($password); diff --git a/src/Symfony/Component/Mailer/CHANGELOG.md b/src/Symfony/Component/Mailer/CHANGELOG.md index 4eca04b464a3c..6ef846cc82485 100644 --- a/src/Symfony/Component/Mailer/CHANGELOG.md +++ b/src/Symfony/Component/Mailer/CHANGELOG.md @@ -5,6 +5,7 @@ CHANGELOG --- * Add DSN parameter `peer_fingerprint` to verify TLS certificate fingerprint + * Change the default port for the `mailjet+smtp` transport from 465 to 587 6.3 --- From 2d9eb7b0726fac07a9dcacf5eb0a1c3ca116178c Mon Sep 17 00:00:00 2001 From: Niels Keurentjes Date: Fri, 10 Nov 2023 16:54:38 +0100 Subject: [PATCH 16/26] [Routing] Extend old Annotations from new Attributes --- src/Symfony/Component/Routing/Annotation/Route.php | 2 +- src/Symfony/Component/Routing/Attribute/Route.php | 2 ++ src/Symfony/Component/Serializer/Annotation/Context.php | 2 +- .../Component/Serializer/Annotation/DiscriminatorMap.php | 2 +- src/Symfony/Component/Serializer/Annotation/Groups.php | 2 +- src/Symfony/Component/Serializer/Annotation/Ignore.php | 2 +- src/Symfony/Component/Serializer/Annotation/MaxDepth.php | 2 +- .../Component/Serializer/Annotation/SerializedName.php | 2 +- .../Component/Serializer/Annotation/SerializedPath.php | 2 +- src/Symfony/Component/Serializer/Attribute/Context.php | 2 ++ .../Component/Serializer/Attribute/DiscriminatorMap.php | 2 ++ src/Symfony/Component/Serializer/Attribute/Groups.php | 2 ++ src/Symfony/Component/Serializer/Attribute/Ignore.php | 4 +++- src/Symfony/Component/Serializer/Attribute/MaxDepth.php | 2 ++ src/Symfony/Component/Serializer/Attribute/SerializedName.php | 4 +++- src/Symfony/Component/Serializer/Attribute/SerializedPath.php | 4 +++- 16 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/Symfony/Component/Routing/Annotation/Route.php b/src/Symfony/Component/Routing/Annotation/Route.php index 5c497fc281422..dda3bdaded528 100644 --- a/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/Symfony/Component/Routing/Annotation/Route.php @@ -17,7 +17,7 @@ class_exists(\Symfony\Component\Routing\Attribute\Route::class); if (false) { #[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] - class Route + class Route extends \Symfony\Component\Routing\Attribute\Route { } } diff --git a/src/Symfony/Component/Routing/Attribute/Route.php b/src/Symfony/Component/Routing/Attribute/Route.php index 398a4dd70d9b4..0077f76db67bd 100644 --- a/src/Symfony/Component/Routing/Attribute/Route.php +++ b/src/Symfony/Component/Routing/Attribute/Route.php @@ -20,6 +20,8 @@ * * @author Fabien Potencier * @author Alexander M. Turek + * + * @final since Symfony 6.4 */ #[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] class Route diff --git a/src/Symfony/Component/Serializer/Annotation/Context.php b/src/Symfony/Component/Serializer/Annotation/Context.php index eef8331481f75..962169788e50d 100644 --- a/src/Symfony/Component/Serializer/Annotation/Context.php +++ b/src/Symfony/Component/Serializer/Annotation/Context.php @@ -17,7 +17,7 @@ class_exists(\Symfony\Component\Serializer\Attribute\Context::class); if (false) { #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] - class Context + class Context extends \Symfony\Component\Serializer\Attribute\Context { } } diff --git a/src/Symfony/Component/Serializer/Annotation/DiscriminatorMap.php b/src/Symfony/Component/Serializer/Annotation/DiscriminatorMap.php index 89b2ae9e8e20f..c1a3021ded536 100644 --- a/src/Symfony/Component/Serializer/Annotation/DiscriminatorMap.php +++ b/src/Symfony/Component/Serializer/Annotation/DiscriminatorMap.php @@ -15,7 +15,7 @@ class_exists(\Symfony\Component\Serializer\Attribute\DiscriminatorMap::class); if (false) { #[\Attribute(\Attribute::TARGET_CLASS)] - class DiscriminatorMap + class DiscriminatorMap extends \Symfony\Component\Serializer\Attribute\DiscriminatorMap { } } diff --git a/src/Symfony/Component/Serializer/Annotation/Groups.php b/src/Symfony/Component/Serializer/Annotation/Groups.php index 89338b05ccb57..642626f7fced8 100644 --- a/src/Symfony/Component/Serializer/Annotation/Groups.php +++ b/src/Symfony/Component/Serializer/Annotation/Groups.php @@ -15,7 +15,7 @@ class_exists(\Symfony\Component\Serializer\Attribute\Groups::class); if (false) { #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_CLASS)] - class Groups + class Groups extends \Symfony\Component\Serializer\Attribute\Groups { } } diff --git a/src/Symfony/Component/Serializer/Annotation/Ignore.php b/src/Symfony/Component/Serializer/Annotation/Ignore.php index 219ea725b52c5..178eb4e6b0abe 100644 --- a/src/Symfony/Component/Serializer/Annotation/Ignore.php +++ b/src/Symfony/Component/Serializer/Annotation/Ignore.php @@ -15,7 +15,7 @@ class_exists(\Symfony\Component\Serializer\Attribute\Ignore::class); if (false) { #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] - final class Ignore + class Ignore extends \Symfony\Component\Serializer\Attribute\Ignore { } } diff --git a/src/Symfony/Component/Serializer/Annotation/MaxDepth.php b/src/Symfony/Component/Serializer/Annotation/MaxDepth.php index 591e68ed95c21..ee1bc1ae79827 100644 --- a/src/Symfony/Component/Serializer/Annotation/MaxDepth.php +++ b/src/Symfony/Component/Serializer/Annotation/MaxDepth.php @@ -15,7 +15,7 @@ class_exists(\Symfony\Component\Serializer\Attribute\MaxDepth::class); if (false) { #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] - class MaxDepth + class MaxDepth extends \Symfony\Component\Serializer\Attribute\MaxDepth { } } diff --git a/src/Symfony/Component/Serializer/Annotation/SerializedName.php b/src/Symfony/Component/Serializer/Annotation/SerializedName.php index 97c6e0aec2143..167064a0b9d17 100644 --- a/src/Symfony/Component/Serializer/Annotation/SerializedName.php +++ b/src/Symfony/Component/Serializer/Annotation/SerializedName.php @@ -15,7 +15,7 @@ class_exists(\Symfony\Component\Serializer\Attribute\SerializedName::class); if (false) { #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] - final class SerializedName + class SerializedName extends \Symfony\Component\Serializer\Attribute\SerializedName { } } diff --git a/src/Symfony/Component/Serializer/Annotation/SerializedPath.php b/src/Symfony/Component/Serializer/Annotation/SerializedPath.php index f555a1086ac95..76e4c7eff2c5c 100644 --- a/src/Symfony/Component/Serializer/Annotation/SerializedPath.php +++ b/src/Symfony/Component/Serializer/Annotation/SerializedPath.php @@ -15,7 +15,7 @@ class_exists(\Symfony\Component\Serializer\Attribute\SerializedPath::class); if (false) { #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] - final class SerializedPath + class SerializedPath extends \Symfony\Component\Serializer\Attribute\SerializedPath { } } diff --git a/src/Symfony/Component/Serializer/Attribute/Context.php b/src/Symfony/Component/Serializer/Attribute/Context.php index baa958839780d..d62c43046a2e3 100644 --- a/src/Symfony/Component/Serializer/Attribute/Context.php +++ b/src/Symfony/Component/Serializer/Attribute/Context.php @@ -21,6 +21,8 @@ * @Target({"PROPERTY", "METHOD"}) * * @author Maxime Steinhausser + * + * @final since Symfony 6.4 */ #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class Context diff --git a/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php b/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php index 4c1f23722eb52..7bba10ab036a6 100644 --- a/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php +++ b/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php @@ -21,6 +21,8 @@ * @Target({"CLASS"}) * * @author Samuel Roze + * + * @final since Symfony 6.4 */ #[\Attribute(\Attribute::TARGET_CLASS)] class DiscriminatorMap diff --git a/src/Symfony/Component/Serializer/Attribute/Groups.php b/src/Symfony/Component/Serializer/Attribute/Groups.php index 9a351910aed57..386a2ce00bd2d 100644 --- a/src/Symfony/Component/Serializer/Attribute/Groups.php +++ b/src/Symfony/Component/Serializer/Attribute/Groups.php @@ -21,6 +21,8 @@ * @Target({"PROPERTY", "METHOD", "CLASS"}) * * @author Kévin Dunglas + * + * @final since Symfony 6.4 */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_CLASS)] class Groups diff --git a/src/Symfony/Component/Serializer/Attribute/Ignore.php b/src/Symfony/Component/Serializer/Attribute/Ignore.php index 688a1f3f44451..577a77084326b 100644 --- a/src/Symfony/Component/Serializer/Attribute/Ignore.php +++ b/src/Symfony/Component/Serializer/Attribute/Ignore.php @@ -18,9 +18,11 @@ * @Target({"PROPERTY", "METHOD"}) * * @author Kévin Dunglas + * + * @final since Symfony 6.4 */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -final class Ignore +class Ignore { } diff --git a/src/Symfony/Component/Serializer/Attribute/MaxDepth.php b/src/Symfony/Component/Serializer/Attribute/MaxDepth.php index 3ecfcb993755d..bbd190ccfaa9b 100644 --- a/src/Symfony/Component/Serializer/Attribute/MaxDepth.php +++ b/src/Symfony/Component/Serializer/Attribute/MaxDepth.php @@ -21,6 +21,8 @@ * @Target({"PROPERTY", "METHOD"}) * * @author Kévin Dunglas + * + * @final since Symfony 6.4 */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] class MaxDepth diff --git a/src/Symfony/Component/Serializer/Attribute/SerializedName.php b/src/Symfony/Component/Serializer/Attribute/SerializedName.php index a2651282fc08d..2afd8d9ed1f8e 100644 --- a/src/Symfony/Component/Serializer/Attribute/SerializedName.php +++ b/src/Symfony/Component/Serializer/Attribute/SerializedName.php @@ -21,9 +21,11 @@ * @Target({"PROPERTY", "METHOD"}) * * @author Fabien Bourigault + * + * @final since Symfony 6.4 */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -final class SerializedName +class SerializedName { public function __construct(private readonly string $serializedName) { diff --git a/src/Symfony/Component/Serializer/Attribute/SerializedPath.php b/src/Symfony/Component/Serializer/Attribute/SerializedPath.php index 0e5f040876555..eed46c5185a61 100644 --- a/src/Symfony/Component/Serializer/Attribute/SerializedPath.php +++ b/src/Symfony/Component/Serializer/Attribute/SerializedPath.php @@ -23,9 +23,11 @@ * @Target({"PROPERTY", "METHOD"}) * * @author Tobias Bönner + * + * @final since Symfony 6.4 */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -final class SerializedPath +class SerializedPath { private PropertyPath $serializedPath; From 28a78ea5d8d4a9b1d293d515990b5d3c110d4d1a Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 13 Nov 2023 15:43:41 +0100 Subject: [PATCH 17/26] [VarExporter] Deprecate per-property lazy-initializers --- UPGRADE-6.4.md | 6 +++++ .../Component/VarExporter/CHANGELOG.md | 5 ++++ .../Component/VarExporter/LazyGhostTrait.php | 25 ++++++------------- src/Symfony/Component/VarExporter/README.md | 12 --------- .../VarExporter/Tests/LazyGhostTraitTest.php | 18 +++++++++++++ .../Component/VarExporter/composer.json | 3 ++- 6 files changed, 39 insertions(+), 30 deletions(-) diff --git a/UPGRADE-6.4.md b/UPGRADE-6.4.md index db6dfd9e2fcdf..182d98cce2f16 100644 --- a/UPGRADE-6.4.md +++ b/UPGRADE-6.4.md @@ -38,6 +38,7 @@ Components * [Serializer](#Serializer) * [Templating](#Templating) * [Validator](#Validator) +* [VarExporter](#VarExporter) * [Workflow](#Workflow) BrowserKit @@ -230,6 +231,11 @@ Validator * Deprecate `ValidatorBuilder::disableAnnotationMapping()`, use `ValidatorBuilder::disableAttributeMapping()` instead * Deprecate `AnnotationLoader`, use `AttributeLoader` instead +VarExporter +----------- + + * Deprecate per-property lazy-initializers + Workflow -------- diff --git a/src/Symfony/Component/VarExporter/CHANGELOG.md b/src/Symfony/Component/VarExporter/CHANGELOG.md index 1b21a0bbde8cc..fdca002cb05df 100644 --- a/src/Symfony/Component/VarExporter/CHANGELOG.md +++ b/src/Symfony/Component/VarExporter/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +6.4 +--- + + * Deprecate per-property lazy-initializers + 6.2 --- diff --git a/src/Symfony/Component/VarExporter/LazyGhostTrait.php b/src/Symfony/Component/VarExporter/LazyGhostTrait.php index 13e33f59c9bd8..66345cdc4ad5c 100644 --- a/src/Symfony/Component/VarExporter/LazyGhostTrait.php +++ b/src/Symfony/Component/VarExporter/LazyGhostTrait.php @@ -23,29 +23,20 @@ trait LazyGhostTrait /** * Creates a lazy-loading ghost instance. * - * When the initializer is a closure, it should initialize all properties at - * once and is given the instance to initialize as argument. - * - * When the initializer is an array of closures, it should be indexed by - * properties and closures should accept 4 arguments: the instance to - * initialize, the property to initialize, its write-scope, and its default - * value. Each closure should return the value of the corresponding property. - * The special "\0" key can be used to define a closure that returns all - * properties at once when full-initialization is needed; it takes the - * instance and its default properties as arguments. - * - * Properties should be indexed by their array-cast name, see + * Skipped properties should be indexed by their array-cast identifier, see * https://php.net/manual/language.types.array#language.types.array.casting * - * @param (\Closure(static):void - * |array - * |array{"\0": \Closure(static, array):array}) $initializer - * @param array|null $skippedProperties An array indexed by the properties to skip, aka the ones - * that the initializer doesn't set when its a closure + * @param (\Closure(static):void $initializer The closure should initialize the object it receives as argument + * @param array|null $skippedProperties An array indexed by the properties to skip, a.k.a. the ones + * that the initializer doesn't initialize, if any * @param static|null $instance */ public static function createLazyGhost(\Closure|array $initializer, array $skippedProperties = null, object $instance = null): static { + if (\is_array($initializer)) { + trigger_deprecation('symfony/var-exporter', '6.4', 'Per-property lazy-initializers are deprecated and won\'t be supported anymore in 7.0, use an object initializer instead.'); + } + $onlyProperties = null === $skippedProperties && \is_array($initializer) ? $initializer : null; if (self::class !== $class = $instance ? $instance::class : static::class) { diff --git a/src/Symfony/Component/VarExporter/README.md b/src/Symfony/Component/VarExporter/README.md index 7c7a58e298357..9f6e2550bf259 100644 --- a/src/Symfony/Component/VarExporter/README.md +++ b/src/Symfony/Component/VarExporter/README.md @@ -105,18 +105,6 @@ $foo = FooLazyGhost::createLazyGhost(initializer: function (Foo $instance): void // be called only when and if a *property* is accessed. ``` -You can also partially initialize the objects on a property-by-property basis by -adding two arguments to the initializer: - -```php -$initializer = function (Foo $instance, string $propertyName, ?string $propertyScope): mixed { - if (Foo::class === $propertyScope && 'bar' === $propertyName) { - return 123; - } - // [...] Add more logic for the other properties -}; -``` - ### `LazyProxyTrait` Alternatively, `LazyProxyTrait` can be used to create virtual proxies: diff --git a/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php b/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php index 0cbbd835b8f64..9289e30e8f4b2 100644 --- a/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php +++ b/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php @@ -186,6 +186,9 @@ public function testFullInitialization() $this->assertSame(1, $counter); } + /** + * @group legacy + */ public function testPartialInitialization() { $counter = 0; @@ -243,6 +246,9 @@ public function testPartialInitialization() $this->assertSame([123, 345, 456, 567, 234, 678], array_values($properties)); } + /** + * @group legacy + */ public function testPartialInitializationWithReset() { $initializer = static fn (ChildTestClass $instance, string $property, ?string $scope, mixed $default) => 234; @@ -275,6 +281,9 @@ public function testPartialInitializationWithReset() $this->assertSame(234, $instance->public); } + /** + * @group legacy + */ public function testPartialInitializationWithNastyPassByRef() { $instance = ChildTestClass::createLazyGhost(['public' => fn (ChildTestClass $instance, string &$property, ?string &$scope, mixed $default) => $property = $scope = 123]); @@ -307,6 +316,9 @@ public function testReflectionPropertyGetValue() $this->assertSame(-3, $r->getValue($obj)); } + /** + * @group legacy + */ public function testFullPartialInitialization() { $counter = 0; @@ -335,6 +347,9 @@ public function testFullPartialInitialization() $this->assertSame(1000, $counter); } + /** + * @group legacy + */ public function testPartialInitializationFallback() { $counter = 0; @@ -357,6 +372,9 @@ public function testPartialInitializationFallback() $this->assertSame(1000, $counter); } + /** + * @group legacy + */ public function testFullInitializationAfterPartialInitialization() { $counter = 0; diff --git a/src/Symfony/Component/VarExporter/composer.json b/src/Symfony/Component/VarExporter/composer.json index 9f20c11c8228e..3498d15cc33c3 100644 --- a/src/Symfony/Component/VarExporter/composer.json +++ b/src/Symfony/Component/VarExporter/composer.json @@ -16,7 +16,8 @@ } ], "require": { - "php": ">=8.1" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" }, "require-dev": { "symfony/var-dumper": "^5.4|^6.0|^7.0" From 38a41257af236d59d7f3cc3ac4621983aa973221 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 14 Nov 2023 09:47:35 +0100 Subject: [PATCH 18/26] attach all required parameters to query --- .../Messenger/Bridge/Doctrine/Transport/Connection.php | 3 ++- 1 file changed, 2 insertions(+), 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 8b348e708d128..875f985cd038b 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -181,7 +181,8 @@ public function get(): ?array // Wrap the rownum query in a sub-query to allow writelocks without ORA-02014 error if ($this->driverConnection->getDatabasePlatform() instanceof OraclePlatform) { $query = $this->createQueryBuilder('w') - ->where('w.id IN ('.str_replace('SELECT a.* FROM', 'SELECT a.id FROM', $sql).')'); + ->where('w.id IN ('.str_replace('SELECT a.* FROM', 'SELECT a.id FROM', $sql).')') + ->setParameters($query->getParameters()); if (method_exists(QueryBuilder::class, 'forUpdate')) { $query->forUpdate(); From 89009aa128879e79acee273bfcb96e7db491ee64 Mon Sep 17 00:00:00 2001 From: vdauchy <26772554+vdauchy@users.noreply.github.com> Date: Sun, 12 Nov 2023 18:26:41 +0100 Subject: [PATCH 19/26] [DomCrawler] UriResolver support path with columns --- src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php | 4 ++++ src/Symfony/Component/DomCrawler/UriResolver.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php b/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php index b0c227abf5478..f5ca403a61a4a 100644 --- a/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php @@ -84,6 +84,10 @@ public static function provideResolverTests() ['foo', 'http://localhost?bar=1', 'http://localhost/foo'], ['foo', 'http://localhost#bar', 'http://localhost/foo'], + + ['foo:1', 'http://localhost', 'http://localhost/foo:1'], + ['/bar:1', 'http://localhost', 'http://localhost/bar:1'], + ['foo/bar:1', 'http://localhost', 'http://localhost/foo/bar:1'], ]; } } diff --git a/src/Symfony/Component/DomCrawler/UriResolver.php b/src/Symfony/Component/DomCrawler/UriResolver.php index 5ff2245284c67..903696ba8fecd 100644 --- a/src/Symfony/Component/DomCrawler/UriResolver.php +++ b/src/Symfony/Component/DomCrawler/UriResolver.php @@ -33,7 +33,7 @@ public static function resolve(string $uri, ?string $baseUri): string $uri = trim($uri); // absolute URL? - if (null !== parse_url($uri, \PHP_URL_SCHEME)) { + if (\is_string(parse_url($uri, \PHP_URL_SCHEME))) { return $uri; } From b3635e37651ae5169c250322af249c6a41213e9c Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Mon, 13 Nov 2023 09:35:02 -0500 Subject: [PATCH 20/26] [AssetMapper] Fixing js sourceMappingURL extraction when sourceMappingURL used in code --- .../Resolver/JsDelivrEsmResolver.php | 5 +++- .../Resolver/JsDelivrEsmResolverTest.php | 25 ++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php b/src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php index dae1a3d1a8656..bbc9199cc7c08 100644 --- a/src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php +++ b/src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php @@ -248,7 +248,10 @@ private function makeImportsBare(string $content, array &$dependencies): string }, $content); // source maps are not also downloaded - so remove the sourceMappingURL - $content = preg_replace('{//# sourceMappingURL=.*$}m', '', $content); + // remove the final one only (in case sourceMappingURL is used in the code) + if (false !== $lastPos = strrpos($content, '//# sourceMappingURL=')) { + $content = substr($content, 0, $lastPos).preg_replace('{//# sourceMappingURL=.*$}m', '', substr($content, $lastPos)); + } return preg_replace('{/\*# sourceMappingURL=[^ ]*+ \*/}', '', $content); } diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php index 1c2ac78d0d2f4..121e80a3a0b3a 100644 --- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php +++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php @@ -430,7 +430,30 @@ public static function provideDownloadPackagesTests() ], ]; - yield 'css file removes importmap' => [ + yield 'js sourcemap is correctly removed when sourceMapping appears in the JS' => [ + [ + 'es-module-shims' => self::createRemoteEntry('es-module-shims', version: '1.8.2'), + ], + [ + [ + 'url' => '/es-module-shims@1.8.2/+esm', + 'body' => <<<'EOF' +const je="\n//# sourceURL=",Ue="\n//# sourceMappingURL=",Me=/^(text|application)\/(x-)?javascript(;|$)/,_e=/^(application)\/wasm(;|$)/,Ie=/^(text|application)\/json(;|$)/,Re=/^(text|application)\/css(;|$)/,Te=/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g;export{t as default}; +//# sourceMappingURL=/sm/ef3916de598f421a779ba0e69af94655b2043095cde2410cc01893452d893338.map +EOF + ], + ], + [ + 'es-module-shims' => [ + 'content' => <<<'EOF' +const je="\n//# sourceURL=",Ue="\n//# sourceMappingURL=",Me=/^(text|application)\/(x-)?javascript(;|$)/,_e=/^(application)\/wasm(;|$)/,Ie=/^(text|application)\/json(;|$)/,Re=/^(text|application)\/css(;|$)/,Te=/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g;export{t as default}; +EOF, + 'dependencies' => [], + ], + ], + ]; + + yield 'css file removes sourcemap' => [ ['lodash' => self::createRemoteEntry('bootstrap/dist/bootstrap.css', version: '5.0.6', type: ImportMapType::CSS)], [ [ From 27650efd912e33e6062650f678a5901fe198a3f5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 13 Nov 2023 16:08:57 +0100 Subject: [PATCH 21/26] [VarExporter] Drop support for partially initialized lazy object --- UPGRADE-7.0.md | 6 + .../Internal/LazyObjectRegistry.php | 8 +- .../VarExporter/Internal/LazyObjectState.php | 45 +--- .../Component/VarExporter/LazyGhostTrait.php | 84 +------- .../VarExporter/Tests/LazyGhostTraitTest.php | 200 +----------------- .../Component/VarExporter/composer.json | 3 +- 6 files changed, 27 insertions(+), 319 deletions(-) diff --git a/UPGRADE-7.0.md b/UPGRADE-7.0.md index 91282771faff7..481ffdad795ba 100644 --- a/UPGRADE-7.0.md +++ b/UPGRADE-7.0.md @@ -46,6 +46,7 @@ Components * [Translation](#Translation) * [Validator](#Validator) * [VarDumper](#VarDumper) + * [VarExporter](#VarExporter) * [Workflow](#Workflow) * [Yaml](#Yaml) @@ -608,6 +609,11 @@ VarDumper * Add parameter `string $label = null` to `VarDumper::dump()` * Require explicit argument when calling `VarDumper::setHandler()` +VarExporter +----------- + + * Remove support for per-property lazy-initializers + Workflow -------- diff --git a/src/Symfony/Component/VarExporter/Internal/LazyObjectRegistry.php b/src/Symfony/Component/VarExporter/Internal/LazyObjectRegistry.php index fddc6fb3b9664..323e8cca27fb0 100644 --- a/src/Symfony/Component/VarExporter/Internal/LazyObjectRegistry.php +++ b/src/Symfony/Component/VarExporter/Internal/LazyObjectRegistry.php @@ -67,18 +67,18 @@ public static function getClassResetters($class) $resetters = []; foreach ($classProperties as $scope => $properties) { - $resetters[] = \Closure::bind(static function ($instance, $skippedProperties, $onlyProperties = null) use ($properties) { + $resetters[] = \Closure::bind(static function ($instance, $skippedProperties) use ($properties) { foreach ($properties as $name => $key) { - if (!\array_key_exists($key, $skippedProperties) && (null === $onlyProperties || \array_key_exists($key, $onlyProperties))) { + if (!\array_key_exists($key, $skippedProperties)) { unset($instance->$name); } } }, null, $scope); } - $resetters[] = static function ($instance, $skippedProperties, $onlyProperties = null) { + $resetters[] = static function ($instance, $skippedProperties) { foreach ((array) $instance as $name => $value) { - if ("\0" !== ($name[0] ?? '') && !\array_key_exists($name, $skippedProperties) && (null === $onlyProperties || \array_key_exists($name, $onlyProperties))) { + if ("\0" !== ($name[0] ?? '') && !\array_key_exists($name, $skippedProperties)) { unset($instance->$name); } } diff --git a/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php b/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php index 2f649dd1ca481..2293031e4c107 100644 --- a/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php +++ b/src/Symfony/Component/VarExporter/Internal/LazyObjectState.php @@ -39,10 +39,10 @@ class LazyObjectState public object $realInstance; - public function __construct(public readonly \Closure|array $initializer, $skippedProperties = []) + public function __construct(public readonly \Closure $initializer, $skippedProperties = []) { $this->skippedProperties = $skippedProperties; - $this->status = \is_array($initializer) ? self::STATUS_UNINITIALIZED_PARTIAL : self::STATUS_UNINITIALIZED_FULL; + $this->status = self::STATUS_UNINITIALIZED_FULL; } public function initialize($instance, $propertyName, $propertyScope) @@ -51,42 +51,6 @@ public function initialize($instance, $propertyName, $propertyScope) return self::STATUS_INITIALIZED_FULL; } - if (\is_array($this->initializer)) { - $class = $instance::class; - $propertyScope ??= $class; - $propertyScopes = Hydrator::$propertyScopes[$class]; - $propertyScopes[$k = "\0$propertyScope\0$propertyName"] ?? $propertyScopes[$k = "\0*\0$propertyName"] ?? $k = $propertyName; - - if ($initializer = $this->initializer[$k] ?? null) { - $value = $initializer(...[$instance, $propertyName, $propertyScope, LazyObjectRegistry::$defaultProperties[$class][$k] ?? null]); - $accessor = LazyObjectRegistry::$classAccessors[$propertyScope] ??= LazyObjectRegistry::getClassAccessors($propertyScope); - $accessor['set']($instance, $propertyName, $value); - - return $this->status = self::STATUS_INITIALIZED_PARTIAL; - } - - $status = self::STATUS_UNINITIALIZED_PARTIAL; - - if ($initializer = $this->initializer["\0"] ?? null) { - if (!\is_array($values = $initializer($instance, LazyObjectRegistry::$defaultProperties[$class]))) { - throw new \TypeError(sprintf('The lazy-initializer defined for instance of "%s" must return an array, got "%s".', $class, get_debug_type($values))); - } - $properties = (array) $instance; - foreach ($values as $key => $value) { - if ($k === $key) { - $status = self::STATUS_INITIALIZED_PARTIAL; - } - if (!\array_key_exists($key, $properties) && [$scope, $name, $readonlyScope] = $propertyScopes[$key] ?? null) { - $scope = $readonlyScope ?? ('*' !== $scope ? $scope : $class); - $accessor = LazyObjectRegistry::$classAccessors[$scope] ??= LazyObjectRegistry::getClassAccessors($scope); - $accessor['set']($instance, $name, $value); - } - } - } - - return $status; - } - $this->status = self::STATUS_INITIALIZED_FULL; try { @@ -111,7 +75,6 @@ public function reset($instance): void $propertyScopes = Hydrator::$propertyScopes[$class] ??= Hydrator::getPropertyScopes($class); $skippedProperties = $this->skippedProperties; $properties = (array) $instance; - $onlyProperties = \is_array($this->initializer) ? $this->initializer : null; foreach ($propertyScopes as $key => [$scope, $name, $readonlyScope]) { $propertyScopes[$k = "\0$scope\0$name"] ?? $propertyScopes[$k = "\0*\0$name"] ?? $k = $name; @@ -122,9 +85,9 @@ public function reset($instance): void } foreach (LazyObjectRegistry::$classResetters[$class] as $reset) { - $reset($instance, $skippedProperties, $onlyProperties); + $reset($instance, $skippedProperties); } - $this->status = self::STATUS_INITIALIZED_FULL === $this->status ? self::STATUS_UNINITIALIZED_FULL : self::STATUS_UNINITIALIZED_PARTIAL; + $this->status = self::STATUS_UNINITIALIZED_FULL; } } diff --git a/src/Symfony/Component/VarExporter/LazyGhostTrait.php b/src/Symfony/Component/VarExporter/LazyGhostTrait.php index 66345cdc4ad5c..b416d171b9e39 100644 --- a/src/Symfony/Component/VarExporter/LazyGhostTrait.php +++ b/src/Symfony/Component/VarExporter/LazyGhostTrait.php @@ -31,14 +31,8 @@ trait LazyGhostTrait * that the initializer doesn't initialize, if any * @param static|null $instance */ - public static function createLazyGhost(\Closure|array $initializer, array $skippedProperties = null, object $instance = null): static + public static function createLazyGhost(\Closure $initializer, array $skippedProperties = null, object $instance = null): static { - if (\is_array($initializer)) { - trigger_deprecation('symfony/var-exporter', '6.4', 'Per-property lazy-initializers are deprecated and won\'t be supported anymore in 7.0, use an object initializer instead.'); - } - - $onlyProperties = null === $skippedProperties && \is_array($initializer) ? $initializer : null; - if (self::class !== $class = $instance ? $instance::class : static::class) { $skippedProperties["\0".self::class."\0lazyObjectState"] = true; } elseif (\defined($class.'::LAZY_OBJECT_PROPERTY_SCOPES')) { @@ -50,7 +44,7 @@ public static function createLazyGhost(\Closure|array $initializer, array $skipp $instance->lazyObjectState = new LazyObjectState($initializer, $skippedProperties ??= []); foreach (Registry::$classResetters[$class] ??= Registry::getClassResetters($class) as $reset) { - $reset($instance, $skippedProperties, $onlyProperties); + $reset($instance, $skippedProperties); } return $instance; @@ -67,25 +61,7 @@ public function isLazyObjectInitialized(bool $partial = false): bool return true; } - if (!\is_array($state->initializer)) { - return LazyObjectState::STATUS_INITIALIZED_FULL === $state->status; - } - - $class = $this::class; - $properties = (array) $this; - - if ($partial) { - return (bool) array_intersect_key($state->initializer, $properties); - } - - $propertyScopes = Hydrator::$propertyScopes[$class] ??= Hydrator::getPropertyScopes($class); - foreach ($state->initializer as $key => $initializer) { - if (!\array_key_exists($key, $properties) && isset($propertyScopes[$key])) { - return false; - } - } - - return true; + return LazyObjectState::STATUS_INITIALIZED_FULL === $state->status; } /** @@ -97,42 +73,8 @@ public function initializeLazyObject(): static return $this; } - if (!\is_array($state->initializer)) { - if (LazyObjectState::STATUS_UNINITIALIZED_FULL === $state->status) { - $state->initialize($this, '', null); - } - - return $this; - } - - $values = isset($state->initializer["\0"]) ? null : []; - - $class = $this::class; - $properties = (array) $this; - $propertyScopes = Hydrator::$propertyScopes[$class] ??= Hydrator::getPropertyScopes($class); - foreach ($state->initializer as $key => $initializer) { - if (\array_key_exists($key, $properties) || ![$scope, $name, $readonlyScope] = $propertyScopes[$key] ?? null) { - continue; - } - $scope = $readonlyScope ?? ('*' !== $scope ? $scope : $class); - - if (null === $values) { - if (!\is_array($values = ($state->initializer["\0"])($this, Registry::$defaultProperties[$class]))) { - throw new \TypeError(sprintf('The lazy-initializer defined for instance of "%s" must return an array, got "%s".', $class, get_debug_type($values))); - } - - if (\array_key_exists($key, $properties = (array) $this)) { - continue; - } - } - - if (\array_key_exists($key, $values)) { - $accessor = Registry::$classAccessors[$scope] ??= Registry::getClassAccessors($scope); - $accessor['set']($this, $name, $properties[$key] = $values[$key]); - } else { - $state->initialize($this, $name, $scope); - $properties = (array) $this; - } + if (LazyObjectState::STATUS_UNINITIALIZED_FULL === $state->status) { + $state->initialize($this, '', null); } return $this; @@ -163,9 +105,8 @@ public function &__get($name): mixed $scope = Registry::getScope($propertyScopes, $class, $name); $state = $this->lazyObjectState ?? null; - if ($state && (null === $scope || isset($propertyScopes["\0$scope\0$name"])) - && LazyObjectState::STATUS_UNINITIALIZED_PARTIAL !== $state->initialize($this, $name, $readonlyScope ?? $scope) - ) { + if ($state && (null === $scope || isset($propertyScopes["\0$scope\0$name"]))) { + $state->initialize($this, $name, $readonlyScope ?? $scope); goto get_in_scope; } } @@ -261,9 +202,8 @@ public function __isset($name): bool $scope = Registry::getScope($propertyScopes, $class, $name); $state = $this->lazyObjectState ?? null; - if ($state && (null === $scope || isset($propertyScopes["\0$scope\0$name"])) - && LazyObjectState::STATUS_UNINITIALIZED_PARTIAL !== $state->initialize($this, $name, $readonlyScope ?? $scope) - ) { + if ($state && (null === $scope || isset($propertyScopes["\0$scope\0$name"]))) { + $state->initialize($this, $name, $readonlyScope ?? $scope); goto isset_in_scope; } } @@ -362,7 +302,7 @@ public function __destruct() { $state = $this->lazyObjectState ?? null; - if ($state && \in_array($state->status, [LazyObjectState::STATUS_UNINITIALIZED_FULL, LazyObjectState::STATUS_UNINITIALIZED_PARTIAL], true)) { + if (LazyObjectState::STATUS_UNINITIALIZED_FULL === $state?->status) { return; } @@ -373,9 +313,7 @@ public function __destruct() private function setLazyObjectAsInitialized(bool $initialized): void { - $state = $this->lazyObjectState ?? null; - - if ($state && !\is_array($state->initializer)) { + if ($state = $this->lazyObjectState ?? null) { $state->status = $initialized ? LazyObjectState::STATUS_INITIALIZED_FULL : LazyObjectState::STATUS_UNINITIALIZED_FULL; } } diff --git a/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php b/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php index ee8596593e9a8..c87adb008c8c6 100644 --- a/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php +++ b/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\VarExporter\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\VarExporter\Internal\LazyObjectState; use Symfony\Component\VarExporter\ProxyHelper; use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\ChildMagicClass; use Symfony\Component\VarExporter\Tests\Fixtures\LazyGhost\ChildStdClass; @@ -186,111 +185,6 @@ public function testFullInitialization() $this->assertSame(1, $counter); } - /** - * @group legacy - */ - public function testPartialInitialization() - { - $counter = 0; - $instance = ChildTestClass::createLazyGhost([ - 'public' => static function (ChildTestClass $instance, string $property, ?string $scope, mixed $default) use (&$counter) { - ++$counter; - - return 4 === $default ? 123 : -1; - }, - 'publicReadonly' => static function (ChildTestClass $instance, string $property, ?string $scope, mixed $default) use (&$counter) { - ++$counter; - - return 234; - }, - "\0*\0protected" => static function (ChildTestClass $instance, string $property, ?string $scope, mixed $default) use (&$counter) { - ++$counter; - - return 5 === $default ? 345 : -1; - }, - "\0*\0protectedReadonly" => static function (ChildTestClass $instance, string $property, ?string $scope, mixed $default) use (&$counter) { - ++$counter; - - return 456; - }, - "\0".TestClass::class."\0private" => static function (ChildTestClass $instance, string $property, ?string $scope, mixed $default) use (&$counter) { - ++$counter; - - return 3 === $default ? 567 : -1; - }, - "\0".ChildTestClass::class."\0private" => static function (ChildTestClass $instance, string $property, ?string $scope, mixed $default) use (&$counter) { - ++$counter; - - return 6 === $default ? 678 : -1; - }, - 'dummyProperty' => fn () => 123, - ]); - - $this->assertSame(["\0".TestClass::class."\0lazyObjectState"], array_keys((array) $instance)); - $this->assertFalse($instance->isLazyObjectInitialized()); - $this->assertSame(123, $instance->public); - $this->assertFalse($instance->isLazyObjectInitialized()); - $this->assertTrue($instance->isLazyObjectInitialized(true)); - $this->assertSame(['public', "\0".TestClass::class."\0lazyObjectState"], array_keys((array) $instance)); - $this->assertSame(1, $counter); - - $instance->initializeLazyObject(); - $this->assertTrue($instance->isLazyObjectInitialized()); - $this->assertSame(123, $instance->public); - $this->assertSame(6, $counter); - - $properties = (array) $instance; - $this->assertInstanceOf(LazyObjectState::class, $properties["\0".TestClass::class."\0lazyObjectState"]); - unset($properties["\0".TestClass::class."\0lazyObjectState"]); - $this->assertSame(array_keys((array) new ChildTestClass()), array_keys($properties)); - $this->assertSame([123, 345, 456, 567, 234, 678], array_values($properties)); - } - - /** - * @group legacy - */ - public function testPartialInitializationWithReset() - { - $initializer = static fn (ChildTestClass $instance, string $property, ?string $scope, mixed $default) => 234; - $instance = ChildTestClass::createLazyGhost([ - 'public' => $initializer, - 'publicReadonly' => $initializer, - "\0*\0protected" => $initializer, - ]); - - $r = new \ReflectionProperty($instance, 'public'); - $r->setValue($instance, 123); - - $this->assertFalse($instance->isLazyObjectInitialized()); - $this->assertSame(234, $instance->publicReadonly); - $this->assertFalse($instance->isLazyObjectInitialized()); - $this->assertSame(123, $instance->public); - - $this->assertTrue($instance->resetLazyObject()); - $this->assertSame(234, $instance->publicReadonly); - $this->assertSame(234, $instance->public); - - $instance = ChildTestClass::createLazyGhost(['public' => $initializer]); - - $instance->resetLazyObject(); - - $instance->public = 123; - $this->assertSame(123, $instance->public); - - $this->assertTrue($instance->resetLazyObject()); - $this->assertSame(234, $instance->public); - } - - /** - * @group legacy - */ - public function testPartialInitializationWithNastyPassByRef() - { - $instance = ChildTestClass::createLazyGhost(['public' => fn (ChildTestClass $instance, string &$property, ?string &$scope, mixed $default) => $property = $scope = 123]); - - $this->assertSame(123, $instance->public); - } - public function testSetStdClassProperty() { $instance = ChildStdClass::createLazyGhost(function (ChildStdClass $ghost) { @@ -316,98 +210,6 @@ public function testReflectionPropertyGetValue() $this->assertSame(-3, $r->getValue($obj)); } - /** - * @group legacy - */ - public function testFullPartialInitialization() - { - $counter = 0; - $initializer = static fn (ChildTestClass $instance, string $property, ?string $scope, mixed $default) => 234; - $instance = ChildTestClass::createLazyGhost([ - 'public' => $initializer, - 'publicReadonly' => $initializer, - "\0*\0protected" => $initializer, - "\0" => function ($obj, $defaults) use (&$instance, &$counter) { - $counter += 1000; - $this->assertSame($instance, $obj); - - return [ - 'public' => 345, - 'publicReadonly' => 456, - "\0*\0protected" => 567, - ] + $defaults; - }, - ]); - - $this->assertSame($instance, $instance->initializeLazyObject()); - $this->assertSame(345, $instance->public); - $this->assertSame(456, $instance->publicReadonly); - $this->assertSame(6, ((array) $instance)["\0".ChildTestClass::class."\0private"]); - $this->assertSame(3, ((array) $instance)["\0".TestClass::class."\0private"]); - $this->assertSame(1000, $counter); - } - - /** - * @group legacy - */ - public function testPartialInitializationFallback() - { - $counter = 0; - $instance = ChildTestClass::createLazyGhost([ - "\0" => function ($obj) use (&$instance, &$counter) { - $counter += 1000; - $this->assertSame($instance, $obj); - - return [ - 'public' => 345, - 'publicReadonly' => 456, - "\0*\0protected" => 567, - ]; - }, - ], []); - - $this->assertSame(345, $instance->public); - $this->assertSame(456, $instance->publicReadonly); - $this->assertSame(567, ((array) $instance)["\0*\0protected"]); - $this->assertSame(1000, $counter); - } - - /** - * @group legacy - */ - public function testFullInitializationAfterPartialInitialization() - { - $counter = 0; - $initializer = static function (ChildTestClass $instance, string $property, ?string $scope, mixed $default) use (&$counter) { - ++$counter; - - return 234; - }; - $instance = ChildTestClass::createLazyGhost([ - 'public' => $initializer, - 'publicReadonly' => $initializer, - "\0*\0protected" => $initializer, - "\0" => function ($obj, $defaults) use (&$instance, &$counter) { - $counter += 1000; - $this->assertSame($instance, $obj); - - return [ - 'public' => 345, - 'publicReadonly' => 456, - "\0*\0protected" => 567, - ] + $defaults; - }, - ]); - - $this->assertSame(234, $instance->public); - $this->assertSame($instance, $instance->initializeLazyObject()); - $this->assertSame(234, $instance->public); - $this->assertSame(456, $instance->publicReadonly); - $this->assertSame(6, ((array) $instance)["\0".ChildTestClass::class."\0private"]); - $this->assertSame(3, ((array) $instance)["\0".TestClass::class."\0private"]); - $this->assertSame(1001, $counter); - } - public function testIndirectModification() { $obj = new class() { @@ -437,7 +239,7 @@ public function testReadOnlyClass() * * @return T */ - private function createLazyGhost(string $class, \Closure|array $initializer, array $skippedProperties = null): object + private function createLazyGhost(string $class, \Closure $initializer, array $skippedProperties = null): object { $r = new \ReflectionClass($class); diff --git a/src/Symfony/Component/VarExporter/composer.json b/src/Symfony/Component/VarExporter/composer.json index 418268b2fc8c6..7a6f7b6071605 100644 --- a/src/Symfony/Component/VarExporter/composer.json +++ b/src/Symfony/Component/VarExporter/composer.json @@ -16,8 +16,7 @@ } ], "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3" + "php": ">=8.2" }, "require-dev": { "symfony/var-dumper": "^6.4|^7.0" From d0b4fcfbbea8f9a15f69787d1b71dec20abba463 Mon Sep 17 00:00:00 2001 From: Sergii Dolgushev Date: Tue, 14 Nov 2023 19:24:13 +0000 Subject: [PATCH 22/26] Use extension_loaded call to check if pcntl extension is loaded, as SIGTERM might be set be swoole --- .../Component/Messenger/Command/ConsumeMessagesCommand.php | 2 +- .../Component/Messenger/Command/FailedMessagesRetryCommand.php | 2 +- .../Messenger/EventListener/StopWorkerOnSignalsListener.php | 2 +- .../EventListener/StopWorkerOnSigtermSignalListener.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php b/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php index f430a28b4bfe2..9746c5ed16848 100644 --- a/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php +++ b/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php @@ -258,7 +258,7 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti public function getSubscribedSignals(): array { - return $this->signals ?? (\defined('SIGTERM') ? [\SIGTERM, \SIGINT] : []); + return $this->signals ?? (\extension_loaded('pcntl') ? [\SIGTERM, \SIGINT] : []); } public function handleSignal(int $signal, int|false $previousExitCode = 0): int|false diff --git a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php index ae47d774b51c4..53e70bb99534c 100644 --- a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php +++ b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php @@ -134,7 +134,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int public function getSubscribedSignals(): array { - return $this->signals ?? (\defined('SIGTERM') ? [\SIGTERM, \SIGINT] : []); + return $this->signals ?? (\extension_loaded('pcntl') ? [\SIGTERM, \SIGINT] : []); } public function handleSignal(int $signal, int|false $previousExitCode = 0): int|false diff --git a/src/Symfony/Component/Messenger/EventListener/StopWorkerOnSignalsListener.php b/src/Symfony/Component/Messenger/EventListener/StopWorkerOnSignalsListener.php index 368c5c5b61862..327d1bb32b0c2 100644 --- a/src/Symfony/Component/Messenger/EventListener/StopWorkerOnSignalsListener.php +++ b/src/Symfony/Component/Messenger/EventListener/StopWorkerOnSignalsListener.php @@ -26,7 +26,7 @@ class StopWorkerOnSignalsListener implements EventSubscriberInterface public function __construct(array $signals = null, LoggerInterface $logger = null) { - if (null === $signals && \defined('SIGTERM')) { + if (null === $signals && \extension_loaded('pcntl')) { $signals = [SIGTERM, SIGINT]; } $this->signals = $signals ?? []; diff --git a/src/Symfony/Component/Messenger/EventListener/StopWorkerOnSigtermSignalListener.php b/src/Symfony/Component/Messenger/EventListener/StopWorkerOnSigtermSignalListener.php index 0b330338d19be..e1509dcf08358 100644 --- a/src/Symfony/Component/Messenger/EventListener/StopWorkerOnSigtermSignalListener.php +++ b/src/Symfony/Component/Messenger/EventListener/StopWorkerOnSigtermSignalListener.php @@ -24,6 +24,6 @@ class StopWorkerOnSigtermSignalListener extends StopWorkerOnSignalsListener { public function __construct(LoggerInterface $logger = null) { - parent::__construct(\defined('SIGTERM') ? [SIGTERM] : [], $logger); + parent::__construct(\extension_loaded('pcntl') ? [SIGTERM] : [], $logger); } } From 89f71abd792c77ff662512e66e1d7e94538c8c07 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 15 Nov 2023 16:28:27 +0100 Subject: [PATCH 23/26] [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 9b31a1de96937..6b92b77dff794 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -243,6 +243,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 beb30fb3d196f..54189a28f4add 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 6c04f84c6782d..0cebc1f09445d 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 55c5776ac6f44..f3442bc370f7d 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 7c1f4ca682ea2..488895d7c1b6e 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 be9f8845254d53b96b3f71b064aac1fe69083bdd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 15 Nov 2023 16:44:10 +0100 Subject: [PATCH 24/26] [7.0] minor cleanup --- .../Security/UserProvider/EntityFactory.php | 4 ++-- src/Symfony/Component/Routing/Attribute/Route.php | 2 +- src/Symfony/Component/Serializer/Attribute/Context.php | 2 +- .../Component/Serializer/Attribute/DiscriminatorMap.php | 2 +- src/Symfony/Component/Serializer/Attribute/Groups.php | 2 +- src/Symfony/Component/Serializer/Attribute/Ignore.php | 2 +- src/Symfony/Component/Serializer/Attribute/MaxDepth.php | 2 +- src/Symfony/Component/Serializer/Attribute/SerializedName.php | 2 +- src/Symfony/Component/Serializer/Attribute/SerializedPath.php | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php index f4ea0370525fe..d39b953b3ffff 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php @@ -19,10 +19,10 @@ /** * EntityFactory creates services for Doctrine user provider. * - * @final since Symfony 6.4 - * * @author Fabien Potencier * @author Christophe Coevoet + * + * @final */ class EntityFactory implements UserProviderFactoryInterface { diff --git a/src/Symfony/Component/Routing/Attribute/Route.php b/src/Symfony/Component/Routing/Attribute/Route.php index c8268b1168657..ba89e221ebb01 100644 --- a/src/Symfony/Component/Routing/Attribute/Route.php +++ b/src/Symfony/Component/Routing/Attribute/Route.php @@ -15,7 +15,7 @@ * @author Fabien Potencier * @author Alexander M. Turek * - * @final since Symfony 6.4 + * @final */ #[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] class Route diff --git a/src/Symfony/Component/Serializer/Attribute/Context.php b/src/Symfony/Component/Serializer/Attribute/Context.php index 5c1f0eee192b6..dc0301823a0db 100644 --- a/src/Symfony/Component/Serializer/Attribute/Context.php +++ b/src/Symfony/Component/Serializer/Attribute/Context.php @@ -16,7 +16,7 @@ /** * @author Maxime Steinhausser * - * @final since Symfony 6.4 + * @final */ #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class Context diff --git a/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php b/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php index ecba7b9033807..31a993207371c 100644 --- a/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php +++ b/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php @@ -16,7 +16,7 @@ /** * @author Samuel Roze * - * @final since Symfony 6.4 + * @final */ #[\Attribute(\Attribute::TARGET_CLASS)] class DiscriminatorMap diff --git a/src/Symfony/Component/Serializer/Attribute/Groups.php b/src/Symfony/Component/Serializer/Attribute/Groups.php index b90315645c581..14dabd298f67c 100644 --- a/src/Symfony/Component/Serializer/Attribute/Groups.php +++ b/src/Symfony/Component/Serializer/Attribute/Groups.php @@ -16,7 +16,7 @@ /** * @author Kévin Dunglas * - * @final since Symfony 6.4 + * @final */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_CLASS)] class Groups diff --git a/src/Symfony/Component/Serializer/Attribute/Ignore.php b/src/Symfony/Component/Serializer/Attribute/Ignore.php index 0121ebfed66d7..da471c2abaeb2 100644 --- a/src/Symfony/Component/Serializer/Attribute/Ignore.php +++ b/src/Symfony/Component/Serializer/Attribute/Ignore.php @@ -14,7 +14,7 @@ /** * @author Kévin Dunglas * - * @final since Symfony 6.4 + * @final */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] class Ignore diff --git a/src/Symfony/Component/Serializer/Attribute/MaxDepth.php b/src/Symfony/Component/Serializer/Attribute/MaxDepth.php index 60cb20890ac96..0373b891d9448 100644 --- a/src/Symfony/Component/Serializer/Attribute/MaxDepth.php +++ b/src/Symfony/Component/Serializer/Attribute/MaxDepth.php @@ -16,7 +16,7 @@ /** * @author Kévin Dunglas * - * @final since Symfony 6.4 + * @final */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] class MaxDepth diff --git a/src/Symfony/Component/Serializer/Attribute/SerializedName.php b/src/Symfony/Component/Serializer/Attribute/SerializedName.php index 407a2675bf8a1..e1fb478143f15 100644 --- a/src/Symfony/Component/Serializer/Attribute/SerializedName.php +++ b/src/Symfony/Component/Serializer/Attribute/SerializedName.php @@ -16,7 +16,7 @@ /** * @author Fabien Bourigault * - * @final since Symfony 6.4 + * @final */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] class SerializedName diff --git a/src/Symfony/Component/Serializer/Attribute/SerializedPath.php b/src/Symfony/Component/Serializer/Attribute/SerializedPath.php index 42ff340000f3c..ea3c8f90eb43e 100644 --- a/src/Symfony/Component/Serializer/Attribute/SerializedPath.php +++ b/src/Symfony/Component/Serializer/Attribute/SerializedPath.php @@ -18,7 +18,7 @@ /** * @author Tobias Bönner * - * @final since Symfony 6.4 + * @final */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] class SerializedPath From feb5e6668aa3f8e471db9ea84ade75f98916ccf6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 15 Nov 2023 17:13:43 +0100 Subject: [PATCH 25/26] Update CHANGELOG for 7.0.0-RC1 --- CHANGELOG-7.0.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG-7.0.md b/CHANGELOG-7.0.md index d81826a434464..b71c7da646673 100644 --- a/CHANGELOG-7.0.md +++ b/CHANGELOG-7.0.md @@ -7,6 +7,17 @@ in 7.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/v7.0.0...v7.0.1 +* 7.0.0-RC1 (2023-11-15) + + * bug #52597 [DependencyInjection] Fix dumping containers with null-referenced services (nicolas-grekas) + * bug #52588 [Messenger] Use extension_loaded call to check if pcntl extension is loaded, as SIGTERM might be set be swoole (Sergii Dolgushev) + * feature #52569 [VarExporter] Drop support for partially initialized lazy object (nicolas-grekas) + * bug #52567 [AssetMapper] Fixing js sourceMappingURL extraction when sourceMappingURL used in code (weaverryan) + * bug #52579 [DomCrawler] UriResolver support path with colons (vdauchy) + * bug #52581 [Messenger] attach all required parameters to query (xabbuh) + * feature #52568 [VarExporter] Deprecate per-property lazy-initializers (nicolas-grekas) + * feature #52560 [Mailer] Update default Mailjet port (Katario) + * 7.0.0-BETA3 (2023-11-10) * bug #51666 [RateLimiter] CompoundLimiter was accepting requests even when some limiters already consumed all tokens (10n) From 936caaa692621dc4834ed3647307aa6b192fe3f6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 15 Nov 2023 17:13:47 +0100 Subject: [PATCH 26/26] Update VERSION for 7.0.0-RC1 --- 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 db2c1de9cc351..385b73e7f0fc7 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 = '7.0.0-DEV'; + public const VERSION = '7.0.0-RC1'; public const VERSION_ID = 70000; public const MAJOR_VERSION = 7; public const MINOR_VERSION = 0; public const RELEASE_VERSION = 0; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = 'RC1'; public const END_OF_MAINTENANCE = '07/2024'; public const END_OF_LIFE = '07/2024';