diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 5b76de89c7bee..e6333054fe172 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,6 +1,6 @@
| Q | A
| ------------- | ---
-| Branch? | 6.1 for features / 4.4, 5.3, 5.4 or 6.0 for bug fixes
+| Branch? | 6.1 for features / 4.4, 5.4 or 6.0 for bug fixes
| Bug fix? | yes/no
| New feature? | yes/no
| Deprecations? | yes/no
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 44aff90b5a81c..cf6787a8d8e77 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -8,6 +8,10 @@ defaults:
run:
shell: bash
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
tests:
@@ -33,7 +37,7 @@ jobs:
redis:
image: redis:6.0.0
ports:
- - 6379:6379
+ - 16379:6379
redis-cluster:
image: grokzen/redis-cluster:5.0.4
ports:
@@ -67,6 +71,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
+ - name: Install system dependencies
+ run: |
+ echo "::group::apt-get update"
+ sudo apt-get update
+ echo "::endgroup::"
+
+ echo "::group::install tools & libraries"
+ sudo apt-get install redis-server
+ sudo -- sh -c 'echo unixsocket /var/run/redis/redis-server.sock >> /etc/redis/redis.conf'
+ sudo -- sh -c 'echo unixsocketperm 777 >> /etc/redis/redis.conf'
+ sudo service redis-server restart
+ echo "::endgroup::"
+
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
@@ -99,6 +116,7 @@ jobs:
- name: Run tests
run: ./phpunit --group integration -v
env:
+ REDIS_HOST: 'localhost:16379'
REDIS_CLUSTER_HOSTS: 'localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'
REDIS_SENTINEL_HOSTS: 'localhost:26379'
REDIS_SENTINEL_SERVICE: redis_sentinel
diff --git a/.github/workflows/intl-data-tests.yml b/.github/workflows/intl-data-tests.yml
index 450826f443874..bb54e306c3d4d 100644
--- a/.github/workflows/intl-data-tests.yml
+++ b/.github/workflows/intl-data-tests.yml
@@ -12,6 +12,10 @@ defaults:
run:
shell: bash
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
tests:
name: Tests
diff --git a/.github/workflows/phpunit-bridge.yml b/.github/workflows/phpunit-bridge.yml
index b503ce48d8a17..e8a19360a8b32 100644
--- a/.github/workflows/phpunit-bridge.yml
+++ b/.github/workflows/phpunit-bridge.yml
@@ -12,6 +12,10 @@ defaults:
run:
shell: bash
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
lint:
name: Lint
diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml
index c5c9bfecf4d09..f607bf8d5eb05 100644
--- a/.github/workflows/psalm.yml
+++ b/.github/workflows/psalm.yml
@@ -7,6 +7,10 @@ defaults:
run:
shell: bash
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
psalm:
name: Psalm
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index 2bea6308930c9..426086892fd33 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -8,6 +8,10 @@ defaults:
run:
shell: bash
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
tests:
diff --git a/CHANGELOG-4.4.md b/CHANGELOG-4.4.md
index 323705a5c8a53..af2b1a47f2ce5 100644
--- a/CHANGELOG-4.4.md
+++ b/CHANGELOG-4.4.md
@@ -7,6 +7,42 @@ in 4.4 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.4.0...v4.4.1
+* 4.4.38 (2022-02-28)
+
+ * bug #44570 [WebProfilerBundle] add nonces to profiler (garak)
+ * bug #44839 MailerInterface: failed exception contract when enabling messenger (Giorgio Premi)
+ * bug #45529 [DependencyInjection] Don't reset env placeholders during compilation (nicolas-grekas)
+ * bug #45527 [HttpClient] Fix overriding default options with null (nicolas-grekas)
+ * bug #45531 [Serializer] Fix passing null to str_contains() (Erwin Dirks)
+ * bug #42458 [Validator][Tests] Fix AssertingContextualValidator not throwing on remaining expectations (fancyweb)
+ * bug #45496 [VarDumper] Fix dumping mysqli_driver instances (nicolas-grekas)
+ * bug #45495 [HttpFoundation] Fix missing ReturnTypeWillChange attributes (luxemate)
+ * bug #45482 [Cache] Add missing log when saving namespace (developer-av)
+ * bug #45479 [HttpKernel] Reset services between requests performed by KernelBrowser (nicolas-grekas)
+ * bug #44650 [Serializer] Make document type nodes ignorable (boenner)
+ * bug #45469 [SecurityBundle] fix autoconfiguring Monolog's ProcessorInterface (nicolas-grekas)
+ * bug #45414 [FrameworkBundle] KernelTestCase resets internal state on tearDown (core23)
+ * bug #45460 [Intl] fix wrong offset timezone PHP 8.1 (Lenny4)
+ * bug #45462 [HttpKernel] Fix extracting controller name from closures (nicolas-grekas)
+ * bug #45424 [DependencyInjection] Fix type binding (sveneld)
+ * bug #44259 [Security] AccountStatusException::$user should be nullable (Cantepie)
+ * bug #45323 [Serializer] Fix ignored callbacks in denormalization (benjaminmal)
+ * bug #45399 [FrameworkBundle] Fix sorting bug in sorting of tagged services by priority (Ahummeling)
+ * bug #45338 [Mailer] Fix string-cast of exceptions thrown by authenticator in EsmtpTransport (wikando-ck)
+ * bug #45339 [Cache] fix error handling when using Redis (nicolas-grekas)
+ * bug #45281 [Cache] Fix connecting to Redis via a socket file (alebedev80)
+ * bug #45289 [FrameworkBundle] Fix log channel of TagAwareAdapter (fancyweb)
+ * bug #45306 [PropertyAccessor] Add missing TypeError catch (b1rdex)
+ * bug #44868 [DependencyInjection][FrameworkBundle] Fix using PHP 8.1 enum as parameters (ogizanagi)
+ * bug #45261 [HttpClient] Fix Content-Length header when possible (nicolas-grekas)
+ * bug #45258 [DependencyInjection] Don't dump polyfilled classes in preload script (nicolas-grekas)
+ * bug #38534 [Serializer] make XmlEncoder stateless thus reentrant (connorhu)
+ * bug #42253 [Form] Do not fix URL protocol for relative URLs (bogkonstantin)
+ * bug #45256 [DomCrawler] ignore bad charsets (nicolas-grekas)
+ * bug #45255 [PropertyAccess] Fix handling of uninitialized property of parent class (filiplikavcan)
+ * bug #45204 [Validator] Fix minRatio and maxRatio when getting rounded (alexander-schranz)
+ * bug #45240 [Console] Revert StringInput bc break from #45088 (bobthecow)
+
* 4.4.37 (2022-01-28)
* bug #44939 [Form] UrlType should not add protocol to emails (GromNaN)
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/phpunit.xml.dist b/phpunit.xml.dist
index 0c4dd3ee87287..cd85992d44d55 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -18,6 +18,7 @@
+
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
index 42c0c5fb8c639..4b0a93884be3c 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
@@ -31,8 +31,6 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
*/
private $em;
- protected static $supportedFeatureSetVersion = 404;
-
protected function getExtensions()
{
$manager = $this->createMock(ManagerRegistry::class);
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
index 7dc883badb0e1..cb7eeed32bbf2 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
@@ -63,8 +63,6 @@ class EntityTypeTest extends BaseTypeTest
*/
private $emRegistry;
- protected static $supportedFeatureSetVersion = 404;
-
protected function setUp(): void
{
$this->em = DoctrineTestHelper::createTestEntityManager();
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php
index 44cf60db3ac5c..eb40559ef6b55 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php
@@ -17,8 +17,6 @@
abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
{
- protected static $supportedFeatureSetVersion = 404;
-
public function testLabelOnForm()
{
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType');
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php
index ff9357627579c..99477a617229c 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php
@@ -32,8 +32,6 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
*/
private $renderer;
- protected static $supportedFeatureSetVersion = 404;
-
protected function setUp(): void
{
parent::setUp();
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php
index 301a74ed94449..967e25ec6ec45 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php
@@ -31,8 +31,6 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
*/
private $renderer;
- protected static $supportedFeatureSetVersion = 404;
-
protected function setUp(): void
{
parent::setUp();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Client.php b/src/Symfony/Bundle/FrameworkBundle/Client.php
index 174b024e21c79..a27a7141dfba2 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Client.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Client.php
@@ -19,6 +19,7 @@
use Symfony\Component\HttpKernel\HttpKernelBrowser;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\HttpKernel\Profiler\Profile as HttpProfile;
+use Symfony\Contracts\Service\ResetInterface;
/**
* Client simulates a browser and makes requests to a Kernel object.
@@ -116,7 +117,12 @@ protected function doRequest($request)
// 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->shutdown();
+
+ if ($container instanceof ResetInterface) {
+ $container->reset();
+ }
} else {
$this->hasPerformedRequest = true;
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php
index fb89768bf5f33..ab77fbf23b0c0 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php
@@ -168,6 +168,20 @@ protected function formatValue($value): string
*/
protected function formatParameter($value): string
{
+ if ($value instanceof \UnitEnum) {
+ return var_export($value, true);
+ }
+
+ // Recursively search for enum values, so we can replace it
+ // before json_encode (which will not display anything for \UnitEnum otherwise)
+ if (\is_array($value)) {
+ array_walk_recursive($value, static function (&$value) {
+ if ($value instanceof \UnitEnum) {
+ $value = var_export($value, true);
+ }
+ });
+ }
+
if (\is_bool($value) || \is_array($value) || (null === $value)) {
$jsonString = json_encode($value);
@@ -247,7 +261,7 @@ protected function sortTaggedServicesByPriority(array $services): array
{
$maxPriority = [];
foreach ($services as $service => $tags) {
- $maxPriority[$service] = 0;
+ $maxPriority[$service] = \PHP_INT_MIN;
foreach ($tags as $tag) {
$currentPriority = $tag['priority'] ?? 0;
if ($maxPriority[$service] < $currentPriority) {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
index 038ba3313d2e4..0b38ebf31c0f4 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
@@ -158,6 +158,14 @@ private function writeData(array $data, array $options)
{
$flags = $options['json_encoding'] ?? 0;
+ // Recursively search for enum values, so we can replace it
+ // before json_encode (which will not display anything for \UnitEnum otherwise)
+ array_walk_recursive($data, static function (&$value) {
+ if ($value instanceof \UnitEnum) {
+ $value = var_export($value, true);
+ }
+ });
+
$this->write(json_encode($data, $flags | \JSON_PRETTY_PRINT)."\n");
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
index f287467d8221b..3441536ab8404 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
@@ -342,6 +342,8 @@ protected function describeContainerDefinition(Definition $definition, array $op
$argumentsInformation[] = sprintf('Service locator (%d element(s))', \count($argument->getValues()));
} elseif ($argument instanceof Definition) {
$argumentsInformation[] = 'Inlined Service';
+ } elseif ($argument instanceof \UnitEnum) {
+ $argumentsInformation[] = var_export($argument, true);
} else {
$argumentsInformation[] = \is_array($argument) ? sprintf('Array (%d element(s))', \count($argument)) : $argument;
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
index 66c441f14e069..44a79a8fa90bd 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
@@ -386,6 +386,9 @@ private function getArgumentNodes(array $arguments, \DOMDocument $dom): array
foreach ($this->getArgumentNodes($argument, $dom) as $childArgumentXML) {
$argumentXML->appendChild($childArgumentXML);
}
+ } elseif ($argument instanceof \UnitEnum) {
+ $argumentXML->setAttribute('type', 'constant');
+ $argumentXML->appendChild(new \DOMText(var_export($argument, true)));
} else {
$argumentXML->appendChild(new \DOMText($argument));
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php b/src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php
index ac3701675c66f..5a2112daf9ed2 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php
@@ -58,7 +58,7 @@ public function setContainer(ContainerInterface $container): ?ContainerInterface
/**
* Gets a container parameter by its name.
*
- * @return array|bool|float|int|string|null
+ * @return array|bool|float|int|string|\UnitEnum|null
*
* @final
*/
diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
index de68e41381793..a7d8f9425c0d0 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
@@ -31,7 +31,7 @@ abstract class Controller implements ContainerAwareInterface
/**
* Gets a container configuration parameter by its name.
*
- * @return array|bool|float|int|string|null
+ * @return array|bool|float|int|string|\UnitEnum|null
*
* @final
*/
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
index eb3b19991bb92..0d52c684b27d0 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
@@ -1962,7 +1962,8 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
if (method_exists(TagAwareAdapter::class, 'setLogger')) {
$container
->getDefinition($name)
- ->addMethodCall('setLogger', [new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]);
+ ->addMethodCall('setLogger', [new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])
+ ->addTag('monolog.logger', ['channel' => 'cache']);
}
$pool['name'] = $name;
diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php
index 442649ac1bac4..b87018bbd6b3f 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php
@@ -44,6 +44,7 @@ abstract class KernelTestCase extends TestCase
private function doTearDown()
{
static::ensureKernelShutdown();
+ static::$class = null;
static::$kernel = null;
static::$booted = false;
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/TestContainer.php b/src/Symfony/Bundle/FrameworkBundle/Test/TestContainer.php
index 31fd0a32c3d66..d5aec6830317e 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Test/TestContainer.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Test/TestContainer.php
@@ -59,7 +59,7 @@ public function getParameterBag(): ParameterBagInterface
/**
* {@inheritdoc}
*
- * @return array|bool|float|int|string|null
+ * @return array|bool|float|int|string|\UnitEnum|null
*/
public function getParameter($name)
{
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php
index 550dcb46cab4c..d45814da781e6 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php
@@ -12,6 +12,7 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor;
use PHPUnit\Framework\TestCase;
+use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\FooUnitEnum;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Style\SymfonyStyle;
@@ -121,6 +122,10 @@ public function getDescribeContainerDefinitionWithArgumentsShownTestData()
$definitionsWithArgs[str_replace('definition_', 'definition_arguments_', $key)] = $definition;
}
+ if (\PHP_VERSION_ID >= 80100) {
+ $definitionsWithArgs['definition_arguments_with_enum'] = (new Definition('definition_with_enum'))->setArgument(0, FooUnitEnum::FOO);
+ }
+
return $this->getDescriptionTestData($definitionsWithArgs);
}
@@ -248,7 +253,7 @@ private function assertDescription($expectedDescription, $describedObject, array
}
}
- private function getDescriptionTestData(array $objects)
+ private function getDescriptionTestData(iterable $objects)
{
$data = [];
foreach ($objects as $name => $object) {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php
index 071ca83ca68b3..05031fa7fcfb6 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php
@@ -11,6 +11,8 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor;
+use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\FooUnitEnum;
+use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Suit;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -61,14 +63,26 @@ public static function getRoutes()
public static function getContainerParameters()
{
- return [
- 'parameters_1' => new ParameterBag([
- 'integer' => 12,
- 'string' => 'Hello world!',
- 'boolean' => true,
- 'array' => [12, 'Hello world!', true],
- ]),
- ];
+ yield 'parameters_1' => new ParameterBag([
+ 'integer' => 12,
+ 'string' => 'Hello world!',
+ 'boolean' => true,
+ 'array' => [12, 'Hello world!', true],
+ ]);
+
+ if (\PHP_VERSION_ID < 80100) {
+ return;
+ }
+
+ yield 'parameters_enums' => new ParameterBag([
+ 'unit_enum' => FooUnitEnum::BAR,
+ 'backed_enum' => Suit::Hearts,
+ 'array_of_enums' => Suit::cases(),
+ 'map' => [
+ 'mixed' => [Suit::Hearts, FooUnitEnum::BAR],
+ 'single' => FooUnitEnum::BAR,
+ ],
+ ]);
}
public static function getContainerParameter()
@@ -157,6 +171,7 @@ public static function getContainerDefinitionsWithPriorityTags()
$definition1 = new Definition('Full\\Qualified\\Class1');
$definition2 = new Definition('Full\\Qualified\\Class2');
$definition3 = new Definition('Full\\Qualified\\Class3');
+ $definition4 = new Definition('Full\\Qualified\\Class4');
return [
'definition_1' => $definition1
@@ -185,6 +200,13 @@ public static function getContainerDefinitionsWithPriorityTags()
->setAbstract(false)
->addTag('tag1', ['attr1' => 'val1', 'attr2' => 'val2', 'priority' => 0])
->addTag('tag1', ['attr3' => 'val3', 'priority' => 40]),
+ 'definition_4' => $definition4
+ ->setPublic(true)
+ ->setSynthetic(true)
+ ->setFile('/path/to/file')
+ ->setLazy(false)
+ ->setAbstract(false)
+ ->addTag('tag1', ['priority' => 0]),
];
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
index 396a04e8b4bf9..b66d0837c3a37 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
@@ -1520,6 +1520,7 @@ public function testCachePoolServices()
$this->assertEquals([
['setLogger', [new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]],
], $tagAwareDefinition->getMethodCalls());
+ $this->assertSame([['channel' => 'cache']], $tagAwareDefinition->getTag('monolog.logger'));
}
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.json
index fe47af88b8d2d..a9d9697847fdb 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.json
@@ -63,6 +63,25 @@
}
]
},
+ "definition_4": {
+ "class": "Full\\Qualified\\Class4",
+ "public": true,
+ "synthetic": true,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": false,
+ "autoconfigure": false,
+ "file": "\/path\/to\/file",
+ "tags": [
+ {
+ "name": "tag1",
+ "parameters": {
+ "priority": 0
+ }
+ }
+ ]
+ },
"definition_2": {
"class": "Full\\Qualified\\Class2",
"public": true,
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.md
index 4ed3e82f0297b..8c0fef6aa3bea 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.md
@@ -44,6 +44,20 @@ Definitions
- Attr2: val2
- Tag: `tag2`
+### definition_4
+
+- Class: `Full\Qualified\Class4`
+- Public: yes
+- Synthetic: yes
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowired: no
+- Autoconfigured: no
+- File: `/path/to/file`
+- Tag: `tag1`
+ - Priority: 0
+
### definition_2
- Class: `Full\Qualified\Class2`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.txt
index 3cbca0110bcce..7884a05c2a690 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.txt
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.txt
@@ -9,6 +9,7 @@
" val1 val2 0
definition_1 val1 30 Full\Qualified\Class1
" val2
+ definition_4 0 Full\Qualified\Class4
definition_2 val1 val2 -20 Full\Qualified\Class2
-------------- ------- ------- ---------- ------- -----------------------
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.xml
index 8e886bed25579..2e00c99955257 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_priority_tag.xml
@@ -29,6 +29,13 @@
+
+
+
+ 0
+
+
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.json
new file mode 100644
index 0000000000000..d5580ee3334a4
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.json
@@ -0,0 +1,15 @@
+{
+ "class": "definition_with_enum",
+ "public": false,
+ "synthetic": false,
+ "lazy": false,
+ "shared": true,
+ "abstract": false,
+ "autowire": false,
+ "autoconfigure": false,
+ "arguments": [
+ "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\FooUnitEnum::FOO"
+ ],
+ "file": null,
+ "tags": []
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.md
new file mode 100644
index 0000000000000..78ef17f14b1fa
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.md
@@ -0,0 +1,9 @@
+- Class: `definition_with_enum`
+- Public: no
+- Synthetic: no
+- Lazy: no
+- Shared: yes
+- Abstract: no
+- Autowired: no
+- Autoconfigured: no
+- Arguments: yes
\ No newline at end of file
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.txt
new file mode 100644
index 0000000000000..9556f9b832f4e
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.txt
@@ -0,0 +1,16 @@
+ ---------------- ----------------------------------------------------------------
+ [32m Option [39m [32m Value [39m
+ ---------------- ----------------------------------------------------------------
+ Service ID -
+ Class definition_with_enum
+ Tags -
+ Public no
+ Synthetic no
+ Lazy no
+ Shared yes
+ Abstract no
+ Autowired no
+ Autoconfigured no
+ Arguments Symfony\Bundle\FrameworkBundle\Tests\Fixtures\FooUnitEnum::FOO
+ ---------------- ----------------------------------------------------------------
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.xml
new file mode 100644
index 0000000000000..cb58a6d935e97
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_arguments_with_enum.xml
@@ -0,0 +1,4 @@
+
+
+ Symfony\Bundle\FrameworkBundle\Tests\Fixtures\FooUnitEnum::FOO
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.json
new file mode 100644
index 0000000000000..34d9e8f773d15
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.json
@@ -0,0 +1,17 @@
+{
+ "array_of_enums": [
+ "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\Suit::Hearts",
+ "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\Suit::Diamonds",
+ "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\Suit::Clubs",
+ "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\Suit::Spades"
+ ],
+ "backed_enum": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\Suit::Hearts",
+ "map": {
+ "mixed": [
+ "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\Suit::Hearts",
+ "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\FooUnitEnum::BAR"
+ ],
+ "single": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\FooUnitEnum::BAR"
+ },
+ "unit_enum": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\FooUnitEnum::BAR"
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.md
new file mode 100644
index 0000000000000..e129a6c07ff0d
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.md
@@ -0,0 +1,7 @@
+Container parameters
+====================
+
+- `array_of_enums`: `["Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\Suit::H...`
+- `backed_enum`: `Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Suit::Hearts`
+- `map`: `{"mixed":["Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures...`
+- `unit_enum`: `Symfony\Bundle\FrameworkBundle\Tests\Fixtures\FooUnitEnum::BAR`
\ No newline at end of file
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.txt
new file mode 100644
index 0000000000000..42c6938150d7c
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.txt
@@ -0,0 +1,11 @@
+[33mSymfony Container Parameters[39m
+[33m============================[39m
+
+ ---------------- -----------------------------------------------------------------
+ [32m Parameter [39m [32m Value [39m
+ ---------------- -----------------------------------------------------------------
+ array_of_enums ["Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\Suit::H...
+ backed_enum Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Suit::Hearts
+ map {"mixed":["Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures...
+ unit_enum Symfony\Bundle\FrameworkBundle\Tests\Fixtures\FooUnitEnum::BAR
+ ---------------- -----------------------------------------------------------------
\ No newline at end of file
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.xml
new file mode 100644
index 0000000000000..8fd512337916a
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_enums.xml
@@ -0,0 +1,7 @@
+
+
+ ["Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures\\Suit::H...
+ Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Suit::Hearts
+ {"mixed":["Symfony\\Bundle\\FrameworkBundle\\Tests\\Fixtures...
+ Symfony\Bundle\FrameworkBundle\Tests\Fixtures\FooUnitEnum::BAR
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/FooUnitEnum.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/FooUnitEnum.php
new file mode 100644
index 0000000000000..02366bcf59c40
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/FooUnitEnum.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Bundle\FrameworkBundle\Tests\Fixtures;
+
+enum FooUnitEnum
+{
+ case BAR;
+ case FOO;
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Suit.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Suit.php
new file mode 100644
index 0000000000000..6d9baba4c7ab6
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Suit.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Bundle\FrameworkBundle\Tests\Fixtures;
+
+enum Suit: string
+{
+ case Hearts = 'H';
+ case Diamonds = 'D';
+ case Clubs = 'C';
+ case Spades = 'S';
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php
index b7f29a0857852..fc53e26661993 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php
@@ -121,7 +121,7 @@ protected static function createKernel(array $options = []): KernelInterface
private function skipIfRedisUnavailable()
{
try {
- (new \Redis())->connect(getenv('REDIS_HOST'));
+ (new \Redis())->connect(...explode(':', getenv('REDIS_HOST')));
} catch (\Exception $e) {
self::markTestSkipped($e->getMessage());
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php
index bf4f9f8779f44..4122a749dfd1d 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php
@@ -44,4 +44,22 @@ public function testThatPrivateServicesAreAvailableIfTestConfigIsEnabled()
$this->assertTrue(static::$container->has('private_service'));
$this->assertFalse(static::$container->has(UnusedPrivateService::class));
}
+
+ /**
+ * @doesNotPerformAssertions
+ */
+ public function testBootKernel()
+ {
+ static::bootKernel(['test_case' => 'TestServiceContainer']);
+ }
+
+ /**
+ * @depends testBootKernel
+ */
+ public function testKernelIsNotInitialized()
+ {
+ self::assertNull(self::$class);
+ self::assertNull(self::$kernel);
+ self::assertFalse(self::$booted);
+ }
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_custom_config.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_custom_config.yml
index df20c5357f7a4..8681e59a7bb4a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_custom_config.yml
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/CachePools/redis_custom_config.yml
@@ -8,8 +8,8 @@ services:
cache.test_redis_connection:
public: false
class: Redis
- calls:
- - [connect, ['%env(REDIS_HOST)%']]
+ factory: ['Symfony\Component\Cache\Adapter\RedisAdapter', 'createConnection']
+ arguments: ['redis://%env(REDIS_HOST)%']
cache.app:
parent: cache.adapter.redis
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php
index 2770813d8a696..96eaaea7612af 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/KernelBrowserTest.php
@@ -54,7 +54,7 @@ public function testEnableRebootKernel()
private function getKernelMock()
{
$mock = $this->getMockBuilder($this->getKernelClass())
- ->setMethods(['shutdown', 'boot', 'handle'])
+ ->setMethods(['shutdown', 'boot', 'handle', 'getContainer'])
->disableOriginalConstructor()
->getMock();
diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json
index 6562fa2d1e241..1e382f1dcf0cb 100644
--- a/src/Symfony/Bundle/FrameworkBundle/composer.json
+++ b/src/Symfony/Bundle/FrameworkBundle/composer.json
@@ -20,7 +20,7 @@
"ext-xml": "*",
"symfony/cache": "^4.4|^5.0",
"symfony/config": "^4.4.11|~5.0.11|^5.1.3",
- "symfony/dependency-injection": "^4.4.1|^5.0.1",
+ "symfony/dependency-injection": "^4.4.38|^5.0.1",
"symfony/error-handler": "^4.4.1|^5.0.1",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/http-kernel": "^4.4",
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php
index 1cd90fe70af1a..6aa50f4196c8b 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterTokenUsageTrackingPass.php
@@ -11,7 +11,7 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler;
-use Symfony\Bridge\Monolog\Processor\ProcessorInterface;
+use Monolog\Processor\ProcessorInterface;
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
index ac65e506f6e6b..5872a9e07c1ac 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
@@ -88,7 +88,7 @@ public function panelAction(Request $request, $token)
}
if (!$profile = $this->profiler->loadProfile($token)) {
- return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', ['about' => 'no_token', 'token' => $token, 'request' => $request]), 200, ['Content-Type' => 'text/html']);
+ return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/info.html.twig', ['about' => 'no_token', 'token' => $token, 'request' => $request]);
}
if (null === $panel) {
@@ -111,7 +111,7 @@ public function panelAction(Request $request, $token)
throw new NotFoundHttpException(sprintf('Panel "%s" is not available for token "%s".', $panel, $token));
}
- return new Response($this->twig->render($this->getTemplateManager()->getName($profile, $panel), [
+ return $this->renderWithCspNonces($request, $this->getTemplateManager()->getName($profile, $panel), [
'token' => $token,
'profile' => $profile,
'collector' => $profile->getCollector($panel),
@@ -121,7 +121,7 @@ public function panelAction(Request $request, $token)
'templates' => $this->getTemplateManager()->getNames($profile),
'is_ajax' => $request->isXmlHttpRequest(),
'profiler_markup_version' => 2, // 1 = original profiler, 2 = Symfony 2.8+ profiler
- ]), 200, ['Content-Type' => 'text/html']);
+ ]);
}
/**
@@ -252,7 +252,7 @@ public function searchResultsAction(Request $request, $token)
$end = $request->query->get('end', null);
$limit = $request->query->get('limit');
- return new Response($this->twig->render('@WebProfiler/Profiler/results.html.twig', [
+ return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/results.html.twig', [
'request' => $request,
'token' => $token,
'profile' => $profile,
@@ -265,7 +265,7 @@ public function searchResultsAction(Request $request, $token)
'end' => $end,
'limit' => $limit,
'panel' => null,
- ]), 200, ['Content-Type' => 'text/html']);
+ ]);
}
/**
@@ -367,11 +367,11 @@ public function openAction(Request $request)
throw new NotFoundHttpException(sprintf('The file "%s" cannot be opened.', $file));
}
- return new Response($this->twig->render('@WebProfiler/Profiler/open.html.twig', [
+ return $this->renderWithCspNonces($request, '@WebProfiler/Profiler/open.html.twig', [
'filename' => $filename,
'file' => $file,
'line' => $line,
- ]), 200, ['Content-Type' => 'text/html']);
+ ]);
}
/**
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 0b13f57509a25..eee81b8311c76 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 %}
-