From 4a5a327b1ff760ae7d19bef23798e7ab1d543dad Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 27 May 2023 10:05:50 +0200 Subject: [PATCH 01/57] Update CHANGELOG for 5.4.24 --- CHANGELOG-5.4.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CHANGELOG-5.4.md b/CHANGELOG-5.4.md index 8241220390c11..dca25ff5b0d50 100644 --- a/CHANGELOG-5.4.md +++ b/CHANGELOG-5.4.md @@ -7,6 +7,34 @@ 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.24 (2023-05-27) + + * bug #50429 [Console] block input stream if needed (joelwurtz) + * bug #50315 [Translation] Fix handling of null messages in `ArrayLoader` (rob006) + * bug #50338 [Console] Remove ``exec`` and replace it by ``shell_exec`` (maxbeckers) + * bug #50362 [FrameworkBundle] Fix Workflow without a marking store definition uses marking store definition of previously defined workflow (krciga22) + * bug #50309 [HttpFoundation] UrlHelper is now aware of RequestContext changes (giosh94mhz) + * bug #50309 [HttpFoundation] UrlHelper is now aware of RequestContext changes (giosh94mhz) + * bug #50354 [Process] Stop the process correctly even if underlying input stream is not closed (joelwurtz) + * bug #50332 [PropertyInfo] Fix `PhpStanExtractor` when constructor has no docblock (HypeMC) + * bug #50253 [FrameworkBundle] Generate caches consistently on successive run of `cache:clear` command (Okhoshi) + * bug #49063 [Messenger] Respect `isRetryable` decision of the retry strategy for re-delivery (FlyingDR) + * bug #50251 [Serializer] Handle datetime deserialization in U format (tugmaks) + * bug #50266 [HttpFoundation] Fix file streaming after connection aborted (rlshukhov) + * bug #50269 Fix param type annotation (l-vo) + * bug #50256 [HttpClient] Fix setting duplicate-name headers when redirecting with AmpHttpClient (nicolas-grekas) + * bug #50214 [WebProfilerBundle] Remove legacy filters remnants (MatTheCat) + * bug #50235 [HttpClient] Fix getting through proxies via CONNECT (nicolas-grekas) + * bug #50244 [HttpKernel] Fix restoring surrogate content from cache (nicolas-grekas) + * bug #50246 [DependencyInjection] Do not check errored definitions’ type (MatTheCat) + * bug #49557 [PropertyInfo] Fix phpDocExtractor nullable array value type (fabpot) + * bug #50213 [ErrorHandler] Prevent conflicts with WebProfilerBundle’s JavaScript (MatTheCat) + * bug #50192 [Serializer] backed enum throw notNormalizableValueException outside construct method (alli83) + * bug #50238 [HttpKernel] Don't use eval() to render ESI/SSI (nicolas-grekas) + * bug #50226 [HttpClient] Ensure HttplugClient ignores invalid HTTP headers (nicolas-grekas) + * bug #50203 [Messenger] Fix registering message handlers (nicolas-grekas) + * bug #50204 [ErrorHandler] Skip Httplug deprecations for HttplugClient (nicolas-grekas) + * 5.4.23 (2023-04-28) * bug #50143 [Console] trim(): Argument #1 () must be of type string, bool given (danepowell) From 5ab98605fdb93dbd42c83dbbe986ee0f25f9c7ed Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 27 May 2023 10:06:30 +0200 Subject: [PATCH 02/57] Update VERSION for 5.4.24 --- 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 1173f499d023f..f44eac93104ea 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.24-DEV'; + public const VERSION = '5.4.24'; public const VERSION_ID = 50424; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; public const RELEASE_VERSION = 24; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From b6b2dec5f2351085939fecfe263a30fa3e6da9e1 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 27 May 2023 10:08:53 +0200 Subject: [PATCH 03/57] Update CONTRIBUTORS for 5.4.24 --- CONTRIBUTORS.md | 65 +++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 24afd64907140..cf5f960f7a101 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -21,9 +21,9 @@ The Symfony Connect username in parenthesis allows to get more information - Jordi Boggiano (seldaek) - Roland Franssen (ro0) - Victor Berchet (victor) + - Javier Eguiluz (javier.eguiluz) - Yonel Ceruto (yonelceruto) - Tobias Nyholm (tobias) - - Javier Eguiluz (javier.eguiluz) - Oskar Stark (oskarstark) - Ryan Weaver (weaverryan) - Johannes S (johannes) @@ -40,8 +40,8 @@ The Symfony Connect username in parenthesis allows to get more information - Abdellatif Ait boudad (aitboudad) - Jan Schädlich (jschaedl) - Lukas Kahwe Smith (lsmith) - - Jérôme Tamarelle (gromnan) - Kevin Bond (kbond) + - Jérôme Tamarelle (gromnan) - Martin Hasoň (hason) - Jeremy Mikola (jmikola) - Jean-François Simon (jfsimon) @@ -52,21 +52,21 @@ The Symfony Connect username in parenthesis allows to get more information - Valentin Udaltsov (vudaltsov) - Vasilij Duško (staff) - Matthias Pigulla (mpdude) + - Antoine Lamirault (alamirault) - Gabriel Ostrolucký (gadelat) - - Antoine Makdessi (amakdessi) - Laurent VOULLEMIER (lvo) + - Antoine Makdessi (amakdessi) - Pierre du Plessis (pierredup) - - Antoine Lamirault (alamirault) - Grégoire Paris (greg0ire) - Jonathan Wage (jwage) + - Mathieu Lechat (mat_the_cat) - Titouan Galopin (tgalopin) - David Maicher (dmaicher) + - Alexander Schranz (alexander-schranz) - Gábor Egyed (1ed) - Mathieu Santostefano (welcomattic) - - Alexander Schranz (alexander-schranz) - Alexandre Salomé (alexandresalome) - William DURAND - - Mathieu Lechat (mat_the_cat) - ornicar - Dany Maillard (maidmaid) - Eriksen Costa @@ -76,10 +76,10 @@ The Symfony Connect username in parenthesis allows to get more information - Francis Besset (francisbesset) - Vasilij Dusko | CREATION - Bulat Shakirzyanov (avalanche123) + - Vincent Langlet (deviling) - Iltar van der Berg - Miha Vrhovnik (mvrhov) - Mathieu Piot (mpiot) - - Vincent Langlet (deviling) - Saša Stamenković (umpirsky) - Alex Pott - Guilhem N (guilhemn) @@ -95,14 +95,14 @@ The Symfony Connect username in parenthesis allows to get more information - Ruud Kamphuis (ruudk) - Henrik Bjørnskov (henrikbjorn) - David Buchmann (dbu) + - Massimiliano Arione (garak) - Andrej Hudec (pulzarraider) - Julien Falque (julienfalque) - - Massimiliano Arione (garak) - Jáchym Toušek (enumag) - Douglas Greenshields (shieldo) + - Mathias Arlaud (mtarld) - Christian Raue - Fran Moreno (franmomu) - - Mathias Arlaud (mtarld) - Graham Campbell (graham) - Michel Weimerskirch (mweimerskirch) - Eric Clemmons (ericclemmons) @@ -117,18 +117,18 @@ The Symfony Connect username in parenthesis allows to get more information - Dariusz Górecki (canni) - Maxime Helias (maxhelias) - Ener-Getick - - Sebastiaan Stok (sstok) - Tugdual Saunier (tucksaun) + - Sebastiaan Stok (sstok) - Jérôme Vasseur (jvasseur) - Ion Bazan (ionbazan) - Rokas Mikalkėnas (rokasm) + - Yanick Witschi (toflar) - Lee McDermott - Brandon Turner - Luis Cordova (cordoval) - Daniel Holmes (dholmes) - Toni Uebernickel (havvg) - Bart van den Burg (burgov) - - Yanick Witschi (toflar) - Jordan Alliot (jalliot) - Smaine Milianni (ismail1432) - John Wards (johnwards) @@ -137,6 +137,7 @@ The Symfony Connect username in parenthesis allows to get more information - Antoine Hérault (herzult) - Konstantin.Myakshin - Arman Hosseini (arman) + - gnito-org - Saif Eddin Gmati (azjezz) - Simon Berger - Arnaud Le Blanc (arnaud-lb) @@ -152,6 +153,7 @@ The Symfony Connect username in parenthesis allows to get more information - Chris Wilkinson (thewilkybarkid) - Brice BERNARD (brikou) - Roman Martinuk (a2a4) + - Joel Wurtz (brouznouf) - Gregor Harlan (gharlan) - Baptiste Clavié (talus) - Adrien Brault (adrienbrault) @@ -168,7 +170,6 @@ The Symfony Connect username in parenthesis allows to get more information - Guillaume (guill) - Christopher Hertel (chertel) - Jacob Dreesen (jdreesen) - - Joel Wurtz (brouznouf) - Olivier Dolbeau (odolbeau) - Florian Voutzinos (florianv) - zairig imad (zairigimad) @@ -180,6 +181,7 @@ The Symfony Connect username in parenthesis allows to get more information - HeahDude - Richard van Laak (rvanlaak) - Paráda József (paradajozsef) + - Hubert Lenoir (hubert_lenoir) - Alessandro Lai (jean85) - Alexander Schwenn (xelaris) - Fabien Pennequin (fabienpennequin) @@ -203,7 +205,6 @@ The Symfony Connect username in parenthesis allows to get more information - Tigran Azatyan (tigranazatyan) - Eric GELOEN (gelo) - Matthieu Napoli (mnapoli) - - Hubert Lenoir (hubert_lenoir) - Tomáš Votruba (tomas_votruba) - Joshua Thijssen - Stefano Sala (stefano.sala) @@ -295,7 +296,6 @@ The Symfony Connect username in parenthesis allows to get more information - Samuel NELA (snela) - Romain Monteil (ker0x) - dFayet - - gnito-org - Karoly Gossler (connorhu) - Vincent AUBERT (vincent) - Sebastien Morel (plopix) @@ -304,7 +304,9 @@ The Symfony Connect username in parenthesis allows to get more information - Timothée Barray (tyx) - Sébastien Alfaiate (seb33300) - James Halsall (jaitsu) + - Maximilian Beckers (maxbeckers) - Mikael Pajunen + - Marcin Sikoń (marphi) - Warnar Boekkooi (boekkooi) - Marco Petersen (ocrampete16) - Benjamin Leveque (benji07) @@ -335,6 +337,7 @@ The Symfony Connect username in parenthesis allows to get more information - Urinbayev Shakhobiddin (shokhaa) - Ahmed Raafat - Philippe Segatori + - Allison Guilhem (a_guilhem) - Thibaut Cheymol (tcheymol) - Julien Pauli - Islam Israfilov (islam93) @@ -346,7 +349,6 @@ The Symfony Connect username in parenthesis allows to get more information - Ruben Gonzalez (rubenrua) - Benjamin Dulau (dbenjamin) - Pavel Kirpitsov (pavel-kirpichyov) - - Maximilian Beckers (maxbeckers) - Mathieu Lemoine (lemoinem) - Christian Schmidt - Andreas Hucks (meandmymonkey) @@ -357,7 +359,6 @@ The Symfony Connect username in parenthesis allows to get more information - Clara van Miert - Martin Auswöger - Alexander Menshchikov - - Marcin Sikoń (marphi) - Stepan Anchugov (kix) - bronze1man - sun (sun) @@ -375,11 +376,13 @@ The Symfony Connect username in parenthesis allows to get more information - Kyle - Dominique Bongiraud - Hidde Wieringa (hiddewie) + - Dane Powell - Christopher Davis (chrisguitarguy) - Lukáš Holeczy (holicz) - Michael Lee (zerustech) - Florian Lonqueu-Brochard (florianlb) - Leszek Prabucki (l3l0) + - Giorgio Premi - Emanuele Panzeri (thepanz) - Matthew Smeets - François Zaninotto (fzaninotto) @@ -415,14 +418,12 @@ The Symfony Connect username in parenthesis allows to get more information - Mantis Development - Pablo Lozano (arkadis) - quentin neyrat (qneyrat) - - Dane Powell - Antonio Jose Cerezo (ajcerezo) - Marcin Szepczynski (czepol) - Lescot Edouard (idetox) - Loïc Frémont (loic425) - Rob Frawley 2nd (robfrawley) - Mohammad Emran Hasan (phpfour) - - Allison Guilhem (a_guilhem) - Dmitriy Mamontov (mamontovdmitriy) - Kévin THERAGE (kevin_therage) - Nikita Konstantinov (unkind) @@ -430,7 +431,6 @@ The Symfony Connect username in parenthesis allows to get more information - Francois Zaninotto - Laurent Masforné (heisenberg) - Claude Khedhiri (ck-developer) - - Giorgio Premi - Daniel Tschinder - Christian Schmidt - Alexander Kotynia (olden) @@ -576,6 +576,7 @@ The Symfony Connect username in parenthesis allows to get more information - Grégoire Passault (gregwar) - Jerzy Zawadzki (jzawadzki) - Ismael Ambrosi (iambrosi) + - Samaël Villette (samadu61) - Saif Eddin G - Emmanuel BORGES (eborges78) - siganushka (siganushka) @@ -691,6 +692,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ruben Jacobs (rubenj) - Arkadius Stefanski (arkadius) - Jérémy M (th3mouk) + - Tristan Pouliquen - Terje Bråten - Pierre Rineau - Renan Gonçalves (renan_saddam) @@ -720,6 +722,7 @@ The Symfony Connect username in parenthesis allows to get more information - Eric COURTIAL - Xesxen - ShinDarth + - Phil E. Taylor (philetaylor) - Arun Philip - Stéphane PY (steph_py) - Philipp Kräutli (pkraeutli) @@ -752,10 +755,10 @@ The Symfony Connect username in parenthesis allows to get more information - Hassan Amouhzi - Antonin CLAUZIER (0x346e3730) - Andrei C. (moldman) - - Samaël Villette (samadu61) - Tamas Szijarto - stlrnz - Adrien Wilmet (adrienfr) + - Mathieu Rochette (mathroc) - Alex Bacart - hugovms - Michele Locati @@ -898,6 +901,7 @@ The Symfony Connect username in parenthesis allows to get more information - Jonas Flodén (flojon) - Adrien Lucas (adrienlucas) - Dominik Zogg + - Quentin Devos - Kai Dederichs - Luc Vieillescazes (iamluc) - Thomas Nunninger @@ -956,7 +960,6 @@ The Symfony Connect username in parenthesis allows to get more information - Gigino Chianese (sajito) - Xav` (xavismeh) - Remi Collet - - Mathieu Rochette (mathroc) - Vicent Soria Durá (vicentgodella) - Michael Moravec - Anthony Ferrara @@ -1026,6 +1029,7 @@ The Symfony Connect username in parenthesis allows to get more information - Loïc Faugeron - Aurélien Fredouelle - Pavel Campr (pcampr) + - Markus Staab - Forfarle (forfarle) - Johnny Robeson (johnny) - Kai Eichinger (kai_eichinger) @@ -1267,7 +1271,6 @@ The Symfony Connect username in parenthesis allows to get more information - Szijarto Tamas - Arend Hummeling - Makdessi Alex - - Phil E. Taylor (philetaylor) - Juan Miguel Besada Vidal (soutlink) - dlorek - Stuart Fyfe @@ -1295,7 +1298,6 @@ The Symfony Connect username in parenthesis allows to get more information - Simon Schick (simonsimcity) - Victor Macko (victor_m) - Tristan Roussel - - Quentin Devos - Jorge Vahldick (jvahldick) - Vladimir Mantulo (mantulo) - aim8604 @@ -1303,6 +1305,7 @@ The Symfony Connect username in parenthesis allows to get more information - Maciej Zgadzaj - David Legatt (dlegatt) - Maarten de Boer (mdeboer) + - Alexandre parent - Cameron Porter - Hossein Bukhamsin - Oliver Hoff @@ -1449,7 +1452,6 @@ The Symfony Connect username in parenthesis allows to get more information - Michael Olšavský - Benny Born - Emirald Mateli - - Tristan Pouliquen - Jose Gonzalez - Claudio Zizza - Ivo Valchev @@ -1841,7 +1843,6 @@ The Symfony Connect username in parenthesis allows to get more information - vladyslavstartsev - Kévin - Marc Abramowitz - - Markus Staab - michal - Martijn Evers - Sjoerd Adema @@ -2220,11 +2221,13 @@ The Symfony Connect username in parenthesis allows to get more information - Andrew Tch - Alexander Cheprasov - Rodrigo Díez Villamuera (rodrigodiez) + - Brad Treloar - Stephen Clouse - e-ivanov - Abderrahman DAIF (death_maker) - Yann Rabiller (einenlum) - Jochen Bayer (jocl) + - Constantine Shtompel - VAN DER PUTTE Guillaume (guillaume_vdp) - Patrick Carlo-Hickman - Bruno MATEU @@ -2235,6 +2238,7 @@ The Symfony Connect username in parenthesis allows to get more information - Viacheslav Sychov - Nicolas Sauveur (baishu) - Helmut Hummel (helhum) + - Andrew Neil Forster (krciga22) - Matt Brunt - Carlos Ortega Huetos - Péter Buri (burci) @@ -2285,7 +2289,6 @@ The Symfony Connect username in parenthesis allows to get more information - John Espiritu (johnillo) - Oxan van Leeuwen - pkowalczyk - - Alexandre parent - Soner Sayakci - Max Voloshin (maxvoloshin) - Nicolas Fabre (nfabre) @@ -2400,6 +2403,7 @@ The Symfony Connect username in parenthesis allows to get more information - Claudiu Cristea - Zacharias Luiten - Sebastian Utz + - Oliver Hader - Adrien Gallou (agallou) - Maks Rafalko (bornfree) - Conrad Kleinespel (conradk) @@ -2417,6 +2421,7 @@ The Symfony Connect username in parenthesis allows to get more information - Cédric Lahouste (rapotor) - Samuel Vogel (samuelvogel) - Berat Doğan + - Christian Kolb - Guillaume LECERF - Juanmi Rodriguez Cerón - twifty @@ -2437,6 +2442,8 @@ The Symfony Connect username in parenthesis allows to get more information - Eric Stern - ShiraNai7 - Antal Áron (antalaron) + - Alexander Grimalovsky (flying) + - Ivan Pepelko (pepelko) - Vašek Purchart (vasek-purchart) - Janusz Jabłoński (yanoosh) - Fleuv @@ -2581,6 +2588,7 @@ The Symfony Connect username in parenthesis allows to get more information - Nicolas Schwartz (nicoschwartz) - Tim Jabs (rubinum) - Stéphane Seng (stephaneseng) + - Robert Korulczyk - Jonathan Gough - Benoit Leveque - Benjamin Bender @@ -2652,6 +2660,7 @@ The Symfony Connect username in parenthesis allows to get more information - Martin Schophaus (m_schophaus_adcada) - Martynas Sudintas (martiis) - Anton Sukhachev (mrsuh) + - Vitaliy Zhuk (zhukv) - Marcel Siegert - ryunosuke - Roy de Vos Burchart @@ -2707,6 +2716,7 @@ The Symfony Connect username in parenthesis allows to get more information - Jovan Perovic (jperovic) - Pablo Maria Martelletti (pmartelletti) - Sander van der Vlugt (stranding) + - Maxim Tugaev (tugmaks) - Florian Bogey - Waqas Ahmed - Bert Hekman @@ -3141,6 +3151,7 @@ The Symfony Connect username in parenthesis allows to get more information - Antoine LA - Vyacheslav Slinko - Benjamin Laugueux + - Lane Shukhov - Jakub Chábek - William Pinaud (DocFX) - Johannes @@ -3244,6 +3255,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ahmed Abdulrahman - dinitrol - Penny Leach + - Kevin Mian Kraiker - Yurii K - Richard Trebichavský - g123456789l @@ -3282,6 +3294,7 @@ The Symfony Connect username in parenthesis allows to get more information - ADmad - Nicolas Roudaire - Abdouni Karim (abdounikarim) + - Adrian Günter (adrianguenter) - Andreas Forsblom (aforsblo) - Alex Olmos (alexolmos) - Cedric BERTOLINI (alsciende) From f2af155921a44fb7f53cdbfe5bd2f9c2d6651c1f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 27 May 2023 19:20:39 +0200 Subject: [PATCH 04/57] Bump Symfony version to 5.4.25 --- 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 f44eac93104ea..ae666d4dc307f 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.24'; - public const VERSION_ID = 50424; + public const VERSION = '5.4.25-DEV'; + public const VERSION_ID = 50425; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 24; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 25; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '11/2024'; public const END_OF_LIFE = '11/2025'; From 4b72b6112a3845d9d8baa754e7de3f9fe3055091 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 27 May 2023 23:15:53 +0200 Subject: [PATCH 05/57] Bump Symfony version to 6.2.12 --- 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 1ad714e6d98a9..f6d91d7b6a81f 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -75,12 +75,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.2.11'; - public const VERSION_ID = 60211; + public const VERSION = '6.2.12-DEV'; + public const VERSION_ID = 60212; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 2; - public const RELEASE_VERSION = 11; - public const EXTRA_VERSION = ''; + public const RELEASE_VERSION = 12; + public const EXTRA_VERSION = 'DEV'; public const END_OF_MAINTENANCE = '07/2023'; public const END_OF_LIFE = '07/2023'; From 2c668ba8a2fe6f077e94891e4f273bf4002af2f3 Mon Sep 17 00:00:00 2001 From: vorozcovmaksim Date: Sat, 27 May 2023 16:43:39 +0300 Subject: [PATCH 06/57] Ignore definitions bearing the `container.excluded` tag --- .../Console/Descriptor/JsonDescriptor.php | 3 +++ .../Console/Descriptor/MarkdownDescriptor.php | 3 +++ .../Console/Descriptor/TextDescriptor.php | 4 ++++ .../Console/Descriptor/XmlDescriptor.php | 6 ++++++ .../Tests/Fixtures/ContainerExcluded.php | 12 ++++++++++++ .../Tests/Functional/ContainerDebugCommandTest.php | 14 ++++++++++++++ .../Tests/Functional/app/ContainerDebug/config.yml | 2 ++ 7 files changed, 44 insertions(+) create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ContainerExcluded.php diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index c454b85ffb4bf..5f0588c9a6d48 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -106,6 +106,9 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o if ($service instanceof Alias) { $data['aliases'][$serviceId] = $this->getContainerAliasData($service); } elseif ($service instanceof Definition) { + if ($service->hasTag('container.excluded')) { + continue; + } $data['definitions'][$serviceId] = $this->getContainerDefinitionData($service, $omitTags, $showArguments, $builder, $serviceId); } else { $data['services'][$serviceId] = $service::class; diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index 36b297172681f..836f06742cd6b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -162,6 +162,9 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o if ($service instanceof Alias) { $services['aliases'][$serviceId] = $service; } elseif ($service instanceof Definition) { + if ($service->hasTag('container.excluded')) { + continue; + } $services['definitions'][$serviceId] = $service; } else { $services['services'][$serviceId] = $service; diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index e589f7b3400a8..8f6ef7e9a420e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -198,6 +198,10 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o } if ($definition instanceof Definition) { + if ($definition->hasTag('container.excluded')) { + unset($serviceIds[$key]); + continue; + } if ($showTag) { $tags = $definition->getTag($showTag); foreach ($tags as $tag) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 6c01c15ce04db..6c49b768f67e6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -294,6 +294,12 @@ private function getContainerServicesDocument(ContainerBuilder $builder, string continue; } + if ($service instanceof Definition) { + if ($service->hasTag('container.excluded')) { + continue; + } + } + $serviceXML = $this->getContainerServiceDocument($service, $serviceId, null, $showArguments); $containerXML->appendChild($containerXML->ownerDocument->importNode($serviceXML->childNodes->item(0), true)); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ContainerExcluded.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ContainerExcluded.php new file mode 100644 index 0000000000000..b89eed5f8db85 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ContainerExcluded.php @@ -0,0 +1,12 @@ + + */ +class ContainerExcluded +{ +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php index 67727202e72b7..bb09c6aed0765 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php @@ -13,6 +13,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\BackslashClass; +use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\ContainerExcluded; use Symfony\Component\Console\Tester\ApplicationTester; use Symfony\Component\Console\Tester\CommandCompletionTester; @@ -85,6 +86,19 @@ public function testDeprecatedServiceAndAlias() $this->assertStringContainsString('[WARNING] The "deprecated_alias" alias is deprecated since foo/bar 1.9 and will be removed in 2.0', $tester->getDisplay()); } + public function testExcludedService() + { + static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']); + + $application = new Application(static::$kernel); + $application->setAutoExit(false); + + $tester = new ApplicationTester($application); + + $tester->run(['command' => 'debug:container']); + $this->assertStringNotContainsString(ContainerExcluded::class, $tester->getDisplay()); + } + /** * @dataProvider provideIgnoreBackslashWhenFindingService */ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDebug/config.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDebug/config.yml index cc1a01bb8f0b5..15ddaca64356f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDebug/config.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDebug/config.yml @@ -33,3 +33,5 @@ services: - '%env(REAL)%' - '%env(int:key:2:json:JSON)%' - '%env(float:key:2:json:JSON)%' + Symfony\Bundle\FrameworkBundle\Tests\Fixtures\ContainerExcluded: + tags: ['container.excluded'] From 83d469dd4319dd48015c53d379fd1e1f4ce34637 Mon Sep 17 00:00:00 2001 From: "Phil E. Taylor" Date: Sun, 28 May 2023 19:16:27 +0100 Subject: [PATCH 07/57] Fix Typos Signed-off-by: Phil E. Taylor --- src/Symfony/Contracts/Translation/Test/TranslatorTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Contracts/Translation/Test/TranslatorTest.php b/src/Symfony/Contracts/Translation/Test/TranslatorTest.php index fdf4f76c1589a..dff86ddad8aba 100644 --- a/src/Symfony/Contracts/Translation/Test/TranslatorTest.php +++ b/src/Symfony/Contracts/Translation/Test/TranslatorTest.php @@ -258,13 +258,13 @@ public static function getChooseTests() new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a new-line in it. Selector > 1.', 5], - // with double-quotes and id split accros lines + // with double-quotes and id split across lines ['This is a text with a new-line in it. Selector = 1.', '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a new-line in it. Selector = 1.|[1,Inf]This is a text with a new-line in it. Selector > 1.', 1], - // with single-quotes and id split accros lines + // with single-quotes and id split across lines ['This is a text with a new-line in it. Selector > 1.', '{0}This is a text with a new-line in it. Selector = 0.|{1}This is a text with a @@ -272,7 +272,7 @@ public static function getChooseTests() new-line in it. Selector > 1.', 5], // with single-quotes and \n in text ['This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0], - // with double-quotes and id split accros lines + // with double-quotes and id split across lines ["This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1], // escape pipe ['This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0], From 380e709c5e7975393feef650ce2264bd5ca79726 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 30 May 2023 11:11:03 +0200 Subject: [PATCH 08/57] CS fix --- .../FrameworkBundle/Console/Descriptor/XmlDescriptor.php | 6 ++---- .../FrameworkBundle/Tests/Fixtures/ContainerExcluded.php | 5 ----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 6c49b768f67e6..ecb9b01b776a7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -294,10 +294,8 @@ private function getContainerServicesDocument(ContainerBuilder $builder, string continue; } - if ($service instanceof Definition) { - if ($service->hasTag('container.excluded')) { - continue; - } + if ($service instanceof Definition && $service->hasTag('container.excluded')) { + continue; } $serviceXML = $this->getContainerServiceDocument($service, $serviceId, null, $showArguments); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ContainerExcluded.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ContainerExcluded.php index b89eed5f8db85..2508b74276bc0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ContainerExcluded.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/ContainerExcluded.php @@ -1,12 +1,7 @@ - */ class ContainerExcluded { } From bb4eeb07a501d9b060f7f31622cc1fd250a71f5c Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Tue, 30 May 2023 17:50:20 +0200 Subject: [PATCH 09/57] [DependencyInjection] Escape `%` from parameter-like default values --- .../Compiler/AutowirePass.php | 18 ++++++++++++++---- .../Tests/Compiler/AutowirePassTest.php | 13 +++++++++++++ .../Fixtures/includes/autowiring_classes.php | 7 +++++++ 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php index 6c3cf82cac072..845f09c116fe1 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -52,6 +52,15 @@ public function __construct(bool $throwOnAutowireException = true) $this->defaultArgument = new class() { public $value; public $names; + public $bag; + + public function withValue(\ReflectionParameter $parameter): self + { + $clone = clone $this; + $clone->value = $this->bag->escapeValue($parameter->getDefaultValue()); + + return $clone; + } }; } @@ -60,6 +69,8 @@ public function __construct(bool $throwOnAutowireException = true) */ public function process(ContainerBuilder $container) { + $this->defaultArgument->bag = $container->getParameterBag(); + try { $this->typesClone = clone $this; parent::process($container); @@ -67,6 +78,7 @@ public function process(ContainerBuilder $container) $this->decoratedClass = null; $this->decoratedId = null; $this->methodCalls = null; + $this->defaultArgument->bag = null; $this->defaultArgument->names = null; $this->getPreviousValue = null; $this->decoratedMethodIndex = null; @@ -287,8 +299,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a } // specifically pass the default value - $arguments[$index] = clone $this->defaultArgument; - $arguments[$index]->value = $parameter->getDefaultValue(); + $arguments[$index] = $this->defaultArgument->withValue($parameter); continue; } @@ -298,8 +309,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a $failureMessage = $this->createTypeNotFoundMessageCallback($ref, sprintf('argument "$%s" of method "%s()"', $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method)); if ($parameter->isDefaultValueAvailable()) { - $value = clone $this->defaultArgument; - $value->value = $parameter->getDefaultValue(); + $value = $this->defaultArgument->withValue($parameter); } elseif (!$parameter->allowsNull()) { throw new AutowiringFailedException($this->currentId, $failureMessage); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php index e61e2d45fc41f..ac81725033e42 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php @@ -1219,4 +1219,17 @@ public function testAutowireWithNamedArgs() $this->assertEquals([new TypedReference(A::class, A::class), 'abc'], $container->getDefinition('foo')->getArguments()); } + + public function testAutowireDefaultValueParametersLike() + { + $container = new ContainerBuilder(); + + $container->register('foo', ParametersLikeDefaultValue::class) + ->setAutowired(true) + ->setArgument(1, 'ok'); + + (new AutowirePass())->process($container); + + $this->assertSame('%%not%%one%%parameter%%here%%', $container->getDefinition('foo')->getArgument(0)); + } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php index ad1f06a49231e..87440891d85fc 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php @@ -431,3 +431,10 @@ public function __construct(NotExisting $notExisting) { } } + +class ParametersLikeDefaultValue +{ + public function __construct(string $parameterLike = '%not%one%parameter%here%', string $willBeSetToKeepFirstArgumentDefaultValue = 'ok') + { + } +} From 4aa8b46c2ee59c9f54a97f2ae200891f30b8671e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Thu, 25 May 2023 23:26:31 +0200 Subject: [PATCH 10/57] [Filesystem] Follow symlinks when dumping files --- .../Component/Filesystem/Filesystem.php | 6 ++ .../Filesystem/Tests/FilesystemTest.php | 67 ++++++++++++++++++- 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 98725e9149931..23192bc74c237 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -669,6 +669,12 @@ public function dumpFile(string $filename, $content) $dir = \dirname($filename); + if (is_link($filename) && $linkTarget = $this->readlink($filename)) { + $this->dumpFile(Path::makeAbsolute($linkTarget, $dir), $content); + + return; + } + if (!is_dir($dir)) { $this->mkdir($dir); } diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 768b9db6f97b5..252635bc95e8f 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -1091,14 +1091,16 @@ public function testReadBrokenLink() { $this->markAsSkippedIfSymlinkIsMissing(); - if ('\\' === \DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Windows does not support creating "broken" symlinks'); + if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400) { + $this->markTestSkipped('Windows does not support reading "broken" symlinks in PHP < 7.4.0'); } $file = $this->workspace.'/file'; $link = $this->workspace.'/link'; + touch($file); $this->filesystem->symlink($file, $link); + $this->filesystem->remove($file); $this->assertEquals($file, $this->filesystem->readlink($link)); $this->assertNull($this->filesystem->readlink($link, true)); @@ -1605,6 +1607,38 @@ public function testDumpFileOverwritesAnExistingFile() $this->assertStringEqualsFile($filename, 'bar'); } + public function testDumpFileFollowsSymlink() + { + $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo.txt'; + file_put_contents($filename, 'FOO BAR'); + $linknameA = $this->workspace.\DIRECTORY_SEPARATOR.'bar.txt'; + $linknameB = $this->workspace.\DIRECTORY_SEPARATOR.'baz.txt'; + $this->filesystem->symlink($filename, $linknameA); + $this->filesystem->symlink($linknameA, $linknameB); + + $this->filesystem->dumpFile($linknameB, 'bar'); + + $this->assertFileExists($filename); + $this->assertFileExists($linknameA); + $this->assertFileExists($linknameB); + $this->assertStringEqualsFile($filename, 'bar'); + $this->assertStringEqualsFile($linknameA, 'bar'); + $this->assertStringEqualsFile($linknameB, 'bar'); + + // Windows does not support reading "broken" symlinks in PHP < 7.4.0 + if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400) { + return; + } + + $this->filesystem->remove($filename); + $this->filesystem->dumpFile($linknameB, 'baz'); + + $this->assertFileExists($filename); + $this->assertStringEqualsFile($filename, 'baz'); + $this->assertStringEqualsFile($linknameA, 'baz'); + $this->assertStringEqualsFile($linknameB, 'baz'); + } + public function testDumpFileWithFileScheme() { $scheme = 'file://'; @@ -1678,6 +1712,35 @@ public function testAppendToFileWithResource() } } + public function testAppendToFileFollowsSymlink() + { + $filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo.txt'; + file_put_contents($filename, 'foo'); + $linknameA = $this->workspace.\DIRECTORY_SEPARATOR.'bar.txt'; + $linknameB = $this->workspace.\DIRECTORY_SEPARATOR.'baz.txt'; + $this->filesystem->symlink($filename, $linknameA); + $this->filesystem->symlink($linknameA, $linknameB); + + $this->filesystem->appendToFile($linknameA, 'bar'); + $this->filesystem->appendToFile($linknameB, 'baz'); + + $this->assertFileExists($filename); + $this->assertFileExists($linknameA); + $this->assertFileExists($linknameB); + $this->assertStringEqualsFile($filename, 'foobarbaz'); + $this->assertStringEqualsFile($linknameA, 'foobarbaz'); + $this->assertStringEqualsFile($linknameB, 'foobarbaz'); + + $this->filesystem->remove($filename); + $this->filesystem->appendToFile($linknameB, 'foo'); + $this->filesystem->appendToFile($linknameA, 'bar'); + + $this->assertFileExists($filename); + $this->assertStringEqualsFile($filename, 'foobar'); + $this->assertStringEqualsFile($linknameA, 'foobar'); + $this->assertStringEqualsFile($linknameB, 'foobar'); + } + public function testAppendToFileWithScheme() { $scheme = 'file://'; From da82f53426bb32ecf07bdf966dec41c810e7586e Mon Sep 17 00:00:00 2001 From: HypeMC Date: Tue, 30 May 2023 19:07:47 +0200 Subject: [PATCH 11/57] [Serializer] Fix discriminator map not working with `AbstractNormalizer::OBJECT_TO_POPULATE` --- .../Normalizer/AbstractObjectNormalizer.php | 4 ++ .../AbstractObjectNormalizerTest.php | 57 +++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index 69dc534e417fb..98ccfca4e4702 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -780,6 +780,10 @@ private function removeNestedValue(array $path, array $data): array */ private function getMappedClass(array $data, string $class, array $context): string { + if (null !== $object = $this->extractObjectToPopulate($class, $context, self::OBJECT_TO_POPULATE)) { + return $object::class; + } + if (!$mapping = $this->classDiscriminatorResolver?->getMappingForClass($class)) { return $class; } diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index d876193c8a741..53ef55bd1bf70 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -34,6 +34,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; use Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter; +use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer; use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -44,6 +45,7 @@ use Symfony\Component\Serializer\Tests\Fixtures\Annotations\AbstractDummy; use Symfony\Component\Serializer\Tests\Fixtures\Annotations\AbstractDummyFirstChild; use Symfony\Component\Serializer\Tests\Fixtures\Annotations\AbstractDummySecondChild; +use Symfony\Component\Serializer\Tests\Fixtures\DummyFirstChildQuux; use Symfony\Component\Serializer\Tests\Fixtures\DummySecondChildQuux; use Symfony\Component\Serializer\Tests\Normalizer\Features\ObjectDummyWithContextAttribute; @@ -480,6 +482,61 @@ public function hasMetadataFor($value): bool $this->assertInstanceOf(DummySecondChildQuux::class, $normalizedData->quux); } + public function testDenormalizeWithDiscriminatorMapAndObjectToPopulateUsesCorrectClassname() + { + $factory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + + $loaderMock = new class() implements ClassMetadataFactoryInterface { + public function getMetadataFor($value): ClassMetadataInterface + { + if (AbstractDummy::class === $value) { + return new ClassMetadata( + AbstractDummy::class, + new ClassDiscriminatorMapping('type', [ + 'first' => AbstractDummyFirstChild::class, + 'second' => AbstractDummySecondChild::class, + ]) + ); + } + + throw new InvalidArgumentException(); + } + + public function hasMetadataFor($value): bool + { + return AbstractDummy::class === $value; + } + }; + + $discriminatorResolver = new ClassDiscriminatorFromClassMetadata($loaderMock); + $normalizer = new AbstractObjectNormalizerDummy($factory, null, new PhpDocExtractor(), $discriminatorResolver); + $serializer = new Serializer([$normalizer]); + $normalizer->setSerializer($serializer); + + $data = [ + 'foo' => 'foo', + 'quux' => ['value' => 'quux'], + ]; + + $normalizedData1 = $normalizer->denormalize($data + ['bar' => 'bar'], AbstractDummy::class, 'any', [ + AbstractNormalizer::OBJECT_TO_POPULATE => new AbstractDummyFirstChild('notfoo', 'notbar'), + ]); + $this->assertInstanceOf(AbstractDummyFirstChild::class, $normalizedData1); + $this->assertSame('foo', $normalizedData1->foo); + $this->assertSame('notbar', $normalizedData1->bar); + $this->assertInstanceOf(DummyFirstChildQuux::class, $normalizedData1->quux); + $this->assertSame('quux', $normalizedData1->quux->getValue()); + + $normalizedData2 = $normalizer->denormalize($data + ['baz' => 'baz'], AbstractDummy::class, 'any', [ + AbstractNormalizer::OBJECT_TO_POPULATE => new AbstractDummySecondChild('notfoo', 'notbaz'), + ]); + $this->assertInstanceOf(AbstractDummySecondChild::class, $normalizedData2); + $this->assertSame('foo', $normalizedData2->foo); + $this->assertSame('baz', $normalizedData2->baz); + $this->assertInstanceOf(DummySecondChildQuux::class, $normalizedData2->quux); + $this->assertSame('quux', $normalizedData2->quux->getValue()); + } + public function testDenormalizeWithNestedDiscriminatorMap() { $classDiscriminatorResolver = new class() implements ClassDiscriminatorResolverInterface { From ce0860865f1a8cf41d7c93a6b8002e3b17615daa Mon Sep 17 00:00:00 2001 From: HypeMC Date: Wed, 31 May 2023 13:43:23 +0200 Subject: [PATCH 12/57] [Serializer] Fix discriminator map not working with `AbstractNormalizer::OBJECT_TO_POPULATE` --- .../Normalizer/AbstractObjectNormalizer.php | 6 ++ .../AbstractObjectNormalizerTest.php | 57 +++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index 8904383dd7d38..7c91171527376 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -263,6 +263,12 @@ private function getAttributeMetadata($objectOrClass, string $attribute): ?Attri */ protected function instantiateObject(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, $allowedAttributes, string $format = null) { + if (null !== $object = $this->extractObjectToPopulate($class, $context, self::OBJECT_TO_POPULATE)) { + unset($context[self::OBJECT_TO_POPULATE]); + + return $object; + } + if ($this->classDiscriminatorResolver && $mapping = $this->classDiscriminatorResolver->getMappingForClass($class)) { if (!isset($data[$mapping->getTypeProperty()])) { throw NotNormalizableValueException::createForUnexpectedDataType(sprintf('Type property "%s" not found for the abstract object "%s".', $mapping->getTypeProperty(), $class), null, ['string'], isset($context['deserialization_path']) ? $context['deserialization_path'].'.'.$mapping->getTypeProperty() : $mapping->getTypeProperty(), false); diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index aa142ed3b4b05..bce6e5f9a598c 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -27,6 +27,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; @@ -36,6 +37,7 @@ use Symfony\Component\Serializer\Tests\Fixtures\Annotations\AbstractDummy; use Symfony\Component\Serializer\Tests\Fixtures\Annotations\AbstractDummyFirstChild; use Symfony\Component\Serializer\Tests\Fixtures\Annotations\AbstractDummySecondChild; +use Symfony\Component\Serializer\Tests\Fixtures\DummyFirstChildQuux; use Symfony\Component\Serializer\Tests\Fixtures\DummySecondChildQuux; class AbstractObjectNormalizerTest extends TestCase @@ -252,6 +254,61 @@ public function hasMetadataFor($value): bool $this->assertInstanceOf(DummySecondChildQuux::class, $normalizedData->quux); } + public function testDenormalizeWithDiscriminatorMapAndObjectToPopulateUsesCorrectClassname() + { + $factory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); + + $loaderMock = new class() implements ClassMetadataFactoryInterface { + public function getMetadataFor($value): ClassMetadataInterface + { + if (AbstractDummy::class === $value) { + return new ClassMetadata( + AbstractDummy::class, + new ClassDiscriminatorMapping('type', [ + 'first' => AbstractDummyFirstChild::class, + 'second' => AbstractDummySecondChild::class, + ]) + ); + } + + throw new InvalidArgumentException(); + } + + public function hasMetadataFor($value): bool + { + return AbstractDummy::class === $value; + } + }; + + $discriminatorResolver = new ClassDiscriminatorFromClassMetadata($loaderMock); + $normalizer = new AbstractObjectNormalizerDummy($factory, null, new PhpDocExtractor(), $discriminatorResolver); + $serializer = new Serializer([$normalizer]); + $normalizer->setSerializer($serializer); + + $data = [ + 'foo' => 'foo', + 'quux' => ['value' => 'quux'], + ]; + + $normalizedData1 = $normalizer->denormalize($data + ['bar' => 'bar'], AbstractDummy::class, 'any', [ + AbstractNormalizer::OBJECT_TO_POPULATE => new AbstractDummyFirstChild('notfoo', 'notbar'), + ]); + $this->assertInstanceOf(AbstractDummyFirstChild::class, $normalizedData1); + $this->assertSame('foo', $normalizedData1->foo); + $this->assertSame('notbar', $normalizedData1->bar); + $this->assertInstanceOf(DummyFirstChildQuux::class, $normalizedData1->quux); + $this->assertSame('quux', $normalizedData1->quux->getValue()); + + $normalizedData2 = $normalizer->denormalize($data + ['baz' => 'baz'], AbstractDummy::class, 'any', [ + AbstractNormalizer::OBJECT_TO_POPULATE => new AbstractDummySecondChild('notfoo', 'notbaz'), + ]); + $this->assertInstanceOf(AbstractDummySecondChild::class, $normalizedData2); + $this->assertSame('foo', $normalizedData2->foo); + $this->assertSame('baz', $normalizedData2->baz); + $this->assertInstanceOf(DummySecondChildQuux::class, $normalizedData2->quux); + $this->assertSame('quux', $normalizedData2->quux->getValue()); + } + public function testDenormalizeWithNestedDiscriminatorMap() { $classDiscriminatorResolver = new class() implements ClassDiscriminatorResolverInterface { From d98a01182919adce28a8249992395269262746f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Wed, 31 May 2023 15:04:02 +0200 Subject: [PATCH 13/57] Fix broken symlink tests Windows PHP 7.4+ --- .../Component/Filesystem/Tests/FilesystemTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 252635bc95e8f..7280d51357bb4 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -13,6 +13,7 @@ use Symfony\Component\Filesystem\Exception\InvalidArgumentException; use Symfony\Component\Filesystem\Exception\IOException; +use Symfony\Component\Filesystem\Path; /** * Test class for Filesystem. @@ -1095,18 +1096,18 @@ public function testReadBrokenLink() $this->markTestSkipped('Windows does not support reading "broken" symlinks in PHP < 7.4.0'); } - $file = $this->workspace.'/file'; - $link = $this->workspace.'/link'; + $file = Path::join($this->workspace, 'file'); + $link = Path::join($this->workspace, 'link'); touch($file); $this->filesystem->symlink($file, $link); $this->filesystem->remove($file); - $this->assertEquals($file, $this->filesystem->readlink($link)); + $this->assertEquals($file, Path::normalize($this->filesystem->readlink($link))); $this->assertNull($this->filesystem->readlink($link, true)); touch($file); - $this->assertEquals($file, $this->filesystem->readlink($link, true)); + $this->assertEquals($file, Path::normalize($this->filesystem->readlink($link, true))); } public function testReadLinkDefaultPathDoesNotExist() From bec5302898a5955b7acdf9938ae414d7246d4e1c Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Wed, 31 May 2023 12:56:17 +0200 Subject: [PATCH 14/57] [Cache] Fix DBAL deprecations --- .../Cache/Adapter/DoctrineDbalAdapter.php | 62 ++++++++++++++----- .../Tests/Adapter/DoctrineDbalAdapterTest.php | 19 ++++-- 2 files changed, 61 insertions(+), 20 deletions(-) diff --git a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php index 700ad95b94abc..2650869e3f8cc 100644 --- a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php @@ -11,13 +11,17 @@ namespace Symfony\Component\Cache\Adapter; +use Doctrine\DBAL\ArrayParameterType; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Exception\TableNotFoundException; use Doctrine\DBAL\ParameterType; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Tools\DsnParser; use Symfony\Component\Cache\Exception\InvalidArgumentException; use Symfony\Component\Cache\Marshaller\DefaultMarshaller; use Symfony\Component\Cache\Marshaller\MarshallerInterface; @@ -68,7 +72,28 @@ public function __construct($connOrDsn, string $namespace = '', int $defaultLife if (!class_exists(DriverManager::class)) { throw new InvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".', $connOrDsn)); } - $this->conn = DriverManager::getConnection(['url' => $connOrDsn]); + if (class_exists(DsnParser::class)) { + $params = (new DsnParser([ + 'db2' => 'ibm_db2', + 'mssql' => 'pdo_sqlsrv', + 'mysql' => 'pdo_mysql', + 'mysql2' => 'pdo_mysql', + 'postgres' => 'pdo_pgsql', + 'postgresql' => 'pdo_pgsql', + 'pgsql' => 'pdo_pgsql', + 'sqlite' => 'pdo_sqlite', + 'sqlite3' => 'pdo_sqlite', + ]))->parse($connOrDsn); + } else { + $params = ['url' => $connOrDsn]; + } + + $config = new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $this->conn = DriverManager::getConnection($params, $config); } else { throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', __METHOD__, Connection::class, get_debug_type($connOrDsn))); } @@ -156,7 +181,7 @@ protected function doFetch(array $ids): iterable $ids, ], [ ParameterType::INTEGER, - Connection::PARAM_STR_ARRAY, + class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY, ])->iterateNumeric(); foreach ($result as $row) { @@ -174,7 +199,7 @@ protected function doFetch(array $ids): iterable $expired, ], [ ParameterType::INTEGER, - Connection::PARAM_STR_ARRAY, + class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY, ]); } } @@ -226,7 +251,7 @@ protected function doDelete(array $ids): bool { $sql = "DELETE FROM $this->table WHERE $this->idCol IN (?)"; try { - $this->conn->executeStatement($sql, [array_values($ids)], [Connection::PARAM_STR_ARRAY]); + $this->conn->executeStatement($sql, [array_values($ids)], [class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY]); } catch (TableNotFoundException $e) { } @@ -285,35 +310,42 @@ protected function doSave(array $values, int $lifetime) $stmt = $this->conn->prepare($sql); } - // $id and $data are defined later in the loop. Binding is done by reference, values are read on execution. if ('sqlsrv' === $platformName || 'oci' === $platformName) { - $stmt->bindParam(1, $id); - $stmt->bindParam(2, $id); - $stmt->bindParam(3, $data, ParameterType::LARGE_OBJECT); + $bind = static function ($id, $data) use ($stmt) { + $stmt->bindValue(1, $id); + $stmt->bindValue(2, $id); + $stmt->bindValue(3, $data, ParameterType::LARGE_OBJECT); + $stmt->bindValue(6, $data, ParameterType::LARGE_OBJECT); + }; $stmt->bindValue(4, $lifetime, ParameterType::INTEGER); $stmt->bindValue(5, $now, ParameterType::INTEGER); - $stmt->bindParam(6, $data, ParameterType::LARGE_OBJECT); $stmt->bindValue(7, $lifetime, ParameterType::INTEGER); $stmt->bindValue(8, $now, ParameterType::INTEGER); } elseif (null !== $platformName) { - $stmt->bindParam(1, $id); - $stmt->bindParam(2, $data, ParameterType::LARGE_OBJECT); + $bind = static function ($id, $data) use ($stmt) { + $stmt->bindValue(1, $id); + $stmt->bindValue(2, $data, ParameterType::LARGE_OBJECT); + }; $stmt->bindValue(3, $lifetime, ParameterType::INTEGER); $stmt->bindValue(4, $now, ParameterType::INTEGER); } else { - $stmt->bindParam(1, $data, ParameterType::LARGE_OBJECT); $stmt->bindValue(2, $lifetime, ParameterType::INTEGER); $stmt->bindValue(3, $now, ParameterType::INTEGER); - $stmt->bindParam(4, $id); $insertStmt = $this->conn->prepare($insertSql); - $insertStmt->bindParam(1, $id); - $insertStmt->bindParam(2, $data, ParameterType::LARGE_OBJECT); $insertStmt->bindValue(3, $lifetime, ParameterType::INTEGER); $insertStmt->bindValue(4, $now, ParameterType::INTEGER); + + $bind = static function ($id, $data) use ($stmt, $insertStmt) { + $stmt->bindValue(1, $data, ParameterType::LARGE_OBJECT); + $stmt->bindValue(4, $id); + $insertStmt->bindValue(1, $id); + $insertStmt->bindValue(2, $data, ParameterType::LARGE_OBJECT); + }; } foreach ($values as $id => $data) { + $bind($id, $data); try { $rowCount = $stmt->executeStatement(); } catch (TableNotFoundException $e) { diff --git a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php index 656b84ab63ba2..034f8ffc8fb4f 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php @@ -16,6 +16,7 @@ use Doctrine\DBAL\Driver\AbstractMySQLDriver; use Doctrine\DBAL\Driver\Middleware; use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; use PHPUnit\Framework\SkippedTestSuiteError; use Psr\Cache\CacheItemPoolInterface; @@ -45,12 +46,12 @@ public static function tearDownAfterClass(): void public function createCachePool(int $defaultLifetime = 0): CacheItemPoolInterface { - return new DoctrineDbalAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]), '', $defaultLifetime); + return new DoctrineDbalAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $this->getDbalConfig()), '', $defaultLifetime); } public function testConfigureSchemaDecoratedDbalDriver() { - $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]); + $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $this->getDbalConfig()); if (!interface_exists(Middleware::class)) { $this->markTestSkipped('doctrine/dbal v2 does not support custom drivers using middleware'); } @@ -60,7 +61,7 @@ public function testConfigureSchemaDecoratedDbalDriver() ->method('wrap') ->willReturn(new DriverWrapper($connection->getDriver())); - $config = new Configuration(); + $config = $this->getDbalConfig(); $config->setMiddlewares([$middleware]); $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config); @@ -75,7 +76,7 @@ public function testConfigureSchemaDecoratedDbalDriver() public function testConfigureSchema() { - $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]); + $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $this->getDbalConfig()); $schema = new Schema(); $adapter = new DoctrineDbalAdapter($connection); @@ -95,7 +96,7 @@ public function testConfigureSchemaDifferentDbalConnection() public function testConfigureSchemaTableExists() { - $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]); + $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $this->getDbalConfig()); $schema = new Schema(); $schema->createTable('cache_items'); @@ -155,4 +156,12 @@ private function createConnectionMock() return $connection; } + + private function getDbalConfig() + { + $config = new Configuration(); + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + + return $config; + } } From c4b16e51c36240ff9d172033a4111c4193a78ead Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Wed, 31 May 2023 20:13:02 +0200 Subject: [PATCH 15/57] [DependencyInjection] Allow casting env var processors to cast null --- .../DependencyInjection/EnvVarProcessor.php | 10 ++++++---- .../Tests/ContainerBuilderTest.php | 4 ++-- .../Tests/EnvVarProcessorTest.php | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php b/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php index feb51fff3bb1c..aec6a79b228cc 100644 --- a/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php +++ b/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php @@ -181,10 +181,12 @@ public function getEnv(string $prefix, string $name, \Closure $getEnv) throw new RuntimeException(sprintf('Unsupported env var prefix "%s".', $prefix)); } - return null; + if (!\in_array($prefix, ['string', 'bool', 'not', 'int', 'float'], true)) { + return null; + } } - if (!\is_scalar($env)) { + if (null !== $env && !\is_scalar($env)) { throw new RuntimeException(sprintf('Non-scalar env var "%s" cannot be cast to "%s".', $name, $prefix)); } @@ -199,7 +201,7 @@ public function getEnv(string $prefix, string $name, \Closure $getEnv) } if ('int' === $prefix) { - if (false === $env = filter_var($env, \FILTER_VALIDATE_INT) ?: filter_var($env, \FILTER_VALIDATE_FLOAT)) { + if (null !== $env && false === $env = filter_var($env, \FILTER_VALIDATE_INT) ?: filter_var($env, \FILTER_VALIDATE_FLOAT)) { throw new RuntimeException(sprintf('Non-numeric env var "%s" cannot be cast to int.', $name)); } @@ -207,7 +209,7 @@ public function getEnv(string $prefix, string $name, \Closure $getEnv) } if ('float' === $prefix) { - if (false === $env = filter_var($env, \FILTER_VALIDATE_FLOAT)) { + if (null !== $env && false === $env = filter_var($env, \FILTER_VALIDATE_FLOAT)) { throw new RuntimeException(sprintf('Non-numeric env var "%s" cannot be cast to float.', $name)); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index bf35ba135dfd4..21acd7fc962a4 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -839,8 +839,8 @@ public function testEnvAreNullable() $container->register('foo', 'stdClass') ->setPublic(true) ->setProperties([ - 'fake' => '%env(int:FAKE)%', - ]); + 'fake' => '%env(resolve:FAKE)%', + ]); $container->compile(true); diff --git a/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php b/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php index e14fb6ae2449f..72cf270a632b6 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php @@ -760,4 +760,22 @@ public static function provideGetEnvUrlPath() ['blog//', 'https://symfony.com/blog//'], ]; } + + /** + * @testWith ["", "string"] + * [false, "bool"] + * [true, "not"] + * [0, "int"] + * [0.0, "float"] + */ + public function testGetEnvCastsNull($expected, string $prefix) + { + $processor = new EnvVarProcessor(new Container()); + + $this->assertSame($expected, $processor->getEnv($prefix, 'default::FOO', static function () use ($processor) { + return $processor->getEnv('default', ':FOO', static function () { + return null; + }); + })); + } } From 38a7ee534a8f957c54ff28bcb16a148219c439be Mon Sep 17 00:00:00 2001 From: Florian Heller Date: Wed, 31 May 2023 17:37:20 +0200 Subject: [PATCH 16/57] [Mailer] [MailPace] Fix undefined array key in errors response --- .../Transport/MailPaceApiTransportTest.php | 51 +++++++++++++++++++ .../Transport/MailPaceApiTransport.php | 15 +++++- 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Mailer/Bridge/MailPace/Tests/Transport/MailPaceApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/MailPace/Tests/Transport/MailPaceApiTransportTest.php index 065c071e52856..c7e99b46d02d4 100644 --- a/src/Symfony/Component/Mailer/Bridge/MailPace/Tests/Transport/MailPaceApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/MailPace/Tests/Transport/MailPaceApiTransportTest.php @@ -121,6 +121,57 @@ public function testSendThrowsForErrorResponse() $transport->send($mail); } + public function testSendThrowsForErrorsResponse() + { + $client = new MockHttpClient(static function (string $method, string $url, array $options): ResponseInterface { + return new MockResponse(json_encode([ + 'errors' => [ + 'to' => [ + 'contains a blocked address', + 'number of email addresses exceeds maximum volume', + ], + 'attachments.name' => ['Extension file type blocked, see Docs for full list of allowed file types'], + ], + ]), [ + 'http_code' => 400, + 'response_headers' => [ + 'content-type' => 'application/json', + ], + ]); + }); + $transport = new MailPaceApiTransport('KEY', $client); + $transport->setPort(8984); + + $mail = new Email(); + $mail->subject('Hello!') + ->to(new Address('saif.gmati@symfony.com', 'Saif Eddin')) + ->from(new Address('fabpot@symfony.com', 'Fabien')) + ->text('Hello There!'); + + $this->expectException(HttpTransportException::class); + $this->expectExceptionMessage('Unable to send an email: to: contains a blocked address & number of email addresses exceeds maximum volume; attachments.name: Extension file type blocked, see Docs for full list of allowed file types (code 400).'); + $transport->send($mail); + } + + public function testSendThrowsForInternalServerErrorResponse() + { + $client = new MockHttpClient(static function (string $method, string $url, array $options): ResponseInterface { + return new MockResponse('', ['http_code' => 500]); + }); + $transport = new MailPaceApiTransport('KEY', $client); + $transport->setPort(8984); + + $mail = new Email(); + $mail->subject('Hello!') + ->to(new Address('saif.gmati@symfony.com', 'Saif Eddin')) + ->from(new Address('fabpot@symfony.com', 'Fabien')) + ->text('Hello There!'); + + $this->expectException(HttpTransportException::class); + $this->expectExceptionMessage('Unable to send an email: (code 500).'); + $transport->send($mail); + } + public function testTagAndMetadataHeaders() { $email = new Email(); diff --git a/src/Symfony/Component/Mailer/Bridge/MailPace/Transport/MailPaceApiTransport.php b/src/Symfony/Component/Mailer/Bridge/MailPace/Transport/MailPaceApiTransport.php index 8b578612afa8e..9489b41bb7889 100644 --- a/src/Symfony/Component/Mailer/Bridge/MailPace/Transport/MailPaceApiTransport.php +++ b/src/Symfony/Component/Mailer/Bridge/MailPace/Transport/MailPaceApiTransport.php @@ -67,7 +67,20 @@ protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $e } if (200 !== $statusCode) { - throw new HttpTransportException('Unable to send an email: '.$result['error'].sprintf(' (code %d).', $statusCode), $response); + $errorMessage = 'Unable to send an email: '; + if (isset($result['error'])) { + $errorMessage .= $result['error']; + } elseif (isset($result['errors'])) { + $errors = []; + foreach ($result['errors'] as $key => $val) { + $errors[] = $key.': '.implode(' & ', $val); + } + $errorMessage .= implode('; ', $errors); + } else { + $errorMessage .= 'unknown error'; + } + $errorMessage .= sprintf(' (code %d).', $statusCode); + throw new HttpTransportException($errorMessage, $response); } $sentMessage->setMessageId($result['id']); From 094729f571cb8d16d6c5f153ebe9d80e5ca29caa Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 1 Jun 2023 10:25:13 +0200 Subject: [PATCH 17/57] [Cache] Fix tests --- .../Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php index 034f8ffc8fb4f..79299ecd61506 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php @@ -160,7 +160,9 @@ private function createConnectionMock() private function getDbalConfig() { $config = new Configuration(); - $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } return $config; } From fe4920b24f5b6c85a8bda207978d5141118a79a4 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 2 Jun 2023 10:40:57 +0200 Subject: [PATCH 18/57] [PhpUnitBridge] Fix support for the NO_COLOR env var --- src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php index f28933cf97357..5a1ba44ef0010 100644 --- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php +++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php @@ -368,7 +368,7 @@ class_exists(\SymfonyExcludeListSimplePhpunit::class, false) && PHPUnit\Util\Bla } } -$cmd[0] = sprintf('%s %s --colors=always', $PHP, escapeshellarg("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit")); +$cmd[0] = sprintf('%s %s --colors=%s', $PHP, escapeshellarg("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit"), false === $getEnvVar('NO_COLOR') ? 'always' : 'never'); $cmd = str_replace('%', '%%', implode(' ', $cmd)).' %1$s'; if ('\\' === \DIRECTORY_SEPARATOR) { @@ -435,7 +435,7 @@ class SymfonyExcludeListSimplePhpunit { } } - array_splice($argv, 1, 0, ['--colors=always']); + array_splice($argv, 1, 0, ['--colors='.(false === $getEnvVar('NO_COLOR') ? 'always' : 'never')]); $_SERVER['argv'] = $argv; $_SERVER['argc'] = ++$argc; include "$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit"; From 21fb6ba532fa6bb9d4129195f9981289f99bdfe6 Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Fri, 2 Jun 2023 15:01:44 +0200 Subject: [PATCH 19/57] [Validator] Remove internal from methods on non-internal interfaces --- .../Context/ExecutionContextInterface.php | 45 ++++--------------- 1 file changed, 9 insertions(+), 36 deletions(-) diff --git a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php b/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php index 093aa71740ae4..039ef74117fc0 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php @@ -123,107 +123,80 @@ public function getValidator(); public function getObject(); /** - * Sets the currently validated value. + * Warning: Should not be called by user code, to be used by the validator engine only. * * @param mixed $value The validated value * @param object|null $object The currently validated object * @param string $propertyPath The property path to the current value - * - * @internal Used by the validator engine. Should not be called by user - * code. */ public function setNode($value, ?object $object, MetadataInterface $metadata = null, string $propertyPath); /** - * Sets the currently validated group. + * Warning: Should not be called by user code, to be used by the validator engine only. * * @param string|null $group The validated group - * - * @internal Used by the validator engine. Should not be called by user - * code. */ public function setGroup(?string $group); /** - * Sets the currently validated constraint. - * - * @internal Used by the validator engine. Should not be called by user - * code. + * Warning: Should not be called by user code, to be used by the validator engine only. */ public function setConstraint(Constraint $constraint); /** - * Marks an object as validated in a specific validation group. + * Warning: Should not be called by user code, to be used by the validator engine only. * * @param string $cacheKey The hash of the object * @param string $groupHash The group's name or hash, if it is group * sequence - * - * @internal Used by the validator engine. Should not be called by user - * code. */ public function markGroupAsValidated(string $cacheKey, string $groupHash); /** - * Returns whether an object was validated in a specific validation group. + * Warning: Should not be called by user code, to be used by the validator engine only. * * @param string $cacheKey The hash of the object * @param string $groupHash The group's name or hash, if it is group * sequence * * @return bool - * - * @internal Used by the validator engine. Should not be called by user - * code. */ public function isGroupValidated(string $cacheKey, string $groupHash); /** - * Marks a constraint as validated for an object. + * Warning: Should not be called by user code, to be used by the validator engine only. * * @param string $cacheKey The hash of the object * @param string $constraintHash The hash of the constraint - * - * @internal Used by the validator engine. Should not be called by user - * code. */ public function markConstraintAsValidated(string $cacheKey, string $constraintHash); /** - * Returns whether a constraint was validated for an object. + * Warning: Should not be called by user code, to be used by the validator engine only. * * @param string $cacheKey The hash of the object * @param string $constraintHash The hash of the constraint * * @return bool - * - * @internal Used by the validator engine. Should not be called by user - * code. */ public function isConstraintValidated(string $cacheKey, string $constraintHash); /** - * Marks that an object was initialized. + * Warning: Should not be called by user code, to be used by the validator engine only. * * @param string $cacheKey The hash of the object * - * @internal Used by the validator engine. Should not be called by user - * code. - * * @see ObjectInitializerInterface */ public function markObjectAsInitialized(string $cacheKey); /** - * Returns whether an object was initialized. + * Warning: Should not be called by user code, to be used by the validator engine only. * * @param string $cacheKey The hash of the object * * @return bool * - * @internal Used by the validator engine. Should not be called by user - * code. - * * @see ObjectInitializerInterface */ public function isObjectInitialized(string $cacheKey); From 6a3a4d7fb7b5b5358b46edbdfe89a80814e49a00 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 1 Jun 2023 12:58:59 +0200 Subject: [PATCH 20/57] Fix Doctrine deprecations --- .github/deprecations-baseline.json | 1237 +++++++++++++++++ .github/workflows/integration-tests.yml | 2 +- .github/workflows/unit-tests.yml | 1 + .../Form/ChoiceList/ORMQueryBuilderLoader.php | 7 +- .../Doctrine/Test/DoctrineTestHelper.php | 25 +- .../DoctrineExtensionTest.php | 10 +- .../Tests/Fixtures/AssociationEntity.php | 6 + .../Tests/Fixtures/AssociationEntity2.php | 6 + .../AnnotationsBundle/Entity/Person.php | 3 + .../Entity/Person.php | 3 + .../AnnotatedEntity/Person.php | 3 + .../Entity/Address.php | 5 +- .../Entity/Address.php | 1 - .../src/Entity/Person.php | 3 + .../Tests/Fixtures/CompositeIntIdEntity.php | 4 + .../CompositeObjectNoToStringIdEntity.php | 7 + .../Fixtures/CompositeStringIdEntity.php | 4 + .../Tests/Fixtures/DoctrineLoaderEmbed.php | 3 + .../Tests/Fixtures/DoctrineLoaderEntity.php | 12 + .../Tests/Fixtures/DoctrineLoaderEnum.php | 6 + .../Fixtures/DoctrineLoaderNestedEmbed.php | 2 + .../DoctrineLoaderNoAutoMappingEntity.php | 4 + .../Fixtures/DoctrineLoaderParentEntity.php | 3 + .../Tests/Fixtures/DoubleNameEntity.php | 4 + .../Fixtures/DoubleNullableNameEntity.php | 4 + .../Tests/Fixtures/Embeddable/Identifier.php | 2 + .../Fixtures/EmbeddedIdentifierEntity.php | 3 + .../Doctrine/Tests/Fixtures/Employee.php | 1 + .../Tests/Fixtures/GroupableEntity.php | 4 + .../Doctrine/Tests/Fixtures/GuidIdEntity.php | 2 + .../Bridge/Doctrine/Tests/Fixtures/Person.php | 3 + .../SingleAssociationToIntIdEntity.php | 3 + .../Tests/Fixtures/SingleIntIdEntity.php | 4 + .../Fixtures/SingleIntIdNoToStringEntity.php | 3 + .../SingleIntIdStringWrapperNameEntity.php | 4 +- .../Fixtures/SingleStringCastableIdEntity.php | 3 + .../Tests/Fixtures/SingleStringIdEntity.php | 3 + .../Doctrine/Tests/Fixtures/UlidIdEntity.php | 2 + .../Bridge/Doctrine/Tests/Fixtures/User.php | 4 + .../Doctrine/Tests/Fixtures/UuidIdEntity.php | 2 + .../ChoiceList/ORMQueryBuilderLoaderTest.php | 13 +- .../Tests/Middleware/Debug/MiddlewareTest.php | 36 +- .../PropertyInfo/DoctrineExtractorTest.php | 22 +- .../PropertyInfo/Fixtures/DoctrineDummy.php | 25 + .../Fixtures/DoctrineEmbeddable.php | 2 + .../PropertyInfo/Fixtures/DoctrineEnum.php | 7 + .../Fixtures/DoctrineGeneratedValue.php | 5 + .../Fixtures/DoctrineRelation.php | 13 + .../Fixtures/DoctrineWithEmbedded.php | 3 + .../RememberMe/DoctrineTokenProviderTest.php | 12 +- .../Constraints/UniqueEntityValidatorTest.php | 8 +- .../Tests/Validator/DoctrineLoaderTest.php | 3 - .../Cache/Adapter/DoctrineDbalAdapter.php | 3 +- .../Tests/Adapter/DoctrineDbalAdapterTest.php | 3 +- .../Tests/Adapter/PdoDbalAdapterTest.php | 25 +- .../Storage/Handler/PdoSessionHandler.php | 4 +- .../Storage/Handler/SessionHandlerFactory.php | 14 +- .../Store/DoctrineDbalPostgreSqlStore.php | 27 +- .../Lock/Store/DoctrineDbalStore.php | 27 +- .../Store/DoctrineDbalPostgreSqlStoreTest.php | 19 +- .../Tests/Store/DoctrineDbalStoreTest.php | 17 +- .../Lock/Tests/Store/PdoDbalStoreTest.php | 17 +- .../Transport/DoctrineIntegrationTest.php | 24 +- .../DoctrinePostgreSqlIntegrationTest.php | 13 +- .../Bridge/Doctrine/Transport/Connection.php | 16 +- .../Validator/Mapping/ClassMetadata.php | 9 +- .../Mapping/Loader/AnnotationLoader.php | 28 +- 67 files changed, 1720 insertions(+), 83 deletions(-) create mode 100644 .github/deprecations-baseline.json diff --git a/.github/deprecations-baseline.json b/.github/deprecations-baseline.json new file mode 100644 index 0000000000000..51092cf19e2ec --- /dev/null +++ b/.github/deprecations-baseline.json @@ -0,0 +1,1237 @@ +[ + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsStringArray", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsIntegerArray", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterNonIntegerValues", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterEmptyUuids", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterUid", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testUidThrowProperException", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testEmbeddedIdentifierName", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 83 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 166 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 1328 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 1328 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetProperties", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testTestGetPropertiesWithEmbedded", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 25 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", + "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3945 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtractWithEmbedded", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtractEnum", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 5 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetPropertiesCatchException", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetTypesCatchException", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", + "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3945 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserRequiresId", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 36 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3945 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", + "count": 72 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 36 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 720 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 720 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testLoadClassMetadata", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testExtractEnum", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testFieldMappingsConfiguration", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassValidator", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 4 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassNoAutoMapping", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaTableExists", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testDsn", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testDsn", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::setUpBeforeClass", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::setUpBeforeClass", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::testDsn", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::testDsn", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\ConnectionTest::testConfigureSchemaTableExists", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testConnectionSendAndGet", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testConnectionSendAndGet", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testSendWithDelay", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testSendWithDelay", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheFirstAvailableMessage", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheFirstAvailableMessage", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItCountMessages", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItCountMessages", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testTheTransportIsSetupOnGet", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testTheTransportIsSetupOnGet", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsStringArray", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsIntegerArray", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterNonIntegerValues", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterEmptyUuids", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterUid", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testUidThrowProperException", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testEmbeddedIdentifierName", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 83 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSetDataToUninitializedEntityWithNonRequired", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSetDataToUninitializedEntityWithNonRequiredToString", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSetDataToUninitializedEntityWithNonRequiredQueryBuilder", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testConfigureQueryBuilderWithClosureReturningNullUseDefault", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSetDataMultipleExpandedNull", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleNonExpandedSingleIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleNonExpandedSingleAssocIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleNonExpandedCompositeIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedSingleIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedSingleAssocIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedSingleIdentifierForExistingData", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedCompositeIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedCompositeIdentifierExistingData", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleExpanded", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleExpanded", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleExpandedWithNegativeIntegerId", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleNonExpandedStringCastableIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleStringCastableIdentifierExpanded", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 4 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedStringCastableIdentifierForExistingData", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedStringCastableIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleStringCastableIdentifierExpanded", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 4 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testOverrideChoicesValues", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testOverrideChoicesValuesWithCallable", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testChoicesForValuesOptimization", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferredChoices", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedQueryBuilderSingleIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSingleIdentifierWithLimit", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedByQueryBuilderSingleIdentifierWithLimit", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedQueryBuilderSingleAssocIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 4 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedQueryBuilderAsClosureSingleIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedQueryBuilderAsClosureCompositeIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleStringIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitCompositeStringIdentifier", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testLoaderCaching", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testLoaderCachingWithParameters", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassIdAndNameToView", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testStripLeadingUnderscoresAndDigitsFromId", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassIdAndNameToViewWithParent", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassIdAndNameToViewWithGrandParent", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassTranslationDomainToView", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testInheritTranslationDomainFromParent", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferOwnTranslationDomain", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDefaultTranslationDomain", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassLabelTranslationParametersToView", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassHelpTranslationParametersToView", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassAttrTranslationParametersToView", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testInheritLabelTranslationParametersFromParent", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testInheritHelpTranslationParametersFromParent", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testInheritAttrTranslationParametersFromParent", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferOwnLabelTranslationParameters", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferOwnHelpTranslationParameters", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferOwnAttrTranslationParameters", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDefaultLabelTranslationParameters", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDefaultHelpTranslationParameters", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDefaultAttrTranslationParameters", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassLabelToView", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassMultipartFalseToView", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitNullExpanded", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitNullExpandedMultiple", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitNullUsesDefaultEmptyData", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitNullMultipleUsesDefaultEmptyData", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testWithSameLoaderAndDifferentChoiceValueCallbacks", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetProperties", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testTestGetPropertiesWithEmbedded", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 25 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtractWithEmbedded", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetPropertiesCatchException", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetTypesCatchException", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserRequiresId", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 28 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniqueness", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateCustomErrorPath", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessWithIgnoreNullDisabled", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessWithValidCustomErrorPath", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testAssociatedEntity", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 4 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessNotToStringEntityWithAssociatedEntity", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 4 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testAssociatedEntityWithNull", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 4 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateInheritanceUniqueness", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 5 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessWithCompositeObjectNoToStringIdEntity", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessWithCustomDoctrineTypeValue", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessCause", + "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testLoadClassMetadata", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testFieldMappingsConfiguration", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassValidator", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 4 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassNoAutoMapping", + "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsStringArray", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsIntegerArray", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterNonIntegerValues", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterEmptyUuids", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterUid", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testUidThrowProperException", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testEmbeddedIdentifierName", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 83 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 166 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 1328 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 1328 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetProperties", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testTestGetPropertiesWithEmbedded", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 25 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", + "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtractWithEmbedded", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetPropertiesCatchException", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetTypesCatchException", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", + "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserRequiresId", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 28 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", + "count": 56 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", + "count": 28 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 560 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 560 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testLoadClassMetadata", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testFieldMappingsConfiguration", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassValidator", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 4 + }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassNoAutoMapping", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaTableExists", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testDsn", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testDsn", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::setUpBeforeClass", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::setUpBeforeClass", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::testDsn", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::testDsn", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 6 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\ConnectionTest::testConfigureSchemaTableExists", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testConnectionSendAndGet", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testConnectionSendAndGet", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testSendWithDelay", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testSendWithDelay", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheFirstAvailableMessage", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheFirstAvailableMessage", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItCountMessages", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItCountMessages", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testTheTransportIsSetupOnGet", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testTheTransportIsSetupOnGet", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 2 + } +] \ No newline at end of file diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 8e450f82f8f8d..dc5b6ebac2c2c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -28,7 +28,7 @@ jobs: services: postgres: - image: postgres:9.6-alpine + image: postgres:10.6-alpine ports: - 5432:5432 env: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 3757f2523e928..b5c5d0fba2bd5 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -89,6 +89,7 @@ jobs: # Create local composer packages for each patched components and reference them in composer.json files when cross-testing components if [[ ! "${{ matrix.mode }}" = *-deps ]]; then + echo SYMFONY_DEPRECATIONS_HELPER="baselineFile=$(pwd)/.github/deprecations-baseline.json" >> $GITHUB_ENV php .github/build-packages.php HEAD^ $SYMFONY_VERSION src/Symfony/Bridge/PhpUnit else echo SYMFONY_DEPRECATIONS_HELPER=weak >> $GITHUB_ENV diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php index 3a80de9d126de..840ec6701cd2f 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php @@ -11,6 +11,7 @@ namespace Symfony\Bridge\Doctrine\Form\ChoiceList; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Types\ConversionException; use Doctrine\DBAL\Types\Type; @@ -78,7 +79,7 @@ public function getEntitiesByIds(string $identifier, array $values) $entity = current($qb->getRootEntities()); $metadata = $qb->getEntityManager()->getClassMetadata($entity); if (\in_array($type = $metadata->getTypeOfField($identifier), ['integer', 'bigint', 'smallint'])) { - $parameterType = Connection::PARAM_INT_ARRAY; + $parameterType = class_exists(ArrayParameterType::class) ? ArrayParameterType::INTEGER : Connection::PARAM_INT_ARRAY; // Filter out non-integer values (e.g. ""). If we don't, some // databases such as PostgreSQL fail. @@ -86,7 +87,7 @@ public function getEntitiesByIds(string $identifier, array $values) return (string) $v === (string) (int) $v || ctype_digit($v); })); } elseif (\in_array($type, ['ulid', 'uuid', 'guid'])) { - $parameterType = Connection::PARAM_STR_ARRAY; + $parameterType = class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY; // Like above, but we just filter out empty strings. $values = array_values(array_filter($values, function ($v) { @@ -107,7 +108,7 @@ public function getEntitiesByIds(string $identifier, array $values) unset($value); } } else { - $parameterType = Connection::PARAM_STR_ARRAY; + $parameterType = class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY; } if (!$values) { return []; diff --git a/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php b/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php index c26bc875f241e..1cb68be8bd641 100644 --- a/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php +++ b/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php @@ -12,10 +12,14 @@ namespace Symfony\Bridge\Doctrine\Test; use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\ORM\Configuration; use Doctrine\ORM\EntityManager; use Doctrine\ORM\Mapping\Driver\AnnotationDriver; +use Doctrine\ORM\Mapping\Driver\AttributeDriver; use Doctrine\ORM\Mapping\Driver\XmlDriver; +use Doctrine\ORM\ORMSetup; use Doctrine\Persistence\Mapping\Driver\MappingDriverChain; use Doctrine\Persistence\Mapping\Driver\SymfonyFileLocator; use PHPUnit\Framework\TestCase; @@ -53,7 +57,11 @@ public static function createTestEntityManager(Configuration $config = null) 'memory' => true, ]; - return EntityManager::create($params, $config); + if (!(new \ReflectionMethod(EntityManager::class, '__construct'))->isPublic()) { + return EntityManager::create($params, $config); + } + + return new EntityManager(DriverManager::getConnection($params, $config), $config); } /** @@ -65,12 +73,19 @@ public static function createTestConfiguration() trigger_deprecation('symfony/doctrine-bridge', '5.3', '"%s" is deprecated and will be removed in 6.0.', __CLASS__); } - $config = new Configuration(); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); $config->setEntityNamespaces(['SymfonyTestsDoctrine' => 'Symfony\Bridge\Doctrine\Tests\Fixtures']); $config->setAutoGenerateProxyClasses(true); $config->setProxyDir(sys_get_temp_dir()); $config->setProxyNamespace('SymfonyTests\Doctrine'); - $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader())); + if (\PHP_VERSION_ID >= 80000 && class_exists(AttributeDriver::class)) { + $config->setMetadataDriverImpl(new AttributeDriver([__DIR__.'/../Tests/Fixtures' => 'Symfony\Bridge\Doctrine\Tests\Fixtures'], true)); + } else { + $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), null, true)); + } + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } return $config; } @@ -91,7 +106,9 @@ public static function createTestConfigurationWithXmlLoader() new XmlDriver( new SymfonyFileLocator( [__DIR__.'/../Tests/Resources/orm' => 'Symfony\\Bridge\\Doctrine\\Tests\\Fixtures'], '.orm.xml' - ) + ), + '.orm.xml', + true ), 'Symfony\\Bridge\\Doctrine\\Tests\\Fixtures' ); diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php index a84804813da4d..da09dc906763e 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -190,7 +190,7 @@ public function testMappingTypeDetection() // The ordinary fixtures contain annotation $mappingType = $method->invoke($this->extension, __DIR__.'/../Fixtures', $container); - $this->assertSame($mappingType, 'annotation'); + $this->assertSame($mappingType, \PHP_VERSION_ID < 80000 ? 'annotation' : 'attribute'); // In the attribute folder, attributes are used $mappingType = $method->invoke($this->extension, __DIR__.'/../Fixtures/Attribute', $container); @@ -278,9 +278,9 @@ public function testUnrecognizedCacheDriverException() public static function providerBundles() { - yield ['AnnotationsBundle', 'annotation', '/Entity']; - yield ['AnnotationsOneLineBundle', 'annotation', '/Entity']; - yield ['FullEmbeddableAnnotationsBundle', 'annotation', '/Entity']; + yield ['AnnotationsBundle', \PHP_VERSION_ID < 80000 ? 'annotation' : 'attribute', '/Entity']; + yield ['AnnotationsOneLineBundle', \PHP_VERSION_ID < 80000 ? 'annotation' : 'attribute', '/Entity']; + yield ['FullEmbeddableAnnotationsBundle', \PHP_VERSION_ID < 80000 ? 'annotation' : 'attribute', '/Entity']; if (\PHP_VERSION_ID >= 80000) { yield ['AttributesBundle', 'attribute', '/Entity']; yield ['FullEmbeddableAttributesBundle', 'attribute', '/Entity']; @@ -291,7 +291,7 @@ public static function providerBundles() yield ['SrcXmlBundle', 'xml', '/Resources/config/doctrine']; - yield ['NewAnnotationsBundle', 'annotation', \DIRECTORY_SEPARATOR.'src/Entity']; + yield ['NewAnnotationsBundle', \PHP_VERSION_ID < 80000 ? 'annotation' : 'attribute', \DIRECTORY_SEPARATOR.'src/Entity']; yield ['NewXmlBundle', 'xml', '/config/doctrine']; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php index c6d689a96a68c..94be71ec9f153 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity.php @@ -16,6 +16,7 @@ /** * @ORM\Entity */ +#[ORM\Entity] class AssociationEntity { /** @@ -23,6 +24,7 @@ class AssociationEntity * @ORM\Id @ORM\GeneratedValue * @ORM\Column(type="integer") */ + #[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')] private $id; /** @@ -30,6 +32,7 @@ class AssociationEntity * * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity */ + #[ORM\ManyToOne(targetEntity: SingleIntIdEntity::class)] public $single; /** @@ -41,5 +44,8 @@ class AssociationEntity * * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity */ + #[ORM\ManyToOne(targetEntity: CompositeIntIdEntity::class)] + #[ORM\JoinColumn(name: 'composite_id1', referencedColumnName: 'id1')] + #[ORM\JoinColumn(name: 'composite_id2', referencedColumnName: 'id2')] public $composite; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php index a0a76124583a0..df4894e76ecbc 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/AssociationEntity2.php @@ -16,6 +16,7 @@ /** * @ORM\Entity */ +#[ORM\Entity] class AssociationEntity2 { /** @@ -23,6 +24,7 @@ class AssociationEntity2 * @ORM\Id @ORM\GeneratedValue * @ORM\Column(type="integer") */ + #[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')] private $id; /** @@ -30,6 +32,7 @@ class AssociationEntity2 * * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity */ + #[ORM\ManyToOne(targetEntity: SingleIntIdNoToStringEntity::class)] public $single; /** @@ -41,5 +44,8 @@ class AssociationEntity2 * * @var \Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity */ + #[ORM\ManyToOne(targetEntity: CompositeIntIdEntity::class)] + #[ORM\JoinColumn(name: 'composite_id1', referencedColumnName: 'id1')] + #[ORM\JoinColumn(name: 'composite_id2', referencedColumnName: 'id2')] public $composite; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsBundle/Entity/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsBundle/Entity/Person.php index 0d7cc91362da3..4f33525506493 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsBundle/Entity/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsBundle/Entity/Person.php @@ -18,12 +18,15 @@ /** * @Entity */ +#[Entity] class Person { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php index b55fe6f86503b..0e77dbffc6dff 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AnnotationsOneLineBundle/Entity/Person.php @@ -16,12 +16,15 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class Person { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AttributesBundle/AnnotatedEntity/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AttributesBundle/AnnotatedEntity/Person.php index 0ec41bb096861..ae6fec848d1f2 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AttributesBundle/AnnotatedEntity/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/AttributesBundle/AnnotatedEntity/Person.php @@ -18,12 +18,15 @@ /** * @Entity */ +#[Entity] class Person { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAnnotationsBundle/Entity/Address.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAnnotationsBundle/Entity/Address.php index d311a3f1ad1a1..bad7402e51c95 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAnnotationsBundle/Entity/Address.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAnnotationsBundle/Entity/Address.php @@ -13,21 +13,24 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Embeddable; -use Doctrine\ORM\Mapping\Id; /** * @Embeddable */ +#[Embeddable] class Address { /** @Column(type="string") */ + #[Column(type: 'string')] public $street; /** @Column(type="string") */ + #[Column(type: 'string')] public $zipCode; /** @Column(type="string") */ + #[Column(type: 'string')] public $city; public function __construct($street, $zipCode, $city) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAttributesBundle/Entity/Address.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAttributesBundle/Entity/Address.php index c0c58d6a21ce2..e257442ae18e6 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAttributesBundle/Entity/Address.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/FullEmbeddableAttributesBundle/Entity/Address.php @@ -13,7 +13,6 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Embeddable; -use Doctrine\ORM\Mapping\Id; #[Embeddable] class Address diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/NewAnnotationsBundle/src/Entity/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/NewAnnotationsBundle/src/Entity/Person.php index e94a24e1a95c7..9ab508e30523f 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/NewAnnotationsBundle/src/Entity/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Bundles/NewAnnotationsBundle/src/Entity/Person.php @@ -18,12 +18,15 @@ /** * @Entity */ +#[Entity] class Person { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php index 7c64cc20ad7e1..40ff64d9488b3 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeIntIdEntity.php @@ -16,15 +16,19 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class CompositeIntIdEntity { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id1; /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id2; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; public function __construct($id1, $id2, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php index 82811b89ed8c0..3be98a925640f 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php @@ -9,6 +9,7 @@ * * @ORM\Entity */ +#[ORM\Entity] class CompositeObjectNoToStringIdEntity { /** @@ -18,6 +19,9 @@ class CompositeObjectNoToStringIdEntity * @ORM\ManyToOne(targetEntity="SingleIntIdNoToStringEntity", cascade={"persist"}) * @ORM\JoinColumn(name="object_one_id") */ + #[ORM\Id] + #[ORM\ManyToOne(targetEntity: SingleIntIdNoToStringEntity::class, cascade: ['persist'])] + #[ORM\JoinColumn(name: 'object_one_id')] protected $objectOne; /** @@ -27,6 +31,9 @@ class CompositeObjectNoToStringIdEntity * @ORM\ManyToOne(targetEntity="SingleIntIdNoToStringEntity", cascade={"persist"}) * @ORM\JoinColumn(name="object_two_id") */ + #[ORM\Id] + #[ORM\ManyToOne(targetEntity: SingleIntIdNoToStringEntity::class, cascade: ['persist'])] + #[ORM\JoinColumn(name: 'object_two_id')] protected $objectTwo; public function __construct(SingleIntIdNoToStringEntity $objectOne, SingleIntIdNoToStringEntity $objectTwo) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php index d6e8d2cd2aafa..95e687f6bfa50 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeStringIdEntity.php @@ -16,15 +16,19 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class CompositeStringIdEntity { /** @Id @Column(type="string") */ + #[Id, Column(type: 'string')] protected $id1; /** @Id @Column(type="string") */ + #[Id, Column(type: 'string')] protected $id2; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; public function __construct($id1, $id2, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEmbed.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEmbed.php index fc16f1cc135bc..5912ae6b1f9ea 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEmbed.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEmbed.php @@ -16,15 +16,18 @@ /** * @ORM\Embeddable */ +#[ORM\Embeddable] class DoctrineLoaderEmbed { /** * @ORM\Column(length=25) */ + #[ORM\Column(length: 25)] public $embeddedMaxLength; /** * @ORM\Embedded(class=DoctrineLoaderNestedEmbed::class) */ + #[ORM\Embedded(class: DoctrineLoaderNestedEmbed::class)] public $nestedEmbedded; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEntity.php index d6aee2d18b0b1..c32a9ef49d472 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEntity.php @@ -21,58 +21,70 @@ * * @author Kévin Dunglas */ +#[ORM\Entity, UniqueEntity(fields: ["alreadyMappedUnique"])] class DoctrineLoaderEntity extends DoctrineLoaderParentEntity { /** * @ORM\Id * @ORM\Column */ + #[ORM\Id, ORM\Column] public $id; /** * @ORM\Column(length=20) */ + #[ORM\Column(length: 20)] public $maxLength; /** * @ORM\Column(length=20) * @Assert\Length(min=5) */ + #[ORM\Column(length: 20), Assert\Length(min: 5)] public $mergedMaxLength; /** * @ORM\Column(length=20) * @Assert\Length(min=1, max=10) */ + #[ORM\Column(length: 20), Assert\Length(min: 1, max: 10)] public $alreadyMappedMaxLength; /** * @ORM\Column(unique=true) */ + #[ORM\Column(unique: true)] public $unique; /** * @ORM\Column(unique=true) */ + #[ORM\Column(unique: true)] public $alreadyMappedUnique; /** * @ORM\Embedded(class=DoctrineLoaderEmbed::class) */ + #[ORM\Embedded(class: DoctrineLoaderEmbed::class)] public $embedded; /** @ORM\Column(type="text", nullable=true, length=1000) */ + #[ORM\Column(type: 'text', nullable: true, length: 1000)] public $textField; /** @ORM\Id @ORM\Column(type="guid", length=50) */ + #[ORM\Id, ORM\Column(type: 'guid', length: 50)] protected $guidField; /** @ORM\Column(type="simple_array", length=100) */ + #[ORM\Column(type: 'simple_array', length: 100)] public $simpleArrayField = []; /** * @ORM\Column(length=10) * @Assert\DisableAutoMapping */ + #[ORM\Column(length: 10), Assert\DisableAutoMapping] public $noAutoMapping; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEnum.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEnum.php index 8ac883e89c4a2..4ba7211456902 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEnum.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderEnum.php @@ -12,25 +12,31 @@ namespace Symfony\Bridge\Doctrine\Tests\Fixtures; use Doctrine\ORM\Mapping as ORM; +use Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt; +use Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumString; /** * @ORM\Entity */ +#[ORM\Entity] class DoctrineLoaderEnum { /** * @ORM\Id * @ORM\Column */ + #[ORM\Id, ORM\Column] public $id; /** * @ORM\Column(type="string", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumString", length=1) */ + #[ORM\Column(type: 'string', enumType: EnumString::class, length: 1)] public $enumString; /** * @ORM\Column(type="integer", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt") */ + #[ORM\Column(type: 'integer', enumType: EnumInt::class)] public $enumInt; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNestedEmbed.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNestedEmbed.php index fbf41555a1316..9d9424f0ece0d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNestedEmbed.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNestedEmbed.php @@ -16,10 +16,12 @@ /** * @ORM\Embeddable() */ +#[ORM\Embeddable] class DoctrineLoaderNestedEmbed { /** * @ORM\Column(length=27) */ + #[ORM\Column(length: 27)] public $nestedEmbeddedMaxLength; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNoAutoMappingEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNoAutoMappingEntity.php index 0914411431201..515ec30bc897f 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNoAutoMappingEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderNoAutoMappingEntity.php @@ -20,22 +20,26 @@ * * @author Kévin Dunglas */ +#[ORM\Entity, Assert\DisableAutoMapping] class DoctrineLoaderNoAutoMappingEntity { /** * @ORM\Id * @ORM\Column */ + #[ORM\Id, ORM\Column] public $id; /** * @ORM\Column(length=20, unique=true) */ + #[ORM\Column(length: 20, unique: true)] public $maxLength; /** * @Assert\EnableAutoMapping * @ORM\Column(length=20) */ + #[Assert\EnableAutoMapping, ORM\Column(length: 20)] public $autoMappingExplicitlyEnabled; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderParentEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderParentEntity.php index 7ec0263559c71..d7d832e6af23a 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderParentEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoctrineLoaderParentEntity.php @@ -16,16 +16,19 @@ /** * @ORM\MappedSuperclass */ +#[ORM\MappedSuperclass] class DoctrineLoaderParentEntity { /** * @ORM\Column(length=35) */ + #[ORM\Column(length: 35)] public $publicParentMaxLength; /** * @ORM\Column(length=30) */ + #[ORM\Column(length: 30)] private $privateParentMaxLength; public function getPrivateParentMaxLength() diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php index 3559568787bcd..2c8ac68ce17c2 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNameEntity.php @@ -16,15 +16,19 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class DoubleNameEntity { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; /** @Column(type="string", nullable=true) */ + #[Column(type: 'string', nullable: true)] public $name2; public function __construct($id, $name, $name2) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php index 20ef14fd1b578..0c37651412ab4 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/DoubleNullableNameEntity.php @@ -16,15 +16,19 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class DoubleNullableNameEntity { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string", nullable=true) */ + #[Column(type: 'string', nullable: true)] public $name; /** @Column(type="string", nullable=true) */ + #[Column(type: 'string', nullable: true)] public $name2; public function __construct($id, $name, $name2) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php index f8000dbfd9814..cdc82cf94e34a 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Embeddable/Identifier.php @@ -16,6 +16,7 @@ /** * @ORM\Embeddable */ +#[ORM\Embeddable] class Identifier { /** @@ -24,5 +25,6 @@ class Identifier * @ORM\Id * @ORM\Column(type="integer") */ + #[ORM\Id, ORM\Column(type: 'integer')] protected $value; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php index 6d7b2670962c7..c2cec427ad77e 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/EmbeddedIdentifierEntity.php @@ -12,10 +12,12 @@ namespace Symfony\Bridge\Doctrine\Tests\Fixtures; use Doctrine\ORM\Mapping as ORM; +use Symfony\Bridge\Doctrine\Tests\Fixtures\Embeddable\Identifier; /** * @ORM\Entity */ +#[ORM\Entity] class EmbeddedIdentifierEntity { /** @@ -23,5 +25,6 @@ class EmbeddedIdentifierEntity * * @ORM\Embedded(class="Symfony\Bridge\Doctrine\Tests\Fixtures\Embeddable\Identifier") */ + #[ORM\Embedded(class: Identifier::class)] protected $id; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php index 24f08b00d781a..b9888adc8beae 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Employee.php @@ -14,6 +14,7 @@ use Doctrine\ORM\Mapping\Entity; /** @Entity */ +#[Entity] class Employee extends Person { } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php index 730a9b2b1dbf8..d803ca2310d8b 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GroupableEntity.php @@ -16,15 +16,19 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class GroupableEntity { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string", nullable=true) */ + #[Column(type: 'string', nullable: true)] public $name; /** @Column(type="string", nullable=true) */ + #[Column(type: 'string', nullable: true)] public $groupName; public function __construct($id, $name, $groupName) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GuidIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GuidIdEntity.php index 0d447ffc1e62c..d575659595010 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GuidIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/GuidIdEntity.php @@ -16,9 +16,11 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class GuidIdEntity { /** @Id @Column(type="guid") */ + #[Id, Column(type: 'guid')] protected $id; public function __construct($id) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php index b90a54ac02c61..35f3836e0d901 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/Person.php @@ -24,12 +24,15 @@ * @DiscriminatorColumn(name="discr", type="string") * @DiscriminatorMap({"person" = "Person", "employee" = "Employee"}) */ +#[Entity, InheritanceType('SINGLE_TABLE'), DiscriminatorColumn(name: 'discr', type: 'string'), DiscriminatorMap(['person' => 'Person', 'employee' => 'Employee'])] class Person { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php index bed8bb9a51d01..b4a1ede9f0a2a 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php @@ -17,12 +17,15 @@ use Doctrine\ORM\Mapping\OneToOne; /** @Entity */ +#[Entity] class SingleAssociationToIntIdEntity { /** @Id @OneToOne(targetEntity="SingleIntIdNoToStringEntity", cascade={"ALL"}) */ + #[Id, OneToOne(targetEntity: SingleIntIdNoToStringEntity::class, cascade: ['ALL'])] protected $entity; /** @Column(type="string", nullable=true) */ + #[Column(type: 'string', nullable: true)] public $name; public function __construct(SingleIntIdNoToStringEntity $entity, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php index 612566b45d94b..94b47da855a37 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdEntity.php @@ -16,15 +16,19 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class SingleIntIdEntity { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string", nullable=true) */ + #[Column(type: 'string', nullable: true)] public $name; /** @Column(type="array", nullable=true) */ + #[Column(type: 'array', nullable: true)] public $phoneNumbers = []; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php index c94815ca02cad..8887c5b5a3d6c 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdNoToStringEntity.php @@ -16,12 +16,15 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class SingleIntIdNoToStringEntity { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string", nullable=true) */ + #[Column(type: 'string', nullable: true)] public $name; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php index a06f4432a761a..8c774009ba530 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleIntIdStringWrapperNameEntity.php @@ -14,15 +14,17 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Id; -use Symfony\Bridge\Doctrine\Tests\Fixtures\Type\StringWrapper; /** @Entity */ +#[Entity] class SingleIntIdStringWrapperNameEntity { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id; /** @Column(type="string_wrapper", nullable=true) */ + #[Column(type: 'string_wrapper', nullable: true)] public $name; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php index 128801a02c922..b3e952d9a8b33 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringCastableIdEntity.php @@ -17,6 +17,7 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class SingleStringCastableIdEntity { /** @@ -24,9 +25,11 @@ class SingleStringCastableIdEntity * @Column(type="string") * @GeneratedValue(strategy="NONE") */ + #[Id, Column(type: 'string'), GeneratedValue(strategy: 'NONE')] protected $id; /** @Column(type="string", nullable=true) */ + #[Column(type: 'string', nullable: true)] public $name; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php index 83f7a9f9ab39d..ce3a5526a5b15 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleStringIdEntity.php @@ -16,12 +16,15 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class SingleStringIdEntity { /** @Id @Column(type="string") */ + #[Id, Column(type: 'string')] protected $id; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; public function __construct($id, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UlidIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UlidIdEntity.php index 3ee909fe4bfc5..238a08511ebe9 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UlidIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UlidIdEntity.php @@ -16,9 +16,11 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class UlidIdEntity { /** @Id @Column(type="ulid") */ + #[Id, Column(type: 'ulid')] protected $id; public function __construct($id) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php index 0ffaf19883361..3f5af5002726a 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/User.php @@ -18,15 +18,19 @@ use Symfony\Component\Security\Core\User\UserInterface; /** @Entity */ +#[Entity] class User implements UserInterface, PasswordAuthenticatedUserInterface { /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id1; /** @Id @Column(type="integer") */ + #[Id, Column(type: 'integer')] protected $id2; /** @Column(type="string") */ + #[Column(type: 'string')] public $name; public function __construct($id1, $id2, $name) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UuidIdEntity.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UuidIdEntity.php index 46084ab292d49..60271f7d15ab0 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UuidIdEntity.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/UuidIdEntity.php @@ -16,9 +16,11 @@ use Doctrine\ORM\Mapping\Id; /** @Entity */ +#[Entity] class UuidIdEntity { /** @Id @Column(type="uuid") */ + #[Id, Column(type: 'uuid')] protected $id; public function __construct($id) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php index 10c73ca3d4c36..b9a9d6558a49d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bridge\Doctrine\Tests\Form\ChoiceList; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Result; use Doctrine\DBAL\Types\GuidType; @@ -36,12 +37,12 @@ protected function tearDown(): void public function testIdentifierTypeIsStringArray() { - $this->checkIdentifierType('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity', Connection::PARAM_STR_ARRAY); + $this->checkIdentifierType('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleStringIdEntity', class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY); } public function testIdentifierTypeIsIntegerArray() { - $this->checkIdentifierType('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity', Connection::PARAM_INT_ARRAY); + $this->checkIdentifierType('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity', class_exists(ArrayParameterType::class) ? ArrayParameterType::INTEGER : Connection::PARAM_INT_ARRAY); } protected function checkIdentifierType($classname, $expectedType) @@ -91,7 +92,7 @@ public function testFilterNonIntegerValues() $query->expects($this->once()) ->method('setParameter') - ->with('ORMQueryBuilderLoader_getEntitiesByIds_id', [1, 2, 3, '9223372036854775808'], Connection::PARAM_INT_ARRAY) + ->with('ORMQueryBuilderLoader_getEntitiesByIds_id', [1, 2, 3, '9223372036854775808'], class_exists(ArrayParameterType::class) ? ArrayParameterType::INTEGER : Connection::PARAM_INT_ARRAY) ->willReturn($query); $qb = $this->getMockBuilder(\Doctrine\ORM\QueryBuilder::class) @@ -127,7 +128,7 @@ public function testFilterEmptyUuids($entityClass) $query->expects($this->once()) ->method('setParameter') - ->with('ORMQueryBuilderLoader_getEntitiesByIds_id', ['71c5fd46-3f16-4abb-bad7-90ac1e654a2d', 'b98e8e11-2897-44df-ad24-d2627eb7f499'], Connection::PARAM_STR_ARRAY) + ->with('ORMQueryBuilderLoader_getEntitiesByIds_id', ['71c5fd46-3f16-4abb-bad7-90ac1e654a2d', 'b98e8e11-2897-44df-ad24-d2627eb7f499'], class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY) ->willReturn($query); $qb = $this->getMockBuilder(\Doctrine\ORM\QueryBuilder::class) @@ -172,7 +173,7 @@ public function testFilterUid($entityClass) $query->expects($this->once()) ->method('setParameter') - ->with('ORMQueryBuilderLoader_getEntitiesByIds_id', [Uuid::fromString('71c5fd46-3f16-4abb-bad7-90ac1e654a2d')->toBinary(), Uuid::fromString('b98e8e11-2897-44df-ad24-d2627eb7f499')->toBinary()], Connection::PARAM_STR_ARRAY) + ->with('ORMQueryBuilderLoader_getEntitiesByIds_id', [Uuid::fromString('71c5fd46-3f16-4abb-bad7-90ac1e654a2d')->toBinary(), Uuid::fromString('b98e8e11-2897-44df-ad24-d2627eb7f499')->toBinary()], class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY) ->willReturn($query); $qb = $this->getMockBuilder(\Doctrine\ORM\QueryBuilder::class) @@ -246,7 +247,7 @@ public function testEmbeddedIdentifierName() $query->expects($this->once()) ->method('setParameter') - ->with('ORMQueryBuilderLoader_getEntitiesByIds_id_value', [1, 2, 3], Connection::PARAM_INT_ARRAY) + ->with('ORMQueryBuilderLoader_getEntitiesByIds_id_value', [1, 2, 3], class_exists(ArrayParameterType::class) ? ArrayParameterType::INTEGER : Connection::PARAM_INT_ARRAY) ->willReturn($query); $qb = $this->getMockBuilder(\Doctrine\ORM\QueryBuilder::class) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php b/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php index 9b71bb8a049a1..4e546b20890c6 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php @@ -17,7 +17,9 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Result; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Types\Types; +use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\TestCase; use Symfony\Bridge\Doctrine\Middleware\Debug\DebugDataHolder; use Symfony\Bridge\Doctrine\Middleware\Debug\Middleware; @@ -48,14 +50,17 @@ private function init(bool $withStopwatch = true): void { $this->stopwatch = $withStopwatch ? new Stopwatch() : null; - $configuration = new Configuration(); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } $this->debugDataHolder = new DebugDataHolder(); - $configuration->setMiddlewares([new Middleware($this->debugDataHolder, $this->stopwatch)]); + $config->setMiddlewares([new Middleware($this->debugDataHolder, $this->stopwatch)]); $this->conn = DriverManager::getConnection([ 'driver' => 'pdo_sqlite', 'memory' => true, - ], $configuration); + ], $config); $this->conn->executeQuery(<<init(); $product = 'product1'; - $price = 12.5; + $price = '12.5'; $stock = 5; $stmt = $this->conn->prepare('INSERT INTO products(name, price, stock) VALUES (?, ?, ?)'); - $stmt->bindParam(1, $product); - $stmt->bindParam(2, $price); - $stmt->bindParam(3, $stock, ParameterType::INTEGER); + $stmt->bindValue(1, $product); + $stmt->bindValue(2, $price); + $stmt->bindValue(3, $stock, ParameterType::INTEGER); $executeMethod($stmt); @@ -194,6 +199,7 @@ public function testTransaction(callable $endTransactionMethod, string $expected { $this->init(); + $this->conn->setNestTransactionsWithSavepoints(true); $this->conn->beginTransaction(); $this->conn->beginTransaction(); $this->conn->executeStatement('INSERT INTO products(name, price, stock) VALUES ("product1", 12.5, 5)'); @@ -204,19 +210,23 @@ public function testTransaction(callable $endTransactionMethod, string $expected $endTransactionMethod($this->conn); $debug = $this->debugDataHolder->getData()['default'] ?? []; - $this->assertCount(7, $debug); + $this->assertCount(9, $debug); $this->assertSame('"START TRANSACTION"', $debug[1]['sql']); $this->assertGreaterThan(0, $debug[1]['executionMS']); - $this->assertSame('INSERT INTO products(name, price, stock) VALUES ("product1", 12.5, 5)', $debug[2]['sql']); + $this->assertSame('SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[2]['sql']); $this->assertGreaterThan(0, $debug[2]['executionMS']); - $this->assertSame($expectedEndTransactionDebug, $debug[3]['sql']); + $this->assertSame('INSERT INTO products(name, price, stock) VALUES ("product1", 12.5, 5)', $debug[3]['sql']); $this->assertGreaterThan(0, $debug[3]['executionMS']); - $this->assertSame('"START TRANSACTION"', $debug[4]['sql']); + $this->assertSame(('"ROLLBACK"' === $expectedEndTransactionDebug ? 'ROLLBACK TO' : 'RELEASE').' SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[4]['sql']); $this->assertGreaterThan(0, $debug[4]['executionMS']); - $this->assertSame('INSERT INTO products(name, price, stock) VALUES ("product2", 15.5, 12)', $debug[5]['sql']); + $this->assertSame($expectedEndTransactionDebug, $debug[5]['sql']); $this->assertGreaterThan(0, $debug[5]['executionMS']); - $this->assertSame($expectedEndTransactionDebug, $debug[6]['sql']); + $this->assertSame('"START TRANSACTION"', $debug[6]['sql']); $this->assertGreaterThan(0, $debug[6]['executionMS']); + $this->assertSame('INSERT INTO products(name, price, stock) VALUES ("product2", 15.5, 12)', $debug[7]['sql']); + $this->assertGreaterThan(0, $debug[7]['executionMS']); + $this->assertSame($expectedEndTransactionDebug, $debug[8]['sql']); + $this->assertGreaterThan(0, $debug[8]['executionMS']); } public static function provideExecuteAndEndTransactionMethods(): array diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php index bbe4b6ab10019..57baf9be25f83 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php @@ -11,10 +11,15 @@ namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo; +use Doctrine\Common\Annotations\AnnotationReader; use Doctrine\Common\Collections\Collection; +use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Types\Type as DBALType; use Doctrine\ORM\EntityManager; use Doctrine\ORM\Mapping\Column; +use Doctrine\ORM\Mapping\Driver\AnnotationDriver; +use Doctrine\ORM\Mapping\Driver\AttributeDriver; use Doctrine\ORM\ORMSetup; use Doctrine\ORM\Tools\Setup; use PHPUnit\Framework\TestCase; @@ -35,9 +40,22 @@ class DoctrineExtractorTest extends TestCase private function createExtractor() { $config = class_exists(ORMSetup::class) - ? ORMSetup::createAnnotationMetadataConfiguration([__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'], true) + ? ORMSetup::createConfiguration(true) : Setup::createAnnotationMetadataConfiguration([__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'], true); - $entityManager = EntityManager::create(['driver' => 'pdo_sqlite'], $config); + if (\PHP_VERSION_ID >= 80000 && class_exists(AttributeDriver::class)) { + $config->setMetadataDriverImpl(new AttributeDriver([__DIR__.'/../Tests/Fixtures' => 'Symfony\Bridge\Doctrine\Tests\Fixtures'], true)); + } else { + $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), null, true)); + } + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + if (!(new \ReflectionMethod(EntityManager::class, '__construct'))->isPublic()) { + $entityManager = EntityManager::create(['driver' => 'pdo_sqlite'], $config); + } else { + $entityManager = new EntityManager(DriverManager::getConnection(['driver' => 'pdo_sqlite'], $config), $config); + } if (!DBALType::hasType('foo')) { DBALType::addType('foo', 'Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\DoctrineFooType'); diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php index 8190540e27566..902850c5828ba 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineDummy.php @@ -23,102 +23,122 @@ * * @author Kévin Dunglas */ +#[Entity] class DoctrineDummy { /** * @Id * @Column(type="smallint") */ + #[Id, Column(type: 'smallint')] public $id; /** * @ManyToOne(targetEntity="DoctrineRelation") */ + #[ManyToOne(targetEntity: DoctrineRelation::class)] public $foo; /** * @ManyToMany(targetEntity="DoctrineRelation") */ + #[ManyToMany(targetEntity: DoctrineRelation::class)] public $bar; /** * @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid") */ + #[ManyToMany(targetEntity: DoctrineRelation::class, indexBy: 'rguid')] protected $indexedRguid; /** * @ManyToMany(targetEntity="DoctrineRelation", indexBy="rguid_column") */ + #[ManyToMany(targetEntity: DoctrineRelation::class, indexBy: 'rguid_column')] protected $indexedBar; /** * @OneToMany(targetEntity="DoctrineRelation", mappedBy="foo", indexBy="foo") */ + #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'foo', indexBy: 'foo')] protected $indexedFoo; /** * @OneToMany(targetEntity="DoctrineRelation", mappedBy="baz", indexBy="baz_id") */ + #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'baz', indexBy: 'baz_id')] protected $indexedBaz; /** * @Column(type="guid") */ + #[Column(type: 'guid')] protected $guid; /** * @Column(type="time") */ + #[Column(type: 'time')] private $time; /** * @Column(type="time_immutable") */ + #[Column(type: 'time_immutable')] private $timeImmutable; /** * @Column(type="dateinterval") */ + #[Column(type: 'dateinterval')] private $dateInterval; /** * @Column(type="json_array") */ + #[Column(type: 'json_array')] private $jsonArray; /** * @Column(type="simple_array") */ + #[Column(type: 'simple_array')] private $simpleArray; /** * @Column(type="float") */ + #[Column(type: 'float')] private $float; /** * @Column(type="decimal", precision=10, scale=2) */ + #[Column(type: 'decimal', precision: 10, scale: 2)] private $decimal; /** * @Column(type="boolean") */ + #[Column(type: 'boolean')] private $bool; /** * @Column(type="binary") */ + #[Column(type: 'binary')] private $binary; /** * @Column(type="custom_foo") */ + #[Column(type: 'custom_foo')] private $customFoo; /** * @Column(type="bigint") */ + #[Column(type: 'bigint')] private $bigint; public $notMapped; @@ -126,25 +146,30 @@ class DoctrineDummy /** * @OneToMany(targetEntity="DoctrineRelation", mappedBy="dt", indexBy="dt") */ + #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'dt', indexBy: 'dt')] protected $indexedByDt; /** * @OneToMany(targetEntity="DoctrineRelation", mappedBy="customType", indexBy="customType") */ + #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'customType', indexBy: 'customType')] private $indexedByCustomType; /** * @OneToMany(targetEntity="DoctrineRelation", mappedBy="buzField", indexBy="buzField") */ + #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'buzField', indexBy: 'buzField')] protected $indexedBuz; /** * @Column(type="json", nullable=true) */ + #[Column(type: 'json', nullable: true)] private $json; /** * @OneToMany(targetEntity="DoctrineRelation", mappedBy="dummyRelation", indexBy="gen_value_col_id", orphanRemoval=true) */ + #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'dummyRelation', indexBy: 'gen_value_col_id', orphanRemoval: true)] protected $dummyGeneratedValueList; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEmbeddable.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEmbeddable.php index a00856ed7331e..23609fb1827d0 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEmbeddable.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEmbeddable.php @@ -19,10 +19,12 @@ * * @author Udaltsov Valentin */ +#[Embeddable] class DoctrineEmbeddable { /** * @Column(type="string") */ + #[Column(type: 'string')] protected $field; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php index fd5271fc47730..cb0c4de026384 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineEnum.php @@ -18,36 +18,43 @@ /** * @Entity */ +#[Entity] class DoctrineEnum { /** * @Id * @Column(type="smallint") */ + #[Id, Column(type: 'smallint')] public $id; /** * @Column(type="string", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumString") */ + #[Column(type: 'string', enumType: EnumString::class)] protected $enumString; /** * @Column(type="integer", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt") */ + #[Column(type: 'integer', enumType: EnumInt::class)] protected $enumInt; /** * @Column(type="array", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumString") */ + #[Column(type: 'array', enumType: EnumString::class)] protected $enumStringArray; /** * @Column(type="simple_array", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt") */ + #[Column(type: 'simple_array', enumType: EnumInt::class)] protected $enumIntArray; /** * @Column(type="custom_foo", enumType="Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\EnumInt") */ + #[Column(type: 'custom_foo', enumType: EnumInt::class)] protected $enumCustom; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineGeneratedValue.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineGeneratedValue.php index 9e7612fa35ae4..90fec268506e8 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineGeneratedValue.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineGeneratedValue.php @@ -22,6 +22,7 @@ * * @Entity */ +#[Entity] class DoctrineGeneratedValue { /** @@ -29,21 +30,25 @@ class DoctrineGeneratedValue * @GeneratedValue(strategy="AUTO") * @Column(type="integer") */ + #[Id, GeneratedValue(strategy: 'AUTO'), Column(type: 'integer')] public $id; /** * @Column */ + #[Column] public $foo; /** * @var int * @Column(type="integer", name="gen_value_col_id") */ + #[Column(type: 'integer', name: 'gen_value_col_id')] public $valueId; /** * @OneToMany(targetEntity="DoctrineRelation", mappedBy="generatedValueRelation", indexBy="rguid_column", orphanRemoval=true) */ + #[OneToMany(targetEntity: DoctrineRelation::class, mappedBy: 'generatedValueRelation', indexBy: 'rguid_column', orphanRemoval: true)] protected $relationList; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php index 61a658096add0..3713eb8b53c96 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineRelation.php @@ -22,54 +22,67 @@ * * @author Kévin Dunglas */ +#[Entity] class DoctrineRelation { /** * @Id * @Column(type="smallint") */ + #[Id, Column(type: 'smallint')] public $id; /** * @Column(type="guid", name="rguid_column") */ + #[Column(type: 'guid', name: 'rguid_column')] protected $rguid; /** * @Column(type="guid") * @ManyToOne(targetEntity="DoctrineDummy", inversedBy="indexedFoo") */ + #[Column(type: 'guid')] + #[ManyToOne(targetEntity: DoctrineDummy::class, inversedBy: 'indexedFoo')] protected $foo; /** * @ManyToOne(targetEntity="DoctrineDummy") */ + #[ManyToOne(targetEntity: DoctrineDummy::class)] protected $baz; /** * @Column(type="datetime") */ + #[Column(type: 'datetime')] private $dt; /** * @Column(type="foo") */ + #[Column(type: 'foo')] private $customType; /** * @Column(type="guid", name="different_than_field") * @ManyToOne(targetEntity="DoctrineDummy", inversedBy="indexedBuz") */ + #[Column(type: 'guid', name: 'different_than_field')] + #[ManyToOne(targetEntity: DoctrineDummy::class, inversedBy: 'indexedBuz')] protected $buzField; /** * @ManyToOne(targetEntity="DoctrineDummy", inversedBy="dummyGeneratedValueList") */ + #[ManyToOne(targetEntity: DoctrineDummy::class, inversedBy: 'dummyGeneratedValueList')] private $dummyRelation; /** * @ManyToOne(targetEntity="DoctrineGeneratedValue", inversedBy="relationList") * @JoinColumn(name="gen_value_col_id", referencedColumnName="gen_value_col_id") */ + #[ManyToOne(targetEntity: DoctrineGeneratedValue::class, inversedBy: 'relationList')] + #[JoinColumn(name: 'gen_value_col_id', referencedColumnName: 'gen_value_col_id')] private $generatedValueRelation; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineWithEmbedded.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineWithEmbedded.php index aace866128b0e..053f8bec0d19b 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineWithEmbedded.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineWithEmbedded.php @@ -21,16 +21,19 @@ * * @author Udaltsov Valentin */ +#[Entity] class DoctrineWithEmbedded { /** * @Id * @Column(type="smallint") */ + #[Id, Column(type: 'smallint')] public $id; /** * @Embedded(class="DoctrineEmbeddable") */ + #[Embedded(class: DoctrineEmbeddable::class)] protected $embedded; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php index 9d8b9256f4c9d..eb387e424cd09 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php @@ -11,7 +11,10 @@ namespace Security\RememberMe; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\TestCase; use Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider; use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken; @@ -120,10 +123,15 @@ public function testVerifyOutdatedTokenAfterParallelRequestFailsAfter60Seconds() */ private function bootstrapProvider() { + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + $connection = DriverManager::getConnection([ 'driver' => 'pdo_sqlite', - 'url' => 'sqlite:///:memory:', - ]); + 'memory' => true, + ], $config); $connection->{method_exists($connection, 'executeStatement') ? 'executeStatement' : 'executeUpdate'}(<<< 'SQL' CREATE TABLE rememberme_token ( series char(88) UNIQUE PRIMARY KEY NOT NULL, diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php index 14f60165eeac2..b04e51eb781e4 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -13,11 +13,12 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\DBAL\Types\Type; +use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Mapping\ClassMetadataInfo; use Doctrine\ORM\Tools\SchemaTool; use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ObjectManager; -use Doctrine\Persistence\ObjectRepository; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Bridge\Doctrine\Tests\DoctrineTestHelper; use Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity2; @@ -58,7 +59,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase protected $registry; /** - * @var ObjectRepository + * @var MockObject&EntityRepository */ protected $repository; @@ -95,7 +96,8 @@ protected function createRegistryMock($em = null) protected function createRepositoryMock() { - $repository = $this->getMockBuilder(ObjectRepository::class) + $repository = $this->getMockBuilder(EntityRepository::class) + ->disableOriginalConstructor() ->onlyMethods(['find', 'findAll', 'findOneBy', 'findBy', 'getClassName']) ->addMethods(['findByCustom']) ->getMock() diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php index a72e78f6433ac..731f393c48b1d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php @@ -100,9 +100,6 @@ public function testLoadClassMetadata() $parentClassMetadata = $validator->getMetadataFor(new DoctrineLoaderParentEntity()); - $publicParentMaxLengthMetadata = $parentClassMetadata->getPropertyMetadata('publicParentMaxLength'); - $this->assertCount(0, $publicParentMaxLengthMetadata); - $privateParentMaxLengthMetadata = $parentClassMetadata->getPropertyMetadata('privateParentMaxLength'); $this->assertCount(1, $privateParentMaxLengthMetadata); $privateParentMaxLengthConstraints = $privateParentMaxLengthMetadata[0]->getConstraints(); diff --git a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php index 2650869e3f8cc..84fb1a4014395 100644 --- a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php @@ -22,6 +22,7 @@ use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Tools\DsnParser; +use Doctrine\ORM\ORMSetup; use Symfony\Component\Cache\Exception\InvalidArgumentException; use Symfony\Component\Cache\Marshaller\DefaultMarshaller; use Symfony\Component\Cache\Marshaller\MarshallerInterface; @@ -88,7 +89,7 @@ public function __construct($connOrDsn, string $namespace = '', int $defaultLife $params = ['url' => $connOrDsn]; } - $config = new Configuration(); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php index 79299ecd61506..4fa78298613d3 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php @@ -18,6 +18,7 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; +use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\SkippedTestSuiteError; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Cache\Adapter\DoctrineDbalAdapter; @@ -159,7 +160,7 @@ private function createConnectionMock() private function getDbalConfig() { - $config = new Configuration(); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php index 8c8f25ee60355..febdf33d3fa8a 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php @@ -16,7 +16,9 @@ use Doctrine\DBAL\Driver\AbstractMySQLDriver; use Doctrine\DBAL\Driver\Middleware; use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; +use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\SkippedTestSuiteError; use Psr\Cache\CacheItemPoolInterface; use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; @@ -50,14 +52,16 @@ public static function tearDownAfterClass(): void public function createCachePool(int $defaultLifetime = 0): CacheItemPoolInterface { $this->expectDeprecation('Since symfony/cache 5.4: Usage of a DBAL Connection with "Symfony\Component\Cache\Adapter\PdoAdapter" is deprecated and will be removed in symfony 6.0. Use "Symfony\Component\Cache\Adapter\DoctrineDbalAdapter" instead.'); + $config = $this->getDbalConfig(); - return new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]), '', $defaultLifetime); + return new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config), '', $defaultLifetime); } public function testConfigureSchemaDecoratedDbalDriver() { $this->expectDeprecation('Since symfony/cache 5.4: Usage of a DBAL Connection with "Symfony\Component\Cache\Adapter\PdoAdapter" is deprecated and will be removed in symfony 6.0. Use "Symfony\Component\Cache\Adapter\DoctrineDbalAdapter" instead.'); - $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]); + $config = $this->getDbalConfig(); + $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config); if (!interface_exists(Middleware::class)) { $this->markTestSkipped('doctrine/dbal v2 does not support custom drivers using middleware'); } @@ -67,7 +71,6 @@ public function testConfigureSchemaDecoratedDbalDriver() ->method('wrap') ->willReturn(new DriverWrapper($connection->getDriver())); - $config = new Configuration(); $config->setMiddlewares([$middleware]); $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config); @@ -83,7 +86,8 @@ public function testConfigureSchemaDecoratedDbalDriver() public function testConfigureSchema() { $this->expectDeprecation('Since symfony/cache 5.4: Usage of a DBAL Connection with "Symfony\Component\Cache\Adapter\PdoAdapter" is deprecated and will be removed in symfony 6.0. Use "Symfony\Component\Cache\Adapter\DoctrineDbalAdapter" instead.'); - $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]); + $config = $this->getDbalConfig(); + $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config); $schema = new Schema(); $adapter = new PdoAdapter($connection); @@ -104,7 +108,8 @@ public function testConfigureSchemaDifferentDbalConnection() public function testConfigureSchemaTableExists() { $this->expectDeprecation('Since symfony/cache 5.4: Usage of a DBAL Connection with "Symfony\Component\Cache\Adapter\PdoAdapter" is deprecated and will be removed in symfony 6.0. Use "Symfony\Component\Cache\Adapter\DoctrineDbalAdapter" instead.'); - $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]); + $config = $this->getDbalConfig(); + $connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config); $schema = new Schema(); $schema->createTable('cache_items'); @@ -168,4 +173,14 @@ private function createConnectionMock() return $connection; } + + private function getDbalConfig(): Configuration + { + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + return $config; + } } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 2d830200b03f5..cad7e0a7263f4 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -397,8 +397,8 @@ public function updateTimestamp($sessionId, $data) $updateStmt = $this->pdo->prepare( "UPDATE $this->table SET $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id" ); - $updateStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $updateStmt->bindParam(':expiry', $expiry, \PDO::PARAM_INT); + $updateStmt->bindValue(':id', $sessionId, \PDO::PARAM_STR); + $updateStmt->bindValue(':expiry', $expiry, \PDO::PARAM_INT); $updateStmt->bindValue(':time', time(), \PDO::PARAM_INT); $updateStmt->execute(); } catch (\PDOException $e) { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php index f3f7b201d9dea..3e838d8a42590 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php @@ -11,7 +11,11 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\DBAL\Tools\DsnParser; +use Doctrine\ORM\ORMSetup; use Symfony\Component\Cache\Adapter\AbstractAdapter; use Symfony\Component\Cache\Traits\RedisClusterProxy; use Symfony\Component\Cache\Traits\RedisProxy; @@ -71,7 +75,15 @@ public static function createHandler($connection): AbstractSessionHandler if (!class_exists(DriverManager::class)) { throw new \InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require doctrine/dbal".', $connection)); } - $connection = DriverManager::getConnection(['url' => $connection])->getWrappedConnection(); + $connection[3] = '-'; + $params = class_exists(DsnParser::class) ? (new DsnParser())->parse($connection) : ['url' => $connection]; + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $connection = DriverManager::getConnection($params, $config); + $connection = method_exists($connection, 'getNativeConnection') ? $connection->getNativeConnection() : $connection->getWrappedConnection(); // no break; case str_starts_with($connection, 'mssql://'): diff --git a/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php b/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php index 18f9352a511b1..56b3ded0ab426 100644 --- a/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php +++ b/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php @@ -11,9 +11,13 @@ namespace Symfony\Component\Lock\Store; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\DBAL\Tools\DsnParser; +use Doctrine\ORM\ORMSetup; use Symfony\Component\Lock\BlockingSharedLockStoreInterface; use Symfony\Component\Lock\BlockingStoreInterface; use Symfony\Component\Lock\Exception\InvalidArgumentException; @@ -51,7 +55,28 @@ public function __construct($connOrUrl) if (!class_exists(DriverManager::class)) { throw new InvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".', $connOrUrl)); } - $this->conn = DriverManager::getConnection(['url' => $this->filterDsn($connOrUrl)]); + if (class_exists(DsnParser::class)) { + $params = (new DsnParser([ + 'db2' => 'ibm_db2', + 'mssql' => 'pdo_sqlsrv', + 'mysql' => 'pdo_mysql', + 'mysql2' => 'pdo_mysql', + 'postgres' => 'pdo_pgsql', + 'postgresql' => 'pdo_pgsql', + 'pgsql' => 'pdo_pgsql', + 'sqlite' => 'pdo_sqlite', + 'sqlite3' => 'pdo_sqlite', + ]))->parse($this->filterDsn($connOrUrl)); + } else { + $params = ['url' => $this->filterDsn($connOrUrl)]; + } + + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $this->conn = DriverManager::getConnection($params, $config); } else { throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', Connection::class, __METHOD__, get_debug_type($connOrUrl))); } diff --git a/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php b/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php index 403746565ee97..8bf023ca2d5be 100644 --- a/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php +++ b/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php @@ -11,12 +11,16 @@ namespace Symfony\Component\Lock\Store; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Exception\TableNotFoundException; use Doctrine\DBAL\ParameterType; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Tools\DsnParser; +use Doctrine\ORM\ORMSetup; use Symfony\Component\Lock\Exception\InvalidArgumentException; use Symfony\Component\Lock\Exception\InvalidTtlException; use Symfony\Component\Lock\Exception\LockConflictedException; @@ -68,7 +72,28 @@ public function __construct($connOrUrl, array $options = [], float $gcProbabilit if (!class_exists(DriverManager::class)) { throw new InvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".', $connOrUrl)); } - $this->conn = DriverManager::getConnection(['url' => $connOrUrl]); + if (class_exists(DsnParser::class)) { + $params = (new DsnParser([ + 'db2' => 'ibm_db2', + 'mssql' => 'pdo_sqlsrv', + 'mysql' => 'pdo_mysql', + 'mysql2' => 'pdo_mysql', + 'postgres' => 'pdo_pgsql', + 'postgresql' => 'pdo_pgsql', + 'pgsql' => 'pdo_pgsql', + 'sqlite' => 'pdo_sqlite', + 'sqlite3' => 'pdo_sqlite', + ]))->parse($connOrUrl); + } else { + $params = ['url' => $connOrUrl]; + } + + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $this->conn = DriverManager::getConnection($params, $config); } else { throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', Connection::class, __METHOD__, get_debug_type($connOrUrl))); } diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php index 7fcffa99e5c7e..26e6b3111b617 100644 --- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php @@ -11,9 +11,13 @@ namespace Symfony\Component\Lock\Tests\Store; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Exception as DBALException; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\DBAL\Tools\DsnParser; +use Doctrine\ORM\ORMSetup; use Symfony\Component\Lock\Exception\InvalidArgumentException; use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Key; @@ -38,7 +42,7 @@ public function createPostgreSqlConnection(): Connection $this->markTestSkipped('Missing POSTGRES_HOST env variable'); } - return DriverManager::getConnection(['url' => 'pgsql://postgres:password@'.getenv('POSTGRES_HOST')]); + return self::getDbalConnection('pdo-pgsql://postgres:password@'.getenv('POSTGRES_HOST')); } /** @@ -68,7 +72,7 @@ public function testInvalidDriver($connOrDsn) public static function getInvalidDrivers() { yield ['sqlite:///tmp/foo.db']; - yield [DriverManager::getConnection(['url' => 'sqlite:///tmp/foo.db'])]; + yield [self::getDbalConnection('sqlite:///tmp/foo.db')]; } public function testSaveAfterConflict() @@ -168,4 +172,15 @@ public function testWaitAndSaveReadAfterConflictReleasesLockFromInternalStore() $this->assertTrue($store2->exists($store2Key)); } + + private static function getDbalConnection(string $dsn): Connection + { + $params = class_exists(DsnParser::class) ? (new DsnParser(['sqlite' => 'pdo_sqlite']))->parse($dsn) : ['url' => $dsn]; + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + return DriverManager::getConnection($params, $config); + } } diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php index 17d721cdfb7a9..d29d43df00718 100644 --- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php @@ -11,10 +11,13 @@ namespace Symfony\Component\Lock\Tests\Store; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Exception\TableNotFoundException; use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\ORM\ORMSetup; use Symfony\Component\Lock\Key; use Symfony\Component\Lock\PersistingStoreInterface; use Symfony\Component\Lock\Store\DoctrineDbalStore; @@ -36,7 +39,12 @@ public static function setUpBeforeClass(): void { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock'); - $store = new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $store = new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config)); $store->createTable(); } @@ -58,7 +66,12 @@ protected function getClockDelay() */ public function getStore(): PersistingStoreInterface { - return new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + return new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config)); } public function testAbortAfterExpiration() diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php index 877412882ea76..7b1f39999fe8b 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php @@ -11,9 +11,12 @@ namespace Symfony\Component\Lock\Tests\Store; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; +use Doctrine\ORM\ORMSetup; use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; use Symfony\Component\Lock\Key; use Symfony\Component\Lock\PersistingStoreInterface; @@ -37,7 +40,12 @@ public static function setUpBeforeClass(): void { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock'); - $store = new PdoStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $store = new PdoStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config)); $store->createTable(); } @@ -61,7 +69,12 @@ public function getStore(): PersistingStoreInterface { $this->expectDeprecation('Since symfony/lock 5.4: Usage of a DBAL Connection with "Symfony\Component\Lock\Store\PdoStore" is deprecated and will be removed in symfony 6.0. Use "Symfony\Component\Lock\Store\DoctrineDbalStore" instead.'); - return new PdoStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + return new PdoStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config)); } public function testAbortAfterExpiration() diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php index 5eee8270fbcb2..2375459bb69f8 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php @@ -11,10 +11,14 @@ namespace Symfony\Component\Messenger\Bridge\Doctrine\Tests\Transport; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Driver\Result as DriverResult; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Result; use Doctrine\DBAL\Schema\AbstractSchemaManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\DBAL\Tools\DsnParser; +use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\TestCase; use Symfony\Component\Messenger\Bridge\Doctrine\Tests\Fixtures\DummyMessage; use Symfony\Component\Messenger\Bridge\Doctrine\Transport\Connection; @@ -31,8 +35,14 @@ class DoctrineIntegrationTest extends TestCase protected function setUp(): void { - $dsn = getenv('MESSENGER_DOCTRINE_DSN') ?: 'sqlite://:memory:'; - $this->driverConnection = DriverManager::getConnection(['url' => $dsn]); + $dsn = getenv('MESSENGER_DOCTRINE_DSN') ?: 'pdo-sqlite://:memory:'; + $params = class_exists(DsnParser::class) ? (new DsnParser())->parse($dsn) : ['url' => $dsn]; + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $this->driverConnection = DriverManager::getConnection($params, $config); $this->connection = new Connection([], $this->driverConnection); } @@ -57,8 +67,12 @@ public function testSendWithDelay() ->select('m.available_at') ->from('messenger_messages', 'm') ->where('m.body = :body') - ->setParameter('body', '{"message": "Hi i am delayed"}') - ->execute(); + ->setParameter('body', '{"message": "Hi i am delayed"}'); + if (method_exists($stmt, 'executeQuery')) { + $stmt = $stmt->executeQuery(); + } else { + $stmt = $stmt->execute(); + } $available_at = new \DateTime($stmt instanceof Result || $stmt instanceof DriverResult ? $stmt->fetchOne() : $stmt->fetchColumn()); @@ -170,7 +184,7 @@ public function testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout() public function testTheTransportIsSetupOnGet() { - $this->assertFalse($this->createSchemaManager()->tablesExist('messenger_messages')); + $this->assertFalse($this->createSchemaManager()->tablesExist(['messenger_messages'])); $this->assertNull($this->connection->get()); $this->connection->send('the body', ['my' => 'header']); diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php index 5b4f8a248e30a..2a0df10975239 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php @@ -11,9 +11,13 @@ namespace Symfony\Component\Messenger\Bridge\Doctrine\Tests\Transport; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\AbstractSchemaManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\DBAL\Tools\DsnParser; +use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\TestCase; use Symfony\Component\Messenger\Bridge\Doctrine\Tests\Fixtures\DummyMessage; use Symfony\Component\Messenger\Bridge\Doctrine\Transport\PostgreSqlConnection; @@ -36,7 +40,14 @@ protected function setUp(): void $this->markTestSkipped('Missing POSTGRES_HOST env variable'); } - $this->driverConnection = DriverManager::getConnection(['url' => "pgsql://postgres:password@$host"]); + $url = "pdo-pgsql://postgres:password@$host"; + $params = class_exists(DsnParser::class) ? (new DsnParser())->parse($url) : ['url' => $url]; + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $this->driverConnection = DriverManager::getConnection($params, $config); $this->connection = new PostgreSqlConnection(['table_name' => 'queue_table'], $this->driverConnection); $this->connection->setup(); } diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php index 99fb8b3641339..6ce2503cbc41f 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -144,9 +144,9 @@ public function send(string $body, array $headers, int $delay = 0): string $now, $availableAt, ], [ - null, - null, - null, + Types::STRING, + Types::STRING, + Types::STRING, Types::DATETIME_MUTABLE, Types::DATETIME_MUTABLE, ]); @@ -273,7 +273,7 @@ public function setup(): void { $configuration = $this->driverConnection->getConfiguration(); $assetFilter = $configuration->getSchemaAssetsFilter(); - $configuration->setSchemaAssetsFilter(null); + $configuration->setSchemaAssetsFilter(static function () { return true; }); $this->updateSchema(); $configuration->setSchemaAssetsFilter($assetFilter); $this->autoSetup = false; @@ -480,9 +480,11 @@ private function updateSchema(): void $schemaManager = $this->createSchemaManager(); $comparator = $this->createComparator($schemaManager); - $schemaDiff = $this->compareSchemas($comparator, $schemaManager->createSchema(), $this->getSchema()); + $schemaDiff = $this->compareSchemas($comparator, method_exists($schemaManager, 'introspectSchema') ? $schemaManager->introspectSchema() : $schemaManager->createSchema(), $this->getSchema()); + $platform = $this->driverConnection->getDatabasePlatform(); + $queries = method_exists($platform, 'getAlterSchemaSQL') ? $platform->getAlterSchemaSQL($schemaDiff) : $schemaDiff->toSaveSql($platform); - foreach ($schemaDiff->toSaveSql($this->driverConnection->getDatabasePlatform()) as $sql) { + foreach ($queries as $sql) { if (method_exists($this->driverConnection, 'executeStatement')) { $this->driverConnection->executeStatement($sql); } else { @@ -507,7 +509,7 @@ private function createComparator(AbstractSchemaManager $schemaManager): Compara private function compareSchemas(Comparator $comparator, Schema $from, Schema $to): SchemaDiff { - return method_exists($comparator, 'compareSchemas') + return method_exists($comparator, 'compareSchemas') || method_exists($comparator, 'doCompareSchemas') ? $comparator->compareSchemas($from, $to) : $comparator->compare($from, $to); } diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index ba62014510e56..a62ab004cf5a4 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -356,16 +356,17 @@ public function mergeConstraints(self $source) $constraint->addImplicitGroupName($this->getDefaultGroup()); } - $this->addPropertyMetadata($member); - if ($member instanceof MemberMetadata && !$member->isPrivate($this->name)) { $property = $member->getPropertyName(); + $this->members[$property] = [$member]; - if ($member instanceof PropertyMetadata && !isset($this->properties[$property])) { + if ($member instanceof PropertyMetadata) { $this->properties[$property] = $member; - } elseif ($member instanceof GetterMetadata && !isset($this->getters[$property])) { + } elseif ($member instanceof GetterMetadata) { $this->getters[$property] = $member; } + } else { + $this->addPropertyMetadata($member); } } } diff --git a/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php index 6968927e3d69f..dfe0f8319c0af 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php @@ -95,14 +95,19 @@ public function loadClassMetadata(ClassMetadata $metadata) */ private function getAnnotations(object $reflection): iterable { + $dedup = []; + if (\PHP_VERSION_ID >= 80000) { foreach ($reflection->getAttributes(GroupSequence::class) as $attribute) { + $dedup[] = $attribute->newInstance(); yield $attribute->newInstance(); } foreach ($reflection->getAttributes(GroupSequenceProvider::class) as $attribute) { + $dedup[] = $attribute->newInstance(); yield $attribute->newInstance(); } foreach ($reflection->getAttributes(Constraint::class, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) { + $dedup[] = $attribute->newInstance(); yield $attribute->newInstance(); } } @@ -110,14 +115,31 @@ private function getAnnotations(object $reflection): iterable return; } + $annotations = []; + if ($reflection instanceof \ReflectionClass) { - yield from $this->reader->getClassAnnotations($reflection); + $annotations = $this->reader->getClassAnnotations($reflection); } if ($reflection instanceof \ReflectionMethod) { - yield from $this->reader->getMethodAnnotations($reflection); + $annotations = $this->reader->getMethodAnnotations($reflection); } if ($reflection instanceof \ReflectionProperty) { - yield from $this->reader->getPropertyAnnotations($reflection); + $annotations = $this->reader->getPropertyAnnotations($reflection); + } + + foreach ($dedup as $annotation) { + if ($annotation instanceof Constraint) { + $annotation->groups; // trigger initialization of the "groups" property + } + } + + foreach ($annotations as $annotation) { + if ($annotation instanceof Constraint) { + $annotation->groups; // trigger initialization of the "groups" property + } + if (!\in_array($annotation, $dedup, false)) { + yield $annotation; + } } } } From 3fd32aa6e4cf7f982b17b143f4728bc7e57763ca Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 3 Jun 2023 09:31:00 +0200 Subject: [PATCH 21/57] fix merge --- .../Tests/Middleware/Debug/MiddlewareTest.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php b/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php index 1598ec54ea507..b1096fbf60cb5 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php @@ -157,21 +157,19 @@ public function testWithParamBound(callable $executeMethod) $expectedRes = $res = $this->getResourceFromString('mydata'); - $stmt->bindValue(2, $price); - $stmt->bindValue(3, $stock, ParameterType::INTEGER); + $stmt = $this->conn->prepare($sql); + $stmt->bindValue(1, 'product1'); + $stmt->bindValue(2, '12.5'); + $stmt->bindValue(3, 5, ParameterType::INTEGER); $stmt->bindValue(4, $res, ParameterType::BINARY); - $product = 'product1'; - $price = '12.5'; - $stock = 5; - $executeMethod($stmt); // Debug data should not be affected by these changes $debug = $this->debugDataHolder->getData()['default'] ?? []; $this->assertCount(2, $debug); $this->assertSame($sql, $debug[1]['sql']); - $this->assertSame(['product1', 12.5, 5, $expectedRes], $debug[1]['params']); + $this->assertSame(['product1', '12.5', 5, $expectedRes], $debug[1]['params']); $this->assertSame([ParameterType::STRING, ParameterType::STRING, ParameterType::INTEGER, ParameterType::BINARY], $debug[1]['types']); $this->assertGreaterThan(0, $debug[1]['executionMS']); } From a859c404d4e69080bf78c1c8743fec47229945bd Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 3 Jun 2023 09:43:47 +0200 Subject: [PATCH 22/57] fix Doctrine deprecations --- .../Lock/Tests/Store/DoctrineDbalStoreTest.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php index db79dcb3c6952..b1e92421231ac 100644 --- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php @@ -11,10 +11,13 @@ namespace Symfony\Component\Lock\Tests\Store; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Exception\TableNotFoundException; use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\ORM\ORMSetup; use Symfony\Component\Lock\Key; use Symfony\Component\Lock\PersistingStoreInterface; use Symfony\Component\Lock\Store\DoctrineDbalStore; @@ -36,7 +39,12 @@ public static function setUpBeforeClass(): void { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock'); - $store = new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $store = new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config)); $store->createTable(); } @@ -52,7 +60,12 @@ protected function getClockDelay() public function getStore(): PersistingStoreInterface { - return new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); + $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + return new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config)); } public function testAbortAfterExpiration() From d7070c3f3f2b09f228bb33066a013ac27f3716cd Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 4 Jun 2023 14:50:25 +0200 Subject: [PATCH 23/57] bump validator requirement --- src/Symfony/Bridge/Doctrine/composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 3aa2e352401ca..dcb046fbc38e7 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -40,7 +40,7 @@ "symfony/security-core": "^5.3|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", "symfony/uid": "^5.1|^6.0", - "symfony/validator": "^5.2|^6.0", + "symfony/validator": "^5.4.25|~6.2.12|^6.3.1", "symfony/translation": "^4.4|^5.0|^6.0", "symfony/var-dumper": "^4.4|^5.0|^6.0", "doctrine/annotations": "^1.10.4|^2", @@ -63,7 +63,7 @@ "symfony/proxy-manager-bridge": "<4.4.19", "symfony/security-bundle": "<5", "symfony/security-core": "<5.3", - "symfony/validator": "<5.2" + "symfony/validator": "<5.4.25|>=6,<6.2.12|>=6.3,<6.3.1" }, "suggest": { "symfony/form": "", From 330bb6adc4fdaadd61cfb066522df016a60565c9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 4 Jun 2023 16:51:27 +0200 Subject: [PATCH 24/57] [DoctrineBridge] Update deprecations baseline --- .github/deprecations-baseline.json | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/deprecations-baseline.json b/.github/deprecations-baseline.json index 51092cf19e2ec..5e889a497cf75 100644 --- a/.github/deprecations-baseline.json +++ b/.github/deprecations-baseline.json @@ -954,6 +954,11 @@ "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", "count": 1 }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtractEnum", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 5 + }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetPropertiesCatchException", "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", @@ -1082,33 +1087,38 @@ { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 28 + "count": 36 }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", - "count": 56 + "count": 72 }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 28 + "count": 36 }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 560 + "count": 720 }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 560 + "count": 720 }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testLoadClassMetadata", "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", "count": 1 }, + { + "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testExtractEnum", + "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", + "count": 1 + }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testFieldMappingsConfiguration", "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", From aab7ce6582875cffe41f934f59e928e81e43dca6 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 4 Jun 2023 17:00:32 +0200 Subject: [PATCH 25/57] [DoctrineBridge] Fix deprecations baseline in integration tests --- .github/deprecations-baseline.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/deprecations-baseline.json b/.github/deprecations-baseline.json index 51092cf19e2ec..e1208ae1ca6a0 100644 --- a/.github/deprecations-baseline.json +++ b/.github/deprecations-baseline.json @@ -369,6 +369,26 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrinePostgreSqlIntegrationTest::setUp", + "message": "Connection::fetchColumn() is deprecated, use Connection::fetchOne() API instead. (Connection.php:662 called by PostgreSqlSchemaManager.php:63, https://github.com/doctrine/dbal/pull/4019, package doctrine/dbal)", + "count": 2 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrinePostgreSqlIntegrationTest::setUp", + "message": "Connection::query() is deprecated, use Connection::executeQuery() instead. (Connection.php:1436 called by AbstractPostgreSQLDriver.php:149, https://github.com/doctrine/dbal/pull/4163, package doctrine/dbal)", + "count": 1 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrinePostgreSqlIntegrationTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 3 + }, + { + "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrinePostgreSqlIntegrationTest::setUp", + "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", + "count": 3 + }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsStringArray", "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", From 6f76b901e1315a4a4a9333ec1caaedbf79d72dc5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 4 Jun 2023 17:52:42 +0200 Subject: [PATCH 26/57] [GHA] Enable deprecations baseline --- .github/workflows/integration-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index dc5b6ebac2c2c..43e6a84618ee9 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -157,6 +157,7 @@ jobs: ([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json" export COMPOSER_ROOT_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -P -o '[0-9]+\.[0-9]+').x-dev echo COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION >> $GITHUB_ENV + echo SYMFONY_DEPRECATIONS_HELPER="baselineFile=$(pwd)/.github/deprecations-baseline.json" >> $GITHUB_ENV echo "::group::composer update" composer require --dev --no-update mongodb/mongodb From ae1969559132dd11c99bb1ef1864a8013209c351 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Mon, 5 Jun 2023 10:05:41 +0200 Subject: [PATCH 27/57] Fix Crawler::filter throw phpdoc --- src/Symfony/Component/DomCrawler/Crawler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 0942443418386..08baced5e9b88 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -778,7 +778,7 @@ public function filterXPath(string $xpath) * * @return static * - * @throws \RuntimeException if the CssSelector Component is not available + * @throws \LogicException if the CssSelector Component is not available */ public function filter(string $selector) { From 3fb90e28300f3c000c321035a6ca1f8ece577b96 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Mon, 5 Jun 2023 13:51:12 +0200 Subject: [PATCH 28/57] [DependencyInjection] Support PHP 8.2 `true` type Add test for `null` type --- .../Compiler/CheckTypeDeclarationsPass.php | 4 ++++ .../CheckTypeDeclarationsPassTest.php | 21 +++++++++++++++++++ .../UnionConstructorPHP82.php | 16 ++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/UnionConstructorPHP82.php diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php index 59e39067e777e..e69d56fb16265 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php @@ -308,6 +308,10 @@ private function checkType(Definition $checkedDefinition, $value, \ReflectionPar if (false === $value) { return; } + } elseif ('true' === $type) { + if (true === $value) { + return; + } } elseif ($reflectionType->isBuiltin()) { $checkFunction = sprintf('is_%s', $type); if ($checkFunction($value)) { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckTypeDeclarationsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckTypeDeclarationsPassTest.php index e3c87ef13b74f..91447c7ef4459 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckTypeDeclarationsPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckTypeDeclarationsPassTest.php @@ -32,6 +32,7 @@ use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\FooObject; use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\IntersectionConstructor; use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\UnionConstructor; +use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\UnionConstructorPHP82; use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\Waldo; use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\WaldoFoo; use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\Wobble; @@ -868,6 +869,26 @@ public function testUnionTypePassesWithFalse() $this->addToAssertionCount(1); } + /** + * @requires PHP 8.2 + */ + public function testUnionTypePassesWithTrue() + { + $container = new ContainerBuilder(); + + $container->register('unionTrue', UnionConstructorPHP82::class) + ->setFactory([UnionConstructorPHP82::class, 'createTrue']) + ->setArguments([true]); + + $container->register('unionNull', UnionConstructorPHP82::class) + ->setFactory([UnionConstructorPHP82::class, 'createNull']) + ->setArguments([null]); + + (new CheckTypeDeclarationsPass(true))->process($container); + + $this->addToAssertionCount(1); + } + /** * @requires PHP 8 */ diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/UnionConstructorPHP82.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/UnionConstructorPHP82.php new file mode 100644 index 0000000000000..ea0d9e348f388 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/UnionConstructorPHP82.php @@ -0,0 +1,16 @@ + Date: Mon, 5 Jun 2023 15:18:20 +0200 Subject: [PATCH 29/57] [Lock] Fix sprintf --- .../Component/Lock/Store/DoctrineDbalPostgreSqlStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php b/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php index 56b3ded0ab426..22eb275f23ebd 100644 --- a/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php +++ b/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php @@ -275,7 +275,7 @@ private function unlockShared(Key $key): void private function filterDsn(string $dsn): string { if (!str_contains($dsn, '://')) { - throw new InvalidArgumentException(sprintf('String "%" is not a valid DSN for Doctrine DBAL.', $dsn)); + throw new InvalidArgumentException(sprintf('String "%s" is not a valid DSN for Doctrine DBAL.', $dsn)); } [$scheme, $rest] = explode(':', $dsn, 2); From e2959ccedb7a6d6eefc97bfc5ffb3ab0489879dd Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Mon, 5 Jun 2023 16:18:47 +0200 Subject: [PATCH 30/57] [Routing] Fix Psalm --- .../Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php index 123130ed40dd9..4b38880453e42 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherDumper.php @@ -139,7 +139,8 @@ private function generateCompiledRoutes(): string foreach ($staticRoutes as $path => $routes) { $code .= sprintf(" %s => [\n", self::export($path)); foreach ($routes as $route) { - $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route)); + $r = array_map([__CLASS__, 'export'], $route); + $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", $r[0], $r[1], $r[2], $r[3], $r[4], $r[5], $r[6]); } $code .= " ],\n"; } @@ -151,7 +152,8 @@ private function generateCompiledRoutes(): string foreach ($dynamicRoutes as $path => $routes) { $code .= sprintf(" %s => [\n", self::export($path)); foreach ($routes as $route) { - $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route)); + $r = array_map([__CLASS__, 'export'], $route); + $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", $r[0], $r[1], $r[2], $r[3], $r[4], $r[5], $r[6]); } $code .= " ],\n"; } From 7d9640be018bb3961580428e466b53c4b81260c8 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 5 Jun 2023 16:50:32 +0200 Subject: [PATCH 31/57] [DoctrineBridge] Work around "Doctrine\DBAL\Connection::getEventManager()" deprecations --- .github/deprecations-baseline.json | 400 ------------------ .../Doctrine/Test/DoctrineTestHelper.php | 5 +- .../PropertyInfo/DoctrineExtractorTest.php | 4 +- 3 files changed, 7 insertions(+), 402 deletions(-) diff --git a/.github/deprecations-baseline.json b/.github/deprecations-baseline.json index e1208ae1ca6a0..bccc0350da2c5 100644 --- a/.github/deprecations-baseline.json +++ b/.github/deprecations-baseline.json @@ -1,44 +1,4 @@ [ - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsStringArray", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsIntegerArray", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterNonIntegerValues", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterEmptyUuids", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterUid", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testUidThrowProperException", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testEmbeddedIdentifierName", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 83 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -54,61 +14,16 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 1328 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetProperties", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testTestGetPropertiesWithEmbedded", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 25 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3945 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", "count": 1 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtractWithEmbedded", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtractEnum", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 5 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetPropertiesCatchException", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetTypesCatchException", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3945 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", "count": 1 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -124,11 +39,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -144,11 +54,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -164,16 +69,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserRequiresId", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -189,11 +84,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -209,11 +99,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 36 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3945 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", @@ -234,31 +119,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 720 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testLoadClassMetadata", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testExtractEnum", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testFieldMappingsConfiguration", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassValidator", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 4 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassNoAutoMapping", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:296 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", @@ -389,46 +249,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 3 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsStringArray", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsIntegerArray", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterNonIntegerValues", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterEmptyUuids", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterUid", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testUidThrowProperException", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testEmbeddedIdentifierName", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 83 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSetDataToUninitializedEntityWithNonRequired", "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", @@ -739,86 +559,16 @@ "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", "count": 3 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetProperties", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testTestGetPropertiesWithEmbedded", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 25 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtractWithEmbedded", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetPropertiesCatchException", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetTypesCatchException", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineExtractorTest.php:48, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", "count": 3 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserRequiresId", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", "count": 3 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 28 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniqueness", "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", @@ -874,66 +624,6 @@ "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", "count": 3 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testLoadClassMetadata", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testFieldMappingsConfiguration", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassValidator", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 4 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassNoAutoMapping", - "message": "The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by DoctrineTestHelper.php:84, https://github.com/doctrine/orm/issues/10098, package doctrine/orm)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsStringArray", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testIdentifierTypeIsIntegerArray", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterNonIntegerValues", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterEmptyUuids", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testFilterUid", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testUidThrowProperException", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\ChoiceList\\ORMQueryBuilderLoaderTest::testEmbeddedIdentifierName", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 83 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -949,56 +639,16 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 1328 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetProperties", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testTestGetPropertiesWithEmbedded", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 25 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", "count": 1 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtractWithEmbedded", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetPropertiesCatchException", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGetTypesCatchException", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", "count": 1 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -1014,11 +664,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -1034,11 +679,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -1054,16 +694,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserRequiresId", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -1079,11 +709,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", @@ -1099,11 +724,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 2 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 28 - }, { "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", @@ -1124,26 +744,6 @@ "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", "count": 560 }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testLoadClassMetadata", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testFieldMappingsConfiguration", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassValidator", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 4 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\DoctrineLoaderTest::testClassNoAutoMapping", - "message": "Doctrine\\DBAL\\Connection::getEventManager is deprecated. (Connection.php:300 called by EntityManager.php:167, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)", - "count": 1 - }, { "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", diff --git a/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php b/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php index 1cb68be8bd641..b9597cfaed345 100644 --- a/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php +++ b/src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php @@ -12,6 +12,7 @@ namespace Symfony\Bridge\Doctrine\Test; use Doctrine\Common\Annotations\AnnotationReader; +use Doctrine\Common\EventManager; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\ORM\Configuration; @@ -61,7 +62,9 @@ public static function createTestEntityManager(Configuration $config = null) return EntityManager::create($params, $config); } - return new EntityManager(DriverManager::getConnection($params, $config), $config); + $eventManager = new EventManager(); + + return new EntityManager(DriverManager::getConnection($params, $config, $eventManager), $config, $eventManager); } /** diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php index 57baf9be25f83..40884d2c572c6 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php @@ -13,6 +13,7 @@ use Doctrine\Common\Annotations\AnnotationReader; use Doctrine\Common\Collections\Collection; +use Doctrine\Common\EventManager; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Types\Type as DBALType; @@ -54,7 +55,8 @@ private function createExtractor() if (!(new \ReflectionMethod(EntityManager::class, '__construct'))->isPublic()) { $entityManager = EntityManager::create(['driver' => 'pdo_sqlite'], $config); } else { - $entityManager = new EntityManager(DriverManager::getConnection(['driver' => 'pdo_sqlite'], $config), $config); + $eventManager = new EventManager(); + $entityManager = new EntityManager(DriverManager::getConnection(['driver' => 'pdo_sqlite'], $config, $eventManager), $config, $eventManager); } if (!DBALType::hasType('foo')) { From 39c3f8df02665fd80f0b863bc9af89b9ffd71f90 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 6 Jun 2023 11:39:10 +0200 Subject: [PATCH 32/57] [GHA] Remove deprecations-baseline --- .github/deprecations-baseline.json | 845 ------------------------ .github/workflows/integration-tests.yml | 2 +- .github/workflows/unit-tests.yml | 1 - 3 files changed, 1 insertion(+), 847 deletions(-) diff --git a/.github/deprecations-baseline.json b/.github/deprecations-baseline.json index bccc0350da2c5..bc8adfb354f19 100644 --- a/.github/deprecations-baseline.json +++ b/.github/deprecations-baseline.json @@ -1,234 +1,4 @@ [ - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 166 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 1328 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 1328 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", - "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3945 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", - "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3945 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3945 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", - "count": 72 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:898 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 36 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 720 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 720 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaTableExists", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testDsn", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testDsn", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::setUpBeforeClass", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::setUpBeforeClass", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::testDsn", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::testDsn", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\ConnectionTest::testConfigureSchemaTableExists", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testConnectionSendAndGet", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testConnectionSendAndGet", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testSendWithDelay", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testSendWithDelay", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheFirstAvailableMessage", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheFirstAvailableMessage", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItCountMessages", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItCountMessages", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testTheTransportIsSetupOnGet", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:816 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testTheTransportIsSetupOnGet", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:727 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, { "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrinePostgreSqlIntegrationTest::setUp", "message": "Connection::fetchColumn() is deprecated, use Connection::fetchOne() API instead. (Connection.php:662 called by PostgreSqlSchemaManager.php:63, https://github.com/doctrine/dbal/pull/4019, package doctrine/dbal)", @@ -238,620 +8,5 @@ "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrinePostgreSqlIntegrationTest::setUp", "message": "Connection::query() is deprecated, use Connection::executeQuery() instead. (Connection.php:1436 called by AbstractPostgreSQLDriver.php:149, https://github.com/doctrine/dbal/pull/4163, package doctrine/dbal)", "count": 1 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrinePostgreSqlIntegrationTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrinePostgreSqlIntegrationTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSetDataToUninitializedEntityWithNonRequired", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSetDataToUninitializedEntityWithNonRequiredToString", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSetDataToUninitializedEntityWithNonRequiredQueryBuilder", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testConfigureQueryBuilderWithClosureReturningNullUseDefault", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSetDataMultipleExpandedNull", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleNonExpandedSingleIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleNonExpandedSingleAssocIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleNonExpandedCompositeIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedSingleIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedSingleAssocIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedSingleIdentifierForExistingData", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedCompositeIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedCompositeIdentifierExistingData", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleExpanded", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleExpanded", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleExpandedWithNegativeIntegerId", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleNonExpandedStringCastableIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleStringCastableIdentifierExpanded", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 4 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedStringCastableIdentifierForExistingData", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleNonExpandedStringCastableIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitMultipleStringCastableIdentifierExpanded", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 4 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testOverrideChoicesValues", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testOverrideChoicesValuesWithCallable", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testChoicesForValuesOptimization", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferredChoices", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedQueryBuilderSingleIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSingleIdentifierWithLimit", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedByQueryBuilderSingleIdentifierWithLimit", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedQueryBuilderSingleAssocIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 4 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedQueryBuilderAsClosureSingleIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDisallowChoicesThatAreNotIncludedQueryBuilderAsClosureCompositeIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitSingleStringIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitCompositeStringIdentifier", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testLoaderCaching", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testLoaderCachingWithParameters", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassIdAndNameToView", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testStripLeadingUnderscoresAndDigitsFromId", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassIdAndNameToViewWithParent", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassIdAndNameToViewWithGrandParent", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassTranslationDomainToView", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testInheritTranslationDomainFromParent", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferOwnTranslationDomain", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDefaultTranslationDomain", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassLabelTranslationParametersToView", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassHelpTranslationParametersToView", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassAttrTranslationParametersToView", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testInheritLabelTranslationParametersFromParent", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testInheritHelpTranslationParametersFromParent", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testInheritAttrTranslationParametersFromParent", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferOwnLabelTranslationParameters", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferOwnHelpTranslationParameters", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPreferOwnAttrTranslationParameters", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDefaultLabelTranslationParameters", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDefaultHelpTranslationParameters", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testDefaultAttrTranslationParameters", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassLabelToView", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testPassMultipartFalseToView", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitNullExpanded", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitNullExpandedMultiple", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitNullUsesDefaultEmptyData", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testSubmitNullMultipleUsesDefaultEmptyData", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::testWithSameLoaderAndDifferentChoiceValueCallbacks", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniqueness", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateCustomErrorPath", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessWithIgnoreNullDisabled", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessWithValidCustomErrorPath", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testAssociatedEntity", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 4 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessNotToStringEntityWithAssociatedEntity", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 4 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testAssociatedEntityWithNull", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 4 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateInheritanceUniqueness", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 5 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessWithCompositeObjectNoToStringIdEntity", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessWithCustomDoctrineTypeValue", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::testValidateUniquenessCause", - "message": "AbstractPlatform::getSQLResultCasing is deprecated without replacement and removed in DBAL 3.Use Portability\\Connection with PORTABILITY_FIX_CASE to get portable result cases. (AbstractPlatform.php:3515 called by SQLResultCasing.php:30, https://github.com/doctrine/dbal/pull/4229, package doctrine/dbal)", - "count": 3 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 166 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 1328 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Form\\Type\\EntityTypeTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 1328 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testExtract", - "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\PropertyInfo\\DoctrineExtractorTest::testGeneratedValueNotWritable", - "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshUserGetsUserByPrimaryKey", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsername", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testLoadUserByUsernameWithNonUserLoaderRepositoryAndWithoutProperty", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testRefreshInvalidUser", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Security\\User\\EntityUserProviderTest::testSupportProxy", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "Doctrine\\DBAL\\Platforms\\AbstractPlatform::usesSequenceEmulatedIdentityColumns is deprecated. (AbstractPlatform.php:3949 called by ClassMetadataFactory.php:622, https://github.com/doctrine/dbal/pull/5513, package doctrine/dbal)", - "count": 56 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "SqlitePlatform::canEmulateSchemas() is deprecated. (SqlitePlatform.php:901 called by SchemaTool.php:409, https://github.com/doctrine/dbal/pull/4805, package doctrine/dbal)", - "count": 28 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 560 - }, - { - "location": "Symfony\\Bridge\\Doctrine\\Tests\\Validator\\Constraints\\UniqueEntityValidatorTest::setUp", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 560 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaDecoratedDbalDriver", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testConfigureSchemaTableExists", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testDsn", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Component\\Cache\\Tests\\Adapter\\DoctrineDbalAdapterTest::testDsn", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::setUpBeforeClass", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::setUpBeforeClass", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::testDsn", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalStoreTest::testDsn", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 6 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\ConnectionTest::testConfigureSchemaTableExists", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 1 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testConnectionSendAndGet", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testConnectionSendAndGet", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testSendWithDelay", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testSendWithDelay", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheFirstAvailableMessage", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheFirstAvailableMessage", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItCountMessages", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItCountMessages", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testItRetrieveTheMessageThatIsOlderThanRedeliverTimeout", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testTheTransportIsSetupOnGet", - "message": "Doctrine\\DBAL\\Schema\\Table::getPrimaryKeyColumns is deprecated. Use getPrimaryKey() and Index::getColumns() instead. (Table.php:820 called by Table.php:708, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 - }, - { - "location": "Symfony\\Component\\Messenger\\Bridge\\Doctrine\\Tests\\Transport\\DoctrineIntegrationTest::testTheTransportIsSetupOnGet", - "message": "Doctrine\\DBAL\\Schema\\Table::getForeignKeyColumns is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead. (Table.php:731 called by Table.php:709, https://github.com/doctrine/dbal/pull/5731, package doctrine/dbal)", - "count": 2 } ] \ No newline at end of file diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 43e6a84618ee9..dc80c6fb28ce6 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -157,7 +157,7 @@ jobs: ([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json" export COMPOSER_ROOT_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -P -o '[0-9]+\.[0-9]+').x-dev echo COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION >> $GITHUB_ENV - echo SYMFONY_DEPRECATIONS_HELPER="baselineFile=$(pwd)/.github/deprecations-baseline.json" >> $GITHUB_ENV + [[ "${{ matrix.php }}" < '8.0' ]] && echo SYMFONY_DEPRECATIONS_HELPER="baselineFile=$(pwd)/.github/deprecations-baseline.json" >> $GITHUB_ENV echo "::group::composer update" composer require --dev --no-update mongodb/mongodb diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index b5c5d0fba2bd5..3757f2523e928 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -89,7 +89,6 @@ jobs: # Create local composer packages for each patched components and reference them in composer.json files when cross-testing components if [[ ! "${{ matrix.mode }}" = *-deps ]]; then - echo SYMFONY_DEPRECATIONS_HELPER="baselineFile=$(pwd)/.github/deprecations-baseline.json" >> $GITHUB_ENV php .github/build-packages.php HEAD^ $SYMFONY_VERSION src/Symfony/Bridge/PhpUnit else echo SYMFONY_DEPRECATIONS_HELPER=weak >> $GITHUB_ENV From 2824fc5d69e874a625e91bad56cbbf429469dc89 Mon Sep 17 00:00:00 2001 From: HypeMC Date: Sun, 4 Jun 2023 14:19:42 +0200 Subject: [PATCH 33/57] [FrameworkBundle] Fix `debug:config` & `config:dump` in debug mode --- .../Command/BuildDebugContainerTrait.php | 9 +- .../Command/ConfigDebugCommand.php | 4 +- .../Functional/ConfigDebugCommandTest.php | 132 +++++++++++++----- .../ConfigDumpReferenceCommandTest.php | 83 +++++++---- 4 files changed, 162 insertions(+), 66 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php b/src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php index 785027dbc8d4e..b29d6954dcde5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php @@ -50,7 +50,14 @@ protected function getContainerBuilder(KernelInterface $kernel): ContainerBuilde $container->getCompilerPassConfig()->setAfterRemovingPasses([]); $container->compile(); } else { - (new XmlFileLoader($container = new ContainerBuilder(), new FileLocator()))->load($kernel->getContainer()->getParameter('debug.container.dump')); + $buildContainer = \Closure::bind(function () { + $containerBuilder = $this->getContainerBuilder(); + $this->prepareContainer($containerBuilder); + + return $containerBuilder; + }, $kernel, \get_class($kernel)); + $container = $buildContainer(); + (new XmlFileLoader($container, new FileLocator()))->load($kernel->getContainer()->getParameter('debug.container.dump')); $locatorPass = new ServiceLocatorTagPass(); $locatorPass->process($container); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php index fe4b83a9b9c97..6a5ba5dcf2245 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php @@ -176,12 +176,12 @@ private function getConfigForExtension(ExtensionInterface $extension, ContainerB // Fall back to default config if the extension has one - if (!$extension instanceof ConfigurationExtensionInterface) { + if (!$extension instanceof ConfigurationExtensionInterface && !$extension instanceof ConfigurationInterface) { throw new \LogicException(sprintf('The extension with alias "%s" does not have configuration.', $extensionAlias)); } $configs = $container->getExtensionConfig($extensionAlias); - $configuration = $extension->getConfiguration($configs, $container); + $configuration = $extension instanceof ConfigurationInterface ? $extension : $extension->getConfiguration($configs, $container); $this->validateConfiguration($extension, $configuration); return (new Processor())->processConfiguration($configuration, $configs); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php index 11afd0d8a5fdc..a5dd42058df4b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php @@ -23,36 +23,53 @@ */ class ConfigDebugCommandTest extends AbstractWebTestCase { - private $application; - - protected function setUp(): void + /** + * @testWith [true] + * [false] + */ + public function testDumpKernelExtension(bool $debug) { - $kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']); - $this->application = new Application($kernel); - $this->application->doRun(new ArrayInput([]), new NullOutput()); + $tester = $this->createCommandTester($debug); + $ret = $tester->execute(['name' => 'foo']); + + $this->assertSame(0, $ret, 'Returns 0 in case of success'); + $this->assertStringContainsString('foo:', $tester->getDisplay()); + $this->assertStringContainsString(' foo: bar', $tester->getDisplay()); } - public function testDumpBundleName() + /** + * @testWith [true] + * [false] + */ + public function testDumpBundleName(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'TestBundle']); $this->assertSame(0, $ret, 'Returns 0 in case of success'); $this->assertStringContainsString('custom: foo', $tester->getDisplay()); } - public function testDumpBundleOption() + /** + * @testWith [true] + * [false] + */ + public function testDumpBundleOption(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'TestBundle', 'path' => 'custom']); $this->assertSame(0, $ret, 'Returns 0 in case of success'); $this->assertStringContainsString('foo', $tester->getDisplay()); } - public function testParametersValuesAreResolved() + /** + * @testWith [true] + * [false] + */ + public function testParametersValuesAreResolved(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'framework']); $this->assertSame(0, $ret, 'Returns 0 in case of success'); @@ -60,77 +77,105 @@ public function testParametersValuesAreResolved() $this->assertStringContainsString('secret: test', $tester->getDisplay()); } - public function testDefaultParameterValueIsResolvedIfConfigIsExisting() + /** + * @testWith [true] + * [false] + */ + public function testDefaultParameterValueIsResolvedIfConfigIsExisting(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'framework']); $this->assertSame(0, $ret, 'Returns 0 in case of success'); - $kernelCacheDir = $this->application->getKernel()->getContainer()->getParameter('kernel.cache_dir'); + $kernelCacheDir = self::$kernel->getContainer()->getParameter('kernel.cache_dir'); $this->assertStringContainsString(sprintf("dsn: 'file:%s/profiler'", $kernelCacheDir), $tester->getDisplay()); } - public function testDumpExtensionConfigWithoutBundle() + /** + * @testWith [true] + * [false] + */ + public function testDumpExtensionConfigWithoutBundle(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'test_dump']); $this->assertSame(0, $ret, 'Returns 0 in case of success'); $this->assertStringContainsString('enabled: true', $tester->getDisplay()); } - public function testDumpUndefinedBundleOption() + /** + * @testWith [true] + * [false] + */ + public function testDumpUndefinedBundleOption(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $tester->execute(['name' => 'TestBundle', 'path' => 'foo']); $this->assertStringContainsString('Unable to find configuration for "test.foo"', $tester->getDisplay()); } - public function testDumpWithPrefixedEnv() + /** + * @testWith [true] + * [false] + */ + public function testDumpWithPrefixedEnv(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $tester->execute(['name' => 'FrameworkBundle']); $this->assertStringContainsString("cookie_httponly: '%env(bool:COOKIE_HTTPONLY)%'", $tester->getDisplay()); } - public function testDumpFallsBackToDefaultConfigAndResolvesParameterValue() + /** + * @testWith [true] + * [false] + */ + public function testDumpFallsBackToDefaultConfigAndResolvesParameterValue(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'DefaultConfigTestBundle']); $this->assertSame(0, $ret, 'Returns 0 in case of success'); $this->assertStringContainsString('foo: bar', $tester->getDisplay()); } - public function testDumpFallsBackToDefaultConfigAndResolvesEnvPlaceholder() + /** + * @testWith [true] + * [false] + */ + public function testDumpFallsBackToDefaultConfigAndResolvesEnvPlaceholder(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'DefaultConfigTestBundle']); $this->assertSame(0, $ret, 'Returns 0 in case of success'); $this->assertStringContainsString("baz: '%env(BAZ)%'", $tester->getDisplay()); } - public function testDumpThrowsExceptionWhenDefaultConfigFallbackIsImpossible() + /** + * @testWith [true] + * [false] + */ + public function testDumpThrowsExceptionWhenDefaultConfigFallbackIsImpossible(bool $debug) { $this->expectException(\LogicException::class); $this->expectExceptionMessage('The extension with alias "extension_without_config_test" does not have configuration.'); - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $tester->execute(['name' => 'ExtensionWithoutConfigTestBundle']); } /** * @dataProvider provideCompletionSuggestions */ - public function testComplete(array $input, array $expectedSuggestions) + public function testComplete(bool $debug, array $input, array $expectedSuggestions) { - $this->application->add(new ConfigDebugCommand()); - - $tester = new CommandCompletionTester($this->application->get('debug:config')); + $application = $this->createApplication($debug); + $application->add(new ConfigDebugCommand()); + $tester = new CommandCompletionTester($application->get('debug:config')); $suggestions = $tester->complete($input); foreach ($expectedSuggestions as $expectedSuggestion) { @@ -140,17 +185,32 @@ public function testComplete(array $input, array $expectedSuggestions) public static function provideCompletionSuggestions(): \Generator { - yield 'name' => [[''], ['default_config_test', 'extension_without_config_test', 'framework', 'test']]; + $name = ['default_config_test', 'extension_without_config_test', 'framework', 'test']; + yield 'name, no debug' => [false, [''], $name]; + yield 'name, debug' => [true, [''], $name]; - yield 'name (started CamelCase)' => [['Fra'], ['DefaultConfigTestBundle', 'ExtensionWithoutConfigTestBundle', 'FrameworkBundle', 'TestBundle']]; + $nameCamelCased = ['DefaultConfigTestBundle', 'ExtensionWithoutConfigTestBundle', 'FrameworkBundle', 'TestBundle']; + yield 'name (started CamelCase), no debug' => [false, ['Fra'], $nameCamelCased]; + yield 'name (started CamelCase), debug' => [true, ['Fra'], $nameCamelCased]; - yield 'name with existing path' => [['framework', ''], ['secret', 'router.resource', 'router.utf8', 'router.enabled', 'validation.enabled', 'default_locale']]; + $nameWithPath = ['secret', 'router.resource', 'router.utf8', 'router.enabled', 'validation.enabled', 'default_locale']; + yield 'name with existing path, no debug' => [false, ['framework', ''], $nameWithPath]; + yield 'name with existing path, debug' => [true, ['framework', ''], $nameWithPath]; } - private function createCommandTester(): CommandTester + private function createCommandTester(bool $debug): CommandTester { - $command = $this->application->find('debug:config'); + $command = $this->createApplication($debug)->find('debug:config'); return new CommandTester($command); } + + private function createApplication(bool $debug): Application + { + $kernel = static::bootKernel(['debug' => $debug, 'test_case' => 'ConfigDump', 'root_config' => 'config.yml']); + $application = new Application($kernel); + $application->doRun(new ArrayInput([]), new NullOutput()); + + return $application; + } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php index e944960aea4e7..8d1a8963b188d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -23,26 +23,27 @@ */ class ConfigDumpReferenceCommandTest extends AbstractWebTestCase { - private $application; - - protected function setUp(): void - { - $kernel = static::createKernel(['test_case' => 'ConfigDump', 'root_config' => 'config.yml']); - $this->application = new Application($kernel); - $this->application->doRun(new ArrayInput([]), new NullOutput()); - } - - public function testDumpKernelExtension() + /** + * @testWith [true] + * [false] + */ + public function testDumpKernelExtension(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'foo']); + + $this->assertSame(0, $ret, 'Returns 0 in case of success'); $this->assertStringContainsString('foo:', $tester->getDisplay()); $this->assertStringContainsString(' bar', $tester->getDisplay()); } - public function testDumpBundleName() + /** + * @testWith [true] + * [false] + */ + public function testDumpBundleName(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'TestBundle']); $this->assertSame(0, $ret, 'Returns 0 in case of success'); @@ -50,18 +51,26 @@ public function testDumpBundleName() $this->assertStringContainsString(' custom:', $tester->getDisplay()); } - public function testDumpExtensionConfigWithoutBundle() + /** + * @testWith [true] + * [false] + */ + public function testDumpExtensionConfigWithoutBundle(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute(['name' => 'test_dump']); $this->assertSame(0, $ret, 'Returns 0 in case of success'); $this->assertStringContainsString('enabled: true', $tester->getDisplay()); } - public function testDumpAtPath() + /** + * @testWith [true] + * [false] + */ + public function testDumpAtPath(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute([ 'name' => 'test', 'path' => 'array', @@ -79,9 +88,13 @@ public function testDumpAtPath() , $tester->getDisplay(true)); } - public function testDumpAtPathXml() + /** + * @testWith [true] + * [false] + */ + public function testDumpAtPathXml(bool $debug) { - $tester = $this->createCommandTester(); + $tester = $this->createCommandTester($debug); $ret = $tester->execute([ 'name' => 'test', 'path' => 'array', @@ -95,24 +108,40 @@ public function testDumpAtPathXml() /** * @dataProvider provideCompletionSuggestions */ - public function testComplete(array $input, array $expectedSuggestions) + public function testComplete(bool $debug, array $input, array $expectedSuggestions) { - $this->application->add(new ConfigDumpReferenceCommand()); - $tester = new CommandCompletionTester($this->application->get('config:dump-reference')); - $suggestions = $tester->complete($input, 2); + $application = $this->createApplication($debug); + + $application->add(new ConfigDumpReferenceCommand()); + $tester = new CommandCompletionTester($application->get('config:dump-reference')); + $suggestions = $tester->complete($input); $this->assertSame($expectedSuggestions, $suggestions); } public static function provideCompletionSuggestions(): iterable { - yield 'name' => [[''], ['DefaultConfigTestBundle', 'default_config_test', 'ExtensionWithoutConfigTestBundle', 'extension_without_config_test', 'FrameworkBundle', 'framework', 'TestBundle', 'test']]; - yield 'option --format' => [['--format', ''], ['yaml', 'xml']]; + $name = ['DefaultConfigTestBundle', 'default_config_test', 'ExtensionWithoutConfigTestBundle', 'extension_without_config_test', 'FrameworkBundle', 'framework', 'TestBundle', 'test']; + yield 'name, no debug' => [false, [''], $name]; + yield 'name, debug' => [true, [''], $name]; + + $optionFormat = ['yaml', 'xml']; + yield 'option --format, no debug' => [false, ['--format', ''], $optionFormat]; + yield 'option --format, debug' => [true, ['--format', ''], $optionFormat]; } - private function createCommandTester(): CommandTester + private function createCommandTester(bool $debug): CommandTester { - $command = $this->application->find('config:dump-reference'); + $command = $this->createApplication($debug)->find('config:dump-reference'); return new CommandTester($command); } + + private function createApplication(bool $debug): Application + { + $kernel = static::createKernel(['debug' => $debug, 'test_case' => 'ConfigDump', 'root_config' => 'config.yml']); + $application = new Application($kernel); + $application->doRun(new ArrayInput([]), new NullOutput()); + + return $application; + } } From 618de82bacfe7f5c973971b285d2c78012ac3beb Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 6 Jun 2023 14:36:44 +0200 Subject: [PATCH 34/57] Add test cases for MariaDBPlatform --- .../Bridge/Doctrine/Tests/Types/UlidTypeTest.php | 15 +++++++++------ .../Bridge/Doctrine/Tests/Types/UuidTypeTest.php | 15 +++++++++------ .../Doctrine/Tests/Transport/ConnectionTest.php | 15 +++++++++++++++ 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php index 06114aeea0050..c1db2bbe70124 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php @@ -12,6 +12,7 @@ namespace Symfony\Bridge\Doctrine\Tests\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Platforms\MariaDBPlatform; use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; @@ -140,13 +141,15 @@ public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string $this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform)); } - public static function provideSqlDeclarations(): array + public static function provideSqlDeclarations(): \Generator { - return [ - [new PostgreSQLPlatform(), 'UUID'], - [new SqlitePlatform(), 'BLOB'], - [new MySQLPlatform(), 'BINARY(16)'], - ]; + yield [new PostgreSQLPlatform(), 'UUID']; + yield [new SqlitePlatform(), 'BLOB']; + yield [new MySQLPlatform(), 'BINARY(16)']; + + if (class_exists(MariaDBPlatform::class)) { + yield [new MariaDBPlatform(), 'BINARY(16)']; + } } public function testRequiresSQLCommentHint() diff --git a/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php index d49afc5f97ec4..120887ef3653a 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php @@ -12,6 +12,7 @@ namespace Symfony\Bridge\Doctrine\Tests\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Platforms\MariaDBPlatform; use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; @@ -152,13 +153,15 @@ public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string $this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform)); } - public static function provideSqlDeclarations(): array + public static function provideSqlDeclarations(): \Generator { - return [ - [new PostgreSQLPlatform(), 'UUID'], - [new SqlitePlatform(), 'BLOB'], - [new MySQLPlatform(), 'BINARY(16)'], - ]; + yield [new PostgreSQLPlatform(), 'UUID']; + yield [new SqlitePlatform(), 'BLOB']; + yield [new MySQLPlatform(), 'BINARY(16)']; + + if (class_exists(MariaDBPlatform::class)) { + yield [new MariaDBPlatform(), 'BINARY(16)']; + } } public function testRequiresSQLCommentHint() diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php index 569f513fa53ab..5af44c4845849 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php @@ -17,6 +17,7 @@ use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Platforms\MariaDBPlatform; use Doctrine\DBAL\Platforms\MySQL57Platform; use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Platforms\SQLServer2012Platform; @@ -394,6 +395,13 @@ public static function providePlatformSql(): iterable 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) ORDER BY available_at ASC LIMIT 1 FOR UPDATE', ]; + if (class_exists(MariaDBPlatform::class)) { + yield 'MariaDB' => [ + new MariaDBPlatform(), + 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) ORDER BY available_at ASC LIMIT 1 FOR UPDATE', + ]; + } + yield 'SQL Server' => [ new SQLServer2012Platform(), 'SELECT m.* FROM messenger_messages m WITH (UPDLOCK, ROWLOCK) WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) ORDER BY available_at ASC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY ', @@ -479,6 +487,13 @@ public function provideFindAllSqlGeneratedByPlatform(): iterable 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) LIMIT 50', ]; + if (class_exists(MariaDBPlatform::class)) { + yield 'MariaDB' => [ + new MariaDBPlatform(), + 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) LIMIT 50', + ]; + } + yield 'SQL Server' => [ new SQLServer2012Platform(), 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) ORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 50 ROWS ONLY', From b31f700f7aa295a8a0389ad1b7f4f9fac0ca4859 Mon Sep 17 00:00:00 2001 From: HypeMC Date: Thu, 8 Jun 2023 21:34:49 +0200 Subject: [PATCH 35/57] [FrameworkBundle] Show non-bundle extensions in `debug:config` & `config:dump` list view & completion --- .../Command/AbstractConfigCommand.php | 41 +++++++++++++++++++ .../Command/ConfigDebugCommand.php | 28 ++++++++----- .../Command/ConfigDumpReferenceCommand.php | 25 ++++++----- .../Functional/ConfigDebugCommandTest.php | 26 +++++++++--- .../ConfigDumpReferenceCommandTest.php | 22 +++++++++- 5 files changed, 114 insertions(+), 28 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php index f0d5a98148640..415b2758a48bb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php @@ -57,6 +57,47 @@ protected function listBundles($output) } } + /** + * @param OutputInterface|StyleInterface $output + */ + protected function listNonBundleExtensions($output) + { + $title = 'Available registered non-bundle extension aliases'; + $headers = ['Extension alias']; + $rows = []; + + $kernel = $this->getApplication()->getKernel(); + + $bundleExtensions = []; + foreach ($kernel->getBundles() as $bundle) { + if ($extension = $bundle->getContainerExtension()) { + $bundleExtensions[\get_class($extension)] = true; + } + } + + $extensions = $this->getContainerBuilder($kernel)->getExtensions(); + + foreach ($extensions as $alias => $extension) { + if (isset($bundleExtensions[\get_class($extension)])) { + continue; + } + $rows[] = [$alias]; + } + + if (!$rows) { + return; + } + + if ($output instanceof StyleInterface) { + $output->title($title); + $output->table($headers, $rows); + } else { + $output->writeln($title); + $table = new Table($output); + $table->setHeaders($headers)->setRows($rows)->render(); + } + } + /** * @return ExtensionInterface */ diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php index 6a5ba5dcf2245..cc0444eae7de5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php @@ -77,14 +77,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (null === $name = $input->getArgument('name')) { $this->listBundles($errorIo); - - $kernel = $this->getApplication()->getKernel(); - if ($kernel instanceof ExtensionInterface - && ($kernel instanceof ConfigurationInterface || $kernel instanceof ConfigurationExtensionInterface) - && $kernel->getAlias() - ) { - $errorIo->table(['Kernel Extension'], [[$kernel->getAlias()]]); - } + $this->listNonBundleExtensions($errorIo); $errorIo->comment('Provide the name of a bundle as the first argument of this command to dump its configuration. (e.g. debug:config FrameworkBundle)'); $errorIo->comment('For dumping a specific option, add its path as the second argument of this command. (e.g. debug:config FrameworkBundle serializer to dump the framework.serializer configuration)'); @@ -190,7 +183,8 @@ private function getConfigForExtension(ExtensionInterface $extension, ContainerB public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void { if ($input->mustSuggestArgumentValuesFor('name')) { - $suggestions->suggestValues($this->getAvailableBundles(!preg_match('/^[A-Z]/', $input->getCompletionValue()))); + $suggestions->suggestValues($this->getAvailableExtensions()); + $suggestions->suggestValues($this->getAvailableBundles()); return; } @@ -205,11 +199,23 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti } } - private function getAvailableBundles(bool $alias): array + private function getAvailableExtensions(): array + { + $kernel = $this->getApplication()->getKernel(); + + $extensions = []; + foreach ($this->getContainerBuilder($kernel)->getExtensions() as $alias => $extension) { + $extensions[] = $alias; + } + + return $extensions; + } + + private function getAvailableBundles(): array { $availableBundles = []; foreach ($this->getApplication()->getKernel()->getBundles() as $bundle) { - $availableBundles[] = $alias ? $bundle->getContainerExtension()->getAlias() : $bundle->getName(); + $availableBundles[] = $bundle->getName(); } return $availableBundles; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php index 63e6496bd1bcc..10387d7985934 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php @@ -22,8 +22,6 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\Yaml\Yaml; /** @@ -88,14 +86,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (null === $name = $input->getArgument('name')) { $this->listBundles($errorIo); - - $kernel = $this->getApplication()->getKernel(); - if ($kernel instanceof ExtensionInterface - && ($kernel instanceof ConfigurationInterface || $kernel instanceof ConfigurationExtensionInterface) - && $kernel->getAlias() - ) { - $errorIo->table(['Kernel Extension'], [[$kernel->getAlias()]]); - } + $this->listNonBundleExtensions($errorIo); $errorIo->comment([ 'Provide the name of a bundle as the first argument of this command to dump its default configuration. (e.g. config:dump-reference FrameworkBundle)', @@ -163,6 +154,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void { if ($input->mustSuggestArgumentValuesFor('name')) { + $suggestions->suggestValues($this->getAvailableExtensions()); $suggestions->suggestValues($this->getAvailableBundles()); } @@ -171,13 +163,24 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti } } + private function getAvailableExtensions(): array + { + $kernel = $this->getApplication()->getKernel(); + + $extensions = []; + foreach ($this->getContainerBuilder($kernel)->getExtensions() as $alias => $extension) { + $extensions[] = $alias; + } + + return $extensions; + } + private function getAvailableBundles(): array { $bundles = []; foreach ($this->getApplication()->getKernel()->getBundles() as $bundle) { $bundles[] = $bundle->getName(); - $bundles[] = $bundle->getContainerExtension()->getAlias(); } return $bundles; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php index a5dd42058df4b..143c632be629c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php @@ -23,6 +23,26 @@ */ class ConfigDebugCommandTest extends AbstractWebTestCase { + /** + * @testWith [true] + * [false] + */ + public function testShowList(bool $debug) + { + $tester = $this->createCommandTester($debug); + $ret = $tester->execute([]); + + $this->assertSame(0, $ret, 'Returns 0 in case of success'); + $this->assertStringContainsString('Available registered bundles with their extension alias if available', $tester->getDisplay()); + $this->assertStringContainsString(' DefaultConfigTestBundle default_config_test', $tester->getDisplay()); + $this->assertStringContainsString(' ExtensionWithoutConfigTestBundle extension_without_config_test', $tester->getDisplay()); + $this->assertStringContainsString(' FrameworkBundle framework', $tester->getDisplay()); + $this->assertStringContainsString(' TestBundle test', $tester->getDisplay()); + $this->assertStringContainsString('Available registered non-bundle extension aliases', $tester->getDisplay()); + $this->assertStringContainsString(' foo', $tester->getDisplay()); + $this->assertStringContainsString(' test_dump', $tester->getDisplay()); + } + /** * @testWith [true] * [false] @@ -185,14 +205,10 @@ public function testComplete(bool $debug, array $input, array $expectedSuggestio public static function provideCompletionSuggestions(): \Generator { - $name = ['default_config_test', 'extension_without_config_test', 'framework', 'test']; + $name = ['default_config_test', 'extension_without_config_test', 'framework', 'test', 'foo', 'test_dump']; yield 'name, no debug' => [false, [''], $name]; yield 'name, debug' => [true, [''], $name]; - $nameCamelCased = ['DefaultConfigTestBundle', 'ExtensionWithoutConfigTestBundle', 'FrameworkBundle', 'TestBundle']; - yield 'name (started CamelCase), no debug' => [false, ['Fra'], $nameCamelCased]; - yield 'name (started CamelCase), debug' => [true, ['Fra'], $nameCamelCased]; - $nameWithPath = ['secret', 'router.resource', 'router.utf8', 'router.enabled', 'validation.enabled', 'default_locale']; yield 'name with existing path, no debug' => [false, ['framework', ''], $nameWithPath]; yield 'name with existing path, debug' => [true, ['framework', ''], $nameWithPath]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php index 8d1a8963b188d..8f5930faac2eb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -23,6 +23,26 @@ */ class ConfigDumpReferenceCommandTest extends AbstractWebTestCase { + /** + * @testWith [true] + * [false] + */ + public function testShowList(bool $debug) + { + $tester = $this->createCommandTester($debug); + $ret = $tester->execute([]); + + $this->assertSame(0, $ret, 'Returns 0 in case of success'); + $this->assertStringContainsString('Available registered bundles with their extension alias if available', $tester->getDisplay()); + $this->assertStringContainsString(' DefaultConfigTestBundle default_config_test', $tester->getDisplay()); + $this->assertStringContainsString(' ExtensionWithoutConfigTestBundle extension_without_config_test', $tester->getDisplay()); + $this->assertStringContainsString(' FrameworkBundle framework', $tester->getDisplay()); + $this->assertStringContainsString(' TestBundle test', $tester->getDisplay()); + $this->assertStringContainsString('Available registered non-bundle extension aliases', $tester->getDisplay()); + $this->assertStringContainsString(' foo', $tester->getDisplay()); + $this->assertStringContainsString(' test_dump', $tester->getDisplay()); + } + /** * @testWith [true] * [false] @@ -120,7 +140,7 @@ public function testComplete(bool $debug, array $input, array $expectedSuggestio public static function provideCompletionSuggestions(): iterable { - $name = ['DefaultConfigTestBundle', 'default_config_test', 'ExtensionWithoutConfigTestBundle', 'extension_without_config_test', 'FrameworkBundle', 'framework', 'TestBundle', 'test']; + $name = ['foo', 'default_config_test', 'extension_without_config_test', 'framework', 'test', 'test_dump', 'DefaultConfigTestBundle', 'ExtensionWithoutConfigTestBundle', 'FrameworkBundle', 'TestBundle']; yield 'name, no debug' => [false, [''], $name]; yield 'name, debug' => [true, [''], $name]; From ca8e3287abffa6bb7b63cf0f40159b68e0a8ce87 Mon Sep 17 00:00:00 2001 From: Pierre Lejeune Date: Wed, 7 Jun 2023 08:25:31 +0200 Subject: [PATCH 36/57] [Cache] Fix RedisTrait::createConnection for cluster --- .../Cache/Tests/Traits/RedisTraitTest.php | 68 +++++++++++++++++++ .../Component/Cache/Traits/RedisTrait.php | 5 ++ 2 files changed, 73 insertions(+) create mode 100644 src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php diff --git a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php new file mode 100644 index 0000000000000..e7e368b3e829d --- /dev/null +++ b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Traits; + +use PHPUnit\Framework\SkippedTestSuiteError; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Cache\Traits\RedisTrait; + +class RedisTraitTest extends TestCase +{ + public static function setUpBeforeClass(): void + { + if (!getenv('REDIS_CLUSTER_HOSTS')) { + throw new SkippedTestSuiteError('REDIS_CLUSTER_HOSTS env var is not defined.'); + } + } + + /** + * @dataProvider provideCreateConnection + */ + public function testCreateConnection(string $dsn, string $expectedClass) + { + if (!class_exists($expectedClass)) { + throw new SkippedTestSuiteError(sprintf('The "%s" class is required.', $expectedClass)); + } + if (!getenv('REDIS_CLUSTER_HOSTS')) { + throw new SkippedTestSuiteError('REDIS_CLUSTER_HOSTS env var is not defined.'); + } + + $mock = self::getObjectForTrait(RedisTrait::class); + $connection = $mock::createConnection($dsn); + + self::assertInstanceOf($expectedClass, $connection); + } + + public static function provideCreateConnection(): array + { + $hosts = array_map(function ($host) { return sprintf('host[%s]', $host); }, explode(' ', getenv('REDIS_CLUSTER_HOSTS'))); + + return [ + [ + sprintf('redis:?%s&redis_cluster=1', $hosts[0]), + 'RedisCluster', + ], + [ + sprintf('redis:?%s&redis_cluster=true', $hosts[0]), + 'RedisCluster', + ], + [ + sprintf('redis:?%s', $hosts[0]), + 'Redis', + ], + [ + 'dsn' => sprintf('redis:?%s', implode('&', \array_slice($hosts, 0, 2))), + 'RedisArray', + ], + ]; + } +} diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 67d866316938b..220e65e744d43 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -174,6 +174,11 @@ public static function createConnection(string $dsn, array $options = []) throw new CacheException(sprintf('Redis Sentinel support requires the "predis/predis" package or the "redis" extension v5.2 or higher: "%s".', $dsn)); } + if (isset($params['lazy'])) { + $params['lazy'] = filter_var($params['lazy'], \FILTER_VALIDATE_BOOLEAN); + } + $params['redis_cluster'] = filter_var($params['redis_cluster'], \FILTER_VALIDATE_BOOLEAN); + if ($params['redis_cluster'] && isset($params['redis_sentinel'])) { throw new InvalidArgumentException(sprintf('Cannot use both "redis_cluster" and "redis_sentinel" at the same time: "%s".', $dsn)); } From d51bce6aaca2a0009e5d14e23b296d869e8ca640 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 8 Jun 2023 21:49:26 +0200 Subject: [PATCH 37/57] Run unit tests with PHP 8.3 --- .github/workflows/unit-tests.yml | 6 +++--- src/Symfony/Bundle/FrameworkBundle/composer.json | 4 ++-- src/Symfony/Component/Runtime/composer.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 3757f2523e928..3ead881ea1a6d 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -28,11 +28,11 @@ jobs: include: - php: '7.2' - php: '7.4' - - php: '8.1' + - php: '8.2' mode: high-deps - - php: '8.1' - mode: low-deps - php: '8.2' + mode: low-deps + - php: '8.3' #mode: experimental fail-fast: false diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 320b993b1f8d1..24a28dee93223 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -60,7 +60,7 @@ "symfony/string": "^5.0|^6.0", "symfony/translation": "^5.3|^6.0", "symfony/twig-bundle": "^4.4|^5.0|^6.0", - "symfony/validator": "^5.2|^6.0", + "symfony/validator": "^5.3.11|^6.0", "symfony/workflow": "^5.2|^6.0", "symfony/yaml": "^4.4|^5.0|^6.0", "symfony/property-info": "^4.4|^5.0|^6.0", @@ -93,7 +93,7 @@ "symfony/translation": "<5.3", "symfony/twig-bridge": "<4.4", "symfony/twig-bundle": "<4.4", - "symfony/validator": "<5.2", + "symfony/validator": "<5.3.11", "symfony/web-profiler-bundle": "<4.4", "symfony/workflow": "<5.2" }, diff --git a/src/Symfony/Component/Runtime/composer.json b/src/Symfony/Component/Runtime/composer.json index 6c90a85947dfb..2e645f89afcac 100644 --- a/src/Symfony/Component/Runtime/composer.json +++ b/src/Symfony/Component/Runtime/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "composer/composer": "^1.0.2|^2.0", - "symfony/console": "^4.4.30|^5.3.7|^6.0", + "symfony/console": "^4.4.30|^5.4.9|^6.0.9", "symfony/dotenv": "^5.1|^6.0", "symfony/http-foundation": "^4.4.30|^5.3.7|^6.0", "symfony/http-kernel": "^4.4.30|^5.3.7|^6.0" From 3f90e16d72f48d1aa165343c3aecbe34521d3ed4 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 9 Jun 2023 00:45:27 +0200 Subject: [PATCH 38/57] [GHA] Always install with --ignore-platform-req=php+ --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 3ead881ea1a6d..7846507f86101 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -65,7 +65,7 @@ jobs: echo COLUMNS=120 >> $GITHUB_ENV echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data,integration" >> $GITHUB_ENV - echo COMPOSER_UP='composer update --no-progress --ansi'$([[ "${{ matrix.mode }}" = experimental ]] && echo ' --ignore-platform-req=php+') >> $GITHUB_ENV + echo COMPOSER_UP='composer update --no-progress --ansi'$([[ "${{ matrix.mode }}" != low-deps ]] && echo ' --ignore-platform-req=php+') >> $GITHUB_ENV SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V) SYMFONY_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | cut -d "'" -f2 | cut -d '.' -f 1-2) From 7361374dff2fbd67b0f2876d460e822c2fc30f0c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 9 Jun 2023 01:43:11 +0200 Subject: [PATCH 39/57] [Clock] Fix MockClock::modify() on PHP 8.3 --- src/Symfony/Component/Clock/MockClock.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Clock/MockClock.php b/src/Symfony/Component/Clock/MockClock.php index a189ff54c4dc9..db22e26b3771e 100644 --- a/src/Symfony/Component/Clock/MockClock.php +++ b/src/Symfony/Component/Clock/MockClock.php @@ -49,7 +49,12 @@ public function sleep(float|int $seconds): void public function modify(string $modifier): void { - if (false === $modifiedNow = @$this->now->modify($modifier)) { + try { + $modifiedNow = @$this->now->modify($modifier); + } catch (\DateMalformedStringException) { + $modifiedNow = false; + } + if (false === $modifiedNow) { throw new \InvalidArgumentException(sprintf('Invalid modifier: "%s". Could not modify MockClock.', $modifier)); } From 5166efec71d3f5af33850d4221df94fcf59b26ec Mon Sep 17 00:00:00 2001 From: Romain Monteil Date: Wed, 7 Jun 2023 16:19:00 +0200 Subject: [PATCH 40/57] Add missing EN and FR translations for newest constraints --- .../Resources/translations/validators.en.xlf | 20 ++++++++++++++++ .../Resources/translations/validators.fr.xlf | 24 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf index f6772fdfb67ba..e49d49d36c0aa 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -406,6 +406,26 @@ 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. 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. + + The password strength is too low. Please use a stronger password. + The password strength is too low. Please use a stronger password. + + + This value contains characters that are not allowed by the current restriction-level. + This value contains characters that are not allowed by the current restriction-level. + + + Using invisible characters is not allowed. + Using invisible characters is not allowed. + + + Mixing numbers from different scripts is not allowed. + Mixing numbers from different scripts is not allowed. + + + Using hidden overlay characters is not allowed. + Using hidden overlay characters is not allowed. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index 92127773178e7..6a355deb555b8 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -402,6 +402,30 @@ The value of the netmask should be between {{ min }} and {{ max }}. La valeur du masque de réseau doit être comprise entre {{ min }} et {{ 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. + Le nom du fichier est trop long. Il doit contenir au maximum {{ filename_max_length }} caractère.|Le nom de fichier est trop long. Il doit contenir au maximum {{ filename_max_length }} caractères. + + + The password strength is too low. Please use a stronger password. + La force du mot de passe est trop faible. Veuillez utiliser un mot de passe plus fort. + + + This value contains characters that are not allowed by the current restriction-level. + Cette valeur contient des caractères qui ne sont pas autorisés par le niveau de restriction actuel. + + + Using invisible characters is not allowed. + Utiliser des caractères invisibles n'est pas autorisé. + + + Mixing numbers from different scripts is not allowed. + Mélanger des chiffres provenant de différents scripts n'est pas autorisé. + + + Using hidden overlay characters is not allowed. + Utiliser des caractères de superposition cachés n'est pas autorisé. + From 484efb3ed89d6917d14988de71acccc5ef91da78 Mon Sep 17 00:00:00 2001 From: Adrien Roches Date: Fri, 9 Jun 2023 17:06:24 +0200 Subject: [PATCH 41/57] [Validator][Translator] Fix xlf files for en & fr translations. Bug introduced by #50590 --- .../Validator/Resources/translations/validators.en.xlf | 10 +++++----- .../Validator/Resources/translations/validators.fr.xlf | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf index e49d49d36c0aa..aaf6ada6fc089 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -408,23 +408,23 @@ The password strength is too low. Please use a stronger password. - The password strength is too low. Please use a stronger password. + The password strength is too low. Please use a stronger password. This value contains characters that are not allowed by the current restriction-level. - This value contains characters that are not allowed by the current restriction-level. + This value contains characters that are not allowed by the current restriction-level. Using invisible characters is not allowed. - Using invisible characters is not allowed. + Using invisible characters is not allowed. Mixing numbers from different scripts is not allowed. - Mixing numbers from different scripts is not allowed. + Mixing numbers from different scripts is not allowed. Using hidden overlay characters is not allowed. - Using hidden overlay characters is not allowed. + Using hidden overlay characters is not allowed. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index 6a355deb555b8..a1186891f4ad2 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -412,19 +412,19 @@ This value contains characters that are not allowed by the current restriction-level. - Cette valeur contient des caractères qui ne sont pas autorisés par le niveau de restriction actuel. + Cette valeur contient des caractères qui ne sont pas autorisés par le niveau de restriction actuel. Using invisible characters is not allowed. - Utiliser des caractères invisibles n'est pas autorisé. + Utiliser des caractères invisibles n'est pas autorisé. Mixing numbers from different scripts is not allowed. - Mélanger des chiffres provenant de différents scripts n'est pas autorisé. + Mélanger des chiffres provenant de différents scripts n'est pas autorisé. Using hidden overlay characters is not allowed. - Utiliser des caractères de superposition cachés n'est pas autorisé. + Utiliser des caractères de superposition cachés n'est pas autorisé. From dd328a230ff4ce0039ffc22f111072c93d91bf10 Mon Sep 17 00:00:00 2001 From: Ben Davies Date: Wed, 14 Jun 2023 09:23:01 +0100 Subject: [PATCH 42/57] Revert "[Messenger] Respect `isRetryable` decision of the retry strategy when deciding if failed message should be re-delivered" This reverts commit 8fc3dcc45d37ba5daaea5549d228cfd10adfb506. --- .../SendFailedMessageForRetryListener.php | 7 +++--- .../SendFailedMessageForRetryListenerTest.php | 23 +------------------ 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php b/src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php index ddd7f1b1f61b0..dab74b203f795 100644 --- a/src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php +++ b/src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php @@ -123,8 +123,7 @@ public static function getSubscribedEvents() private function shouldRetry(\Throwable $e, Envelope $envelope, RetryStrategyInterface $retryStrategy): bool { - $isRetryable = $retryStrategy->isRetryable($envelope, $e); - if ($isRetryable && $e instanceof RecoverableExceptionInterface) { + if ($e instanceof RecoverableExceptionInterface) { return true; } @@ -133,7 +132,7 @@ private function shouldRetry(\Throwable $e, Envelope $envelope, RetryStrategyInt if ($e instanceof HandlerFailedException) { $shouldNotRetry = true; foreach ($e->getNestedExceptions() as $nestedException) { - if ($isRetryable && $nestedException instanceof RecoverableExceptionInterface) { + if ($nestedException instanceof RecoverableExceptionInterface) { return true; } @@ -151,7 +150,7 @@ private function shouldRetry(\Throwable $e, Envelope $envelope, RetryStrategyInt return false; } - return $isRetryable; + return $retryStrategy->isRetryable($envelope, $e); } private function getRetryStrategyForTransport(string $alias): ?RetryStrategyInterface diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/SendFailedMessageForRetryListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/SendFailedMessageForRetryListenerTest.php index 8d795d7b86c23..a5fe10e85578b 100644 --- a/src/Symfony/Component/Messenger/Tests/EventListener/SendFailedMessageForRetryListenerTest.php +++ b/src/Symfony/Component/Messenger/Tests/EventListener/SendFailedMessageForRetryListenerTest.php @@ -63,7 +63,7 @@ public function testRecoverableStrategyCausesRetry() $senderLocator->expects($this->once())->method('has')->willReturn(true); $senderLocator->expects($this->once())->method('get')->willReturn($sender); $retryStategy = $this->createMock(RetryStrategyInterface::class); - $retryStategy->expects($this->once())->method('isRetryable')->willReturn(true); + $retryStategy->expects($this->never())->method('isRetryable'); $retryStategy->expects($this->once())->method('getWaitingTime')->willReturn(1000); $retryStrategyLocator = $this->createMock(ContainerInterface::class); $retryStrategyLocator->expects($this->once())->method('has')->willReturn(true); @@ -78,27 +78,6 @@ public function testRecoverableStrategyCausesRetry() $listener->onMessageFailed($event); } - public function testRetryIsOnlyAllowedWhenPermittedByRetryStrategy() - { - $senderLocator = $this->createMock(ContainerInterface::class); - $senderLocator->expects($this->never())->method('has'); - $senderLocator->expects($this->never())->method('get'); - $retryStrategy = $this->createMock(RetryStrategyInterface::class); - $retryStrategy->expects($this->once())->method('isRetryable')->willReturn(false); - $retryStrategy->expects($this->never())->method('getWaitingTime'); - $retryStrategyLocator = $this->createMock(ContainerInterface::class); - $retryStrategyLocator->expects($this->once())->method('has')->willReturn(true); - $retryStrategyLocator->expects($this->once())->method('get')->willReturn($retryStrategy); - - $listener = new SendFailedMessageForRetryListener($senderLocator, $retryStrategyLocator); - - $exception = new RecoverableMessageHandlingException('retry'); - $envelope = new Envelope(new \stdClass()); - $event = new WorkerMessageFailedEvent($envelope, 'my_receiver', $exception); - - $listener->onMessageFailed($event); - } - public function testEnvelopeIsSentToTransportOnRetry() { $exception = new \Exception('no!'); From 6dacc5938a7deb34e769004a576ac6a51d928f6b Mon Sep 17 00:00:00 2001 From: "Roland Franssen :)" Date: Thu, 15 Jun 2023 09:35:04 +0200 Subject: [PATCH 43/57] [FrameworkBundle] Ignore missing directories in about command --- src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php index e9660e55bd046..f338c45af4a9b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php @@ -109,6 +109,10 @@ private static function formatFileSize(string $path): string if (is_file($path)) { $size = filesize($path) ?: 0; } else { + if (!is_dir($path)) { + return 'n/a'; + } + $size = 0; foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS | \RecursiveDirectoryIterator::FOLLOW_SYMLINKS)) as $file) { if ($file->isReadable()) { From 962050ae9da662b8173d2ceb72847ecf1eba8705 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Sun, 18 Jun 2023 22:04:30 +0200 Subject: [PATCH 44/57] [HttpClient] Force int conversion for floated multiplier for GenericRetryStrategy --- .../HttpClient/Retry/GenericRetryStrategy.php | 2 +- .../Tests/Retry/GenericRetryStrategyTest.php | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/HttpClient/Retry/GenericRetryStrategy.php b/src/Symfony/Component/HttpClient/Retry/GenericRetryStrategy.php index ebe10a2186962..3241a5eb2da8f 100644 --- a/src/Symfony/Component/HttpClient/Retry/GenericRetryStrategy.php +++ b/src/Symfony/Component/HttpClient/Retry/GenericRetryStrategy.php @@ -102,7 +102,7 @@ public function getDelay(AsyncContext $context, ?string $responseContent, ?Trans $delay = $this->delayMs * $this->multiplier ** $context->getInfo('retry_count'); if ($this->jitter > 0) { - $randomness = $delay * $this->jitter; + $randomness = (int) ($delay * $this->jitter); $delay = $delay + random_int(-$randomness, +$randomness); } diff --git a/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php b/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php index 79fc37588bd0f..8219bbe57c0a8 100644 --- a/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php +++ b/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php @@ -67,7 +67,7 @@ public function testGetDelay(int $delay, int $multiplier, int $maxDelay, int $pr public static function provideDelay(): iterable { - // delay, multiplier, maxDelay, retries, expectedDelay + // delay, multiplier, maxDelay, previousRetries, expectedDelay yield [1000, 1, 5000, 0, 1000]; yield [1000, 1, 5000, 1, 1000]; yield [1000, 1, 5000, 2, 1000]; @@ -90,13 +90,16 @@ public static function provideDelay(): iterable yield [0, 2, 10000, 1, 0]; } - public function testJitter() + /** + * @dataProvider provideJitter + */ + public function testJitter(float $multiplier, int $previousRetries) { - $strategy = new GenericRetryStrategy([], 1000, 1, 0, 1); + $strategy = new GenericRetryStrategy([], 1000, $multiplier, 0, 1); $min = 2000; $max = 0; for ($i = 0; $i < 50; ++$i) { - $delay = $strategy->getDelay($this->getContext(0, 'GET', 'http://example.com/', 200), null, null); + $delay = $strategy->getDelay($this->getContext($previousRetries, 'GET', 'http://example.com/', 200), null, null); $min = min($min, $delay); $max = max($max, $delay); } @@ -105,6 +108,13 @@ public function testJitter() $this->assertLessThanOrEqual(1000, $min); } + public static function provideJitter(): iterable + { + // multiplier, previousRetries + yield [1, 0]; + yield [1.1, 2]; + } + private function getContext($retryCount, $method, $url, $statusCode): AsyncContext { $passthru = null; From b0a8ee3afb062e2ca00cd541ca076e423d4fe8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Mon, 19 Jun 2023 11:28:43 +0200 Subject: [PATCH 45/57] [Intl] Update the ICU data to 73.2 --- src/Symfony/Component/Intl/Intl.php | 2 +- src/Symfony/Component/Intl/Resources/data/git-info.txt | 4 ++-- src/Symfony/Component/Intl/Resources/data/version.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Intl/Intl.php b/src/Symfony/Component/Intl/Intl.php index eb5f36c5951b8..a05a54a1e013c 100644 --- a/src/Symfony/Component/Intl/Intl.php +++ b/src/Symfony/Component/Intl/Intl.php @@ -117,7 +117,7 @@ public static function getIcuDataVersion(): string */ public static function getIcuStubVersion(): string { - return '73.1'; + return '73.2'; } /** diff --git a/src/Symfony/Component/Intl/Resources/data/git-info.txt b/src/Symfony/Component/Intl/Resources/data/git-info.txt index c9973ca5da2cd..55d3c90d5a6fb 100644 --- a/src/Symfony/Component/Intl/Resources/data/git-info.txt +++ b/src/Symfony/Component/Intl/Resources/data/git-info.txt @@ -2,6 +2,6 @@ Git information =============== URL: https://github.com/unicode-org/icu.git -Revision: 5861e1fd52f1d7673eee38bc3c965aa18b336062 +Revision: 680f521746a3bd6a86f25f25ee50a62d88b489cf Author: Peter Edberg -Date: 2023-04-11T10:32:35-07:00 +Date: 2023-06-07T19:19:55-07:00 diff --git a/src/Symfony/Component/Intl/Resources/data/version.txt b/src/Symfony/Component/Intl/Resources/data/version.txt index 62bf7fe234f35..ae6f4d78d2129 100644 --- a/src/Symfony/Component/Intl/Resources/data/version.txt +++ b/src/Symfony/Component/Intl/Resources/data/version.txt @@ -1 +1 @@ -73.1 +73.2 From ca53525c70b73fe2cc0678e131cde083fdc8b2ef Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 14 Jun 2023 11:19:05 +0200 Subject: [PATCH 46/57] Only update autoload_runtime.php when it changed --- src/Symfony/Component/Runtime/Internal/ComposerPlugin.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php b/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php index d689e7f2dedb9..32c7f68810415 100644 --- a/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php +++ b/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php @@ -105,7 +105,12 @@ public function updateAutoloadFile(): void '%runtime_options%' => '['.substr(var_export($extra, true), 7, -1)." 'project_dir' => {$projectDir},\n]", ]); - file_put_contents(substr_replace($autoloadFile, '_runtime', -4, 0), $code); + // could use Composer\Util\Filesystem::filePutContentsIfModified once Composer 1.x support is dropped for this plugin + $path = substr_replace($autoloadFile, '_runtime', -4, 0); + $currentContent = @file_exists($path) ? @file_get_contents($path) : false; + if (false === $currentContent || $currentContent !== $code) { + file_put_contents($path, $code); + } } public static function getSubscribedEvents(): array From d6bc7a48ad55d588b7d5e3982d6579e3f746176d Mon Sep 17 00:00:00 2001 From: Moza Bogdan Date: Tue, 13 Jun 2023 11:12:51 +0300 Subject: [PATCH 47/57] [VarDumper] Dumping DateTime throws error if getTimezone is false --- .../Component/VarDumper/Caster/DateCaster.php | 2 +- .../VarDumper/Tests/Caster/DateCasterTest.php | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/VarDumper/Caster/DateCaster.php b/src/Symfony/Component/VarDumper/Caster/DateCaster.php index 18641fbc1d348..d07bac583147d 100644 --- a/src/Symfony/Component/VarDumper/Caster/DateCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/DateCaster.php @@ -27,7 +27,7 @@ class DateCaster public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, bool $isNested, int $filter) { $prefix = Caster::PREFIX_VIRTUAL; - $location = $d->getTimezone()->getLocation(); + $location = $d->getTimezone() ? $d->getTimezone()->getLocation() : null; $fromNow = (new \DateTime())->diff($d); $title = $d->format('l, F j, Y') diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php index 40835671b5137..ef0972f7908ab 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php @@ -90,6 +90,52 @@ public static function provideDateTimes() ]; } + /** + * @dataProvider provideNoTimezoneDateTimes + */ + public function testCastDateTimeNoTimezone($time, $xDate, $xInfos) + { + $stub = new Stub(); + $date = new NoTimezoneDate($time); + $cast = DateCaster::castDateTime($date, Caster::castObject($date, \DateTime::class), $stub, false, 0); + + $xDump = << $xDate +] +EODUMP; + + $this->assertDumpEquals($xDump, $cast); + + $xDump = <<assertDumpMatchesFormat($xDump, $cast["\0~\0date"]); + } + + public static function provideNoTimezoneDateTimes() + { + return [ + ['2017-04-30 00:00:00.000000', '2017-04-30 00:00:00.0 +00:00', 'Sunday, April 30, 2017'], + ['2017-04-30 00:00:00.100000', '2017-04-30 00:00:00.100 +00:00', 'Sunday, April 30, 2017'], + ['2017-04-30 00:00:00.120000', '2017-04-30 00:00:00.120 +00:00', 'Sunday, April 30, 2017'], + ['2017-04-30 00:00:00.123000', '2017-04-30 00:00:00.123 +00:00', 'Sunday, April 30, 2017'], + ['2017-04-30 00:00:00.123400', '2017-04-30 00:00:00.123400 +00:00', 'Sunday, April 30, 2017'], + ['2017-04-30 00:00:00.123450', '2017-04-30 00:00:00.123450 +00:00', 'Sunday, April 30, 2017'], + ['2017-04-30 00:00:00.123456', '2017-04-30 00:00:00.123456 +00:00', 'Sunday, April 30, 2017'], + ]; + } + public function testCastDateTimeWithAdditionalChildProperty() { $stub = new Stub(); @@ -407,3 +453,15 @@ private function createInterval($intervalSpec, $ms, $invert) return $interval; } } + +class NoTimezoneDate extends \DateTime +{ + /** + * @return \DateTimeZone|false + */ + #[\ReturnTypeWillChange] + public function getTimezone() + { + return false; + } +} From e34097dcf071c101929ae28f522fc107c337a42e Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Sun, 18 Jun 2023 14:34:14 +0200 Subject: [PATCH 48/57] [SecurityBundle] Remove last usages of tag `security.remember_me_aware` --- .../Compiler/UnusedTagsPass.php | 1 - .../Security/Factory/RememberMeFactory.php | 9 --------- .../DependencyInjection/SecurityExtension.php | 15 +++++---------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php index f127f32b49952..1dcee2d998a56 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php @@ -81,7 +81,6 @@ class UnusedTagsPass implements CompilerPassInterface 'routing.route_loader', 'security.authenticator.login_linker', 'security.expression_language_provider', - 'security.remember_me_aware', 'security.remember_me_handler', 'security.voter', 'serializer.encoder', diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php index d3ec4633cf5ce..eac593b8c7a6c 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php @@ -111,15 +111,6 @@ public function createAuthenticator(ContainerBuilder $container, string $firewal ->replaceArgument(3, $config['name'] ?? $this->options['name']) ; - foreach ($container->findTaggedServiceIds('security.remember_me_aware') as $serviceId => $attributes) { - // register ContextListener - if (str_starts_with($serviceId, 'security.context_listener')) { - continue; - } - - throw new \LogicException(sprintf('Symfony Authenticator Security dropped support for the "security.remember_me_aware" tag, service "%s" will no longer work as expected.', $serviceId)); - } - return $authenticatorId; } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php index cd514bb44367d..e6d26f8789769 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php @@ -417,11 +417,10 @@ private function createFirewall(ContainerBuilder $container, string $id, array $ $listeners[] = new Reference('security.channel_listener'); $contextKey = null; - $contextListenerId = null; // Context serializer listener if (false === $firewall['stateless']) { $contextKey = $firewall['context'] ?? $id; - $listeners[] = new Reference($contextListenerId = $this->createContextListener($container, $contextKey, $firewallEventDispatcherId)); + $listeners[] = new Reference($this->createContextListener($container, $contextKey, $firewallEventDispatcherId)); $sessionStrategyId = 'security.authentication.session_strategy'; $container @@ -490,7 +489,7 @@ private function createFirewall(ContainerBuilder $container, string $id, array $ // Authentication listeners $firewallAuthenticationProviders = []; - [$authListeners, $defaultEntryPoint] = $this->createAuthenticationListeners($container, $id, $firewall, $firewallAuthenticationProviders, $defaultProvider, $providerIds, $configuredEntryPoint, $contextListenerId); + [$authListeners, $defaultEntryPoint] = $this->createAuthenticationListeners($container, $id, $firewall, $firewallAuthenticationProviders, $defaultProvider, $providerIds, $configuredEntryPoint); // $configuredEntryPoint is resolved into a service ID and stored in $defaultEntryPoint $configuredEntryPoint = $defaultEntryPoint; @@ -596,7 +595,7 @@ private function createContextListener(ContainerBuilder $container, string $cont return $this->contextListeners[$contextKey] = $listenerId; } - private function createAuthenticationListeners(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, ?string $defaultProvider, array $providerIds, ?string $defaultEntryPoint, string $contextListenerId = null) + private function createAuthenticationListeners(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, ?string $defaultProvider, array $providerIds, ?string $defaultEntryPoint) { $listeners = []; $entryPoints = []; @@ -605,7 +604,7 @@ private function createAuthenticationListeners(ContainerBuilder $container, stri $key = str_replace('-', '_', $factory->getKey()); if (isset($firewall[$key])) { - $userProvider = $this->getUserProvider($container, $id, $firewall, $key, $defaultProvider, $providerIds, $contextListenerId); + $userProvider = $this->getUserProvider($container, $id, $firewall, $key, $defaultProvider, $providerIds); if (!$factory instanceof AuthenticatorFactoryInterface) { throw new InvalidConfigurationException(sprintf('Authenticator factory "%s" ("%s") must implement "%s".', get_debug_type($factory), $key, AuthenticatorFactoryInterface::class)); @@ -637,7 +636,7 @@ private function createAuthenticationListeners(ContainerBuilder $container, stri return [$listeners, $defaultEntryPoint]; } - private function getUserProvider(ContainerBuilder $container, string $id, array $firewall, string $factoryKey, ?string $defaultProvider, array $providerIds, ?string $contextListenerId): string + private function getUserProvider(ContainerBuilder $container, string $id, array $firewall, string $factoryKey, ?string $defaultProvider, array $providerIds): string { if (isset($firewall[$factoryKey]['provider'])) { if (!isset($providerIds[$normalizedName = str_replace('-', '_', $firewall[$factoryKey]['provider'])])) { @@ -647,10 +646,6 @@ private function getUserProvider(ContainerBuilder $container, string $id, array return $providerIds[$normalizedName]; } - if ('remember_me' === $factoryKey && $contextListenerId) { - $container->getDefinition($contextListenerId)->addTag('security.remember_me_aware', ['id' => $id, 'provider' => 'none']); - } - if ($defaultProvider) { return $defaultProvider; } From cb26c19c48b195307649a0d0e84f1835a5bfceb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Koz=C3=A1k?= Date: Thu, 15 Jun 2023 14:26:51 +0200 Subject: [PATCH 49/57] [HttpClient] Fix encoding some characters in query strings --- src/Symfony/Component/HttpClient/HttpClientTrait.php | 6 +----- .../Component/HttpClient/Tests/HttpClientTraitTest.php | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/HttpClient/HttpClientTrait.php b/src/Symfony/Component/HttpClient/HttpClientTrait.php index 411fcf65f7017..3d6044320d48c 100644 --- a/src/Symfony/Component/HttpClient/HttpClientTrait.php +++ b/src/Symfony/Component/HttpClient/HttpClientTrait.php @@ -547,7 +547,7 @@ private static function parseUrl(string $url, array $query = [], array $allowedS } // https://tools.ietf.org/html/rfc3986#section-3.3 - $parts[$part] = preg_replace_callback("#[^-A-Za-z0-9._~!$&/'()[\]*+,;=:@\\\\^`{|}%]++#", function ($m) { return rawurlencode($m[0]); }, $parts[$part]); + $parts[$part] = preg_replace_callback("#[^-A-Za-z0-9._~!$&/'()[\]*+,;=:@{}%]++#", function ($m) { return rawurlencode($m[0]); }, $parts[$part]); } return [ @@ -634,11 +634,7 @@ private static function mergeQueryString(?string $queryString, array $queryArray '%3B' => ';', '%40' => '@', '%5B' => '[', - '%5C' => '\\', '%5D' => ']', - '%5E' => '^', - '%60' => '`', - '%7C' => '|', ]); } diff --git a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php index a44a4b4b36ef6..2f42eb8c4a4d2 100644 --- a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php +++ b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php @@ -155,12 +155,13 @@ public static function provideParseUrl(): iterable yield [['http:', '//example.com', null, null, null], 'http://Example.coM:80']; yield [['https:', '//xn--dj-kia8a.example.com:8000', '/', null, null], 'https://DÉjà.Example.com:8000/']; yield [[null, null, '/f%20o.o', '?a=b', '#c'], '/f o%2Eo?a=b#c']; + yield [[null, null, '/custom%7C2010-01-01%2000:00:00%7C2023-06-15%2005:50:35', '?a=b', '#c'], '/custom|2010-01-01 00:00:00|2023-06-15 05:50:35?a=b#c']; yield [[null, '//a:b@foo', '/bar', null, null], '//a:b@foo/bar']; yield [[null, '//a:b@foo', '/b{}', null, null], '//a:b@foo/b{}']; yield [['http:', null, null, null, null], 'http:']; yield [['http:', null, 'bar', null, null], 'http:bar']; yield [[null, null, 'bar', '?a=1&c=c', null], 'bar?a=a&b=b', ['b' => null, 'c' => 'c', 'a' => 1]]; - yield [[null, null, 'bar', '?a=b+c&b=b-._~!$%26/%27()[]*%2B%2C;%3D:@%25\\^`%7B|%7D', null], 'bar?a=b+c', ['b' => 'b-._~!$&/\'()[]*+,;=:@%\\^`{|}']]; + yield [[null, null, 'bar', '?a=b+c&b=b-._~!$%26/%27()[]*%2B%2C;%3D:@%25%5C%5E%60%7B%7C%7D', null], 'bar?a=b+c', ['b' => 'b-._~!$&/\'()[]*+,;=:@%\\^`{|}']]; yield [[null, null, 'bar', '?a=b%2B%20c', null], 'bar?a=b+c', ['a' => 'b+ c']]; yield [[null, null, 'bar', '?a[b]=c', null], 'bar', ['a' => ['b' => 'c']]]; yield [[null, null, 'bar', '?a[b[c]=d', null], 'bar?a[b[c]=d', []]; From eb08ef351355e4fad1525324ef1ba82ecb0ee225 Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Sat, 10 Jun 2023 09:21:54 +0200 Subject: [PATCH 50/57] [Validator] Add missing validator translations in Polish language --- .../Resources/translations/validators.pl.xlf | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf index b983b2d6c877f..e20f490970958 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf @@ -402,6 +402,30 @@ The value of the netmask should be between {{ min }} and {{ max }}. Wartość maski podsieci powinna być pomiędzy {{ min }} i {{ 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. + Nazwa pliku jest za długa. Powinna mieć {{ filename_max_length }} znak lub mniej.|Nazwa pliku jest za długa. Powinna mieć {{ filename_max_length }} znaków lub mniej. + + + The password strength is too low. Please use a stronger password. + Siła hasła jest zbyt niska. Użyj mocniejszego hasła. + + + This value contains characters that are not allowed by the current restriction-level. + Ta wartość zawiera znaki, które nie są dozwolone przez aktualny poziom ograniczeń. + + + Using invisible characters is not allowed. + Używanie niewidzialnych znaków jest niedozwolone. + + + Mixing numbers from different scripts is not allowed. + Mieszanie liczb z różnych skryptów jest niedozwolone. + + + Using hidden overlay characters is not allowed. + Używanie ukrytych znaków nakładki jest niedozwolone. + From c90e20fb08f08c1b44b9b766ed1fc2de5a497092 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 21 Jun 2023 16:44:30 +0200 Subject: [PATCH 51/57] [HttpClient] Explicitly exclude CURLOPT_POSTREDIR --- src/Symfony/Component/HttpClient/CurlHttpClient.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Component/HttpClient/CurlHttpClient.php b/src/Symfony/Component/HttpClient/CurlHttpClient.php index 70fb803a99ddb..ef6d700cc9360 100644 --- a/src/Symfony/Component/HttpClient/CurlHttpClient.php +++ b/src/Symfony/Component/HttpClient/CurlHttpClient.php @@ -469,6 +469,7 @@ private function validateExtraCurlOptions(array $options): void \CURLOPT_TIMEOUT_MS => 'max_duration', \CURLOPT_TIMEOUT => 'max_duration', \CURLOPT_MAXREDIRS => 'max_redirects', + \CURLOPT_POSTREDIR => 'max_redirects', \CURLOPT_PROXY => 'proxy', \CURLOPT_NOPROXY => 'no_proxy', \CURLOPT_SSL_VERIFYPEER => 'verify_peer', From 96c227a35c9199c7e9ad638e41c9f574b053b9a9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 22 Jun 2023 09:45:19 +0200 Subject: [PATCH 52/57] [Messenger] Preserve existing Doctrine schema --- .../Cache/Adapter/DoctrineDbalAdapter.php | 3 +- .../Tests/Adapter/DoctrineDbalAdapterTest.php | 3 +- .../Tests/Adapter/PdoDbalAdapterTest.php | 3 +- .../Storage/Handler/SessionHandlerFactory.php | 3 +- .../Store/DoctrineDbalPostgreSqlStore.php | 3 +- .../Lock/Store/DoctrineDbalStore.php | 3 +- .../Store/DoctrineDbalPostgreSqlStoreTest.php | 3 +- .../Tests/Store/DoctrineDbalStoreTest.php | 5 +-- .../Lock/Tests/Store/PdoDbalStoreTest.php | 5 +-- .../Transport/DoctrineIntegrationTest.php | 3 +- .../DoctrinePostgreSqlIntegrationTest.php | 3 +- .../Bridge/Doctrine/Transport/Connection.php | 38 ++++++++++++++++--- 12 files changed, 45 insertions(+), 30 deletions(-) diff --git a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php index 84fb1a4014395..2650869e3f8cc 100644 --- a/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php @@ -22,7 +22,6 @@ use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Tools\DsnParser; -use Doctrine\ORM\ORMSetup; use Symfony\Component\Cache\Exception\InvalidArgumentException; use Symfony\Component\Cache\Marshaller\DefaultMarshaller; use Symfony\Component\Cache\Marshaller\MarshallerInterface; @@ -89,7 +88,7 @@ public function __construct($connOrDsn, string $namespace = '', int $defaultLife $params = ['url' => $connOrDsn]; } - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php index 4fa78298613d3..79299ecd61506 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php @@ -18,7 +18,6 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; -use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\SkippedTestSuiteError; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Cache\Adapter\DoctrineDbalAdapter; @@ -160,7 +159,7 @@ private function createConnectionMock() private function getDbalConfig() { - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php index febdf33d3fa8a..1ed86b06c8e91 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php @@ -18,7 +18,6 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; -use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\SkippedTestSuiteError; use Psr\Cache\CacheItemPoolInterface; use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; @@ -176,7 +175,7 @@ private function createConnectionMock() private function getDbalConfig(): Configuration { - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php index 3e838d8a42590..39dc30c6f6c50 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php @@ -15,7 +15,6 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Tools\DsnParser; -use Doctrine\ORM\ORMSetup; use Symfony\Component\Cache\Adapter\AbstractAdapter; use Symfony\Component\Cache\Traits\RedisClusterProxy; use Symfony\Component\Cache\Traits\RedisProxy; @@ -77,7 +76,7 @@ public static function createHandler($connection): AbstractSessionHandler } $connection[3] = '-'; $params = class_exists(DsnParser::class) ? (new DsnParser())->parse($connection) : ['url' => $connection]; - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php b/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php index 22eb275f23ebd..0c3660a906d3d 100644 --- a/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php +++ b/src/Symfony/Component/Lock/Store/DoctrineDbalPostgreSqlStore.php @@ -17,7 +17,6 @@ use Doctrine\DBAL\Platforms\PostgreSQLPlatform; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Tools\DsnParser; -use Doctrine\ORM\ORMSetup; use Symfony\Component\Lock\BlockingSharedLockStoreInterface; use Symfony\Component\Lock\BlockingStoreInterface; use Symfony\Component\Lock\Exception\InvalidArgumentException; @@ -71,7 +70,7 @@ public function __construct($connOrUrl) $params = ['url' => $this->filterDsn($connOrUrl)]; } - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php b/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php index 8bf023ca2d5be..7874f465b8274 100644 --- a/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php +++ b/src/Symfony/Component/Lock/Store/DoctrineDbalStore.php @@ -20,7 +20,6 @@ use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Tools\DsnParser; -use Doctrine\ORM\ORMSetup; use Symfony\Component\Lock\Exception\InvalidArgumentException; use Symfony\Component\Lock\Exception\InvalidTtlException; use Symfony\Component\Lock\Exception\LockConflictedException; @@ -88,7 +87,7 @@ public function __construct($connOrUrl, array $options = [], float $gcProbabilit $params = ['url' => $connOrUrl]; } - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php index 26e6b3111b617..8b99ec4d5933a 100644 --- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php @@ -17,7 +17,6 @@ use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Tools\DsnParser; -use Doctrine\ORM\ORMSetup; use Symfony\Component\Lock\Exception\InvalidArgumentException; use Symfony\Component\Lock\Exception\LockConflictedException; use Symfony\Component\Lock\Key; @@ -176,7 +175,7 @@ public function testWaitAndSaveReadAfterConflictReleasesLockFromInternalStore() private static function getDbalConnection(string $dsn): Connection { $params = class_exists(DsnParser::class) ? (new DsnParser(['sqlite' => 'pdo_sqlite']))->parse($dsn) : ['url' => $dsn]; - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php index d29d43df00718..f8abec2522319 100644 --- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php @@ -17,7 +17,6 @@ use Doctrine\DBAL\Exception\TableNotFoundException; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; -use Doctrine\ORM\ORMSetup; use Symfony\Component\Lock\Key; use Symfony\Component\Lock\PersistingStoreInterface; use Symfony\Component\Lock\Store\DoctrineDbalStore; @@ -39,7 +38,7 @@ public static function setUpBeforeClass(): void { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock'); - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } @@ -66,7 +65,7 @@ protected function getClockDelay() */ public function getStore(): PersistingStoreInterface { - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php index 7b1f39999fe8b..ee34366747e07 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php @@ -16,7 +16,6 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; -use Doctrine\ORM\ORMSetup; use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; use Symfony\Component\Lock\Key; use Symfony\Component\Lock\PersistingStoreInterface; @@ -40,7 +39,7 @@ public static function setUpBeforeClass(): void { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock'); - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } @@ -69,7 +68,7 @@ public function getStore(): PersistingStoreInterface { $this->expectDeprecation('Since symfony/lock 5.4: Usage of a DBAL Connection with "Symfony\Component\Lock\Store\PdoStore" is deprecated and will be removed in symfony 6.0. Use "Symfony\Component\Lock\Store\DoctrineDbalStore" instead.'); - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php index 2375459bb69f8..e4e22565717f6 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php @@ -18,7 +18,6 @@ use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Tools\DsnParser; -use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\TestCase; use Symfony\Component\Messenger\Bridge\Doctrine\Tests\Fixtures\DummyMessage; use Symfony\Component\Messenger\Bridge\Doctrine\Transport\Connection; @@ -37,7 +36,7 @@ protected function setUp(): void { $dsn = getenv('MESSENGER_DOCTRINE_DSN') ?: 'pdo-sqlite://:memory:'; $params = class_exists(DsnParser::class) ? (new DsnParser())->parse($dsn) : ['url' => $dsn]; - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php index 2a0df10975239..63fe3ebd4b513 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php @@ -17,7 +17,6 @@ use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Tools\DsnParser; -use Doctrine\ORM\ORMSetup; use PHPUnit\Framework\TestCase; use Symfony\Component\Messenger\Bridge\Doctrine\Tests\Fixtures\DummyMessage; use Symfony\Component\Messenger\Bridge\Doctrine\Transport\PostgreSqlConnection; @@ -42,7 +41,7 @@ protected function setUp(): void $url = "pdo-pgsql://postgres:password@$host"; $params = class_exists(DsnParser::class) ? (new DsnParser())->parse($url) : ['url' => $url]; - $config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration(); + $config = new Configuration(); if (class_exists(DefaultSchemaManagerFactory::class)) { $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); } diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php index 6ce2503cbc41f..6bb601c2eef29 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -482,13 +482,39 @@ private function updateSchema(): void $comparator = $this->createComparator($schemaManager); $schemaDiff = $this->compareSchemas($comparator, method_exists($schemaManager, 'introspectSchema') ? $schemaManager->introspectSchema() : $schemaManager->createSchema(), $this->getSchema()); $platform = $this->driverConnection->getDatabasePlatform(); - $queries = method_exists($platform, 'getAlterSchemaSQL') ? $platform->getAlterSchemaSQL($schemaDiff) : $schemaDiff->toSaveSql($platform); + $exec = method_exists($this->driverConnection, 'executeStatement') ? 'executeStatement' : 'exec'; - foreach ($queries as $sql) { - if (method_exists($this->driverConnection, 'executeStatement')) { - $this->driverConnection->executeStatement($sql); - } else { - $this->driverConnection->exec($sql); + if (!method_exists(SchemaDiff::class, 'getCreatedSchemas')) { + foreach ($schemaDiff->toSaveSql($platform) as $sql) { + $this->driverConnection->$exec($sql); + } + + return; + } + + if ($platform->supportsSchemas()) { + foreach ($schemaDiff->getCreatedSchemas() as $schema) { + $this->driverConnection->$exec($platform->getCreateSchemaSQL($schema)); + } + } + + if ($platform->supportsSequences()) { + foreach ($schemaDiff->getAlteredSequences() as $sequence) { + $this->driverConnection->$exec($platform->getAlterSequenceSQL($sequence)); + } + + foreach ($schemaDiff->getCreatedSequences() as $sequence) { + $this->driverConnection->$exec($platform->getCreateSequenceSQL($sequence)); + } + } + + foreach ($platform->getCreateTablesSQL($schemaDiff->getCreatedTables()) as $sql) { + $this->driverConnection->$exec($sql); + } + + foreach ($schemaDiff->getAlteredTables() as $tableDiff) { + foreach ($platform->getAlterTableSQL($tableDiff) as $sql) { + $this->driverConnection->$exec($sql); } } } From a03692e903da48c14048793a6aa5daee3a2ec8bb Mon Sep 17 00:00:00 2001 From: jmsche Date: Thu, 12 Jan 2023 14:23:23 +0100 Subject: [PATCH 53/57] [WebProfilerBundle] right blocks: fix display --- .../Resources/views/Profiler/toolbar.css.twig | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index d1d4f0f426ed2..691e8fd6f0d4b 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -38,7 +38,7 @@ --sf-toolbar-green-100: #deeaea; --sf-toolbar-green-200: #bbd5d5; --sf-toolbar-green-300: #99bfbf; - --sf-toolbar-green-400: #76a9a9; + --sf-toolbar-green-400: #1dc9a4; --sf-toolbar-green-500: #598e8e; --sf-toolbar-green-600: #436c6c; --sf-toolbar-green-700: #2e4949; @@ -258,6 +258,11 @@ div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece.sf-toolbar-info-php-ext position: absolute; } +.sf-toolbar-block.sf-toolbar-block-right .sf-toolbar-info { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 0; +} + .sf-toolbar-block .sf-toolbar-info:empty { visibility: hidden; } @@ -273,9 +278,10 @@ div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece.sf-toolbar-info-php-ext text-align: center; } -.sf-toolbar-block .sf-toolbar-status-green, -.sf-toolbar-block .sf-toolbar-info .sf-toolbar-status-green { - background-color: #059669; +.sf-toolbar-block .sf-toolbar-status.sf-toolbar-status-green, +.sf-toolbar-block .sf-toolbar-info .sf-toolbar-status.sf-toolbar-status-green { + background-color: var(--sf-toolbar-green-400); + color: var(--sf-toolbar-green-50); } .sf-toolbar-block .sf-toolbar-status.sf-toolbar-status-red, .sf-toolbar-block .sf-toolbar-info .sf-toolbar-status.sf-toolbar-status-red { @@ -288,10 +294,7 @@ div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece.sf-toolbar-info-php-ext color: var(--sf-toolbar-yellow-800); } -.sf-toolbar-block.sf-toolbar-status-green { - background-color: #059669; - color: var(--sf-toolbar-white); -} +.sf-toolbar-block.sf-toolbar-status-green::before, .sf-toolbar-block.sf-toolbar-status-red::before, .sf-toolbar-block.sf-toolbar-status-yellow::before { background: var(--sf-toolbar-yellow-400); @@ -307,6 +310,10 @@ div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece.sf-toolbar-info-php-ext .sf-toolbar-block.sf-toolbar-status-red::before { background: var(--sf-toolbar-red-400); } +.sf-toolbar-block.sf-toolbar-status-green::before { + background: var(--sf-toolbar-green-400); +} +.sf-toolbar-block-request.sf-toolbar-block.sf-toolbar-status-green::before, .sf-toolbar-block-request.sf-toolbar-block.sf-toolbar-status-red::before, .sf-toolbar-block-request.sf-toolbar-block.sf-toolbar-status-yellow::before { display: none; @@ -384,7 +391,7 @@ div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece.sf-toolbar-info-php-ext box-shadow: 1px 0 0 var(--sf-toolbar-black), inset 0 -1px 0 var(--sf-toolbar-black); } .sf-toolbar-block.sf-toolbar-block-right:hover .sf-toolbar-icon { - box-shadow: -2px 0 0 var(--sf-toolbar-black), inset 0 -2px 0 var(--sf-toolbar-black); + box-shadow: -1px 0 0 var(--sf-toolbar-black), inset 0 -1px 0 var(--sf-toolbar-black); } .sf-toolbar-block-request .sf-toolbar-icon { @@ -409,9 +416,6 @@ div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece.sf-toolbar-info-php-ext .sf-toolbar-block.sf-toolbar-block-sf-cli .sf-toolbar-label { margin-left: 0; } -.sf-toolbar-block.sf-toolbar-block-sf-cli:hover .sf-toolbar-icon { - box-shadow: 2px 0 0 var(--sf-toolbar-black), inset 0 -2px 0 var(--sf-toolbar-black); -} .sf-toolbar-block:hover, .sf-toolbar-block.hover { @@ -538,7 +542,8 @@ div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece.sf-toolbar-info-php-ext .sf-toolbar-icon .sf-toolbar-value { display: none; } -.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-label { +.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-label, +.sf-cli .sf-toolbar-icon .sf-toolbar-label { display: inline-block; } From 99736d314831df80b36a972c9ad2797802aef21e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 23 Jun 2023 10:08:52 +0200 Subject: [PATCH 54/57] [WebProfilerBundle] Fix the accessibility of some background color --- .../Resources/views/Profiler/toolbar.css.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 691e8fd6f0d4b..4bb9cb8d1e269 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -38,7 +38,7 @@ --sf-toolbar-green-100: #deeaea; --sf-toolbar-green-200: #bbd5d5; --sf-toolbar-green-300: #99bfbf; - --sf-toolbar-green-400: #1dc9a4; + --sf-toolbar-green-400: #76a9a9; --sf-toolbar-green-500: #598e8e; --sf-toolbar-green-600: #436c6c; --sf-toolbar-green-700: #2e4949; @@ -280,8 +280,8 @@ div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece.sf-toolbar-info-php-ext .sf-toolbar-block .sf-toolbar-status.sf-toolbar-status-green, .sf-toolbar-block .sf-toolbar-info .sf-toolbar-status.sf-toolbar-status-green { - background-color: var(--sf-toolbar-green-400); - color: var(--sf-toolbar-green-50); + background-color: #059669; + color: var(--white); } .sf-toolbar-block .sf-toolbar-status.sf-toolbar-status-red, .sf-toolbar-block .sf-toolbar-info .sf-toolbar-status.sf-toolbar-status-red { From fef31dc824b1a9832a1b7961498e048d6012c38d Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 23 Jun 2023 18:16:23 +0200 Subject: [PATCH 55/57] [DependencyInjection] Skip errored definitions deep-referenced as runtime exceptions --- .../Compiler/DefinitionErrorExceptionPass.php | 105 +++++++++++++++--- .../DefinitionErrorExceptionPassTest.php | 22 ++++ 2 files changed, 109 insertions(+), 18 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php b/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php index 5e7ba3173e5b4..aabc5b71d6cab 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php @@ -11,6 +11,8 @@ namespace Symfony\Component\DependencyInjection\Compiler; +use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\RuntimeException; @@ -23,34 +25,101 @@ */ class DefinitionErrorExceptionPass extends AbstractRecursivePass { + private $erroredDefinitions = []; + private $targetReferences = []; + private $sourceReferences = []; + + /** + * @return void + */ + public function process(ContainerBuilder $container) + { + try { + parent::process($container); + + if (!$this->erroredDefinitions) { + return; + } + + $runtimeIds = []; + + foreach ($this->sourceReferences as $id => $sourceIds) { + foreach ($sourceIds as $sourceId => $isRuntime) { + if (!$isRuntime) { + continue 2; + } + } + + unset($this->erroredDefinitions[$id]); + $runtimeIds[$id] = $id; + } + + if (!$this->erroredDefinitions) { + return; + } + + foreach ($this->targetReferences as $id => $targetIds) { + if (!isset($this->sourceReferences[$id]) || isset($runtimeIds[$id]) || isset($this->erroredDefinitions[$id])) { + continue; + } + foreach ($this->targetReferences[$id] as $targetId => $isRuntime) { + foreach ($this->sourceReferences[$id] as $sourceId => $isRuntime) { + if ($sourceId !== $targetId) { + $this->sourceReferences[$targetId][$sourceId] = false; + $this->targetReferences[$sourceId][$targetId] = false; + } + } + } + + unset($this->sourceReferences[$id]); + } + + foreach ($this->erroredDefinitions as $id => $definition) { + if (isset($this->sourceReferences[$id])) { + continue; + } + + // only show the first error so the user can focus on it + $errors = $definition->getErrors(); + + throw new RuntimeException(reset($errors)); + } + } finally { + $this->erroredDefinitions = []; + $this->targetReferences = []; + $this->sourceReferences = []; + } + } + /** * {@inheritdoc} */ protected function processValue($value, bool $isRoot = false) { - if (!$value instanceof Definition || !$value->hasErrors()) { - return parent::processValue($value, $isRoot); + if ($value instanceof ArgumentInterface) { + parent::processValue($value->getValues()); + + return $value; } - if ($isRoot && !$value->isPublic()) { - $graph = $this->container->getCompiler()->getServiceReferenceGraph(); - $runtimeException = false; - foreach ($graph->getNode($this->currentId)->getInEdges() as $edge) { - if (!$edge->getValue() instanceof Reference || ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE !== $edge->getValue()->getInvalidBehavior()) { - $runtimeException = false; - break; - } - $runtimeException = true; - } - if ($runtimeException) { - return parent::processValue($value, $isRoot); + if ($value instanceof Reference && $this->currentId !== $targetId = (string) $value) { + if (ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) { + $this->sourceReferences[$targetId][$this->currentId] ?? $this->sourceReferences[$targetId][$this->currentId] = true; + $this->targetReferences[$this->currentId][$targetId] ?? $this->targetReferences[$this->currentId][$targetId] = true; + } else { + $this->sourceReferences[$targetId][$this->currentId] = false; + $this->targetReferences[$this->currentId][$targetId] = false; } + + return $value; + } + + if (!$value instanceof Definition || !$value->hasErrors()) { + return parent::processValue($value, $isRoot); } - // only show the first error so the user can focus on it - $errors = $value->getErrors(); - $message = reset($errors); + $this->erroredDefinitions[$this->currentId] = $value; - throw new RuntimeException($message); + return parent::processValue($value); } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/DefinitionErrorExceptionPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/DefinitionErrorExceptionPassTest.php index b22b934dd80cd..f02caf0a7f81e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/DefinitionErrorExceptionPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/DefinitionErrorExceptionPassTest.php @@ -16,6 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\DependencyInjection\Reference; class DefinitionErrorExceptionPassTest extends TestCase { @@ -49,4 +50,25 @@ public function testNoExceptionThrown() $pass->process($container); $this->assertSame($def, $container->getDefinition('foo_service_id')->getArgument(0)); } + + public function testSkipNestedErrors() + { + $container = new ContainerBuilder(); + + $container->register('nested_error', 'stdClass') + ->addError('Things went wrong!'); + + $container->register('bar', 'stdClass') + ->addArgument(new Reference('nested_error')); + + $container->register('foo', 'stdClass') + ->addArgument(new Reference('bar', ContainerBuilder::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE)); + + $pass = new DefinitionErrorExceptionPass(); + $pass->process($container); + + $this->expectException(RuntimeException::class); + $this->expectExceptionMessage('Things went wrong!'); + $container->get('foo'); + } } From 31400b932b97414cd3cbbcccfc09940bd1a6b835 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 26 Jun 2023 08:02:44 +0200 Subject: [PATCH 56/57] Update CHANGELOG for 6.2.12 --- CHANGELOG-6.2.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CHANGELOG-6.2.md b/CHANGELOG-6.2.md index 5a003a6343fe2..1be744e9c26c5 100644 --- a/CHANGELOG-6.2.md +++ b/CHANGELOG-6.2.md @@ -7,6 +7,35 @@ in 6.2 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.2.0...v6.2.1 +* 6.2.12 (2023-06-26) + + * bug #50763 [DependencyInjection] Skip errored definitions deep-referenced as runtime exceptions (nicolas-grekas) + * bug #50728 [HttpClient] Explicitly exclude CURLOPT_POSTREDIR (nicolas-grekas) + * bug #48961 [WebProfilerBundle] right blocks: fix display (jmsche) + * bug #50671 [HttpClient] Fix encoding some characters in query strings (Daniel Kozák) + * bug #50655 Revert "Respect isRetryable decision of the retry strategy for re-delivery" (bendavies) + * bug #50665 [FrameworkBundle] Ignore missing directories in about command (ro0NL) + * bug #50644 [VarDumper] Dumping DateTime throws error if getTimezone is false (bogdanmoza) + * bug #50656 Only update autoload_runtime.php when it changed (Seldaek) + * bug #50698 [HttpClient] Fix int conversion for `GenericRetryStrategy` with floated multiplier (francisbesset) + * bug #50611 [Clock] Fix MockClock::modify() on PHP 8.3 (nicolas-grekas) + * bug #50548 [FrameworkBundle] Show non-bundle extensions in `debug:config` & `config:dump` list view & completion (HypeMC) + * bug #50585 [Cache] Fix RedisTrait::createConnection for cluster (darkanakin41) + * bug #50546 [FrameworkBundle] Fix `debug:config` & `config:dump` in debug mode (HypeMC) + * bug #50560 [DependencyInjection] Support PHP 8.2 `true` and `null` type (ruudk) + * bug #50562 [Lock] Fix sprintf (fancyweb) + * bug #50524 Fix Doctrine deprecations (nicolas-grekas) + * bug #50539 [Validator] Remove internal from methods on non-internal interfaces (wouterj) + * bug #50534 [PhpUnitBridge] Fix support for the NO_COLOR env var (nicolas-grekas) + * bug #50517 [DependencyInjection] Fix casting scalar env vars from null (fancyweb) + * bug #50515 [Mailer] [MailPace] Fix undefined array key in errors response (Florian Heller) + * bug #50507 [Cache] Fix DBAL deprecations (MatTheCat) + * bug #50501 [Serializer] Fix discriminator map not working with `AbstractNormalizer::OBJECT_TO_POPULATE` (HypeMC) + * bug #50480 [Serializer] Fix discriminator map not working with `AbstractNormalizer::OBJECT_TO_POPULATE` (HypeMC) + * bug #50437 [Filesystem] Follow symlinks when dumping files (ausi) + * bug #50478 [DependencyInjection] Escape `` from parameter-like default values (MatTheCat) + * bug #50452 Hide definitions bearing the `container.excluded` tag (Myks92) + * 6.2.11 (2023-05-27) * bug #50442 [SecurityBundle] Update security-1.0.xsd to include missing access-token definition (aegypius) From aaac260ba350c0585574b7aa9da0626909a35dc4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 26 Jun 2023 08:02:47 +0200 Subject: [PATCH 57/57] Update VERSION for 6.2.12 --- 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 f6d91d7b6a81f..b3689455f301a 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -75,12 +75,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.2.12-DEV'; + public const VERSION = '6.2.12'; public const VERSION_ID = 60212; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 2; public const RELEASE_VERSION = 12; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '07/2023'; public const END_OF_LIFE = '07/2023';