diff --git a/.appveyor.yml b/.appveyor.yml index 8a880a9b3c063..fddaf7b75802c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -46,6 +46,7 @@ install: - echo extension=php_fileinfo.dll >> php.ini-max - echo extension=php_pdo_sqlite.dll >> php.ini-max - echo extension=php_curl.dll >> php.ini-max + - echo extension=php_sodium.dll >> php.ini-max - copy /Y php.ini-max php.ini - cd c:\projects\symfony - IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/2.0.0/composer.phar) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 23f535cb9b80e..c4b401d26f70e 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -29,7 +29,7 @@ jobs: - php: '8.1' mode: low-deps - php: '8.2' - mode: experimental + #mode: experimental fail-fast: false runs-on: ubuntu-20.04 diff --git a/CHANGELOG-6.0.md b/CHANGELOG-6.0.md index a221de2d0d7e4..f92727fee106c 100644 --- a/CHANGELOG-6.0.md +++ b/CHANGELOG-6.0.md @@ -7,6 +7,18 @@ in 6.0 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v6.0.0...v6.0.1 +* 6.0.6 (2022-03-05) + + * bug #45619 [redis-messenger] remove undefined array key warnings (PhilETaylor) + * bug #45637 [Cache] do not pass DBAL connections to PDO adapters (xabbuh) + * bug #45631 [HttpFoundation] Fix PHP 8.1 deprecation in `Response::isNotModified` (HypeMC) + * bug #45610 [HttpKernel] Guard against bad profile data (nicolas-grekas) + * bug #45532 Fix deprecations on PHP 8.2 (nicolas-grekas) + * bug #45595 [FrameworkBundle] Fix resetting container between tests (nicolas-grekas) + * bug #45590 [Console] Revert StringInput bc break from #45088 (bobthecow) + * bug #45585 [HttpClient] fix checking for unset property on PHP <= 7.1.4 (nicolas-grekas) + * bug #45583 [WebProfilerBundle] Fixes HTML syntax regression introduced by #44570 (xavismeh) + * 6.0.5 (2022-02-28) * bug #45351 [WebProfilerBundle] Log section minor fixes (missing "notice" filter, log priority, accessibility) (Amunak) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d287e27ee871e..c8eb4764f6c53 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -12,13 +12,13 @@ The Symfony Connect username in parenthesis allows to get more information - Tobias Schultze (tobion) - Robin Chalas (chalas_r) - Christophe Coevoet (stof) - - Wouter De Jong (wouterj) - Jérémy DERUSSÉ (jderusse) + - Wouter De Jong (wouterj) - Grégoire Pineau (lyrixx) - Maxime Steinhausser (ogizanagi) - Kévin Dunglas (dunglas) - - Jordi Boggiano (seldaek) - Thomas Calvet (fancyweb) + - Jordi Boggiano (seldaek) - Victor Berchet (victor) - Javier Eguiluz (javier.eguiluz) - Ryan Weaver (weaverryan) @@ -76,8 +76,8 @@ The Symfony Connect username in parenthesis allows to get more information - Saša Stamenković (umpirsky) - Peter Rehm (rpet) - Henrik Bjørnskov (henrikbjorn) - - Miha Vrhovnik - Antoine M (amakdessi) + - Miha Vrhovnik - Diego Saint Esteben (dii3g0) - Mathieu Piot (mpiot) - Konstantin Kudryashov (everzet) @@ -93,18 +93,18 @@ The Symfony Connect username in parenthesis allows to get more information - Eric Clemmons (ericclemmons) - Graham Campbell (graham) - Charles Sarrazin (csarrazi) + - Alexander Schranz (alexander-schranz) - Vasilij Dusko - Douglas Greenshields (shieldo) - David Buchmann (dbu) - - Alexander Schranz (alexander-schranz) - Arnout Boks (aboks) - Deni - Henrik Westphal (snc) - Dariusz Górecki (canni) - Fran Moreno (franmomu) + - Jérôme Vasseur (jvasseur) - Mathieu Santostefano (welcomattic) - Dariusz Ruminski - - Jérôme Vasseur (jvasseur) - Lee McDermott - Brandon Turner - Luis Cordova (cordoval) @@ -119,11 +119,11 @@ The Symfony Connect username in parenthesis allows to get more information - Alexandre Daubois (alexandre-daubois) - Julien Falque (julienfalque) - Baptiste Clavié (talus) + - Massimiliano Arione (garak) + - Mathias Arlaud (mtarld) - Antoine Hérault (herzult) - Paráda József (paradajozsef) - Vincent Langlet (deviling) - - Massimiliano Arione (garak) - - Mathias Arlaud (mtarld) - Arnaud Le Blanc (arnaud-lb) - Przemysław Bogusz (przemyslaw-bogusz) - Maxime STEINHAUSSER @@ -182,6 +182,7 @@ The Symfony Connect username in parenthesis allows to get more information - Juti Noppornpitak (shiroyuki) - Simon Berger - Anthony MARTIN (xurudragon) + - Alexander Menshchikov (zmey_kk) - Sebastian Hörl (blogsh) - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) @@ -192,7 +193,6 @@ The Symfony Connect username in parenthesis allows to get more information - Guilherme Blanco (guilhermeblanco) - Marco Pivetta (ocramius) - SpacePossum - - Alexander Menshchikov (zmey_kk) - Pablo Godel (pgodel) - Andreas Braun - Jérémie Augustin (jaugustin) @@ -236,6 +236,7 @@ The Symfony Connect username in parenthesis allows to get more information - Matthieu Ouellette-Vachon (maoueh) - Michał Pipa (michal.pipa) - Dawid Nowak + - Martin Hujer (martinhujer) - Roman Martinuk (a2a4) - Amal Raghav (kertz) - Jonathan Ingram (jonathaningram) @@ -264,7 +265,6 @@ The Symfony Connect username in parenthesis allows to get more information - Dorian Villet (gnutix) - Michaël Perrin (michael.perrin) - Sergey Linnik (linniksa) - - Martin Hujer (martinhujer) - Richard Miller (mr_r_miller) - Mario A. Alvarez Garcia (nomack84) - Dennis Benkert (denderello) @@ -281,6 +281,7 @@ The Symfony Connect username in parenthesis allows to get more information - Benjamin Dulau (dbenjamin) - Baptiste Lafontaine (magnetik) - Mathieu Lemoine (lemoinem) + - Justin Hileman (bobthecow) - Denis Brumann (dbrumann) - Christian Schmidt - Andreas Hucks (meandmymonkey) @@ -308,6 +309,7 @@ The Symfony Connect username in parenthesis allows to get more information - Dominique Bongiraud - dFayet - Jeremy Livingston (jeremylivingston) + - Karoly Gossler (connorhu) - soyuka - Michael Lee (zerustech) - Matthieu Auger (matthieuauger) @@ -318,7 +320,6 @@ The Symfony Connect username in parenthesis allows to get more information - jeff - John Kary (johnkary) - fd6130 (fdtvui) - - Justin Hileman (bobthecow) - Blanchon Vincent (blanchonvincent) - Maciej Malarz (malarzm) - Michele Orselli (orso) @@ -346,7 +347,6 @@ The Symfony Connect username in parenthesis allows to get more information - Mantis Development - Loïc Faugeron - quentin neyrat (qneyrat) - - Karoly Gossler (connorhu) - Marcin Szepczynski (czepol) - Rob Frawley 2nd (robfrawley) - Ahmed Raafat @@ -415,8 +415,10 @@ The Symfony Connect username in parenthesis allows to get more information - Wodor Wodorski - Guilhem N (guilhemn) - Mohammad Emran Hasan (phpfour) + - Christopher Davis (chrisguitarguy) - Dmitriy Mamontov (mamontovdmitriy) - Ben Ramsey (ramsey) + - Hugo Alliaume (kocal) - Laurent Masforné (heisenberg) - Sergey (upyx) - Giorgio Premi @@ -482,6 +484,7 @@ The Symfony Connect username in parenthesis allows to get more information - Aurelijus Valeiša (aurelijus) - Jan Decavele (jandc) - Gustavo Piltcher + - flack (flack) - Stepan Tanasiychuk (stfalcon) - Ivan Kurnosov - Tiago Ribeiro (fixe) @@ -508,7 +511,6 @@ The Symfony Connect username in parenthesis allows to get more information - Mark Challoner (markchalloner) - Loïc Frémont (loic425) - Oleksandr Barabolia (oleksandrbarabolia) - - Christopher Davis (chrisguitarguy) - ivan - Greg Anderson - Tri Pham (phamuyentri) @@ -539,6 +541,7 @@ The Symfony Connect username in parenthesis allows to get more information - Dmytro Borysovskyi (dmytr0) - Tomasz Kowalczyk (thunderer) - Artur Eshenbrener + - Dries Vints - Thomas Perez (scullwm) - Yoann RENARD (yrenard) - Felix Labrecque @@ -548,6 +551,7 @@ The Symfony Connect username in parenthesis allows to get more information - Tim Goudriaan (codedmonkey) - Tarmo Leppänen (tarlepp) - Martin Auswöger + - Hubert Lenoir (hubert_lenoir) - Robbert Klarenbeek (robbertkl) - Hamza Makraz (makraz) - Eric Masoero (eric-masoero) @@ -556,7 +560,6 @@ The Symfony Connect username in parenthesis allows to get more information - hossein zolfi (ocean) - Clément Gautier (clementgautier) - Koen Reiniers (koenre) - - Hugo Alliaume (kocal) - Sanpi - Eduardo Gulias (egulias) - giulio de donato (liuggio) @@ -620,7 +623,6 @@ The Symfony Connect username in parenthesis allows to get more information - hubert lecorche (hlecorche) - Vladyslav Loboda - fritzmg - - flack (flack) - Marc Morales Valldepérez (kuert) - Jean-Baptiste GOMOND (mjbgo) - Vadim Kharitonov (virtuozzz) @@ -716,7 +718,6 @@ The Symfony Connect username in parenthesis allows to get more information - Jerzy (jlekowski) - Raulnet - Christian Wahler - - Dries Vints - Giso Stallenberg (gisostallenberg) - Gintautas Miselis - Rob Bast @@ -724,6 +725,7 @@ The Symfony Connect username in parenthesis allows to get more information - Pierre Rineau - Andreas Leathley (iquito) - Soufian EZ-ZANTAR (soezz) + - Arun Philip - Zander Baldwin - Marek Zajac - Adam Harvey @@ -769,6 +771,7 @@ The Symfony Connect username in parenthesis allows to get more information - nikos.sotiropoulos - Eduardo Oliveira (entering) - Oleksii Zhurbytskyi + - Bilge - Ilya Antipenko (aivus) - Ricardo Oliveira (ricardolotr) - Roy Van Ginneken (rvanginneken) @@ -799,7 +802,6 @@ The Symfony Connect username in parenthesis allows to get more information - alexpods - Dennis Langen (nijusan) - Adrien Wilmet (adrienfr) - - Hubert Lenoir (hubert_lenoir) - Adam Szaraniec (mimol) - Dariusz Ruminski - Erik Trapman (eriktrapman) @@ -926,6 +928,7 @@ The Symfony Connect username in parenthesis allows to get more information - Nicolas Martin (cocorambo) - Jon Gotlin (jongotlin) - Adrian Nguyen (vuphuong87) + - benjaminmal - Khoo Yong Jun - Sebastian Blum - Laurent Clouet @@ -973,6 +976,7 @@ The Symfony Connect username in parenthesis allows to get more information - Geoffrey Brier (geoffrey-brier) - Alexandre Parent - Roger Guasch (rogerguasch) + - DT Inier (gam6itko) - Vladimir Tsykun - Andrei O - Dustin Dobervich (dustin10) @@ -1050,7 +1054,6 @@ The Symfony Connect username in parenthesis allows to get more information - maxime.perrimond - Sascha Grossenbacher - cthulhu - - Arun Philip - Rémi Leclerc - Jonas Hünig - Szijarto Tamas @@ -1061,6 +1064,7 @@ The Symfony Connect username in parenthesis allows to get more information - Kristijan Kanalas - Stephan Vock - Benjamin Zikarsky (bzikarsky) + - “Filip - Marion Hurteau - Dmitrii Lozhkin - Sobhan Sharifi (50bhan) @@ -1176,6 +1180,7 @@ The Symfony Connect username in parenthesis allows to get more information - Wickex - tuqqu - Neagu Cristian-Doru (cristian-neagu) + - Dude (b1rdex) - Dave Marshall (davedevelopment) - Jakub Kulhan (jakubkulhan) - Shaharia Azam @@ -1203,6 +1208,7 @@ The Symfony Connect username in parenthesis allows to get more information - SnakePin - vladimir.panivko - Josiah (josiah) + - Dennis Væversted (srnzitcom) - Guillaume Verstraete (versgui) - Joschi Kuphal - John Bohn (jbohn) @@ -1221,7 +1227,6 @@ The Symfony Connect username in parenthesis allows to get more information - Christian Soronellas (theunic) - kick-the-bucket - fedor.f - - Bilge - Yosmany Garcia (yosmanyga) - Jeremiasz Major - Wouter de Wild @@ -1265,6 +1270,7 @@ The Symfony Connect username in parenthesis allows to get more information - Zhuravlev Alexander (scif) - Stefano Degenkamp (steef) - James Michael DuPont + - Christian Gripp (core23) - Jake (jakesoft) - Flinsch - Quentin Dreyer @@ -1625,6 +1631,7 @@ The Symfony Connect username in parenthesis allows to get more information - Georgi Georgiev - Maximilian Berghoff (electricmaxxx) - nacho + - TristanPouliquen - Piotr Antosik (antek88) - mwos - Volker Killesreiter (ol0lll) @@ -1643,6 +1650,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ken Marfilla (marfillaster) - benatespina (benatespina) - Denis Kop + - Andrey Lebedev (alebedev) - Jean-Guilhem Rouel (jean-gui) - Yoann MOROCUTTI - jfcixmedia @@ -1690,7 +1698,6 @@ The Symfony Connect username in parenthesis allows to get more information - Jakub Sacha - Julius Kiekbusch - Olaf Klischat - - benjaminmal - orlovv - Claude Dioudonnat - Jonathan Hedstrom @@ -1734,6 +1741,7 @@ The Symfony Connect username in parenthesis allows to get more information - Péter Buri (burci) - Evgeny Efimov (edefimov) - kaiwa + - Daniel Badura - Charles Sanquer (csanquer) - Albert Ganiev (helios-ag) - Neil Katin @@ -1762,6 +1770,7 @@ The Symfony Connect username in parenthesis allows to get more information - Amine Yakoubi - Eduardo García Sanz (coma) - Sergio (deverad) + - Arend Hummeling - Makdessi Alex - fduch (fduch) - Juan Miguel Besada Vidal (soutlink) @@ -1829,13 +1838,13 @@ The Symfony Connect username in parenthesis allows to get more information - Vlad Gapanovich (gapik) - Alexander Kurilo (kamazee) - Nyro (nyro) + - Konstantin Bogomolov - Marco - Marc Torres - Mark Spink - cesar - Alberto Aldegheri - Cesar Scur (cesarscur) - - “Filip - Dmitri Petmanson - heccjj - Alexandre Melard @@ -1918,6 +1927,7 @@ The Symfony Connect username in parenthesis allows to get more information - abluchet - Ruud Arentsen - Harald Tollefsen + - Tobias Bönner - Matthieu - Arend-Jan Tetteroo - Albin Kerouaton @@ -1979,6 +1989,7 @@ The Symfony Connect username in parenthesis allows to get more information - Volodymyr Kupriienko (greeflas) - Serhiy Lunak (slunak) - Wojciech Błoszyk (wbloszyk) + - Jiri Barous - Giorgio Premi - abunch - tamcy @@ -2000,6 +2011,7 @@ The Symfony Connect username in parenthesis allows to get more information - Frédéric Bouchery (fbouchery) - Patrick Daley (padrig) - Foxprodev + - developer-av - Max Summe - WedgeSama - Dale.Nash @@ -2103,6 +2115,7 @@ The Symfony Connect username in parenthesis allows to get more information - Simon Neidhold - Valentin VALCIU - Jeremiah VALERIE + - Alexandre Beaujour - Julien Menth - George Yiannoulopoulos - Yannick Snobbert @@ -2116,6 +2129,7 @@ The Symfony Connect username in parenthesis allows to get more information - bill moll - Benjamin Bender - PaoRuby + - Bizley - Jared Farrish - karl.rixon - raplider @@ -2236,12 +2250,14 @@ The Symfony Connect username in parenthesis allows to get more information - riadh26 - Konstantinos Alexiou - Andrii Boiko + - Dilek Erkut - Harold Iedema - WaiSkats - Morimoto Ryosuke - Ikhsan Agustian - Arnau González (arnaugm) - Simon Bouland (bouland) + - Christoph König (chriskoenig) - Jibé Barth (jibbarth) - Jm Aribau (jmaribau) - Matthew Foster (mfoster) @@ -2266,6 +2282,7 @@ The Symfony Connect username in parenthesis allows to get more information - Phil Davis - Gleb Sidora - David Stone + - Giorgio Premi - Gerhard Seidel (gseidel) - Jovan Perovic (jperovic) - Pablo Maria Martelletti (pmartelletti) @@ -2295,7 +2312,6 @@ The Symfony Connect username in parenthesis allows to get more information - Mickael GOETZ - Maciej Schmidt - botbotbot - - Dennis Væversted - Timon van der Vorm - nuncanada - František Bereň @@ -2390,6 +2406,7 @@ The Symfony Connect username in parenthesis allows to get more information - Roy-Orbison - Aaron Somi - kshida + - Yasmany Cubela Medina (bitgandtter) - Michał Dąbrowski (defrag) - Aryel Tupinamba (dfkimera) - Hans Höchtl (hhoechtl) @@ -2400,6 +2417,7 @@ The Symfony Connect username in parenthesis allows to get more information - Jawira Portugal (jawira) - Johannes Müller (johmue) - Jordi Llonch (jordillonch) + - Roman Igoshin (masterro) - Nicholas Ruunu (nicholasruunu) - Jeroen van den Nieuwenhuisen (nieuwenhuisen) - Cyril Pascal (paxal) @@ -2454,6 +2472,7 @@ The Symfony Connect username in parenthesis allows to get more information - Adam - Ivo - Ismo Vuorinen + - Valentin - Sören Bernstein - devel - taiiiraaa @@ -2556,6 +2575,7 @@ The Symfony Connect username in parenthesis allows to get more information - Veres Lajos - Ernest Hymel - Andrea Civita + - Nicolás Alonso - LoginovIlya - Nick Chiu - grifx @@ -2596,10 +2616,12 @@ The Symfony Connect username in parenthesis allows to get more information - David Windell - Frank Jogeleit - Ondřej Frei + - Volodymyr Panivko - Gabriel Birke - skafandri - Derek Bonner - martijn + - Jenne van der Meer - Storkeus - Alan Chen - Anton Zagorskii @@ -2610,10 +2632,12 @@ The Symfony Connect username in parenthesis allows to get more information - Even André Fiskvik - Agata - dakur + - Matthias Schmidt - florian-michael-mast - Александр Ли - Arjan Keeman - Vlad Dumitrache + - Alex Kalineskou - Erik van Wingerden - Valouleloup - robmro27 @@ -2675,6 +2699,7 @@ The Symfony Connect username in parenthesis allows to get more information - Kevin Verschaeve (keversc) - Kevin Herrera (kherge) - Luis Ramón López López (lrlopez) + - Vladislav Nikolayev (luxemate) - Martin Mandl (m2mtech) - Mehdi Mabrouk (mehdidev) - Bart Reunes (metalarend) @@ -2693,6 +2718,7 @@ The Symfony Connect username in parenthesis allows to get more information - Pablo Monterde Perez (plebs) - Pierre-Olivier Vares (povares) - Jimmy Leger (redpanda) + - Samaël Villette (samadu61) - Marcin Szepczynski (szepczynski) - Cyrille Jouineau (tuxosaurus) - Vladimir Chernyshev (volch) @@ -2721,6 +2747,7 @@ The Symfony Connect username in parenthesis allows to get more information - Gabriel Moreira - Alexey Popkov - ChS + - michal - Alexis MARQUIS - Joseph Deray - Damian Sromek @@ -2792,6 +2819,7 @@ The Symfony Connect username in parenthesis allows to get more information - Michel Bardelmeijer - Tomas Kmieliauskas - Ikko Ashimine + - Erwin Dirks - Brad Jones - Billie Thompson - lol768 @@ -2801,6 +2829,7 @@ The Symfony Connect username in parenthesis allows to get more information - Johannes - Jörg Rühl - George Dietrich + - jannick-holm - wesleyh - sergey - Menno Holtkamp @@ -2811,6 +2840,7 @@ The Symfony Connect username in parenthesis allows to get more information - Michael Genereux - patrick-mcdougle - Dariusz Czech + - Clemens Krack - Bruno Baguette - Jack Wright - MrNicodemuz @@ -2867,6 +2897,8 @@ The Symfony Connect username in parenthesis allows to get more information - bokonet - Arrilot - ampaze + - Gabrielle Langer + - Chris McGehee - Markus Staab - Pierre-Louis LAUNAY - djama @@ -2914,6 +2946,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ilya Bulakh - David Soria Parra - Sergiy Sokolenko + - Cantepie - detinkin - Ahmed Abdulrahman - dinitrol @@ -2971,7 +3004,6 @@ The Symfony Connect username in parenthesis allows to get more information - Juan Ases García (ases) - Siragusa (asiragusa) - Daniel Basten (axhm3a) - - Dude (b1rdex) - Benedict Massolle (bemas) - Gerard Berengue Llobera (bere) - Bernd Matzner (bmatzner) @@ -2981,7 +3013,6 @@ The Symfony Connect username in parenthesis allows to get more information - Choong Wei Tjeng (choonge) - Kousuke Ebihara (co3k) - Loïc Vernet (coil) - - Christian Gripp (core23) - Christoph Schaefer (cvschaefer) - Damon Jones (damon__jones) - Alexandre Fiocre (demos77) @@ -3087,6 +3118,7 @@ The Symfony Connect username in parenthesis allows to get more information - Florent Cailhol - szymek - Ryan Linnit + - a.dmitryuk - Kovacs Nicolas - craigmarvelley - Stano Turza diff --git a/composer.json b/composer.json index e34ed24a4d6d8..0c750c584e9ca 100644 --- a/composer.json +++ b/composer.json @@ -131,7 +131,6 @@ "masterminds/html5": "^2.6", "monolog/monolog": "^1.25.1|^2", "nyholm/psr7": "^1.0", - "paragonie/sodium_compat": "^1.8", "pda/pheanstalk": "^4.0", "php-http/httplug": "^1.0|^2.0", "phpstan/phpdoc-parser": "^1.0", diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php index 37155c1fe4532..240e2eb976194 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -13,9 +13,9 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\DBAL\Types\Type; +use Doctrine\ORM\Mapping\ClassMetadataInfo; use Doctrine\ORM\Tools\SchemaTool; use Doctrine\Persistence\ManagerRegistry; -use Doctrine\Persistence\Mapping\ClassMetadata; use Doctrine\Persistence\ObjectManager; use Doctrine\Persistence\ObjectRepository; use Symfony\Bridge\Doctrine\Tests\DoctrineTestHelper; @@ -111,7 +111,7 @@ protected function createEntityManagerMock($repositoryMock) ->willReturn($repositoryMock) ; - $classMetadata = $this->createMock(ClassMetadata::class); + $classMetadata = $this->createMock(ClassMetadataInfo::class); $classMetadata ->expects($this->any()) ->method('hasField') diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php index 0bb9591e185df..034cd001aaebb 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php @@ -162,7 +162,8 @@ public function testExtractEnum() $validator = Validation::createValidatorBuilder() ->addMethodMapping('loadValidatorMetadata') - ->enableAnnotationMapping() + ->enableAnnotationMapping(true) + ->addDefaultDoctrineAnnotationReader() ->addLoader(new DoctrineLoader(DoctrineTestHelper::createTestEntityManager(), '{^Symfony\\\\Bridge\\\\Doctrine\\\\Tests\\\\Fixtures\\\\DoctrineLoader}')) ->getValidator() ; diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php index a63cbb4667549..e787da909bbb3 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php @@ -185,6 +185,7 @@ function ($definition) { } } +#[\AllowDynamicProperties] final class DummyClass implements DummyInterface, SunnyInterface { private $ref; diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php index 4f09e52bdcbd1..a0581ff21fb6f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; +use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -28,14 +29,18 @@ public function process(ContainerBuilder $container) // "annotation_reader" at build time don't get any cache foreach ($container->findTaggedServiceIds('annotations.cached_reader') as $id => $tags) { $reader = $container->getDefinition($id); + $reader->setPublic(false); $properties = $reader->getProperties(); if (isset($properties['cacheProviderBackup'])) { $provider = $properties['cacheProviderBackup']->getValues()[0]; unset($properties['cacheProviderBackup']); $reader->setProperties($properties); - $container->set($id, null); - $container->setDefinition($id, $reader->replaceArgument(1, $provider)); + $reader->replaceArgument(1, $provider); + } elseif (4 <= \count($arguments = $reader->getArguments()) && $arguments[3] instanceof ServiceClosureArgument) { + $arguments[1] = $arguments[3]->getValues()[0]; + unset($arguments[3]); + $reader->setArguments($arguments); } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index 198a434c98603..ffb9beb9a0774 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -16,6 +16,7 @@ use Psr\Log\LogLevel; use Symfony\Bundle\FullStack; use Symfony\Component\Asset\Package; +use Symfony\Component\Cache\Adapter\DoctrineAdapter; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\NodeBuilder; use Symfony\Component\Config\Definition\Builder\TreeBuilder; @@ -1049,7 +1050,7 @@ private function addCacheSection(ArrayNodeDefinition $rootNode, callable $willBe ->scalarNode('default_redis_provider')->defaultValue('redis://localhost')->end() ->scalarNode('default_memcached_provider')->defaultValue('memcached://localhost')->end() ->scalarNode('default_doctrine_dbal_provider')->defaultValue('database_connection')->end() - ->scalarNode('default_pdo_provider')->defaultValue($willBeAvailable('doctrine/dbal', Connection::class) ? 'database_connection' : null)->end() + ->scalarNode('default_pdo_provider')->defaultValue($willBeAvailable('doctrine/dbal', Connection::class) && class_exists(DoctrineAdapter::class) ? 'database_connection' : null)->end() ->arrayNode('pools') ->useAttributeAsKey('name') ->prototype('array') diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 25fa6a30727f8..eb5aa9dba0368 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1594,9 +1594,10 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde $container ->getDefinition('annotations.cached_reader') + ->setPublic(true) // set to false in AddAnnotationsCachedReaderPass ->replaceArgument(2, $config['debug']) - // temporary property to lazy-reference the cache provider without using it until AddAnnotationsCachedReaderPass runs - ->setProperty('cacheProviderBackup', new ServiceClosureArgument(new Reference($cacheService))) + // reference the cache provider without using it until AddAnnotationsCachedReaderPass runs + ->addArgument(new ServiceClosureArgument(new Reference($cacheService))) ->addTag('annotations.cached_reader') ; diff --git a/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php b/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php index 90728d0a1b53c..c80177c5d39c0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php +++ b/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php @@ -22,7 +22,6 @@ use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\Profiler\Profile as HttpProfile; use Symfony\Component\Security\Core\User\UserInterface; -use Symfony\Contracts\Service\ResetInterface; /** * Simulates a browser and makes requests to a Kernel object. @@ -157,12 +156,8 @@ protected function doRequest(object $request): Response // avoid shutting down the Kernel if no request has been performed yet // WebTestCase::createClient() boots the Kernel but do not handle a request if ($this->hasPerformedRequest && $this->reboot) { - $container = $this->kernel->getContainer(); + $this->kernel->boot(); $this->kernel->shutdown(); - - if ($container instanceof ResetInterface) { - $container->reset(); - } } else { $this->hasPerformedRequest = true; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php index 7ecf76e0f36b6..d931c9366de2e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php @@ -15,7 +15,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Contracts\Service\ResetInterface; /** * KernelTestCase is the base class for tests needing a Kernel. @@ -35,8 +34,6 @@ abstract class KernelTestCase extends TestCase protected static $booted = false; - private static ?ContainerInterface $kernelContainer = null; - protected function tearDown(): void { static::ensureKernelShutdown(); @@ -69,12 +66,11 @@ protected static function bootKernel(array $options = []): KernelInterface { static::ensureKernelShutdown(); - static::$kernel = static::createKernel($options); - static::$kernel->boot(); + $kernel = static::createKernel($options); + $kernel->boot(); + self::$kernel = $kernel; static::$booted = true; - self::$kernelContainer = static::$kernel->getContainer(); - return static::$kernel; } @@ -93,7 +89,7 @@ protected static function getContainer(): ContainerInterface } try { - return self::$kernelContainer->get('test.service_container'); + return self::$kernel->getContainer()->get('test.service_container'); } catch (ServiceNotFoundException $e) { throw new \LogicException('Could not find service "test.service_container". Try updating the "framework.test" config to "true".', 0, $e); } @@ -142,14 +138,9 @@ protected static function createKernel(array $options = []): KernelInterface protected static function ensureKernelShutdown() { if (null !== static::$kernel) { + static::$kernel->boot(); static::$kernel->shutdown(); static::$booted = false; } - - if (self::$kernelContainer instanceof ResetInterface) { - self::$kernelContainer->reset(); - } - - self::$kernelContainer = null; } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php index 96eaaea7612af..404a239b51282 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php @@ -51,6 +51,16 @@ public function testEnableRebootKernel() $client->request('GET', '/'); } + public function testRequestAfterKernelShutdownAndPerformedRequest() + { + $this->expectNotToPerformAssertions(); + + $client = static::createClient(['test_case' => 'TestServiceContainer']); + $client->request('GET', '/'); + static::ensureKernelShutdown(); + $client->request('GET', '/'); + } + private function getKernelMock() { $mock = $this->getMockBuilder($this->getKernelClass()) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php index a9b88b1763bd5..de096ccb22de0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php @@ -6,6 +6,9 @@ use Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault; use Symfony\Component\Filesystem\Filesystem; +/** + * @requires extension sodium + */ class SodiumVaultTest extends TestCase { private $secretsDir; diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index f19610887be35..5c925160733b8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -64,7 +64,6 @@ "symfony/property-info": "^5.4|^6.0", "symfony/web-link": "^5.4|^6.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "paragonie/sodium_compat": "^1.8", "twig/twig": "^2.10|^3.0", "symfony/phpunit-bridge": "^5.4|^6.0" }, diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig index f54e276910efe..1a74431d898b5 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig @@ -8,13 +8,13 @@ {% block head %} - {% endblock %}
-