diff --git a/.github/ISSUE_TEMPLATE/1_Bug_report.yaml b/.github/ISSUE_TEMPLATE/1_Bug_report.yaml
new file mode 100644
index 0000000000000..5518d4e4ad79d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/1_Bug_report.yaml
@@ -0,0 +1,38 @@
+name: 🐛 Bug Report
+description: ⚠️ See below for security reports
+labels: Bug
+
+body:
+ - type: input
+ id: affected-versions
+ attributes:
+ label: Symfony version(s) affected
+ placeholder: x.y.z
+ validations:
+ required: true
+ - type: textarea
+ id: description
+ attributes:
+ label: Description
+ description: A clear and consise description of the problem
+ validations:
+ required: true
+ - type: textarea
+ id: how-to-reproduce
+ attributes:
+ label: How to reproduce
+ description: |
+ Code and/or config needed to reproduce the problem.
+ If it's a complex bug, create a "bug reproducer" as explained in https://symfony.com/doc/current/contributing/code/reproducer.html
+ validations:
+ required: true
+ - type: textarea
+ id: possible-solution
+ attributes:
+ label: Possible Solution
+ description: "Optional: only if you have suggestions on a fix/reason for the bug"
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: Additional Context
+ description: "Optional: any other context about the problem: log messages, screenshots, etc."
diff --git a/.github/ISSUE_TEMPLATE/2_Feature_request.yaml b/.github/ISSUE_TEMPLATE/2_Feature_request.yaml
new file mode 100644
index 0000000000000..bd300eb1e82b2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/2_Feature_request.yaml
@@ -0,0 +1,17 @@
+name: 🚀 Feature Request
+description: RFC and ideas for new features and improvements
+body:
+ - type: textarea
+ id: description
+ attributes:
+ label: Description
+ description: A clear and concise description of the new feature
+ validations:
+ required: true
+ - type: textarea
+ id: example
+ attributes:
+ label: Example
+ description: |
+ A simple example of the new feature in action (include PHP code, YAML config, etc.)
+ If the new feature changes an existing feature, include a simple before/after comparison.
diff --git a/CHANGELOG-4.4.md b/CHANGELOG-4.4.md
index 530ec3dfd337d..18b1ae705bb72 100644
--- a/CHANGELOG-4.4.md
+++ b/CHANGELOG-4.4.md
@@ -7,6 +7,27 @@ 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.33 (2021-10-29)
+
+ * bug #43798 [Dotenv] Duplicate $_SERVER values in $_ENV if they don't exist (fancyweb)
+ * bug #43799 [PhpUnitBridge] fix symlink to bridge in docker by making its path relative (nicolas-grekas)
+ * bug #43781 [Messenger] Fix `TraceableMessageBus` implementation so it can compute caller even when used within a callback (Ocramius)
+ * bug #43655 [VarDumper] Fix dumping twig templates found in exceptions (event15)
+ * bug #43484 [Messenger] Fix Redis Transport when username is empty (villfa)
+ * bug #43568 [Messenger] fix: TypeError in PhpSerializer::encode() (dsech)
+ * bug #43591 [Config] Fix files sorting in GlobResource (lyrixx)
+ * bug #43569 [HttpClient] fix collecting debug info on destruction of CurlResponse (nicolas-grekas)
+ * bug #43545 [DependencyInjection] fix "url" env var processor (nicolas-grekas)
+ * bug #43413 [VarDumper] Fix error with uninitialized XMLReader (villfa)
+ * bug #43388 [Validator] Fixes URL validation for single-char subdomains (DfKimera)
+ * bug #43333 [HttpClient] fix missing kernel.reset tag on TraceableHttpClient services (nicolas-grekas)
+ * bug #43302 [Cache] Commit items implicitly only when deferred keys are requested (Sergey Belyshkin)
+ * bug #43330 [Cache][Lock] fix SQLSRV throws for method_exists() (GDmac)
+ * bug #43270 [VarDumper] Fix handling of "new" in initializers on PHP 8.1 (nicolas-grekas)
+ * bug #43277 [DependencyInjection] fix support for "new" in initializers on PHP 8.1 (nicolas-grekas)
+ * bug #43243 [HttpClient] accept headers when CURLE_RECV_ERROR is received before the content (nicolas-grekas)
+ * bug #43205 [Serializer] Fix denormalizing XML array with empty body (4.4) (alexandre-daubois)
+
* 4.4.32 (2021-09-28)
* Fix subtree split issues
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 507ca7e28d68b..1ac10f641e698 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -14,8 +14,8 @@ The Symfony Connect username in parenthesis allows to get more information
- Christophe Coevoet (stof)
- Wouter De Jong (wouterj)
- Jérémy DERUSSÉ (jderusse)
- - Maxime Steinhausser (ogizanagi)
- Grégoire Pineau (lyrixx)
+ - Maxime Steinhausser (ogizanagi)
- Kévin Dunglas (dunglas)
- Jordi Boggiano (seldaek)
- Victor Berchet (victor)
@@ -53,8 +53,8 @@ The Symfony Connect username in parenthesis allows to get more information
- Valentin Udaltsov (vudaltsov)
- Iltar van der Berg (kjarli)
- Jonathan Wage (jwage)
- - Matthias Pigulla (mpdude)
- Vasilij Duško (staff)
+ - Matthias Pigulla (mpdude)
- Diego Saint Esteben (dosten)
- Grégoire Paris (greg0ire)
- Alexandre Salomé (alexandresalome)
@@ -68,6 +68,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Titouan Galopin (tgalopin)
- Laurent VOULLEMIER (lvo)
- Vasilij Dusko | CREATION
+ - Jérôme Tamarelle (gromnan)
- Bulat Shakirzyanov (avalanche123)
- David Maicher (dmaicher)
- gadelat (gadelat)
@@ -81,15 +82,14 @@ The Symfony Connect username in parenthesis allows to get more information
- Konstantin Kudryashov (everzet)
- Vladimir Reznichenko (kalessil)
- Bilal Amarni (bamarni)
- - Jérôme Tamarelle (gromnan)
- Florin Patan (florinpatan)
- Jáchym Toušek (enumag)
- Alex Pott
+ - Antoine M (amakdessi)
- Michel Weimerskirch (mweimerskirch)
- Andrej Hudec (pulzarraider)
- Christian Raue
- Issei Murasawa (issei_m)
- - Antoine M (amakdessi)
- Eric Clemmons (ericclemmons)
- Charles Sarrazin (csarrazi)
- Vasilij Dusko
@@ -101,33 +101,35 @@ The Symfony Connect username in parenthesis allows to get more information
- Henrik Westphal (snc)
- Dariusz Górecki (canni)
- Fran Moreno (franmomu)
+ - Alexander Schranz (alexander-schranz)
- Dariusz Ruminski
- Jérôme Vasseur (jvasseur)
- Lee McDermott
- Brandon Turner
- Luis Cordova (cordoval)
- Daniel Holmes (dholmes)
- - Alexander Schranz (alexander-schranz)
- Sebastiaan Stok (sstok)
- Toni Uebernickel (havvg)
- Bart van den Burg (burgov)
- Jordan Alliot (jalliot)
- John Wards (johnwards)
+ - Tomas Norkūnas (norkunas)
- Baptiste Clavié (talus)
- Antoine Hérault (herzult)
- Paráda József (paradajozsef)
- Vincent Langlet (deviling)
+ - Massimiliano Arione (garak)
- Arnaud Le Blanc (arnaud-lb)
- Przemysław Bogusz (przemyslaw-bogusz)
- Maxime STEINHAUSSER
- - Tomas Norkūnas (norkunas)
- Michal Piotrowski (eventhorizon)
- Tomáš Votruba (tomas_votruba)
- - Massimiliano Arione (garak)
- Mathias Arlaud (mtarld)
- Tim Nagel (merk)
+ - Alexandre Daubois (alexandre-daubois)
- HypeMC (hypemc)
- Chris Wilkinson (thewilkybarkid)
+ - Julien Falque (julienfalque)
- Peter Kokot (maastermedia)
- Lars Strojny (lstrojny)
- Brice BERNARD (brikou)
@@ -141,14 +143,13 @@ The Symfony Connect username in parenthesis allows to get more information
- Christian Scheb
- Adrien Brault (adrienbrault)
- Yanick Witschi (toflar)
- - Julien Falque (julienfalque)
- Jacob Dreesen (jdreesen)
+ - Mathieu Santostefano (welcomattic)
- Malte Schlüter (maltemaltesich)
- Joel Wurtz (brouznouf)
- Théo FIDRY (theofidry)
- Florian Voutzinos (florianv)
- Teoh Han Hui (teohhanhui)
- - Alexandre Daubois (alexandre-daubois)
- Colin Frei
- Javier Spagnoletti (phansys)
- Joshua Thijssen
@@ -158,27 +159,27 @@ The Symfony Connect username in parenthesis allows to get more information
- Gordon Franke (gimler)
- Saif Eddin Gmati (azjezz)
- Richard van Laak (rvanlaak)
+ - Maxime Helias (maxhelias)
- Jesse Rushlow (geeshoe)
- Fabien Pennequin (fabienpennequin)
- - Mathieu Santostefano (welcomattic)
- Olivier Dolbeau (odolbeau)
- Smaine Milianni (ismail1432)
- Eric GELOEN (gelo)
- Gary PEGEOT (gary-p)
- Matthieu Napoli (mnapoli)
- - Maxime Helias (maxhelias)
+ - Ruud Kamphuis (ruudk)
- Jannik Zschiesche (apfelbox)
- Robert Schönthal (digitalkaoz)
- Florian Lonqueu-Brochard (florianlb)
- Tigran Azatyan (tigranazatyan)
- YaFou
- Gabriel Caruso (carusogabriel)
- - Ruud Kamphuis (ruudk)
- Stefano Sala (stefano.sala)
- Andréia Bohner (andreia)
- Evgeniy (ewgraf)
- Vincent AUBERT (vincent)
- Juti Noppornpitak (shiroyuki)
+ - Simon Berger
- Anthony MARTIN (xurudragon)
- Sebastian Hörl (blogsh)
- Daniel Gomes (danielcsgomes)
@@ -205,6 +206,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Joe Bennett (kralos)
- Mikael Pajunen
- Andreas Schempp (aschempp)
+ - Alessandro Lai (jean85)
- Romaric Drigon (romaricdrigon)
- Arman Hosseini (arman)
- Niels Keurentjes (curry684)
@@ -220,9 +222,9 @@ The Symfony Connect username in parenthesis allows to get more information
- Rouven Weßling (realityking)
- Jérôme Parmentier (lctrs)
- Ben Davies (bendavies)
- - Alessandro Lai (jean85)
- Clemens Tolboom
- Helmer Aaviksoo
+ - Christopher Hertel (chertel)
- Remon van de Kamp (rpkamp)
- Filippo Tessarotto (slamdunk)
- Hiromi Hishida (77web)
@@ -242,7 +244,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Dmitrii Poddubnyi (karser)
- Michael Babker (mbabker)
- Tien Vo (tienvx)
- - Simon Berger
- Timothée Barray (tyx)
- James Halsall (jaitsu)
- Florent Mata (fmata)
@@ -262,7 +263,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Richard Miller (mr_r_miller)
- Mario A. Alvarez Garcia (nomack84)
- Dennis Benkert (denderello)
- - Christopher Hertel (chertel)
- DQNEO
- Hidde Wieringa (hiddewie)
- Antonio Pauletich (x-coder264)
@@ -274,6 +274,7 @@ The Symfony Connect username in parenthesis allows to get more information
- mcfedr (mcfedr)
- Ruben Gonzalez (rubenrua)
- Benjamin Dulau (dbenjamin)
+ - zairig imad (zairigimad)
- Baptiste Lafontaine (magnetik)
- Mathieu Lemoine (lemoinem)
- Denis Brumann (dbrumann)
@@ -305,6 +306,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Dominique Bongiraud
- dFayet
- Jeremy Livingston (jeremylivingston)
+ - soyuka
- Michael Lee (zerustech)
- Matthieu Auger (matthieuauger)
- Leszek Prabucki (l3l0)
@@ -315,7 +317,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Dustin Whittle (dustinwhittle)
- jeff
- John Kary (johnkary)
- - zairig imad (zairigimad)
- Justin Hileman (bobthecow)
- Blanchon Vincent (blanchonvincent)
- Maciej Malarz (malarzm)
@@ -345,7 +346,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Marcin Szepczynski (czepol)
- Rob Frawley 2nd (robfrawley)
- Ahmed Raafat
- - soyuka
- julien pauli (jpauli)
- Lorenz Schori
- Sébastien Lavoie (lavoiesl)
@@ -353,6 +353,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Farhad Safarov (safarov)
- BoShurik
- Thomas Lallement (raziel057)
+ - Michael Voříšek
- Francois Zaninotto
- Claude Khedhiri (ck-developer)
- Alexander Kotynia (olden)
@@ -361,6 +362,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Marcos Sánchez
- Elnur Abdurrakhimov (elnur)
- Manuel Reinhard (sprain)
+ - fd6130 (fdtvui)
- Harm van Tilborg (hvt)
- Danny Berger (dpb587)
- Antonio J. García Lagar (ajgarlag)
@@ -409,7 +411,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Mohammad Emran Hasan (phpfour)
- Dmitriy Mamontov (mamontovdmitriy)
- Ben Ramsey (ramsey)
- - Michael Voříšek
- Laurent Masforné (heisenberg)
- Giorgio Premi
- Guillaume (guill)
@@ -450,11 +451,14 @@ The Symfony Connect username in parenthesis allows to get more information
- Alan Poulain (alanpoulain)
- Chris Smith (cs278)
- Florian Klein (docteurklein)
+ - W0rma
+ - Dāvis Zālītis (k0d3r1s)
- Manuel Kiessling (manuelkiessling)
- Dimitri Gritsajuk (ottaviano)
- Alexey Kopytko (sanmai)
- Pol Dellaiera (drupol)
- Atsuhiro KUBO (iteman)
+ - Alireza Mirsepassi (alirezamirsepassi)
- rudy onfroy (ronfroy)
- Serkan Yildiz (srknyldz)
- Andrew Moore (finewolf)
@@ -501,7 +505,9 @@ The Symfony Connect username in parenthesis allows to get more information
- ivan
- Greg Anderson
- Tri Pham (phamuyentri)
+ - Urinbayev Shakhobiddin (shokhaa)
- Gennady Telegin (gtelegin)
+ - Sergey (upyx)
- Krystian Marcisz (simivar)
- Toni Rudolf (toooni)
- Erin Millard
@@ -534,13 +540,13 @@ The Symfony Connect username in parenthesis allows to get more information
- Tarmo Leppänen (tarlepp)
- Martin Auswöger
- Robbert Klarenbeek (robbertkl)
+ - Hamza Makraz (makraz)
- Eric Masoero (eric-masoero)
- Vitalii Ekert (comrade42)
- JhonnyL
- hossein zolfi (ocean)
- Clément Gautier (clementgautier)
- Koen Reiniers (koenre)
- - Dāvis Zālītis (k0d3r1s)
- Sanpi
- Eduardo Gulias (egulias)
- giulio de donato (liuggio)
@@ -551,10 +557,12 @@ The Symfony Connect username in parenthesis allows to get more information
- Grzegorz Zdanowski (kiler129)
- Kirill chEbba Chebunin (chebba)
-
+ - Fabien Villepinte
- Matthew Grasmick
- Greg Thornton (xdissent)
- BENOIT POLASZEK (bpolaszek)
- Alex Bowers
+ - Piotr Kugla (piku235)
- Philipp Cordes
- Jeroen Thora (bolle)
- Costin Bereveanu (schniper)
@@ -577,6 +585,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Daniel Beyer
- Manuel Alejandro Paz Cetina
- Shein Alexey
+ - Aleksandar Jakovljevic (ajakov)
- Jacek Jędrzejewski (jacek.jedrzejewski)
- Romain Gautier (mykiwi)
- Stefan Kruppa
@@ -596,11 +605,13 @@ The Symfony Connect username in parenthesis allows to get more information
- Miha Vrhovnik
- Alessandro Desantis
- hubert lecorche (hlecorche)
+ - Vladyslav Loboda
- fritzmg
- flack (flack)
- Marc Morales Valldepérez (kuert)
- Jean-Baptiste GOMOND (mjbgo)
- Vadim Kharitonov (virtuozzz)
+ - Jurica Vlahoviček (vjurica)
- Oscar Cubo Medina (ocubom)
- Karel Souffriau
- Christophe L. (christophelau)
@@ -610,7 +621,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Marc Laporte
- Michał Jusięga
- Bernd Stellwag
- - Alireza Mirsepassi (alirezamirsepassi)
- Sébastien Santoro (dereckson)
- Gennadi Janzen
- Brian King
@@ -625,14 +635,13 @@ The Symfony Connect username in parenthesis allows to get more information
- Christin Gruber (christingruber)
- Andrey Sevastianov
- Webnet team (webnet)
- - Urinbayev Shakhobiddin (shokhaa)
- marie
- Jan Schumann
- Noémi Salaün (noemi-salaun)
- Niklas Fiekas
- Philippe Segatori
+ - Dalibor Karlović (dkarlovi)
- Markus Bachmann (baachi)
- - fd6130 (fdtvui)
- Kévin THERAGE (kevin_therage)
- Michel Hunziker
- Gunnstein Lye (glye)
@@ -656,6 +665,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Stefan Gehrig (sgehrig)
- vagrant
- Aurimas Niekis (gcds)
+ - Hendrik Luup (hluup)
- EdgarPE
- Florian Pfitzer (marmelatze)
- Asier Illarramendi (doup)
@@ -739,7 +749,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Pablo Díez (pablodip)
- SiD (plbsid)
- Michel Roca (mroca)
- - Piotr Kugla (piku235)
- Kevin McBride
- Sergio Santoro
- Robin van der Vleuten (robinvdvleuten)
@@ -783,6 +792,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Erik Trapman (eriktrapman)
- De Cock Xavier (xdecock)
- Almog Baku (almogbaku)
+ - Evert Harmeling (evertharmeling)
- Scott Arciszewski
- Xavier HAUSHERR
- Norbert Orzechowicz (norzechowicz)
@@ -811,6 +821,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Rodrigo Borrego Bernabé (rodrigobb)
- Emanuele Iannone
- Jörn Lang (j.lang)
+ - Marcos Rezende (rezehnde)
- Denis Gorbachev (starfall)
- Peter van Dommelen
- Tim van Densen
@@ -893,7 +904,6 @@ The Symfony Connect username in parenthesis allows to get more information
- vitaliytv
- Nicolas Martin (cocorambo)
- Adrian Nguyen (vuphuong87)
- - Dalibor Karlović (dkarlovi)
- Sebastian Blum
- Alexis Lefebvre
- Laurent Clouet
@@ -927,7 +937,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Nahuel Cuesta (ncuesta)
- Chris Boden (cboden)
- Christophe Villeger (seragan)
- - Hendrik Luup
- Julien Fredon
- Jacek Wilczyński (jacekwilczynski)
- Xavier Leune (xleune)
@@ -973,6 +982,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Claus Due (namelesscoder)
- adev
- Alexandru Patranescu
+ - Andy Palmer (andyexeter)
- Stefan Warman
- Tristan Maindron (tmaindron)
- Behnoush norouzali (behnoush)
@@ -1003,7 +1013,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Tomas Javaisis
- Ivan Grigoriev
- Johann Saunier (prophet777)
- - Sergey (upyx)
- Fabien Salles (blacked)
- Andreas Erhard
- John VanDeWeghe
@@ -1081,6 +1090,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Junaid Farooq (junaidfarooq)
- Massimiliano Braglia (massimilianobraglia)
- Frankie Wittevrongel
+ - Jerzy (jlekowski)
- Richard Quadling
- Raphaëll Roussel
- Anton Kroshilin
@@ -1202,7 +1212,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Ahmadou Waly Ndiaye (waly)
- Antonin CLAUZIER (0x346e3730)
- moldman
- - Evert Harmeling (evertharmeling)
- Jonathan Johnson (jrjohnson)
- Olivier Maisonneuve (olineuve)
- Pedro Miguel Maymone de Resende (pedroresende)
@@ -1251,14 +1260,14 @@ The Symfony Connect username in parenthesis allows to get more information
- frost-nzcr4
- Taylor Otwell
- Sami Mussbach
+ - Dhananjay Goratela
- Kien Nguyen
- Foxprodev
- Eric Hertwig
- Niels Robin-Aubertin
+ - Achilles Kaloeridis (achilles)
- Adrien Wilmet (adrienfr)
- - Aleksandar Jakovljevic (ajakov)
- Laurent Bassin (lbassin)
- - Hamza Makraz (makraz)
- Tomasz Ignatiuk
- andrey1s
- Abhoryo
@@ -1267,7 +1276,9 @@ The Symfony Connect username in parenthesis allows to get more information
- Stéphan Kochen
- Steven Dubois
- Arjan Keeman
+ - siganushka
- Alaattin Kahramanlar (alaattin)
+ - Dadang NH (dadangnh)
- Sergey Zolotov (enleur)
- Maksim Kotlyar (makasim)
- Neil Ferreira
@@ -1281,13 +1292,11 @@ The Symfony Connect username in parenthesis allows to get more information
- Tony Malzhacker
- Pchol
- Mathieu MARCHOIS
- - W0rma
- Cyril Quintin (cyqui)
- Cyrille Bourgois (cyrilleb)
- Gerard van Helden (drm)
- Johnny Peck (johnnypeck)
- Jordi Sala Morales (jsala)
- - Marcos Rezende (rezehnde)
- Roman Anasal
- Ivan Menshykov
- David Romaní
@@ -1314,6 +1323,7 @@ The Symfony Connect username in parenthesis allows to get more information
- pdragun
- corphi
- JoppeDC
+ - Daniel Tiringer
- grizlik
- Derek ROTH
- Ben Johnson
@@ -1328,6 +1338,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Simon Leblanc (leblanc_simon)
- Matthieu Mota (matthieumota)
- Mikhail Prosalov (mprosalov)
+ - Petr Duda (petrduda)
- Ronny López (ronnylt)
- abdul malik ikhsan (samsonasik)
- Henry Snoek (snoek09)
@@ -1432,6 +1443,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Htun Htun Htet (ryanhhh91)
- Guillaume Gammelin
- Valérian Galliat
+ - Sorin Pop (sorinpop)
- d-ph
- Renan Taranto (renan-taranto)
- Adrien Chinour
@@ -1443,6 +1455,7 @@ The Symfony Connect username in parenthesis allows to get more information
- The Whole Life to Learn
- Mikkel Paulson
- ergiegonzaga
+ - André Matthies
- Liverbool (liverbool)
- Valentin Nazarov
- Jérôme Nadaud (jnadaud)
@@ -1452,7 +1465,9 @@ The Symfony Connect username in parenthesis allows to get more information
- neghmurken
- xaav
- Mahmoud Mostafa (mahmoud)
+ - Fractal Zombie
- Ahmed Abdou
+ - shreyadenny
- Daniel Iwaniec
- Pieter
- Michael Tibben
@@ -1461,6 +1476,8 @@ The Symfony Connect username in parenthesis allows to get more information
- Albion Bame (abame)
- Ganesh Chandrasekaran
- Sander Marechal
+ - Ivan Nemets
+ - Grégoire Hébert (gregoirehebert)
- Franz Wilding (killerpoke)
- ProgMiner
- Oleg Golovakhin (doc_tr)
@@ -1515,10 +1532,12 @@ The Symfony Connect username in parenthesis allows to get more information
- Stanislav Kocanda
- DerManoMann
- Guillaume Royer
+ - Erfan Bahramali
- Artem (digi)
- boite
- Silvio Ginter
- MGDSoft
+ - Abdiel Carrazana (abdielcs)
- Vadim Tyukov (vatson)
- Arman
- Gabi Udrescu
@@ -1576,6 +1595,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Maximilian Berghoff (electricmaxxx)
- nacho
- Piotr Antosik (antek88)
+ - mwos
- Volker Killesreiter (ol0lll)
- Vedran Mihočinec (v-m-i)
- Sergey Novikov (s12v)
@@ -1588,14 +1608,17 @@ The Symfony Connect username in parenthesis allows to get more information
- Angel Koilov (po_taka)
- RevZer0 (rav)
- Dan Finnie
+ - Marek Binkowski
- Ken Marfilla (marfillaster)
- benatespina (benatespina)
- Denis Kop
- Jean-Guilhem Rouel (jean-gui)
+ - Yoann MOROCUTTI
- jfcixmedia
- Dominic Tubach
- Nikita Konstantinov
- Martijn Evers
+ - Alexander Onatskiy
- Philipp Fritsche
- tarlepp
- Benjamin Paap (benjaminpaap)
@@ -1750,6 +1773,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Krzysztof Przybyszewski
- alexpozzi
- Vladimir
+ - Quentin Devos
- Jorge Vahldick (jvahldick)
- Frederic Godfrin
- Paul Matthews
@@ -1890,6 +1914,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Vašek Purchart (vasek-purchart)
- Janusz Jabłoński (yanoosh)
- Fleuv
+ - Tayfun Aydin
- Sandro Hopf
- Łukasz Makuch
- Arne Groskurth
@@ -1908,8 +1933,10 @@ The Symfony Connect username in parenthesis allows to get more information
- Philip Frank
- David Brooks
- Lance McNearney
+ - Volodymyr Kupriienko (greeflas)
- Serhiy Lunak (slunak)
- Giorgio Premi
+ - Sergey Belyshkin
- tamcy
- Mikko Pesari
- ncou
@@ -1989,6 +2016,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Serhii Smirnov
- Robert Queck
- Peter Bouwdewijn
+ - Martins Eglitis
- mlively
- Wouter Diesveld
- Amine Matmati
@@ -2009,6 +2037,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Ergie Gonzaga
- Matthew J Mucklo
- AnrDaemon
+ - Matthew Covey
- Anthony Massard (decap94)
- Emre Akinci (emre)
- Chris Maiden (matason)
@@ -2051,6 +2080,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Justin (wackymole)
- Flavian (2much)
- Gautier Deuette
+ - dsech
- mike
- Gilbertsoft
- tadas
@@ -2083,6 +2113,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Tobias Genberg (lorceroth)
- Nicolas Badey (nico-b)
- Shane Preece (shane)
+ - Stephan Wentz (temp)
- Johannes Goslar
- Geoff
- georaldc
@@ -2094,7 +2125,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Gavin Staniforth
- bahram
- Alessandro Tagliapietra (alex88)
- - Andy Palmer (andyexeter)
- Biji (biji)
- Alex Teterin (errogaht)
- Gunnar Lium (gunnarlium)
@@ -2110,6 +2140,8 @@ The Symfony Connect username in parenthesis allows to get more information
- mschop
- Martin Eckhardt
- natechicago
+ - Victor
+ - Andreas Allacher
- Alexis
- Sergei Gorjunov
- Jonathan Poston
@@ -2145,14 +2177,18 @@ The Symfony Connect username in parenthesis allows to get more information
- Matt Farmer
- catch
- aetxebeste
- - siganushka
- Alexandre Segura
+ - afaricamp
- Josef Cech
- Glodzienski
+ - riadh26
+ - Konstantinos Alexiou
- Andrii Boiko
- Harold Iedema
+ - WaiSkats
- Ikhsan Agustian
- Arnau González (arnaugm)
+ - Bahman Mehrdad (bahman)
- Simon Bouland (bouland)
- Jibé Barth (jibbarth)
- Matthew Foster (mfoster)
@@ -2208,6 +2244,7 @@ The Symfony Connect username in parenthesis allows to get more information
- nuncanada
- František Bereň
- Kamil Madejski
+ - G.R.Dalenoort
- Jeremiah VALERIE
- Mike Francis
- Vladimir Khramtsov (chrome)
@@ -2291,6 +2328,8 @@ The Symfony Connect username in parenthesis allows to get more information
- Aaron Somi
- kshida
- Michał Dąbrowski (defrag)
+ - Aryel Tupinamba (dfkimera)
+ - Hans Höchtl (hhoechtl)
- Simone Fumagalli (hpatoio)
- Brian Graham (incognito)
- Kevin Vergauwen (innocenzo)
@@ -2348,6 +2387,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Walther Lalk
- Adam
- Ivo
+ - Ismo Vuorinen
- Sören Bernstein
- devel
- taiiiraaa
@@ -2370,6 +2410,7 @@ The Symfony Connect username in parenthesis allows to get more information
- vlakoff
- bertillon
- thib92
+ - Yiorgos Kalligeros
- Rudolf Ratusiński
- Bertalan Attila
- Arek Bochinski
@@ -2436,24 +2477,32 @@ The Symfony Connect username in parenthesis allows to get more information
- Dan Ordille (dordille)
- Jan Eichhorn (exeu)
- Grégory Pelletier (ip512)
+ - Johan Wilfer (johanwilfer)
- John Nickell (jrnickell)
- Martin Mayer (martin)
- Grzegorz Łukaszewicz (newicz)
- Jonny Schmid (schmidjon)
+ - Toby Griffiths (tog)
- Götz Gottwald
+ - Alessandra Lai
- Veres Lajos
- Ernest Hymel
+ - Andrea Civita
- LoginovIlya
- Nick Chiu
- grifx
- Robert Campbell
- Matt Lehner
+ - Shakhobiddin
- Helmut Januschka
- Hein Zaw Htet™
- Ruben Kruiswijk
- Cosmin-Romeo TANASE
+ - Ana Raro
- Michael J
+ - youssef saoubou
- Joseph Maarek
+ - Ivan Sarastov
- Alexander Menk
- Alex Pods
- hadriengem
@@ -2475,23 +2524,26 @@ The Symfony Connect username in parenthesis allows to get more information
- Gerben Wijnja
- Emre YILMAZ
- Rowan Manning
+ - Marcos Labad
- Per Modin
- David Windell
- Frank Jogeleit
- Ondřej Frei
- Gabriel Birke
- - Daniel Tiringer
- skafandri
- Derek Bonner
- martijn
- Storkeus
- Alan Chen
- Anton Zagorskii
+ - ging-dev
+ - zakaria-amm
- insidestyles
- Maerlyn
- Even André Fiskvik
- Agata
- dakur
+ - florian-michael-mast
- Александр Ли
- Arjan Keeman
- Vlad Dumitrache
@@ -2524,7 +2576,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Daniel González Cerviño
- Rafał
- Ahmad El-Bardan (absahmad)
- - Achilles Kaloeridis (achilles)
- Adria Lopez (adlpz)
- Aaron Scherer (aequasi)
- Rosio (ben-rosio)
@@ -2550,6 +2601,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Javier Núñez Berrocoso (javiernuber)
- Jelle Bekker (jbekker)
- Jonathan Sui Lioung Lee Slew (jlslew)
+ - Johan Vlaar (johjohan)
- Giovanni Albero (johntree)
- Jorge Martin (jorgemartind)
- Joeri Verdeyen (jverdeyen)
@@ -2562,13 +2614,13 @@ The Symfony Connect username in parenthesis allows to get more information
- Michael Pohlers (mick_the_big)
- Misha Klomp (mishaklomp)
- mlpo (mlpo)
+ - Ulrik Nielsen (mrbase)
- Marek Šimeček (mssimi)
- Dmitriy Tkachenko (neka)
- Cayetano Soriano Gallego (neoshadybeat)
- Artem (nexim)
- Nicolas ASSING (nicolasassing)
- Olivier Laviale (olvlvl)
- - Petr Duda (petrduda)
- Pierre Gasté (pierre_g)
- Pablo Monterde Perez (plebs)
- Pierre-Olivier Vares (povares)
@@ -2579,6 +2631,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Wim Godden (wimg)
- Yorkie Chadwick (yorkie76)
- Maxime Aknin (3m1x4m)
+ - Geordie
- Exploit.cz
- GuillaumeVerdon
- Philipp Keck
@@ -2610,6 +2663,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Shrey Puranik
- Lars Moelleken
- dasmfm
+ - Claas Augner
- Mathias Geat
- Arnaud Buathier (arnapou)
- chesteroni (chesteroni)
@@ -2771,7 +2825,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Alex Nostadt
- Michael Squires
- Egor Gorbachev
- - Fabien Villepinte
- Derek Stephen McLean
- Norman Soetbeer
- zorn
@@ -2788,6 +2841,7 @@ The Symfony Connect username in parenthesis allows to get more information
- jspee
- Ilya Bulakh
- David Soria Parra
+ - Egor Taranov
- Sergiy Sokolenko
- detinkin
- Ahmed Abdulrahman
@@ -2801,6 +2855,7 @@ The Symfony Connect username in parenthesis allows to get more information
- DanSync
- Peter Zwosta
- parhs
+ - Harry Wiseman
- Diego Campoy
- TeLiXj
- Oncle Tom
@@ -2873,6 +2928,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Arash Tabriziyan (ghost098)
- Greg Szczotka (greg606)
- ibasaw (ibasaw)
+ - Nathan DIdier (icz)
- Vladislav Krupenkin (ideea)
- Ilija Tovilo (ilijatovilo)
- Peter Orosz (ill_logical)
diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php
index 179280b87b510..910f77a21e8ad 100644
--- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php
+++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php
@@ -94,11 +94,11 @@
};
if (\PHP_VERSION_ID >= 80000) {
- // PHP 8 requires PHPUnit 9.3+
- $PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '9.4') ?: '9.4';
+ // PHP 8 requires PHPUnit 9.3+, PHP 8.1 requires PHPUnit 9.5+
+ $PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '9.5') ?: '9.5';
} elseif (\PHP_VERSION_ID >= 70200) {
// PHPUnit 8 requires PHP 7.2+
- $PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '8.3') ?: '8.3';
+ $PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '8.5') ?: '8.5';
} elseif (\PHP_VERSION_ID >= 70100) {
// PHPUnit 7 requires PHP 7.1+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '7.5') ?: '7.5';
@@ -126,7 +126,7 @@
}
$oldPwd = getcwd();
-$PHPUNIT_DIR = $getEnvVar('SYMFONY_PHPUNIT_DIR', $root.'/vendor/bin/.phpunit');
+$PHPUNIT_DIR = rtrim($getEnvVar('SYMFONY_PHPUNIT_DIR', $root.'/vendor/bin/.phpunit'), '/'.\DIRECTORY_SEPARATOR);
$PHP = defined('PHP_BINARY') ? \PHP_BINARY : 'php';
$PHP = escapeshellarg($PHP);
if ('phpdbg' === \PHP_SAPI) {
@@ -238,6 +238,10 @@
$passthruOrFail("$COMPOSER config --unset platform.php");
}
if (file_exists($path = $root.'/vendor/symfony/phpunit-bridge')) {
+ $p = str_repeat('../', substr_count("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR", '/', strlen($root))).'vendor/symfony/phpunit-bridge';
+ if (realpath($p) === realpath($path)) {
+ $path = $p;
+ }
$passthruOrFail("$COMPOSER require --no-update symfony/phpunit-bridge \"*@dev\"");
$passthruOrFail("$COMPOSER config repositories.phpunit-bridge path ".escapeshellarg(str_replace('/', \DIRECTORY_SEPARATOR, $path)));
if ('\\' === \DIRECTORY_SEPARATOR) {
diff --git a/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php
index 72e03f9275ef7..cd96d2969b9ac 100644
--- a/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php
+++ b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php
@@ -158,9 +158,10 @@ public function invalidateTags(array $tags)
*/
public function hasItem($key)
{
- if ($this->deferred) {
+ if (\is_string($key) && isset($this->deferred[$key])) {
$this->commit();
}
+
if (!$this->pool->hasItem($key)) {
return false;
}
@@ -201,18 +202,21 @@ public function getItem($key)
*/
public function getItems(array $keys = [])
{
- if ($this->deferred) {
- $this->commit();
- }
$tagKeys = [];
+ $commit = false;
foreach ($keys as $key) {
if ('' !== $key && \is_string($key)) {
+ $commit = $commit || isset($this->deferred[$key]);
$key = static::TAGS_PREFIX.$key;
$tagKeys[$key] = $key;
}
}
+ if ($commit) {
+ $this->commit();
+ }
+
try {
$items = $this->pool->getItems($tagKeys + $keys);
} catch (InvalidArgumentException $e) {
diff --git a/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php b/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php
index 8ff715d2f54e4..388c1df303188 100644
--- a/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php
+++ b/src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php
@@ -39,10 +39,11 @@ trait AbstractAdapterTrait
*/
public function getItem($key)
{
- if ($this->deferred) {
+ $id = $this->getId($key);
+
+ if (isset($this->deferred[$key])) {
$this->commit();
}
- $id = $this->getId($key);
$f = $this->createCacheItem;
$isHit = false;
@@ -66,14 +67,18 @@ public function getItem($key)
*/
public function getItems(array $keys = [])
{
- if ($this->deferred) {
- $this->commit();
- }
$ids = [];
+ $commit = false;
foreach ($keys as $key) {
$ids[] = $this->getId($key);
+ $commit = $commit || isset($this->deferred[$key]);
}
+
+ if ($commit) {
+ $this->commit();
+ }
+
try {
$items = $this->doFetch($ids);
} catch (\Exception $e) {
diff --git a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php
index f86cb1c7a2244..b0c48d72a9797 100644
--- a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php
+++ b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php
@@ -255,7 +255,7 @@ protected function doSave(array $values, int $lifetime)
protected function doFetch(array $ids)
{
try {
- $encodedIds = array_map('self::encodeKey', $ids);
+ $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids);
$encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds));
@@ -284,7 +284,7 @@ protected function doHave($id)
protected function doDelete(array $ids)
{
$ok = true;
- $encodedIds = array_map('self::encodeKey', $ids);
+ $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids);
foreach ($this->checkResultCode($this->getClient()->deleteMulti($encodedIds)) as $result) {
if (\Memcached::RES_SUCCESS !== $result && \Memcached::RES_NOTFOUND !== $result) {
$ok = false;
diff --git a/src/Symfony/Component/Cache/Traits/PdoTrait.php b/src/Symfony/Component/Cache/Traits/PdoTrait.php
index 2f733a78e1307..5b0461409cfb5 100644
--- a/src/Symfony/Component/Cache/Traits/PdoTrait.php
+++ b/src/Symfony/Component/Cache/Traits/PdoTrait.php
@@ -150,7 +150,7 @@ public function createTable()
throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver));
}
- if (method_exists($conn, 'executeStatement')) {
+ if ($conn instanceof Connection && method_exists($conn, 'executeStatement')) {
$conn->executeStatement($sql);
} else {
$conn->exec($sql);
@@ -282,7 +282,7 @@ protected function doClear($namespace)
}
try {
- if (method_exists($conn, 'executeStatement')) {
+ if ($conn instanceof Connection && method_exists($conn, 'executeStatement')) {
$conn->executeStatement($sql);
} else {
$conn->exec($sql);
diff --git a/src/Symfony/Component/Config/Resource/GlobResource.php b/src/Symfony/Component/Config/Resource/GlobResource.php
index f9429eb8f9bd9..3657f6dcb9500 100644
--- a/src/Symfony/Component/Config/Resource/GlobResource.php
+++ b/src/Symfony/Component/Config/Resource/GlobResource.php
@@ -123,7 +123,7 @@ public function getIterator()
}
if (null !== $paths) {
- sort($paths);
+ natsort($paths);
foreach ($paths as $path) {
if ($this->excludedPrefixes) {
$normalizedPath = str_replace('\\', '/', $path);
@@ -156,7 +156,7 @@ function (\SplFileInfo $file, $path) {
),
\RecursiveIteratorIterator::LEAVES_ONLY
));
- uasort($files, 'strnatcmp');
+ uksort($files, 'strnatcmp');
foreach ($files as $path => $info) {
if ($info->isFile()) {
diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php
index 089de76bd63e0..0516545bc9bc7 100644
--- a/src/Symfony/Component/Console/Helper/QuestionHelper.php
+++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php
@@ -207,7 +207,7 @@ protected function formatChoiceQuestionChoices(ChoiceQuestion $question, $tag)
{
$messages = [];
- $maxWidth = max(array_map('self::strlen', array_keys($choices = $question->getChoices())));
+ $maxWidth = max(array_map([__CLASS__, 'strlen'], array_keys($choices = $question->getChoices())));
foreach ($choices as $key => $value) {
$padding = str_repeat(' ', $maxWidth - self::strlen($key));
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
index 470c638404411..c88143d114506 100644
--- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
+++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
@@ -34,6 +34,7 @@ class AutowirePass extends AbstractRecursivePass
private $decoratedClass;
private $decoratedId;
private $methodCalls;
+ private $defaultArgument;
private $getPreviousValue;
private $decoratedMethodIndex;
private $decoratedMethodArgumentIndex;
@@ -42,6 +43,10 @@ class AutowirePass extends AbstractRecursivePass
public function __construct(bool $throwOnAutowireException = true)
{
$this->throwOnAutowiringException = $throwOnAutowireException;
+ $this->defaultArgument = new class() {
+ public $value;
+ public $names;
+ };
}
/**
@@ -56,6 +61,7 @@ public function process(ContainerBuilder $container)
$this->decoratedClass = null;
$this->decoratedId = null;
$this->methodCalls = null;
+ $this->defaultArgument->names = null;
$this->getPreviousValue = null;
$this->decoratedMethodIndex = null;
$this->decoratedMethodArgumentIndex = null;
@@ -150,8 +156,9 @@ private function autowireCalls(\ReflectionClass $reflectionClass, bool $isRoot):
$this->decoratedClass = $this->container->findDefinition($this->decoratedId)->getClass();
}
+ $patchedIndexes = [];
+
foreach ($this->methodCalls as $i => $call) {
- $this->decoratedMethodIndex = $i;
[$method, $arguments] = $call;
if ($method instanceof \ReflectionFunctionAbstract) {
@@ -168,11 +175,37 @@ private function autowireCalls(\ReflectionClass $reflectionClass, bool $isRoot):
}
}
- $arguments = $this->autowireMethod($reflectionMethod, $arguments);
+ $arguments = $this->autowireMethod($reflectionMethod, $arguments, $i);
if ($arguments !== $call[1]) {
$this->methodCalls[$i][1] = $arguments;
+ $patchedIndexes[] = $i;
+ }
+ }
+
+ // use named arguments to skip complex default values
+ foreach ($patchedIndexes as $i) {
+ $namedArguments = null;
+ $arguments = $this->methodCalls[$i][1];
+
+ foreach ($arguments as $j => $value) {
+ if ($namedArguments && !$value instanceof $this->defaultArgument) {
+ unset($arguments[$j]);
+ $arguments[$namedArguments[$j]] = $value;
+ }
+ if ($namedArguments || !$value instanceof $this->defaultArgument) {
+ continue;
+ }
+
+ if (\PHP_VERSION_ID >= 80100 && (\is_array($value->value) ? $value->value : \is_object($value->value))) {
+ unset($arguments[$j]);
+ $namedArguments = $value->names;
+ } else {
+ $arguments[$j] = $value->value;
+ }
}
+
+ $this->methodCalls[$i][1] = $arguments;
}
return $this->methodCalls;
@@ -185,7 +218,7 @@ private function autowireCalls(\ReflectionClass $reflectionClass, bool $isRoot):
*
* @throws AutowiringFailedException
*/
- private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, array $arguments): array
+ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, array $arguments, int $methodIndex): array
{
$class = $reflectionMethod instanceof \ReflectionMethod ? $reflectionMethod->class : $this->currentId;
$method = $reflectionMethod->name;
@@ -193,8 +226,11 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
if ($reflectionMethod->isVariadic()) {
array_pop($parameters);
}
+ $this->defaultArgument->names = new \ArrayObject();
foreach ($parameters as $index => $parameter) {
+ $this->defaultArgument->names[$index] = $parameter->name;
+
if (\array_key_exists($index, $arguments) && '' !== $arguments[$index]) {
continue;
}
@@ -212,7 +248,8 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
// be false when isOptional() returns true. If the
// argument *is* optional, allow it to be missing
if ($parameter->isOptional()) {
- continue;
+ --$index;
+ break;
}
$type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, false);
$type = $type ? sprintf('is type-hinted "%s"', ltrim($type, '\\')) : 'has no type-hint';
@@ -221,7 +258,8 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
}
// specifically pass the default value
- $arguments[$index] = $parameter->getDefaultValue();
+ $arguments[$index] = clone $this->defaultArgument;
+ $arguments[$index]->value = $parameter->getDefaultValue();
continue;
}
@@ -231,7 +269,8 @@ 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 = $parameter->getDefaultValue();
+ $value = clone $this->defaultArgument;
+ $value->value = $parameter->getDefaultValue();
} elseif (!$parameter->allowsNull()) {
throw new AutowiringFailedException($this->currentId, $failureMessage);
}
@@ -252,6 +291,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
} else {
$arguments[$index] = new TypedReference($this->decoratedId, $this->decoratedClass);
$this->getPreviousValue = $getValue;
+ $this->decoratedMethodIndex = $methodIndex;
$this->decoratedMethodArgumentIndex = $index;
continue;
@@ -263,8 +303,7 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
if ($parameters && !isset($arguments[++$index])) {
while (0 <= --$index) {
- $parameter = $parameters[$index];
- if (!$parameter->isDefaultValueAvailable() || $parameter->getDefaultValue() !== $arguments[$index]) {
+ if (!$arguments[$index] instanceof $this->defaultArgument) {
break;
}
unset($arguments[$index]);
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php
index d289c05b15c09..557e6af628165 100644
--- a/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php
+++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php
@@ -39,7 +39,13 @@ protected function processValue($value, $isRoot = false)
}
$i = 0;
+ $hasNamedArgs = false;
foreach ($value->getArguments() as $k => $v) {
+ if (\PHP_VERSION_ID >= 80000 && preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $k)) {
+ $hasNamedArgs = true;
+ continue;
+ }
+
if ($k !== $i++) {
if (!\is_int($k)) {
$msg = sprintf('Invalid constructor argument for service "%s": integer expected but found string "%s". Check your service definition.', $this->currentId, $k);
@@ -57,11 +63,27 @@ protected function processValue($value, $isRoot = false)
throw new RuntimeException($msg);
}
}
+
+ if ($hasNamedArgs) {
+ $msg = sprintf('Invalid constructor argument for service "%s": cannot use positional argument after named argument. Check your service definition.', $this->currentId);
+ $value->addError($msg);
+ if ($this->throwExceptions) {
+ throw new RuntimeException($msg);
+ }
+
+ break;
+ }
}
foreach ($value->getMethodCalls() as $methodCall) {
$i = 0;
+ $hasNamedArgs = false;
foreach ($methodCall[1] as $k => $v) {
+ if (\PHP_VERSION_ID >= 80000 && preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $k)) {
+ $hasNamedArgs = true;
+ continue;
+ }
+
if ($k !== $i++) {
if (!\is_int($k)) {
$msg = sprintf('Invalid argument for method call "%s" of service "%s": integer expected but found string "%s". Check your service definition.', $methodCall[0], $this->currentId, $k);
@@ -79,6 +101,16 @@ protected function processValue($value, $isRoot = false)
throw new RuntimeException($msg);
}
}
+
+ if ($hasNamedArgs) {
+ $msg = sprintf('Invalid argument for method call "%s" of service "%s": cannot use positional argument after named argument. Check your service definition.', $methodCall[0], $this->currentId);
+ $value->addError($msg);
+ if ($this->throwExceptions) {
+ throw new RuntimeException($msg);
+ }
+
+ break;
+ }
}
}
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php
index 9a2ab4c6574db..5d832ef370ad1 100644
--- a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php
+++ b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php
@@ -124,7 +124,7 @@ public function process(ContainerBuilder $container)
protected function processValue($value, $isRoot = false)
{
if ($value instanceof ArgumentInterface) {
- // Reference found in ArgumentInterface::getValues() are not inlineable
+ // References found in ArgumentInterface::getValues() are not inlineable
return $value;
}
diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
index 4f89bb3fd68df..f76daf03aea5d 100644
--- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
+++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
@@ -714,8 +714,8 @@ private function addServiceMethodCalls(Definition $definition, string $variableN
$calls = '';
foreach ($definition->getMethodCalls() as $k => $call) {
$arguments = [];
- foreach ($call[1] as $value) {
- $arguments[] = $this->dumpValue($value);
+ foreach ($call[1] as $i => $value) {
+ $arguments[] = (\is_string($i) ? $i.': ' : '').$this->dumpValue($value);
}
$witherAssignation = '';
@@ -1080,8 +1080,8 @@ private function addNewInstance(Definition $definition, string $return = '', str
}
$arguments = [];
- foreach ($definition->getArguments() as $value) {
- $arguments[] = $this->dumpValue($value);
+ foreach ($definition->getArguments() as $i => $value) {
+ $arguments[] = (\is_string($i) ? $i.': ' : '').$this->dumpValue($value);
}
if (null !== $definition->getFactory()) {
diff --git a/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php b/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php
index adf9c311f3817..2268bad49c2ea 100644
--- a/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php
+++ b/src/Symfony/Component/DependencyInjection/EnvVarProcessor.php
@@ -255,10 +255,8 @@ public function getEnv($prefix, $name, \Closure $getEnv)
'fragment' => null,
];
- if (null !== $parsedEnv['path']) {
- // remove the '/' separator
- $parsedEnv['path'] = '/' === $parsedEnv['path'] ? null : substr($parsedEnv['path'], 1);
- }
+ // remove the '/' separator
+ $parsedEnv['path'] = '/' === ($parsedEnv['path'] ?? '/') ? '' : substr($parsedEnv['path'], 1);
return $parsedEnv;
}
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php
index 1253abb37ff80..322dcd2583fbe 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php
@@ -46,22 +46,22 @@ public function testProcess()
*/
public function testException(array $arguments, array $methodCalls)
{
- $this->expectException(RuntimeException::class);
$container = new ContainerBuilder();
$definition = $container->register('foo');
$definition->setArguments($arguments);
$definition->setMethodCalls($methodCalls);
$pass = new CheckArgumentsValidityPass();
+ $this->expectException(RuntimeException::class);
$pass->process($container);
}
public function definitionProvider()
{
return [
- [[null, 'a' => 'a'], []],
+ [['a' => 'a', null], []],
[[1 => 1], []],
- [[], [['baz', [null, 'a' => 'a']]]],
+ [[], [['baz', ['a' => 'a', null]]]],
[[], [['baz', [1 => 1]]]],
];
}
@@ -70,7 +70,7 @@ public function testNoException()
{
$container = new ContainerBuilder();
$definition = $container->register('foo');
- $definition->setArguments([null, 'a' => 'a']);
+ $definition->setArguments(['a' => 'a', null]);
$pass = new CheckArgumentsValidityPass(false);
$pass->process($container);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
index f11858fcf9dd3..61040d3255d28 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
@@ -42,6 +42,7 @@
use Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition;
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooClassWithEnumAttribute;
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooUnitEnum;
+use Symfony\Component\DependencyInjection\Tests\Fixtures\NewInInitializer;
use Symfony\Component\DependencyInjection\Tests\Fixtures\ScalarFactory;
use Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator;
use Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1;
@@ -1187,6 +1188,24 @@ public function testDumpHandlesObjectClassNames()
$this->assertInstanceOf(\stdClass::class, $container->get('bar'));
}
+ /**
+ * @requires PHP 8.1
+ */
+ public function testNewInInitializer()
+ {
+ $container = new ContainerBuilder();
+ $container
+ ->register('foo', NewInInitializer::class)
+ ->setPublic(true)
+ ->setAutowired(true)
+ ->setArguments(['$bar' => 234]);
+
+ $container->compile();
+
+ $dumper = new PhpDumper($container);
+ $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_new_in_initializer.php', $dumper->dump());
+ }
+
/**
* @requires PHP 8.1
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php b/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php
index 45a64e4f8e059..2ac933f47d167 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php
@@ -624,8 +624,8 @@ public function testGetEnvUrlPath(?string $expected, string $url)
public function provideGetEnvUrlPath()
{
return [
- [null, 'https://symfony.com'],
- [null, 'https://symfony.com/'],
+ ['', 'https://symfony.com'],
+ ['', 'https://symfony.com/'],
['/', 'https://symfony.com//'],
['blog', 'https://symfony.com/blog'],
['blog/', 'https://symfony.com/blog/'],
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/NewInInitializer.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/NewInInitializer.php
new file mode 100644
index 0000000000000..4309ab330bd9c
--- /dev/null
+++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/NewInInitializer.php
@@ -0,0 +1,10 @@
+services = $this->privates = [];
+ $this->methodMap = [
+ 'foo' => 'getFooService',
+ ];
+
+ $this->aliases = [];
+ }
+
+ public function compile(): void
+ {
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
+ }
+
+ public function isCompiled(): bool
+ {
+ return true;
+ }
+
+ public function getRemovedIds(): array
+ {
+ return [
+ 'Psr\\Container\\ContainerInterface' => true,
+ 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
+ ];
+ }
+
+ /**
+ * Gets the public 'foo' shared autowired service.
+ *
+ * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\NewInInitializer
+ */
+ protected function getFooService()
+ {
+ return $this->services['foo'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\NewInInitializer(bar: 234);
+ }
+}
diff --git a/src/Symfony/Component/Dotenv/Dotenv.php b/src/Symfony/Component/Dotenv/Dotenv.php
index 57128b4ec73f4..8180f4bfa10ba 100644
--- a/src/Symfony/Component/Dotenv/Dotenv.php
+++ b/src/Symfony/Component/Dotenv/Dotenv.php
@@ -136,8 +136,12 @@ public function populate(array $values, bool $overrideExistingVars = false): voi
foreach ($values as $name => $value) {
$notHttpName = 0 !== strpos($name, 'HTTP_');
+ if (isset($_SERVER[$name]) && $notHttpName && !isset($_ENV[$name])) {
+ $_ENV[$name] = $_SERVER[$name];
+ }
+
// don't check existence with getenv() because of thread safety issues
- if (!isset($loadedVars[$name]) && (!$overrideExistingVars && (isset($_ENV[$name]) || (isset($_SERVER[$name]) && $notHttpName)))) {
+ if (!isset($loadedVars[$name]) && !$overrideExistingVars && isset($_ENV[$name])) {
continue;
}
diff --git a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php
index 3df51a5392e68..62494e4c07076 100644
--- a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php
+++ b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php
@@ -226,63 +226,71 @@ public function testLoad()
public function testLoadEnv()
{
- unset($_ENV['FOO']);
- unset($_ENV['BAR']);
- unset($_SERVER['FOO']);
- unset($_SERVER['BAR']);
- putenv('FOO');
- putenv('BAR');
+ $resetContext = static function (): void {
+ unset($_ENV['SYMFONY_DOTENV_VARS']);
+ unset($_ENV['FOO']);
+ unset($_ENV['TEST_APP_ENV']);
+ unset($_SERVER['SYMFONY_DOTENV_VARS']);
+ unset($_SERVER['FOO']);
+ unset($_SERVER['TEST_APP_ENV']);
+ putenv('SYMFONY_DOTENV_VARS');
+ putenv('FOO');
+ putenv('TEST_APP_ENV');
+ };
@mkdir($tmpdir = sys_get_temp_dir().'/dotenv');
$path = tempnam($tmpdir, 'sf-');
// .env
-
file_put_contents($path, 'FOO=BAR');
+
+ $resetContext();
(new Dotenv(true))->loadEnv($path, 'TEST_APP_ENV');
$this->assertSame('BAR', getenv('FOO'));
$this->assertSame('dev', getenv('TEST_APP_ENV'));
// .env.local
+ file_put_contents("$path.local", 'FOO=localBAR');
+ $resetContext();
$_SERVER['TEST_APP_ENV'] = 'local';
- file_put_contents("$path.local", 'FOO=localBAR');
(new Dotenv(true))->loadEnv($path, 'TEST_APP_ENV');
$this->assertSame('localBAR', getenv('FOO'));
// special case for test
-
+ $resetContext();
$_SERVER['TEST_APP_ENV'] = 'test';
(new Dotenv(true))->loadEnv($path, 'TEST_APP_ENV');
$this->assertSame('BAR', getenv('FOO'));
// .env.dev
-
- unset($_SERVER['TEST_APP_ENV']);
file_put_contents("$path.dev", 'FOO=devBAR');
+
+ $resetContext();
(new Dotenv(true))->loadEnv($path, 'TEST_APP_ENV');
$this->assertSame('devBAR', getenv('FOO'));
// .env.dev.local
-
file_put_contents("$path.dev.local", 'FOO=devlocalBAR');
+
+ $resetContext();
(new Dotenv(true))->loadEnv($path, 'TEST_APP_ENV');
$this->assertSame('devlocalBAR', getenv('FOO'));
+ unlink("$path.local");
+ unlink("$path.dev");
+ unlink("$path.dev.local");
// .env.dist
+ file_put_contents("$path.dist", 'FOO=distBAR');
+ $resetContext();
unlink($path);
- file_put_contents("$path.dist", 'BAR=distBAR');
(new Dotenv(true))->loadEnv($path, 'TEST_APP_ENV');
- $this->assertSame('distBAR', getenv('BAR'));
-
- putenv('FOO');
- putenv('BAR');
+ $this->assertSame('distBAR', getenv('FOO'));
unlink("$path.dist");
- unlink("$path.local");
- unlink("$path.dev");
- unlink("$path.dev.local");
+
+ $resetContext();
rmdir($tmpdir);
}
@@ -485,4 +493,14 @@ public function testDoNotUsePutenv()
$this->assertSame('no', $_ENV['TEST_USE_PUTENV']);
$this->assertFalse(getenv('TEST_USE_PUTENV'));
}
+
+ public function testSERVERVarsDuplicationInENV()
+ {
+ unset($_ENV['SYMFONY_DOTENV_VARS'], $_SERVER['SYMFONY_DOTENV_VARS'], $_ENV['FOO']);
+ $_SERVER['FOO'] = 'CCC';
+
+ (new Dotenv(false))->populate(['FOO' => 'BAR']);
+
+ $this->assertSame('CCC', $_ENV['FOO']);
+ }
}
diff --git a/src/Symfony/Component/Form/Resources/translations/validators.bs.xlf b/src/Symfony/Component/Form/Resources/translations/validators.bs.xlf
index 259b05f842995..319f91544d50c 100644
--- a/src/Symfony/Component/Form/Resources/translations/validators.bs.xlf
+++ b/src/Symfony/Component/Form/Resources/translations/validators.bs.xlf
@@ -16,7 +16,7 @@