diff --git a/.appveyor.yml b/.appveyor.yml
index 66409a9c4e34b..35847e4fc3727 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -12,7 +12,7 @@ init:
- SET SYMFONY_DEPRECATIONS_HELPER=strict
- SET ANSICON=121x90 (121x90)
- SET SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1
- - SET SYMFONY_DEPRECATIONS_HELPER=max[indirect]=170
+ - SET SYMFONY_DEPRECATIONS_HELPER=max[direct]=1
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
install:
@@ -48,12 +48,10 @@ install:
- IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/2.0.0/composer.phar)
- php composer.phar self-update --2
- copy /Y .github\composer-config.json %APPDATA%\Composer\config.json
- - php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex
- git config --global user.email ""
- git config --global user.name "Symfony"
- FOR /F "tokens=* USEBACKQ" %%F IN (`bash -c "grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -o '[0-9][0-9]*\.[0-9]'"`) DO (SET SYMFONY_VERSION=%%F)
- php .github/build-packages.php HEAD^ %SYMFONY_VERSION% src\Symfony\Bridge\PhpUnit
- - SET "SYMFONY_REQUIRE=>=%SYMFONY_VERSION%"
- SET COMPOSER_ROOT_VERSION=%SYMFONY_VERSION%.x-dev
- php composer.phar update --no-progress --ansi
- php phpunit install
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 0820ae8d918b3..c4559a084a466 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -157,6 +157,7 @@ jobs:
- name: Run tests
run: ./phpunit --group integration -v
env:
+ SYMFONY_DEPRECATIONS_HELPER: max[direct]=1 # to be removed once DbalLogger is compatible with dbal 3.2+
REDIS_HOST: localhost
REDIS_CLUSTER_HOSTS: 'localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'
REDIS_SENTINEL_HOSTS: 'localhost:26379'
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index c60d92ba61cce..685d08e1b1d9d 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -63,6 +63,7 @@ jobs:
echo COLUMNS=120 >> $GITHUB_ENV
echo PHPUNIT="$(readlink -f ./phpunit) --exclude-group tty,benchmark,intl-data" >> $GITHUB_ENV
echo COMPOSER_UP='composer update --no-progress --ansi' >> $GITHUB_ENV
+ echo SYMFONY_DEPRECATIONS_HELPER=max[direct]=1 >> $GITHUB_ENV # to be removed once DbalLogger is compatible with dbal 3.2+
SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V)
SYMFONY_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -P -o '[0-9]+\.[0-9]+')
diff --git a/CHANGELOG-5.3.md b/CHANGELOG-5.3.md
index dff9252ddcf24..f73800bc11f80 100644
--- a/CHANGELOG-5.3.md
+++ b/CHANGELOG-5.3.md
@@ -7,6 +7,48 @@ in 5.3 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v5.3.0...v5.3.1
+* 5.3.11 (2021-11-22)
+
+ * bug #44188 [VarExporter] fix exporting declared but unset properties when __sleep() is implemented (nicolas-grekas)
+ * bug #44176 [Console] Default ansi option to null (jderusse)
+ * bug #44119 [HttpClient][Mime] Add correct IDN flags for IDNA2008 compliance (j-bernard)
+ * bug #44131 [Yaml] properly parse quoted strings tagged with !!str (xabbuh)
+ * bug #42323 [TwigBridge] do not merge label classes into expanded choice labels (xabbuh)
+ * bug #44110 [FrameworkBundle] Fix default PHP attributes support in validation and serializer configuration when doctrine/annotations is not installed with PHP 8 (fancyweb)
+ * bug #44121 [Serializer] fix support for lazy properties (nicolas-grekas)
+ * bug #44108 [FrameworkBundle][Messenger] remove `FlattenExceptionNormalizer` definition if serializer not available (kbond)
+ * bug #44111 [Serializer] fix support for unset properties on PHP < 7.4 (nicolas-grekas)
+ * bug #44070 [Process] intersect with getenv() to populate default envs (nicolas-grekas)
+ * bug #43990 [Translation] [Loco] Generate id parameter instead of letting Loco do it (welcoMattic)
+ * bug #44043 [Cache] fix dbindex Redis (a1812)
+ * bug #44050 [Notifier] Fix package names (fabpot)
+ * bug #44042 Fix DateIntervalToStringTransformer::transform() doc (BenMorel)
+ * bug #44034 [Yaml] don't try to replace references in quoted strings (xabbuh)
+ * bug #44028 [ErrorHandler] Fix FlattenException::setPrevious argument typing (welcoMattic)
+ * bug #44012 [DependencyInjection] fix inlining when non-shared services are involved (nicolas-grekas)
+ * bug #44002 [Cache] Fix Memory leak (a1812)
+ * bug #43981 [FrameworkBundle] fix registering late resettable services (nicolas-grekas)
+ * bug #43988 [DoctrineBridge] add support for the JSON type (dunglas)
+ * bug #43987 [PhpUnitBridge] Fix Uncaught ValueError (dunglas)
+ * bug #43961 [HttpClient] Curl http client has to reinit curl multi handle on reset (rmikalkenas)
+ * bug #43948 [Asset][Security] Fixed leftover deprecations PHP 8.1 (michaljusiega)
+ * bug #43945 [Runtime] fix defining APP_DEBUG when Dotenv is not enabled (nicolas-grekas)
+ * bug #43922 [DependencyInjection] only allow `ReflectionNamedType` for `ServiceSubscriberTrait` (kbond)
+ * bug #43814 [Intl] Update the ICU data to 70.1 - 5.3 (jderusse)
+ * bug #43915 [Messenger] Fix tests (jderusse)
+ * bug #43901 [SecurityBundle] Default access_decision_manager.strategy option with merge (biozshock)
+ * bug #43909 [VarExporter] escape unicode chars involved in directionality (nicolas-grekas)
+ * bug #43900 [Security] Fix TypeError message in ChainUserProvider (derrabus)
+ * bug #43884 [Console] Runtime conflict for psr/log >= 3.0 instead of composer conflict (fancyweb)
+ * bug #43867 [VarDumper] Make dumping DateInterval instances timezone-independent (derrabus)
+ * bug #43096 [Messenger] Use `TransportMessageIdStamp` in `InMemoryTransport` allows retrying (alexndlm)
+ * bug #42168 [RateLimiter] Fix wait duration for fixed window policy (jlekowski)
+ * bug #43501 [HttpKernel] fix ErrorException in CacheWarmerAggregate (Ahummeling)
+ * bug #42361 [Translation] correctly handle intl domains with TargetOperation (acran)
+ * bug #43833 [Runtime] Consider also $_ENV when resolving APP_RUNTIME and APP_RUNTIME_OPTIONS (Peter Simoncic)
+ * bug #43834 [Inflector] Fix inflector for "zombies" (acodispo)
+ * bug #43267 [Config] Fix signature generation with nested attributes on PHP 8.1 (agustingomes)
+
* 5.3.10 (2021-10-29)
* bug #43798 [Dotenv] Duplicate $_SERVER values in $_ENV if they don't exist (fancyweb)
diff --git a/CHANGELOG-5.4.md b/CHANGELOG-5.4.md
index 22eace057214e..98ea5ab9c9e74 100644
--- a/CHANGELOG-5.4.md
+++ b/CHANGELOG-5.4.md
@@ -7,6 +7,25 @@ in 5.4 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v5.4.0...v5.4.1
+* 5.4.0-RC1 (2021-11-24)
+
+ * security #cve-2021-41268 [SecurityBundle] Default signature_properties to the previous behavior (wouterj)
+ * security #cve-2021-41267 [HttpKernel] Fix missing extra trusted header in sub-request (jderusse)
+ * security #cve-2021-41270 [Serializer] Use single quote to escape formulas (jderusse)
+ * bug #44230 [Console] Add Suggestion class for more advanced completion suggestion (wouterj)
+ * bug #44232 [Cache] fix connecting to local Redis sockets (nicolas-grekas)
+ * bug #44204 [HttpClient] fix closing curl multi handle when destructing client (nicolas-grekas)
+ * bug #44208 [Process] exclude argv/argc from possible default env vars (nicolas-grekas)
+ * bug #44188 [VarExporter] fix exporting declared but unset properties when __sleep() is implemented (nicolas-grekas)
+ * bug #44176 [Console] Default ansi option to null (jderusse)
+ * bug #44179 [WebProfilerBundle] Fix JS error when toolbar is reloaded (jderusse)
+ * bug #44172 [Security] Guard is incompatible with Symfony 6 (derrabus)
+ * bug #44119 [HttpClient][Mime] Add correct IDN flags for IDNA2008 compliance (j-bernard)
+ * bug #44139 [WebProfilerBundle] Prevent installation of incompatible mailer component versions (Anne-Julia Seitz)
+ * bug #43917 Allow autodetecting mapping type for any object (franmomu)
+ * bug #44131 [Yaml] properly parse quoted strings tagged with !!str (xabbuh)
+ * bug #42323 [TwigBridge] do not merge label classes into expanded choice labels (xabbuh)
+
* 5.4.0-BETA3 (2021-11-18)
* feature #44125 Add a setter on DateTimeNormalizer to change the default context at runtime (Seldaek)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 1ac10f641e698..92b9b528b9c50 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -20,9 +20,9 @@ The Symfony Connect username in parenthesis allows to get more information
- Jordi Boggiano (seldaek)
- Victor Berchet (victor)
- Javier Eguiluz (javier.eguiluz)
+ - Thomas Calvet (fancyweb)
- Ryan Weaver (weaverryan)
- Roland Franssen (ro0)
- - Thomas Calvet (fancyweb)
- Jakub Zalas (jakubzalas)
- Johannes S (johannes)
- Kris Wallsmith (kriswallsmith)
@@ -46,20 +46,21 @@ The Symfony Connect username in parenthesis allows to get more information
- Jan Schädlich (jschaedl)
- Igor Wiedler (igorw)
- Eriksen Costa (eriksencosta)
+ - Kevin Bond (kbond)
- Ener-Getick (energetick)
- Sarah Khalil (saro0h)
- - Kevin Bond (kbond)
- Pierre du Plessis (pierredup)
+ - Vasilij Duško (staff)
- Valentin Udaltsov (vudaltsov)
- Iltar van der Berg (kjarli)
- Jonathan Wage (jwage)
- - Vasilij Duško (staff)
- Matthias Pigulla (mpdude)
- Diego Saint Esteben (dosten)
- Grégoire Paris (greg0ire)
- Alexandre Salomé (alexandresalome)
- William Durand (couac)
- ornicar
+ - Jérôme Tamarelle (gromnan)
- Konstantin Myakshin (koc)
- Dany Maillard (maidmaid)
- Francis Besset (francisbesset)
@@ -68,13 +69,12 @@ 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)
+ - Gábor Egyed (1ed)
- gadelat (gadelat)
- Saša Stamenković (umpirsky)
- Peter Rehm (rpet)
- - Gábor Egyed (1ed)
- Henrik Bjørnskov (henrikbjorn)
- Miha Vrhovnik
- Diego Saint Esteben (dii3g0)
@@ -82,10 +82,10 @@ The Symfony Connect username in parenthesis allows to get more information
- Konstantin Kudryashov (everzet)
- Vladimir Reznichenko (kalessil)
- Bilal Amarni (bamarni)
+ - Antoine M (amakdessi)
- Florin Patan (florinpatan)
- Jáchym Toušek (enumag)
- Alex Pott
- - Antoine M (amakdessi)
- Michel Weimerskirch (mweimerskirch)
- Andrej Hudec (pulzarraider)
- Christian Raue
@@ -112,24 +112,25 @@ The Symfony Connect username in parenthesis allows to get more information
- Toni Uebernickel (havvg)
- Bart van den Burg (burgov)
- Jordan Alliot (jalliot)
+ - Mathieu Santostefano (welcomattic)
- John Wards (johnwards)
- Tomas Norkūnas (norkunas)
- Baptiste Clavié (talus)
- Antoine Hérault (herzult)
- Paráda József (paradajozsef)
+ - Alexandre Daubois (alexandre-daubois)
- Vincent Langlet (deviling)
+ - HypeMC (hypemc)
- Massimiliano Arione (garak)
- Arnaud Le Blanc (arnaud-lb)
- Przemysław Bogusz (przemyslaw-bogusz)
+ - Julien Falque (julienfalque)
- Maxime STEINHAUSSER
- Michal Piotrowski (eventhorizon)
- Tomáš Votruba (tomas_votruba)
- 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)
@@ -144,7 +145,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Adrien Brault (adrienbrault)
- Yanick Witschi (toflar)
- Jacob Dreesen (jdreesen)
- - Mathieu Santostefano (welcomattic)
- Malte Schlüter (maltemaltesich)
- Joel Wurtz (brouznouf)
- Théo FIDRY (theofidry)
@@ -168,6 +168,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Gary PEGEOT (gary-p)
- Matthieu Napoli (mnapoli)
- Ruud Kamphuis (ruudk)
+ - Ion Bazan (ionbazan)
- Jannik Zschiesche (apfelbox)
- Robert Schönthal (digitalkaoz)
- Florian Lonqueu-Brochard (florianlb)
@@ -186,7 +187,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Hidenori Goto (hidenorigoto)
- Jan Rosier (rosier)
- Alessandro Chitolina (alekitto)
- - Ion Bazan (ionbazan)
- Albert Casademont (acasademont)
- Arnaud Kleinpeter (nanocom)
- Guilherme Blanco (guilhermeblanco)
@@ -202,6 +202,8 @@ The Symfony Connect username in parenthesis allows to get more information
- George Mponos (gmponos)
- jwdeitch
- Jeroen Spee (jeroens)
+ - Jérôme Parmentier (lctrs)
+ - Marco Pivetta (ocramius)
- Fabien Bourigault (fbourigault)
- Joe Bennett (kralos)
- Mikael Pajunen
@@ -216,16 +218,16 @@ The Symfony Connect username in parenthesis allows to get more information
- Thomas Rabaix (rande)
- Chi-teck
- Timo Bakx (timobakx)
- - Marco Pivetta (ocramius)
- Vincent Touzet (vincenttouzet)
- Nate Wiebe (natewiebe13)
- Rouven Weßling (realityking)
- - Jérôme Parmentier (lctrs)
+ - Michael Babker (mbabker)
- Ben Davies (bendavies)
- Clemens Tolboom
- Helmer Aaviksoo
- Christopher Hertel (chertel)
- Remon van de Kamp (rpkamp)
+ - Rokas Mikalkėnas (rokasm)
- Filippo Tessarotto (slamdunk)
- Hiromi Hishida (77web)
- Michael Käfer (michael_kaefer)
@@ -233,6 +235,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Michał Pipa (michal.pipa)
- Dawid Nowak
- Andreas Möller (localheinz)
+ - Roman Martinuk (a2a4)
- Amal Raghav (kertz)
- Jonathan Ingram (jonathaningram)
- Artur Kotyrba
@@ -241,8 +244,9 @@ The Symfony Connect username in parenthesis allows to get more information
- Samuel NELA (snela)
- David Prévot
- Hugo Monteiro (monteiro)
+ - Baptiste Leduc (korbeil)
- Dmitrii Poddubnyi (karser)
- - Michael Babker (mbabker)
+ - zairig imad (zairigimad)
- Tien Vo (tienvx)
- Timothée Barray (tyx)
- James Halsall (jaitsu)
@@ -270,11 +274,9 @@ The Symfony Connect username in parenthesis allows to get more information
- Philippe Segatori
- Thibaut Cheymol (tcheymol)
- Sebastien Morel (plopix)
- - Baptiste Leduc (korbeil)
- mcfedr (mcfedr)
- Ruben Gonzalez (rubenrua)
- Benjamin Dulau (dbenjamin)
- - zairig imad (zairigimad)
- Baptiste Lafontaine (magnetik)
- Mathieu Lemoine (lemoinem)
- Denis Brumann (dbrumann)
@@ -287,13 +289,11 @@ The Symfony Connect username in parenthesis allows to get more information
- Stadly
- Stepan Anchugov (kix)
- François Pluchino (francoispluchino)
- - Rokas Mikalkėnas (rokasm)
- bronze1man
- sun (sun)
- Larry Garfield (crell)
- Edi Modrić (emodric)
- Gocha Ossinkine (ossinkine)
- - Roman Martinuk (a2a4)
- Leo Feyer (leofeyer)
- Nikolay Labinskiy (e-moe)
- Martin Schuhfuß (usefulthink)
@@ -317,6 +317,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Dustin Whittle (dustinwhittle)
- jeff
- John Kary (johnkary)
+ - fd6130 (fdtvui)
- Justin Hileman (bobthecow)
- Blanchon Vincent (blanchonvincent)
- Maciej Malarz (malarzm)
@@ -330,6 +331,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Bastien Jaillot (bastnic)
- Rui Marinho (ruimarinho)
- Patrick Landolt (scube)
+ - Michał (bambucha15)
- Eugene Wissner
- Bohan Yang (brentybh)
- Pascal Montoya
@@ -362,7 +364,6 @@ 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)
@@ -375,9 +376,9 @@ The Symfony Connect username in parenthesis allows to get more information
- Xavier Perez
- Arjen Brouwer (arjenjb)
- Katsuhiro OGAWA
+ - Sylvain Fabre (sylfabre)
- Patrick McDougle (patrick-mcdougle)
- Marc Weistroff (futurecat)
- - Michał (bambucha15)
- Alif Rachmawadi
- Anton Chernikov (anton_ch1989)
- Kristen Gilden (kgilden)
@@ -387,6 +388,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Sullivan SENECHAL (soullivaneuh)
- Thomas Bisignani (toma)
- Uwe Jäger (uwej711)
+ - Dāvis Zālītis (k0d3r1s)
- Eugene Leonovich (rybakit)
- Joseph Rouff (rouffj)
- Félix Labrecque (woodspire)
@@ -395,11 +397,13 @@ The Symfony Connect username in parenthesis allows to get more information
- Jan Sorgalla (jsor)
- Ray
- Chekote
+ - Aleksandar Jakovljevic (ajakov)
- Thomas Adam
- Jhonny Lidfors (jhonne)
- Diego Agulló (aeoris)
- jdhoek
- Thomas Landauer (thomas-landauer)
+ - Jurica Vlahoviček (vjurica)
- Bob den Otter (bopp)
- Thomas Schulz (king2500)
- Frank de Jonge (frenkynet)
@@ -412,6 +416,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Dmitriy Mamontov (mamontovdmitriy)
- Ben Ramsey (ramsey)
- Laurent Masforné (heisenberg)
+ - Sergey (upyx)
- Giorgio Premi
- Guillaume (guill)
- renanbr
@@ -434,7 +439,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Soner Sayakci
- Peter Kruithof (pkruithof)
- Michael Holm (hollo)
- - Sylvain Fabre (sylfabre)
- Arjen van der Meijden
- Markus Fasselt (digilist)
- Damien Alexandre (damienalexandre)
@@ -452,7 +456,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Chris Smith (cs278)
- Florian Klein (docteurklein)
- W0rma
- - Dāvis Zālītis (k0d3r1s)
- Manuel Kiessling (manuelkiessling)
- Dimitri Gritsajuk (ottaviano)
- Alexey Kopytko (sanmai)
@@ -497,6 +500,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Berny Cantos (xphere81)
- Andrii Bodnar
- Thierry Thuon (lepiaf)
+ - Antonio Jose Cerezo (ajcerezo)
- Ricard Clau (ricardclau)
- Mark Challoner (markchalloner)
- Loïc Frémont (loic425)
@@ -507,9 +511,9 @@ The Symfony Connect username in parenthesis allows to get more information
- Tri Pham (phamuyentri)
- Urinbayev Shakhobiddin (shokhaa)
- Gennady Telegin (gtelegin)
- - Sergey (upyx)
- Krystian Marcisz (simivar)
- Toni Rudolf (toooni)
+ - Dalibor Karlović (dkarlovi)
- Erin Millard
- Artur Melo (restless)
- Matthew Lewinski (lewinski)
@@ -526,10 +530,12 @@ The Symfony Connect username in parenthesis allows to get more information
- Tobias Sjösten (tobiassjosten)
- Gyula Sallai (salla)
- Benjamin Cremer (bcremer)
+ - Hendrik Luup (hluup)
- Inal DJAFAR (inalgnu)
- Christian Gärtner (dagardner)
- Dmytro Borysovskyi (dmytr0)
- Tomasz Kowalczyk (thunderer)
+ - Artem Lopata
- Artur Eshenbrener
- Thomas Perez (scullwm)
- Yoann RENARD (yrenard)
@@ -585,7 +591,6 @@ 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
@@ -611,7 +616,6 @@ The Symfony Connect username in parenthesis allows to get more information
- 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)
@@ -630,7 +634,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Alexandru Furculita (afurculita)
- Valentin Jonovs (valentins-jonovs)
- Bastien DURAND (deamon)
- - Antonio Jose Cerezo (ajcerezo)
- Jeanmonod David (jeanmonod)
- Christin Gruber (christingruber)
- Andrey Sevastianov
@@ -640,11 +643,11 @@ The Symfony Connect username in parenthesis allows to get more information
- Noémi Salaün (noemi-salaun)
- Niklas Fiekas
- Philippe Segatori
- - Dalibor Karlović (dkarlovi)
- Markus Bachmann (baachi)
- Kévin THERAGE (kevin_therage)
- Michel Hunziker
- Gunnstein Lye (glye)
+ - scyzoryck
- Matthias Krauser (mkrauser)
- Erkhembayar Gantulga (erheme318)
- Lorenzo Millucci (lmillucci)
@@ -665,14 +668,12 @@ 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)
- Martijn Cuppens
- Vlad Gregurco (vgregurco)
- Boris Vujicic (boris.vujicic)
- - Artem Lopata
- Chris Sedlmayr (catchamonkey)
- Indra Gunawan (indragunawan)
- Mathias STRASSER (roukmoute)
@@ -703,6 +704,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Lukáš Holeczy (holicz)
- Erik Saunier (snickers)
- franek (franek)
+ - Jerzy (jlekowski)
- Raulnet
- Christian Wahler
- Dries Vints
@@ -770,6 +772,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Alex Bacart
- mcben
- Jérôme Vieilledent (lolautruche)
+ - Roman Anasal
- Maks Slesarenko
- Filip Procházka (fprochazka)
- mmoreram
@@ -808,6 +811,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Tom Klingenberg
- Gábor Fási
- DUPUCH (bdupuch)
+ - Dadang NH (dadangnh)
- Nate (frickenate)
- Joachim Løvgaard (loevgaard)
- Stefan Kruppa
@@ -832,8 +836,10 @@ The Symfony Connect username in parenthesis allows to get more information
- Samuele Lilli (doncallisto)
- Gawain Lynch (gawain)
- Peter Bowyer (pbowyer)
+ - Wojciech Kania
- mmokhi
- NothingWeAre
+ - Andrii Dembitskyi
- Ryan
- Lctrs
- Alexander Deruwe (aderuwe)
@@ -857,6 +863,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Johnny Robeson (johnny)
- Disquedur
- Michiel Boeckaert (milio)
+ - Benjamin Morel
- Dmitriy Derepko
- Geoffrey Tran (geoff)
- Pablo Lozano (arkadis)
@@ -992,7 +999,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Timothée BARRAY
- Nilmar Sanchez Muguercia
- Ivo Bathke (ivoba)
- - scyzoryck
- Ippei SUmida (ippey_s)
- David Molineus
- Strate
@@ -1010,6 +1016,7 @@ The Symfony Connect username in parenthesis allows to get more information
- rtek
- Benjamin Dos Santos
- Jérémy Jarrié (gagnar)
+ - Adrien Jourdier
- Tomas Javaisis
- Ivan Grigoriev
- Johann Saunier (prophet777)
@@ -1019,6 +1026,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Michael Devery (mickadoo)
- Antoine Corcy
- Ahmed Ashraf (ahmedash95)
+ - Gert Wijnalda (cinamo)
- Luca Saba (lucasaba)
- maxime.perrimond
- Sascha Grossenbacher
@@ -1090,7 +1098,6 @@ 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
@@ -1240,6 +1247,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Jake (jakesoft)
- Flinsch
- Quentin Dreyer
+ - Bahman Mehrdad (bahman)
- Jordan de Laune (jdelaune)
- Christopher Hall (mythmakr)
- none (nelexa)
@@ -1251,6 +1259,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Martin Parsiegla (spea)
- Bernhard Rusch
- bhavin (bhavin4u)
+ - Mario Ramundo (rammar)
- Ivan
- Quentin Schuler
- Nico Haase
@@ -1259,6 +1268,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Sofiane HADDAG (sofhad)
- frost-nzcr4
- Taylor Otwell
+ - Shahriar56
- Sami Mussbach
- Dhananjay Goratela
- Kien Nguyen
@@ -1268,17 +1278,18 @@ The Symfony Connect username in parenthesis allows to get more information
- Achilles Kaloeridis (achilles)
- Adrien Wilmet (adrienfr)
- Laurent Bassin (lbassin)
+ - Mouad ZIANI (mouadziani)
- Tomasz Ignatiuk
- andrey1s
- Abhoryo
- Fabian Vogler (fabian)
+ - Shakhobiddin
- Korvin Szanto
- Stéphan Kochen
- Steven Dubois
- Arjan Keeman
- siganushka
- Alaattin Kahramanlar (alaattin)
- - Dadang NH (dadangnh)
- Sergey Zolotov (enleur)
- Maksim Kotlyar (makasim)
- Neil Ferreira
@@ -1287,6 +1298,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Paul LE CORRE
- Loïc Beurlet
- Sébastien COURJEAN
+ - Ana Raro
- Daniel Gorgan
- Ana Raro
- Tony Malzhacker
@@ -1295,9 +1307,9 @@ The Symfony Connect username in parenthesis allows to get more information
- Cyril Quintin (cyqui)
- Cyrille Bourgois (cyrilleb)
- Gerard van Helden (drm)
+ - Ivan Sarastov (isarastov)
- Johnny Peck (johnnypeck)
- Jordi Sala Morales (jsala)
- - Roman Anasal
- Ivan Menshykov
- David Romaní
- Patrick Allaert
@@ -1305,7 +1317,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Matt Robinson (inanimatt)
- Aleksey Podskrebyshev
- Calin Mihai Pristavu
- - Andrii Dembitskyi
- David Marín Carreño (davefx)
- Fabien LUCAS (flucas2)
- Ondrej Machulda (ondram)
@@ -1328,6 +1339,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Derek ROTH
- Ben Johnson
- mweimerskirch
+ - Andrew Codispoti
- Benjamin Franzke
- baron (bastien)
- Dmytro Boiko (eagle)
@@ -1379,7 +1391,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Matthew Davis (mdavis1982)
- Paulo Ribeiro (paulo)
- Markus S. (staabm)
- - Benjamin Morel
- Maks
- Knallcharge
- Antoine LA
@@ -1467,6 +1478,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Mahmoud Mostafa (mahmoud)
- Fractal Zombie
- Ahmed Abdou
+ - Khoo Yong Jun
- shreyadenny
- Daniel Iwaniec
- Pieter
@@ -1500,6 +1512,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Amirreza Shafaat (amirrezashafaat)
- Adoni Pavlakis (adoni)
- Nicolas Le Goff (nlegoff)
+ - Alex Hofbauer (alexhofbauer)
- Maarten Nusteling (nusje2000)
- Ahmed EBEN HASSINE (famas23)
- Ben Oman
@@ -1777,6 +1790,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Jorge Vahldick (jvahldick)
- Frederic Godfrin
- Paul Matthews
+ - aim8604
- Jakub Kisielewski
- Vacheslav Silyutin
- Aleksandr Dankovtsev
@@ -1831,6 +1845,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Rubén Calvo (rubencm)
- Abdul.Mohsen B. A. A
- Swen van Zanten
+ - Agustin Gomes
- Benoît Burnichon
- pthompson
- Malaney J. Hill
@@ -1845,6 +1860,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Sebastian Göttschkes (sgoettschkes)
- Tatsuya Tsuruoka
- Ross Tuck
+ - Oleksiy (alexndlm)
- Kévin Gomez (kevin)
- Mihai Nica (redecs)
- Andrei Igna
@@ -1935,7 +1951,9 @@ The Symfony Connect username in parenthesis allows to get more information
- Lance McNearney
- Volodymyr Kupriienko (greeflas)
- Serhiy Lunak (slunak)
+ - Wojciech Błoszyk (wbloszyk)
- Giorgio Premi
+ - abunch
- Sergey Belyshkin
- tamcy
- Mikko Pesari
@@ -1958,6 +1976,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Foxprodev
- Max Summe
- WedgeSama
+ - Dale.Nash
- Felds Liscia
- Chihiro Adachi (chihiro-adachi)
- Raphaëll Roussel
@@ -2030,6 +2049,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Alexander Janssen (tnajanssen)
- Thomas Chmielowiec (chmielot)
- Jānis Lukss
+ - Julien BERNARD
- Michael Zangerle
- rkerner
- Alex Silcock
@@ -2177,6 +2197,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Matt Farmer
- catch
- aetxebeste
+ - Juga Paazmaya
- Alexandre Segura
- afaricamp
- Josef Cech
@@ -2186,11 +2207,12 @@ The Symfony Connect username in parenthesis allows to get more information
- Andrii Boiko
- Harold Iedema
- WaiSkats
+ - Morimoto Ryosuke
- Ikhsan Agustian
- Arnau González (arnaugm)
- - Bahman Mehrdad (bahman)
- Simon Bouland (bouland)
- Jibé Barth (jibbarth)
+ - Jm Aribau (jmaribau)
- Matthew Foster (mfoster)
- Reyo Stallenberg (reyostallenberg)
- Paul Seiffert (seiffert)
@@ -2226,6 +2248,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Eric Schildkamp
- Andreas
- Markus
+ - agaktr
- kernig
- Thomas Chmielowiec
- shdev
@@ -2239,6 +2262,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Joe Springe
- Mickael GOETZ
- Maciej Schmidt
+ - botbotbot
- Dennis Væversted
- Timon van der Vorm
- nuncanada
@@ -2255,7 +2279,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Mathieu Dewet (mdewet)
- Nicolas Tallefourtané (nicolab)
- Botond Dani (picur)
- - Mario Ramundo (rammar)
- Rémi Faivre (rfv)
- Thierry Marianne (thierrymarianne)
- Nick Stemerdink
@@ -2263,6 +2286,7 @@ The Symfony Connect username in parenthesis allows to get more information
- jjanvier
- Julius Beckmann
- Ruben Jansen
+ - Marc Biorklund
- shreypuranik
- loru88
- Thibaut Salanon
@@ -2291,6 +2315,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Yuri Karaban
- Johan
- Thomas Rothe
+ - Edwin
- Martin
- nietonfir
- Andriy
@@ -2300,21 +2325,26 @@ The Symfony Connect username in parenthesis allows to get more information
- Pavel.Batanov
- avi123
- Pavel Prischepa
+ - qzylalala
- alsar
- downace
- Aarón Nieves Fernández
- Mike Meier
+ - Mikolaj Czajkowski
- Kirill Saksin
- Shiro
- Reda DAOUDI
- Koalabaerchen
- michalmarcinkowski
- Warwick
+ - Jesper Skytte
- Chris
- Farid Jalilov
- Christiaan Wiesenekker
- Florent Olivaud
+ - Sergey Panteleev
- JakeFr
+ - Dmitry Hordinky
- Oliver Klee
- Simon Sargeant
- efeen
@@ -2329,20 +2359,22 @@ The Symfony Connect username in parenthesis allows to get more information
- kshida
- Michał Dąbrowski (defrag)
- Aryel Tupinamba (dfkimera)
+ - Florian Wolfsjaeger (flowolf)
- Hans Höchtl (hhoechtl)
- Simone Fumagalli (hpatoio)
- Brian Graham (incognito)
- Kevin Vergauwen (innocenzo)
- Alessio Baglio (ioalessio)
+ - Jawira Portugal (jawira)
- Johannes Müller (johmue)
- Jordi Llonch (jordillonch)
- - Mouad ZIANI (mouadziani)
- Nicholas Ruunu (nicholasruunu)
- Jeroen van den Nieuwenhuisen (nieuwenhuisen)
- Cyril Pascal (paxal)
- Cédric Dugat (ph3nol)
- Philip Dahlstrøm (phidah)
- Milos Colakovic (project2481)
+ - Raphael de Almeida (raphaeldealmeida)
- Rénald Casagraude (rcasagraude)
- Robin Duval (robin-duval)
- Grinbergs Reinis (shima5)
@@ -2446,6 +2478,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Darryl Hein (xmmedia)
- Sadicov Vladimir (xtech)
- Kevin EMO (zarcox)
+ - Marcel Berteler
- sdkawata
- Andrzej
- Alexander Zogheb
@@ -2473,7 +2506,6 @@ The Symfony Connect username in parenthesis allows to get more information
- adenkejawen
- Florent SEVESTRE (aniki-taicho)
- Ari Pringle (apringle)
- - Gert Wijnalda (cinamo)
- Dan Ordille (dordille)
- Jan Eichhorn (exeu)
- Grégory Pelletier (ip512)
@@ -2493,16 +2525,13 @@ The Symfony Connect username in parenthesis allows to get more information
- 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
@@ -2517,6 +2546,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Matthieu Prat
- Grummfy
- zors1
+ - Peter Simoncic
- Paul Le Corre
- Noel Light-Hilary
- Filipe Guerra
@@ -2693,6 +2723,7 @@ The Symfony Connect username in parenthesis allows to get more information
- temperatur
- misterx
- Cas
+ - arend
- Vincent Godé
- Dusan Kasan
- Michael Steininger
@@ -2739,7 +2770,6 @@ The Symfony Connect username in parenthesis allows to get more information
- Daniel Bannert
- Karim Miladi
- Michael Genereux
- - Wojciech Kania
- patrick-mcdougle
- Dariusz Czech
- Bruno Baguette
@@ -2811,6 +2841,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Adam Klvač
- Bruno Nogueira Nascimento Wowk
- Tomanhez
+ - satalaondrej
- jonmldr
- Yevgen Kovalienia
- Lebnik
@@ -2871,6 +2902,7 @@ The Symfony Connect username in parenthesis allows to get more information
- Nicolas
- Sergio Santoro
- tirnanog06
+ - Andrejs Leonovs
- phc
- Дмитрий Пацура
- Signor Pedro
@@ -3037,6 +3069,7 @@ The Symfony Connect username in parenthesis allows to get more information
- ddegentesh
- DSeemiller
- Jan Emrich
+ - Anne-Julia Seitz
- Mark Topper
- Xavier REN
- Zander Baldwin
diff --git a/UPGRADE-6.0.md b/UPGRADE-6.0.md
index c5506acbea75e..10c9dcc9199e3 100644
--- a/UPGRADE-6.0.md
+++ b/UPGRADE-6.0.md
@@ -109,6 +109,7 @@ FrameworkBundle
* Remove the `AdapterInterface` autowiring alias, use `CacheItemPoolInterface` instead
* Remove `get()`, `has()`, `getDoctrine()`, and `dispatchMessage()` in `AbstractController`, use method/constructor injection instead
* Deprecate the `cache.adapter.doctrine` service: The Doctrine Cache library is deprecated. Either switch to Symfony Cache or use the PSR-6 adapters provided by Doctrine Cache.
+ * Make the `framework.messenger.reset_on_message` configuration option default to `true`
* In `framework.cache` configuration, using the `cache.adapter.pdo` with a Doctrine DBAL connection is no longer supported, use `cache.adapter.doctrine_dbal` instead.
HttpFoundation
@@ -118,9 +119,17 @@ HttpFoundation
* Removed `Response::create()`, `JsonResponse::create()`,
`RedirectResponse::create()`, `StreamedResponse::create()` and
`BinaryFileResponse::create()` methods (use `__construct()` instead)
- * Not passing a `Closure` together with `FILTER_CALLBACK` to `ParameterBag::filter()` throws an `InvalidArgumentException`; wrap your filter in a closure instead.
- * Removed the `Request::HEADER_X_FORWARDED_ALL` constant, use either `Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO` or `Request::HEADER_X_FORWARDED_AWS_ELB` or `Request::HEADER_X_FORWARDED_TRAEFIK`constants instead.
+ * Not passing a `Closure` together with `FILTER_CALLBACK` to `ParameterBag::filter()` throws an `\InvalidArgumentException`; wrap your filter in a closure instead
+ * Not passing a `Closure` together with `FILTER_CALLBACK` to `InputBag::filter()` throws an `\InvalidArgumentException`; wrap your filter in a closure instead
+ * Removed the `Request::HEADER_X_FORWARDED_ALL` constant, use either `Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO` or `Request::HEADER_X_FORWARDED_AWS_ELB` or `Request::HEADER_X_FORWARDED_TRAEFIK`constants instead
* Rename `RequestStack::getMasterRequest()` to `getMainRequest()`
+ * Not passing `FILTER_REQUIRE_ARRAY` or `FILTER_FORCE_ARRAY` flags to `InputBag::filter()` when filtering an array will throw `BadRequestException`
+ * Removed the `Request::HEADER_X_FORWARDED_ALL` constant
+ * Retrieving non-scalar values using `InputBag::get()` will throw `BadRequestException` (use `InputBad::all()` instead to retrieve an array)
+ * Passing non-scalar default value as the second argument `InputBag::get()` will throw `\InvalidArgumentException`
+ * Passing non-scalar, non-array value as the second argument `InputBag::set()` will throw `\InvalidArgumentException`
+ * Passing `null` as `$requestIp` to `IpUtils::__checkIp()`, `IpUtils::__checkIp4()` or `IpUtils::__checkIp6()` is not supported anymore.
+ * Remove the `upload_progress.*` and `url_rewriter.tags` session options
HttpKernel
----------
@@ -488,7 +497,8 @@ Validator
After:
```php
- $builder->enableAnnotationMapping(true)
+ $builder
+ ->enableAnnotationMapping()
->setDoctrineAnnotationReader($reader);
```
@@ -503,7 +513,8 @@ Validator
After:
```php
- $builder->enableAnnotationMapping(true)
+ $builder
+ ->enableAnnotationMapping()
->addDefaultDoctrineAnnotationReader();
```
diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php
index 236789a721a66..ce71235bea2b9 100644
--- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php
+++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php
@@ -301,13 +301,15 @@ private function detectMappingType(string $directory, ContainerBuilder $containe
$glob = new GlobResource($directory, '*', true);
$container->addResource($glob);
+ $quotedMappingObjectName = preg_quote($this->getMappingObjectDefaultName(), '/');
+
foreach ($glob as $file) {
$content = file_get_contents($file);
- if (preg_match('/^#\[.*Entity\b/m', $content)) {
+ if (preg_match('/^#\[.*'.$quotedMappingObjectName.'\b/m', $content)) {
break;
}
- if (preg_match('/^ \* @.*Entity\b/m', $content)) {
+ if (preg_match('/^ \* @.*'.$quotedMappingObjectName.'\b/m', $content)) {
$type = 'annotation';
break;
}
diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php
index dc86ee22b640e..b665b242cc496 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php
@@ -49,6 +49,10 @@ protected function setUp(): void
->willReturnCallback(function ($name) {
return 'doctrine.orm.'.$name;
});
+
+ $this->extension
+ ->method('getMappingObjectDefaultName')
+ ->willReturn('Entity');
}
public function testFixManagersAutoMappingsWithTwoAutomappings()
diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json
index c1feaf4e4213b..f9772266722e6 100644
--- a/src/Symfony/Bridge/Doctrine/composer.json
+++ b/src/Symfony/Bridge/Doctrine/composer.json
@@ -19,11 +19,11 @@
"php": ">=7.2.5",
"doctrine/event-manager": "~1.0",
"doctrine/persistence": "^2",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.16",
- "symfony/service-contracts": "^1.1|^2"
+ "symfony/service-contracts": "^1.1|^2|^3"
},
"require-dev": {
"composer/package-versions-deprecated": "^1.8",
diff --git a/src/Symfony/Bridge/Monolog/composer.json b/src/Symfony/Bridge/Monolog/composer.json
index 8c0a9d239ad35..f9476b517737d 100644
--- a/src/Symfony/Bridge/Monolog/composer.json
+++ b/src/Symfony/Bridge/Monolog/composer.json
@@ -18,9 +18,9 @@
"require": {
"php": ">=7.2.5",
"monolog/monolog": "^1.25.1|^2",
- "symfony/service-contracts": "^1.1|^2",
+ "symfony/service-contracts": "^1.1|^2|^3",
"symfony/http-kernel": "^5.3|^6.0",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
diff --git a/src/Symfony/Bridge/PhpUnit/composer.json b/src/Symfony/Bridge/PhpUnit/composer.json
index 60b5ac6fb4802..9627d2b40c12c 100644
--- a/src/Symfony/Bridge/PhpUnit/composer.json
+++ b/src/Symfony/Bridge/PhpUnit/composer.json
@@ -19,7 +19,7 @@
"php": ">=7.1.3 EVEN ON LATEST SYMFONY VERSIONS TO ALLOW USING",
"php": "THIS BRIDGE WHEN TESTING LOWEST SYMFONY VERSIONS.",
"php": ">=7.1.3",
- "symfony/deprecation-contracts": "^2.1"
+ "symfony/deprecation-contracts": "^2.1|^3"
},
"require-dev": {
"symfony/error-handler": "^4.4|^5.0|^6.0"
diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig
index 7316abf0ddd12..34cbc76074acd 100644
--- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig
+++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig
@@ -90,9 +90,6 @@
{%- if required -%}
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%}
{%- endif -%}
- {%- if parent_label_class is defined -%}
- {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) -%}
- {%- endif -%}
{%- if label is not same as(false) and label is empty -%}
{%- if label_format is not empty -%}
{%- set label = label_format|replace({
diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig
index fb440282861d8..0e80840541fa1 100644
--- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig
+++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig
@@ -283,9 +283,6 @@
{%- if required -%}
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) -%}
{%- endif -%}
- {%- if parent_label_class is defined -%}
- {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|replace({'checkbox-inline': '', 'radio-inline': '', 'checkbox-custom': '', 'radio-custom': ''})|trim}) -%}
- {%- endif -%}
{%- if label is not same as(false) and label is empty -%}
{%- if label_format is not empty -%}
{%- set label = label_format|replace({
diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig
index b02b94210d9be..f8c51b83dd8ed 100644
--- a/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig
+++ b/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig
@@ -253,9 +253,6 @@
{% if errors|length > 0 -%}
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' error')|trim}) %}
{% endif %}
- {% if parent_label_class is defined %}
- {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ parent_label_class)|trim}) %}
- {% endif %}
{% if label is empty %}
{%- if label_format is not empty -%}
{% set label = label_format|replace({
diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json
index 3d79e39ca2244..63b072605582d 100644
--- a/src/Symfony/Bridge/Twig/composer.json
+++ b/src/Symfony/Bridge/Twig/composer.json
@@ -18,7 +18,7 @@
"require": {
"php": ">=7.2.5",
"symfony/polyfill-php80": "^1.16",
- "symfony/translation-contracts": "^1.1|^2",
+ "symfony/translation-contracts": "^1.1|^2|^3",
"twig/twig": "^2.13|^3.0.4"
},
"require-dev": {
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
index 9dc8ada27aa8d..519803f15c5ee 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
@@ -343,7 +343,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
$workflows = [];
}
- if (1 === \count($workflows) && isset($workflows['workflows']) && array_keys($workflows['workflows']) !== range(0, \count($workflows) - 1) && !empty(array_diff(array_keys($workflows['workflows']), ['audit_trail', 'type', 'marking_store', 'supports', 'support_strategy', 'initial_marking', 'places', 'transitions']))) {
+ if (1 === \count($workflows) && isset($workflows['workflows']) && !array_is_list($workflows['workflows']) && !empty(array_diff(array_keys($workflows['workflows']), ['audit_trail', 'type', 'marking_store', 'supports', 'support_strategy', 'initial_marking', 'places', 'transitions']))) {
$workflows = $workflows['workflows'];
}
@@ -1280,7 +1280,7 @@ private function addLockSection(ArrayNodeDefinition $rootNode, callable $enableI
->ifString()->then(function ($v) { return ['default' => $v]; })
->end()
->beforeNormalization()
- ->ifTrue(function ($v) { return \is_array($v) && array_keys($v) === range(0, \count($v) - 1); })
+ ->ifTrue(function ($v) { return \is_array($v) && array_is_list($v); })
->then(function ($v) {
$resources = [];
foreach ($v as $resource) {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/BaseBundle.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/BaseBundle.php
deleted file mode 100644
index 494a18dff0a14..0000000000000
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/BaseBundle.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- *
- * 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\BaseBundle;
-
-use Symfony\Component\HttpKernel\Bundle\Bundle;
-
-class BaseBundle extends Bundle
-{
-}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/base.format.engine b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/base.format.engine
deleted file mode 100644
index e69de29bb2d1d..0000000000000
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/controller/base.format.engine b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/controller/base.format.engine
deleted file mode 100644
index e69de29bb2d1d..0000000000000
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/this.is.a.template.format.engine b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/BaseBundle/Resources/views/this.is.a.template.format.engine
deleted file mode 100644
index e69de29bb2d1d..0000000000000
diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json
index c797289672f9d..71e4940ff0a4b 100644
--- a/src/Symfony/Bundle/FrameworkBundle/composer.json
+++ b/src/Symfony/Bundle/FrameworkBundle/composer.json
@@ -21,13 +21,14 @@
"symfony/cache": "^5.2|^6.0",
"symfony/config": "^5.3|^6.0",
"symfony/dependency-injection": "^5.3|^6.0",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/event-dispatcher": "^5.1|^6.0",
"symfony/error-handler": "^4.4.1|^5.0.1|^6.0",
"symfony/http-foundation": "^5.3|^6.0",
"symfony/http-kernel": "^5.4|^6.0",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.16",
+ "symfony/polyfill-php81": "^1.22",
"symfony/filesystem": "^4.4|^5.0|^6.0",
"symfony/finder": "^4.4|^5.0|^6.0",
"symfony/routing": "^5.3|^6.0"
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
index b18018e54fe44..0ecc6df4ef250 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
@@ -219,6 +219,7 @@ public function addConfiguration(NodeDefinition $node)
->requiresAtLeastOneElement()
->info('An array of properties on your User that are used to sign the remember-me cookie. If any of these change, all existing cookies will become invalid.')
->example(['email', 'password'])
+ ->defaultValue(['password'])
->end()
->arrayNode('token_provider')
->beforeNormalization()
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
index 45169b64112ba..8747273b9e9a6 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
@@ -36,7 +36,6 @@
use Symfony\Component\Security\Core\User\UserCheckerInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
-use Symfony\Component\Security\Guard\AuthenticatorInterface as GuardAuthenticatorInterface;
use Symfony\Component\Security\Guard\Token\GuardTokenInterface;
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
use Symfony\Component\Security\Http\Authenticator\HttpBasicAuthenticator;
@@ -894,45 +893,6 @@ public function createToken(Passport $passport, string $firewallName): TokenInte
}
}
-class NullAuthenticator implements GuardAuthenticatorInterface
-{
- public function start(Request $request, AuthenticationException $authException = null): Response
- {
- }
-
- public function supports(Request $request): bool
- {
- }
-
- public function getCredentials(Request $request)
- {
- }
-
- public function getUser($credentials, UserProviderInterface $userProvider): ?UserInterface
- {
- }
-
- public function checkCredentials($credentials, UserInterface $user): bool
- {
- }
-
- public function createAuthenticatedToken(UserInterface $user, string $providerKey): GuardTokenInterface
- {
- }
-
- public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
- {
- }
-
- public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey): ?Response
- {
- }
-
- public function supportsRememberMe(): bool
- {
- }
-}
-
class TestUserChecker implements UserCheckerInterface
{
public function checkPreAuth(UserInterface $user)
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/UserChangingUserProvider.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/UserChangingUserProvider.php
index f28bfff393693..c40a7e0a12267 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/UserChangingUserProvider.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/UserChangingUserProvider.php
@@ -21,6 +21,8 @@ class UserChangingUserProvider implements UserProviderInterface
{
private $inner;
+ public static $changePassword = false;
+
public function __construct(InMemoryUserProvider $inner)
{
$this->inner = $inner;
@@ -28,26 +30,31 @@ public function __construct(InMemoryUserProvider $inner)
public function loadUserByUsername($username): UserInterface
{
- return $this->inner->loadUserByUsername($username);
+ return $this->changeUser($this->inner->loadUserByUsername($username));
}
public function loadUserByIdentifier(string $userIdentifier): UserInterface
{
- return $this->inner->loadUserByIdentifier($userIdentifier);
+ return $this->changeUser($this->inner->loadUserByIdentifier($userIdentifier));
}
public function refreshUser(UserInterface $user): UserInterface
{
- $user = $this->inner->refreshUser($user);
-
- $alterUser = \Closure::bind(function (InMemoryUser $user) { $user->password = 'foo'; }, null, class_exists(User::class) ? User::class : InMemoryUser::class);
- $alterUser($user);
-
- return $user;
+ return $this->changeUser($this->inner->refreshUser($user));
}
public function supportsClass($class): bool
{
return $this->inner->supportsClass($class);
}
+
+ private function changeUser(UserInterface $user): UserInterface
+ {
+ if (self::$changePassword) {
+ $alterUser = \Closure::bind(function (InMemoryUser $user) { $user->password = 'changed!'; }, null, class_exists(User::class) ? User::class : InMemoryUser::class);
+ $alterUser($user);
+ }
+
+ return $user;
+ }
}
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php
index 7af43e1154a42..c1958c7dee3ff 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php
@@ -11,8 +11,15 @@
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
+use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\RememberMeBundle\Security\UserChangingUserProvider;
+
class RememberMeTest extends AbstractWebTestCase
{
+ protected function setUp(): void
+ {
+ UserChangingUserProvider::$changePassword = false;
+ }
+
/**
* @dataProvider provideConfigs
*/
@@ -51,11 +58,19 @@ public function testUserChangeClearsCookie()
$this->assertSame(302, $client->getResponse()->getStatusCode());
$cookieJar = $client->getCookieJar();
- $this->assertNotNull($cookieJar->get('REMEMBERME'));
+ $this->assertNotNull($cookie = $cookieJar->get('REMEMBERME'));
+
+ UserChangingUserProvider::$changePassword = true;
+ // change password (through user provider), this deauthenticates the session
$client->request('GET', '/profile');
$this->assertRedirect($client->getResponse(), '/login');
$this->assertNull($cookieJar->get('REMEMBERME'));
+
+ // restore the old remember me cookie, it should no longer be valid
+ $cookieJar->set($cookie);
+ $client->request('GET', '/profile');
+ $this->assertRedirect($client->getResponse(), '/login');
}
public function testSessionLessRememberMeLogout()
@@ -121,11 +136,19 @@ public function testLegacyUserChangeClearsCookie()
$this->assertSame(302, $client->getResponse()->getStatusCode());
$cookieJar = $client->getCookieJar();
- $this->assertNotNull($cookieJar->get('REMEMBERME'));
+ $this->assertNotNull($cookie = $cookieJar->get('REMEMBERME'));
+
+ UserChangingUserProvider::$changePassword = true;
+ // change password (through user provider), this deauthenticates the session
$client->request('GET', '/profile');
$this->assertRedirect($client->getResponse(), '/login');
$this->assertNull($cookieJar->get('REMEMBERME'));
+
+ // restore the old remember me cookie, it should no longer be valid
+ $cookieJar->set($cookie);
+ $client->request('GET', '/profile');
+ $this->assertRedirect($client->getResponse(), '/login');
}
/**
diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json
index 50345333fc550..ee3e6e3e90008 100644
--- a/src/Symfony/Bundle/SecurityBundle/composer.json
+++ b/src/Symfony/Bundle/SecurityBundle/composer.json
@@ -20,7 +20,7 @@
"ext-xml": "*",
"symfony/config": "^4.4|^5.0|^6.0",
"symfony/dependency-injection": "^5.3|^6.0",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/event-dispatcher": "^5.1|^6.0",
"symfony/http-kernel": "^5.3|^6.0",
"symfony/http-foundation": "^5.3|^6.0",
@@ -28,7 +28,7 @@
"symfony/polyfill-php80": "^1.16",
"symfony/security-core": "^5.4|^6.0",
"symfony/security-csrf": "^4.4|^5.0|^6.0",
- "symfony/security-guard": "^5.3|^6.0",
+ "symfony/security-guard": "^5.3",
"symfony/security-http": "^5.4|^6.0"
},
"require-dev": {
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig
index 4b234d24b354c..fbe3c0794314b 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig
@@ -409,6 +409,14 @@ if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
renderAjaxRequests: renderAjaxRequests,
+ getSfwdt: function(token) {
+ if (!this.sfwdt) {
+ this.sfwdt = document.getElementById('sfwdt' + token);
+ }
+
+ return this.sfwdt;
+ },
+
load: function(selector, url, onSuccess, onError, options) {
var el = document.getElementById(selector);
@@ -440,7 +448,7 @@ if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
},
showToolbar: function(token) {
- var sfwdt = document.getElementById('sfwdt' + token);
+ var sfwdt = this.getSfwdt(token);
removeClass(sfwdt, 'sf-display-none');
if (getPreference('toolbar/displayState') == 'none') {
@@ -455,7 +463,7 @@ if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
},
hideToolbar: function(token) {
- var sfwdt = document.getElementById('sfwdt' + token);
+ var sfwdt = this.getSfwdt(token);
addClass(sfwdt, 'sf-display-none');
},
@@ -606,7 +614,7 @@ if (typeof Sfjs === 'undefined' || typeof Sfjs.loadToolbar === 'undefined') {
},
function(xhr) {
if (xhr.status !== 0 && !options.stop) {
- var sfwdt = document.getElementById('sfwdt' + token);
+ var sfwdt = that.getSfwdt(token);
sfwdt.innerHTML = '\
\
\
diff --git a/src/Symfony/Bundle/WebProfilerBundle/composer.json b/src/Symfony/Bundle/WebProfilerBundle/composer.json
index 6f3db08702779..3f67bb6ff5675 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/composer.json
+++ b/src/Symfony/Bundle/WebProfilerBundle/composer.json
@@ -33,6 +33,7 @@
},
"conflict": {
"symfony/form": "<4.4",
+ "symfony/mailer": "<5.4",
"symfony/messenger": "<4.4",
"symfony/dependency-injection": "<5.2"
},
diff --git a/src/Symfony/Component/Asset/composer.json b/src/Symfony/Component/Asset/composer.json
index 0481671ca3dd2..06cc332d45a67 100644
--- a/src/Symfony/Component/Asset/composer.json
+++ b/src/Symfony/Component/Asset/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16"
},
"suggest": {
diff --git a/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php
index 7bb16573db32f..b020ddc9f43a8 100644
--- a/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php
+++ b/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php
@@ -96,6 +96,7 @@ public function provideFailedCreateConnection(): array
['redis://localhost:1234'],
['redis://foo@localhost'],
['redis://localhost/123'],
+ ['redis:///some/local/path'],
];
}
diff --git a/src/Symfony/Component/Cache/Tests/Fixtures/PrunableCache.php b/src/Symfony/Component/Cache/Tests/Fixtures/PrunableCache.php
deleted file mode 100644
index c1b3f740129d8..0000000000000
--- a/src/Symfony/Component/Cache/Tests/Fixtures/PrunableCache.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Cache\Tests\Fixtures;
-
-use Psr\SimpleCache\CacheInterface;
-use Symfony\Component\Cache\PruneableInterface;
-
-abstract class PrunableCache implements CacheInterface, PruneableInterface
-{
-}
diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php
index 3eec435ca1297..aacd8834b7df9 100644
--- a/src/Symfony/Component/Cache/Traits/RedisTrait.php
+++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php
@@ -151,7 +151,7 @@ public static function createConnection(string $dsn, array $options = [])
if (preg_match('#/(\d+)$#', $params['path'], $m)) {
$params['dbindex'] = $m[1];
$params['path'] = substr($params['path'], 0, -\strlen($m[0]));
- } else {
+ } elseif (isset($params['host'])) {
throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s", the "dbindex" parameter must be a number.', $dsn));
}
}
diff --git a/src/Symfony/Component/Cache/composer.json b/src/Symfony/Component/Cache/composer.json
index c8ce2947932e6..1ebcfc9b307e7 100644
--- a/src/Symfony/Component/Cache/composer.json
+++ b/src/Symfony/Component/Cache/composer.json
@@ -25,10 +25,10 @@
"psr/cache": "^1.0|^2.0",
"psr/log": "^1.1|^2|^3",
"symfony/cache-contracts": "^1.1.7|^2",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php73": "^1.9",
"symfony/polyfill-php80": "^1.16",
- "symfony/service-contracts": "^1.1|^2",
+ "symfony/service-contracts": "^1.1|^2|^3",
"symfony/var-exporter": "^4.4|^5.0|^6.0"
},
"require-dev": {
diff --git a/src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php b/src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php
index d35bed2b679a2..979c95522704c 100644
--- a/src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php
+++ b/src/Symfony/Component/Config/Builder/ConfigBuilderGenerator.php
@@ -301,31 +301,31 @@ private function getComment(VariableNode $node): string
{
$comment = '';
if ('' !== $info = (string) $node->getInfo()) {
- $comment .= ' * '.$info.\PHP_EOL;
+ $comment .= ' * '.$info."\n";
}
foreach ((array) ($node->getExample() ?? []) as $example) {
- $comment .= ' * @example '.$example.\PHP_EOL;
+ $comment .= ' * @example '.$example."\n";
}
if ('' !== $default = $node->getDefaultValue()) {
- $comment .= ' * @default '.(null === $default ? 'null' : var_export($default, true)).\PHP_EOL;
+ $comment .= ' * @default '.(null === $default ? 'null' : var_export($default, true))."\n";
}
if ($node instanceof EnumNode) {
$comment .= sprintf(' * @param ParamConfigurator|%s $value', implode('|', array_map(function ($a) {
return var_export($a, true);
- }, $node->getValues()))).\PHP_EOL;
+ }, $node->getValues())))."\n";
} else {
$parameterType = $this->getParameterType($node);
if (null === $parameterType || '' === $parameterType) {
$parameterType = 'mixed';
}
- $comment .= ' * @param ParamConfigurator|'.$parameterType.' $value'.\PHP_EOL;
+ $comment .= ' * @param ParamConfigurator|'.$parameterType.' $value'."\n";
}
if ($node->isDeprecated()) {
- $comment .= ' * @deprecated '.$node->getDeprecation($node->getName(), $node->getParent()->getName())['message'].\PHP_EOL;
+ $comment .= ' * @deprecated '.$node->getDeprecation($node->getName(), $node->getParent()->getName())['message']."\n";
}
return $comment;
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/Messenger/ReceivingConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/Messenger/ReceivingConfig.php
new file mode 100644
index 0000000000000..ca4db117acd37
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/Messenger/ReceivingConfig.php
@@ -0,0 +1,73 @@
+priority = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function color($value): self
+ {
+ $this->color = $value;
+
+ return $this;
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['priority'])) {
+ $this->priority = $value['priority'];
+ unset($value['priority']);
+ }
+
+ if (isset($value['color'])) {
+ $this->color = $value['color'];
+ unset($value['color']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->priority) {
+ $output['priority'] = $this->priority;
+ }
+ if (null !== $this->color) {
+ $output['color'] = $this->color;
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/Messenger/RoutingConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/Messenger/RoutingConfig.php
new file mode 100644
index 0000000000000..7f44a8553f66f
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/Messenger/RoutingConfig.php
@@ -0,0 +1,51 @@
+ $value
+ * @return $this
+ */
+ public function senders($value): self
+ {
+ $this->senders = $value;
+
+ return $this;
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['senders'])) {
+ $this->senders = $value['senders'];
+ unset($value['senders']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->senders) {
+ $output['senders'] = $this->senders;
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/MessengerConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/MessengerConfig.php
new file mode 100644
index 0000000000000..2189fde0f3bec
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/MessengerConfig.php
@@ -0,0 +1,67 @@
+routing[$message_class])) {
+ return $this->routing[$message_class] = new \Symfony\Config\AddToList\Messenger\RoutingConfig($value);
+ }
+ if ([] === $value) {
+ return $this->routing[$message_class];
+ }
+
+ throw new InvalidConfigurationException('The node created by "routing()" has already been initialized. You cannot pass values the second time you call routing().');
+ }
+
+ public function receiving(array $value = []): \Symfony\Config\AddToList\Messenger\ReceivingConfig
+ {
+ return $this->receiving[] = new \Symfony\Config\AddToList\Messenger\ReceivingConfig($value);
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['routing'])) {
+ $this->routing = array_map(function ($v) { return new \Symfony\Config\AddToList\Messenger\RoutingConfig($v); }, $value['routing']);
+ unset($value['routing']);
+ }
+
+ if (isset($value['receiving'])) {
+ $this->receiving = array_map(function ($v) { return new \Symfony\Config\AddToList\Messenger\ReceivingConfig($v); }, $value['receiving']);
+ unset($value['receiving']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->routing) {
+ $output['routing'] = array_map(function ($v) { return $v->toArray(); }, $this->routing);
+ }
+ if (null !== $this->receiving) {
+ $output['receiving'] = array_map(function ($v) { return $v->toArray(); }, $this->receiving);
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/TranslatorConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/TranslatorConfig.php
new file mode 100644
index 0000000000000..570e415ce2830
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToList/TranslatorConfig.php
@@ -0,0 +1,71 @@
+ $value
+ * @return $this
+ */
+ public function fallbacks($value): self
+ {
+ $this->fallbacks = $value;
+
+ return $this;
+ }
+
+ /**
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function source(string $source_class, $value): self
+ {
+ $this->sources[$source_class] = $value;
+
+ return $this;
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['fallbacks'])) {
+ $this->fallbacks = $value['fallbacks'];
+ unset($value['fallbacks']);
+ }
+
+ if (isset($value['sources'])) {
+ $this->sources = $value['sources'];
+ unset($value['sources']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->fallbacks) {
+ $output['fallbacks'] = $this->fallbacks;
+ }
+ if (null !== $this->sources) {
+ $output['sources'] = $this->sources;
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToListConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToListConfig.php
new file mode 100644
index 0000000000000..679aa9bbc7fca
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/AddToList/Symfony/Config/AddToListConfig.php
@@ -0,0 +1,77 @@
+translator) {
+ $this->translator = new \Symfony\Config\AddToList\TranslatorConfig($value);
+ } elseif ([] !== $value) {
+ throw new InvalidConfigurationException('The node created by "translator()" has already been initialized. You cannot pass values the second time you call translator().');
+ }
+
+ return $this->translator;
+ }
+
+ public function messenger(array $value = []): \Symfony\Config\AddToList\MessengerConfig
+ {
+ if (null === $this->messenger) {
+ $this->messenger = new \Symfony\Config\AddToList\MessengerConfig($value);
+ } elseif ([] !== $value) {
+ throw new InvalidConfigurationException('The node created by "messenger()" has already been initialized. You cannot pass values the second time you call messenger().');
+ }
+
+ return $this->messenger;
+ }
+
+ public function getExtensionAlias(): string
+ {
+ return 'add_to_list';
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['translator'])) {
+ $this->translator = new \Symfony\Config\AddToList\TranslatorConfig($value['translator']);
+ unset($value['translator']);
+ }
+
+ if (isset($value['messenger'])) {
+ $this->messenger = new \Symfony\Config\AddToList\MessengerConfig($value['messenger']);
+ unset($value['messenger']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->translator) {
+ $output['translator'] = $this->translator->toArray();
+ }
+ if (null !== $this->messenger) {
+ $output['messenger'] = $this->messenger->toArray();
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys.php
index 453468330b26d..751fe5c2934cc 100644
--- a/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys.php
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys.php
@@ -29,6 +29,9 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->end()
->end()
+ ->arrayNode('baz')
+ ->ignoreExtraKeys(false)
+ ->end()
;
return $tb;
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeys/BarConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeys/BarConfig.php
new file mode 100644
index 0000000000000..87eba94c6b91f
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeys/BarConfig.php
@@ -0,0 +1,87 @@
+corge = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function grault($value): self
+ {
+ $this->grault = $value;
+
+ return $this;
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['corge'])) {
+ $this->corge = $value['corge'];
+ unset($value['corge']);
+ }
+
+ if (isset($value['grault'])) {
+ $this->grault = $value['grault'];
+ unset($value['grault']);
+ }
+
+ $this->_extraKeys = $value;
+
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->corge) {
+ $output['corge'] = $this->corge;
+ }
+ if (null !== $this->grault) {
+ $output['grault'] = $this->grault;
+ }
+
+ return $output + $this->_extraKeys;
+ }
+
+ /**
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function set(string $key, $value): self
+ {
+ if (null === $value) {
+ unset($this->_extraKeys[$key]);
+ } else {
+ $this->_extraKeys[$key] = $value;
+ }
+
+ return $this;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeys/BazConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeys/BazConfig.php
new file mode 100644
index 0000000000000..fae09098ab103
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeys/BazConfig.php
@@ -0,0 +1,45 @@
+_extraKeys = $value;
+
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+
+ return $output + $this->_extraKeys;
+ }
+
+ /**
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function set(string $key, $value): self
+ {
+ if (null === $value) {
+ unset($this->_extraKeys[$key]);
+ } else {
+ $this->_extraKeys[$key] = $value;
+ }
+
+ return $this;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeys/FooConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeys/FooConfig.php
new file mode 100644
index 0000000000000..46632c7f9a0e7
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeys/FooConfig.php
@@ -0,0 +1,87 @@
+baz = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function qux($value): self
+ {
+ $this->qux = $value;
+
+ return $this;
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['baz'])) {
+ $this->baz = $value['baz'];
+ unset($value['baz']);
+ }
+
+ if (isset($value['qux'])) {
+ $this->qux = $value['qux'];
+ unset($value['qux']);
+ }
+
+ $this->_extraKeys = $value;
+
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->baz) {
+ $output['baz'] = $this->baz;
+ }
+ if (null !== $this->qux) {
+ $output['qux'] = $this->qux;
+ }
+
+ return $output + $this->_extraKeys;
+ }
+
+ /**
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function set(string $key, $value): self
+ {
+ if (null === $value) {
+ unset($this->_extraKeys[$key]);
+ } else {
+ $this->_extraKeys[$key] = $value;
+ }
+
+ return $this;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeysConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeysConfig.php
new file mode 100644
index 0000000000000..20ff730475f54
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/ArrayExtraKeys/Symfony/Config/ArrayExtraKeysConfig.php
@@ -0,0 +1,92 @@
+foo) {
+ $this->foo = new \Symfony\Config\ArrayExtraKeys\FooConfig($value);
+ } elseif ([] !== $value) {
+ throw new InvalidConfigurationException('The node created by "foo()" has already been initialized. You cannot pass values the second time you call foo().');
+ }
+
+ return $this->foo;
+ }
+
+ public function bar(array $value = []): \Symfony\Config\ArrayExtraKeys\BarConfig
+ {
+ return $this->bar[] = new \Symfony\Config\ArrayExtraKeys\BarConfig($value);
+ }
+
+ public function baz(array $value = []): \Symfony\Config\ArrayExtraKeys\BazConfig
+ {
+ if (null === $this->baz) {
+ $this->baz = new \Symfony\Config\ArrayExtraKeys\BazConfig($value);
+ } elseif ([] !== $value) {
+ throw new InvalidConfigurationException('The node created by "baz()" has already been initialized. You cannot pass values the second time you call baz().');
+ }
+
+ return $this->baz;
+ }
+
+ public function getExtensionAlias(): string
+ {
+ return 'array_extra_keys';
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['foo'])) {
+ $this->foo = new \Symfony\Config\ArrayExtraKeys\FooConfig($value['foo']);
+ unset($value['foo']);
+ }
+
+ if (isset($value['bar'])) {
+ $this->bar = array_map(function ($v) { return new \Symfony\Config\ArrayExtraKeys\BarConfig($v); }, $value['bar']);
+ unset($value['bar']);
+ }
+
+ if (isset($value['baz'])) {
+ $this->baz = new \Symfony\Config\ArrayExtraKeys\BazConfig($value['baz']);
+ unset($value['baz']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->foo) {
+ $output['foo'] = $this->foo->toArray();
+ }
+ if (null !== $this->bar) {
+ $output['bar'] = array_map(function ($v) { return $v->toArray(); }, $this->bar);
+ }
+ if (null !== $this->baz) {
+ $output['baz'] = $this->baz->toArray();
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValues/Messenger/TransportsConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValues/Messenger/TransportsConfig.php
new file mode 100644
index 0000000000000..a3fe5218f0678
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValues/Messenger/TransportsConfig.php
@@ -0,0 +1,93 @@
+dsn = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function serializer($value): self
+ {
+ $this->serializer = $value;
+
+ return $this;
+ }
+
+ /**
+ * @param ParamConfigurator|list
$value
+ * @return $this
+ */
+ public function options($value): self
+ {
+ $this->options = $value;
+
+ return $this;
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['dsn'])) {
+ $this->dsn = $value['dsn'];
+ unset($value['dsn']);
+ }
+
+ if (isset($value['serializer'])) {
+ $this->serializer = $value['serializer'];
+ unset($value['serializer']);
+ }
+
+ if (isset($value['options'])) {
+ $this->options = $value['options'];
+ unset($value['options']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->dsn) {
+ $output['dsn'] = $this->dsn;
+ }
+ if (null !== $this->serializer) {
+ $output['serializer'] = $this->serializer;
+ }
+ if (null !== $this->options) {
+ $output['options'] = $this->options;
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValues/MessengerConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValues/MessengerConfig.php
new file mode 100644
index 0000000000000..8e59732f2d024
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValues/MessengerConfig.php
@@ -0,0 +1,52 @@
+transports[$name])) {
+ return $this->transports[$name] = new \Symfony\Config\NodeInitialValues\Messenger\TransportsConfig($value);
+ }
+ if ([] === $value) {
+ return $this->transports[$name];
+ }
+
+ throw new InvalidConfigurationException('The node created by "transports()" has already been initialized. You cannot pass values the second time you call transports().');
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['transports'])) {
+ $this->transports = array_map(function ($v) { return new \Symfony\Config\NodeInitialValues\Messenger\TransportsConfig($v); }, $value['transports']);
+ unset($value['transports']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->transports) {
+ $output['transports'] = array_map(function ($v) { return $v->toArray(); }, $this->transports);
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValues/SomeCleverNameConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValues/SomeCleverNameConfig.php
new file mode 100644
index 0000000000000..2db3d4cf95578
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValues/SomeCleverNameConfig.php
@@ -0,0 +1,73 @@
+first = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function second($value): self
+ {
+ $this->second = $value;
+
+ return $this;
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['first'])) {
+ $this->first = $value['first'];
+ unset($value['first']);
+ }
+
+ if (isset($value['second'])) {
+ $this->second = $value['second'];
+ unset($value['second']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->first) {
+ $output['first'] = $this->first;
+ }
+ if (null !== $this->second) {
+ $output['second'] = $this->second;
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValuesConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValuesConfig.php
new file mode 100644
index 0000000000000..d2f8bc654cfde
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/NodeInitialValues/Symfony/Config/NodeInitialValuesConfig.php
@@ -0,0 +1,77 @@
+someCleverName) {
+ $this->someCleverName = new \Symfony\Config\NodeInitialValues\SomeCleverNameConfig($value);
+ } elseif ([] !== $value) {
+ throw new InvalidConfigurationException('The node created by "someCleverName()" has already been initialized. You cannot pass values the second time you call someCleverName().');
+ }
+
+ return $this->someCleverName;
+ }
+
+ public function messenger(array $value = []): \Symfony\Config\NodeInitialValues\MessengerConfig
+ {
+ if (null === $this->messenger) {
+ $this->messenger = new \Symfony\Config\NodeInitialValues\MessengerConfig($value);
+ } elseif ([] !== $value) {
+ throw new InvalidConfigurationException('The node created by "messenger()" has already been initialized. You cannot pass values the second time you call messenger().');
+ }
+
+ return $this->messenger;
+ }
+
+ public function getExtensionAlias(): string
+ {
+ return 'node_initial_values';
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['some_clever_name'])) {
+ $this->someCleverName = new \Symfony\Config\NodeInitialValues\SomeCleverNameConfig($value['some_clever_name']);
+ unset($value['some_clever_name']);
+ }
+
+ if (isset($value['messenger'])) {
+ $this->messenger = new \Symfony\Config\NodeInitialValues\MessengerConfig($value['messenger']);
+ unset($value['messenger']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->someCleverName) {
+ $output['some_clever_name'] = $this->someCleverName->toArray();
+ }
+ if (null !== $this->messenger) {
+ $output['messenger'] = $this->messenger->toArray();
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/Placeholders/Symfony/Config/PlaceholdersConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/Placeholders/Symfony/Config/PlaceholdersConfig.php
new file mode 100644
index 0000000000000..909c95585b441
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/Placeholders/Symfony/Config/PlaceholdersConfig.php
@@ -0,0 +1,98 @@
+enabled = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|float $value
+ * @return $this
+ */
+ public function favoriteFloat($value): self
+ {
+ $this->favoriteFloat = $value;
+
+ return $this;
+ }
+
+ /**
+ * @param ParamConfigurator|list $value
+ * @return $this
+ */
+ public function goodIntegers($value): self
+ {
+ $this->goodIntegers = $value;
+
+ return $this;
+ }
+
+ public function getExtensionAlias(): string
+ {
+ return 'placeholders';
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['enabled'])) {
+ $this->enabled = $value['enabled'];
+ unset($value['enabled']);
+ }
+
+ if (isset($value['favorite_float'])) {
+ $this->favoriteFloat = $value['favorite_float'];
+ unset($value['favorite_float']);
+ }
+
+ if (isset($value['good_integers'])) {
+ $this->goodIntegers = $value['good_integers'];
+ unset($value['good_integers']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->enabled) {
+ $output['enabled'] = $this->enabled;
+ }
+ if (null !== $this->favoriteFloat) {
+ $output['favorite_float'] = $this->favoriteFloat;
+ }
+ if (null !== $this->goodIntegers) {
+ $output['good_integers'] = $this->goodIntegers;
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/PrimitiveTypes/Symfony/Config/PrimitiveTypesConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/PrimitiveTypes/Symfony/Config/PrimitiveTypesConfig.php
new file mode 100644
index 0000000000000..fd802032c28f6
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/PrimitiveTypes/Symfony/Config/PrimitiveTypesConfig.php
@@ -0,0 +1,141 @@
+booleanNode = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|'foo'|'bar'|'baz' $value
+ * @return $this
+ */
+ public function enumNode($value): self
+ {
+ $this->enumNode = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|float $value
+ * @return $this
+ */
+ public function floatNode($value): self
+ {
+ $this->floatNode = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|int $value
+ * @return $this
+ */
+ public function integerNode($value): self
+ {
+ $this->integerNode = $value;
+
+ return $this;
+ }
+
+ /**
+ * @default null
+ * @param ParamConfigurator|mixed $value
+ * @return $this
+ */
+ public function scalarNode($value): self
+ {
+ $this->scalarNode = $value;
+
+ return $this;
+ }
+
+ public function getExtensionAlias(): string
+ {
+ return 'primitive_types';
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['boolean_node'])) {
+ $this->booleanNode = $value['boolean_node'];
+ unset($value['boolean_node']);
+ }
+
+ if (isset($value['enum_node'])) {
+ $this->enumNode = $value['enum_node'];
+ unset($value['enum_node']);
+ }
+
+ if (isset($value['float_node'])) {
+ $this->floatNode = $value['float_node'];
+ unset($value['float_node']);
+ }
+
+ if (isset($value['integer_node'])) {
+ $this->integerNode = $value['integer_node'];
+ unset($value['integer_node']);
+ }
+
+ if (isset($value['scalar_node'])) {
+ $this->scalarNode = $value['scalar_node'];
+ unset($value['scalar_node']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->booleanNode) {
+ $output['boolean_node'] = $this->booleanNode;
+ }
+ if (null !== $this->enumNode) {
+ $output['enum_node'] = $this->enumNode;
+ }
+ if (null !== $this->floatNode) {
+ $output['float_node'] = $this->floatNode;
+ }
+ if (null !== $this->integerNode) {
+ $output['integer_node'] = $this->integerNode;
+ }
+ if (null !== $this->scalarNode) {
+ $output['scalar_node'] = $this->scalarNode;
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/Fixtures/VariableType/Symfony/Config/VariableTypeConfig.php b/src/Symfony/Component/Config/Tests/Builder/Fixtures/VariableType/Symfony/Config/VariableTypeConfig.php
new file mode 100644
index 0000000000000..0ee7efe7f362b
--- /dev/null
+++ b/src/Symfony/Component/Config/Tests/Builder/Fixtures/VariableType/Symfony/Config/VariableTypeConfig.php
@@ -0,0 +1,57 @@
+anyValue = $value;
+
+ return $this;
+ }
+
+ public function getExtensionAlias(): string
+ {
+ return 'variable_type';
+ }
+
+ public function __construct(array $value = [])
+ {
+
+ if (isset($value['any_value'])) {
+ $this->anyValue = $value['any_value'];
+ unset($value['any_value']);
+ }
+
+ if ([] !== $value) {
+ throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
+ }
+ }
+
+ public function toArray(): array
+ {
+ $output = [];
+ if (null !== $this->anyValue) {
+ $output['any_value'] = $this->anyValue;
+ }
+
+ return $output;
+ }
+
+}
diff --git a/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php b/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php
index 4089bacc97f26..83b98d12ac363 100644
--- a/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php
+++ b/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php
@@ -11,6 +11,8 @@
use Symfony\Component\Config\Tests\Builder\Fixtures\NodeInitialValues;
use Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
+use Symfony\Component\Filesystem\Filesystem;
+use Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator;
use Symfony\Config\AddToListConfig;
/**
@@ -20,6 +22,23 @@
*/
class GeneratedConfigTest extends TestCase
{
+ private $tempDir = [];
+
+ protected function setup(): void
+ {
+ parent::setup();
+
+ $this->tempDir = [];
+ }
+
+ protected function tearDown(): void
+ {
+ (new Filesystem())->remove($this->tempDir);
+ $this->tempDir = [];
+
+ parent::tearDown();
+ }
+
public function fixtureNames()
{
$array = [
@@ -49,11 +68,19 @@ public function fixtureNames()
public function testConfig(string $name, string $alias)
{
$basePath = __DIR__.'/Fixtures/';
- $configBuilder = $this->generateConfigBuilder('Symfony\\Component\\Config\\Tests\\Builder\\Fixtures\\'.$name);
$callback = include $basePath.$name.'.config.php';
$expectedOutput = include $basePath.$name.'.output.php';
+ $expectedCode = $basePath.$name;
+
+ // to regenerate snapshot files, uncomment this line
+ // $configBuilder = $this->generateConfigBuilder('Symfony\\Component\\Config\\Tests\\Builder\\Fixtures\\'.$name, $expectedCode);
+
+ $outputDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf_config_builder', true);
+ $configBuilder = $this->generateConfigBuilder('Symfony\\Component\\Config\\Tests\\Builder\\Fixtures\\'.$name, $outputDir);
$callback($configBuilder);
+ $this->assertDirectorySame($expectedCode, $outputDir);
+
$this->assertInstanceOf(ConfigBuilderInterface::class, $configBuilder);
$this->assertSame($alias, $configBuilder->getExtensionAlias());
$output = $configBuilder->toArray();
@@ -118,8 +145,13 @@ public function testSetExtraKeyMethodIsNotGeneratedWhenAllowExtraKeysIsFalse()
/**
* Generate the ConfigBuilder or return an already generated instance.
*/
- private function generateConfigBuilder(string $configurationClass)
+ private function generateConfigBuilder(string $configurationClass, string $outputDir = null)
{
+ $outputDir ?? $outputDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf_config_builder', true);
+ if (!str_contains($outputDir, __DIR__)) {
+ $this->tempDir[] = $outputDir;
+ }
+
$configuration = new $configurationClass();
$rootNode = $configuration->getConfigTreeBuilder()->buildTree();
$rootClass = new ClassBuilder('Symfony\\Config', $rootNode->getName());
@@ -128,13 +160,31 @@ private function generateConfigBuilder(string $configurationClass)
return new $fqcn();
}
- $outputDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf_config_builder', true);
-
- // This line is helpful for debugging
- // $outputDir = __DIR__.'/.build';
-
$loader = (new ConfigBuilderGenerator($outputDir))->build(new $configurationClass());
return $loader();
}
+
+ private function assertDirectorySame($expected, $current)
+ {
+ $expectedFiles = [];
+ foreach (new \RecursiveIteratorIterator(new RecursiveDirectoryIterator($expected, \FilesystemIterator::SKIP_DOTS)) as $file) {
+ if ($file->isDir()) {
+ continue;
+ }
+ $expectedFiles[substr($file->getPathname(), \strlen($expected))] = $file->getPathname();
+ }
+ $currentFiles = [];
+ foreach (new \RecursiveIteratorIterator(new RecursiveDirectoryIterator($current, \FilesystemIterator::SKIP_DOTS)) as $file) {
+ if ($file->isDir()) {
+ continue;
+ }
+ $currentFiles[substr($file->getPathname(), \strlen($current))] = $file->getPathname();
+ }
+
+ $this->assertSame(array_keys($expectedFiles), array_keys($currentFiles));
+ foreach ($expectedFiles as $fileName => $filePath) {
+ $this->assertFileEquals($filePath, $currentFiles[$fileName]);
+ }
+ }
}
diff --git a/src/Symfony/Component/Config/composer.json b/src/Symfony/Component/Config/composer.json
index 3d4154b1ddfef..b357ed317b1fc 100644
--- a/src/Symfony/Component/Config/composer.json
+++ b/src/Symfony/Component/Config/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/filesystem": "^4.4|^5.0|^6.0",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-php80": "^1.16",
@@ -27,7 +27,7 @@
"symfony/event-dispatcher": "^4.4|^5.0|^6.0",
"symfony/finder": "^4.4|^5.0|^6.0",
"symfony/messenger": "^4.4|^5.0|^6.0",
- "symfony/service-contracts": "^1.1|^2",
+ "symfony/service-contracts": "^1.1|^2|^3",
"symfony/yaml": "^4.4|^5.0|^6.0"
},
"conflict": {
diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php
index 91403c275c9b0..735b1ef18ee36 100644
--- a/src/Symfony/Component/Console/Application.php
+++ b/src/Symfony/Component/Console/Application.php
@@ -1067,7 +1067,7 @@ protected function getDefaultInputDefinition()
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'),
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
- new InputOption('--ansi', '', InputOption::VALUE_NEGATABLE, 'Force (or disable --no-ansi) ANSI output', false),
+ new InputOption('--ansi', '', InputOption::VALUE_NEGATABLE, 'Force (or disable --no-ansi) ANSI output', null),
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'),
]);
}
diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md
index fedb08823e15b..6662dd1eb7e23 100644
--- a/src/Symfony/Component/Console/CHANGELOG.md
+++ b/src/Symfony/Component/Console/CHANGELOG.md
@@ -18,6 +18,7 @@ CHANGELOG
* Add support for bright colors
* Add `#[AsCommand]` attribute for declaring commands on PHP 8
* Add `Helper::width()` and `Helper::length()`
+ * The `--ansi` and `--no-ansi` options now default to `null`.
5.2.0
-----
diff --git a/src/Symfony/Component/Console/Completion/CompletionSuggestions.php b/src/Symfony/Component/Console/Completion/CompletionSuggestions.php
index 13572472e4357..d8905e5ee77df 100644
--- a/src/Symfony/Component/Console/Completion/CompletionSuggestions.php
+++ b/src/Symfony/Component/Console/Completion/CompletionSuggestions.php
@@ -18,7 +18,7 @@
*
* @author Wouter de Jong
*/
-class CompletionSuggestions
+final class CompletionSuggestions
{
private $valueSuggestions = [];
private $optionSuggestions = [];
@@ -26,11 +26,13 @@ class CompletionSuggestions
/**
* Add a suggested value for an input option or argument.
*
+ * @param string|Suggestion $value
+ *
* @return $this
*/
- public function suggestValue(string $value): self
+ public function suggestValue($value): self
{
- $this->valueSuggestions[] = $value;
+ $this->valueSuggestions[] = !$value instanceof Suggestion ? new Suggestion($value) : $value;
return $this;
}
@@ -38,13 +40,15 @@ public function suggestValue(string $value): self
/**
* Add multiple suggested values at once for an input option or argument.
*
- * @param string[] $values
+ * @param list $values
*
* @return $this
*/
public function suggestValues(array $values): self
{
- $this->valueSuggestions = array_merge($this->valueSuggestions, $values);
+ foreach ($values as $value) {
+ $this->suggestValue($value);
+ }
return $this;
}
@@ -86,7 +90,7 @@ public function getOptionSuggestions(): array
}
/**
- * @return string[]
+ * @return Suggestion[]
*/
public function getValueSuggestions(): array
{
diff --git a/src/Symfony/Component/Console/Completion/Output/BashCompletionOutput.php b/src/Symfony/Component/Console/Completion/Output/BashCompletionOutput.php
index cfe8415d1a2a0..8d5ffa6b67d4b 100644
--- a/src/Symfony/Component/Console/Completion/Output/BashCompletionOutput.php
+++ b/src/Symfony/Component/Console/Completion/Output/BashCompletionOutput.php
@@ -21,10 +21,10 @@ class BashCompletionOutput implements CompletionOutputInterface
{
public function write(CompletionSuggestions $suggestions, OutputInterface $output): void
{
- $options = $suggestions->getValueSuggestions();
+ $values = $suggestions->getValueSuggestions();
foreach ($suggestions->getOptionSuggestions() as $option) {
- $options[] = '--'.$option->getName();
+ $values[] = '--'.$option->getName();
}
- $output->writeln(implode("\n", $options));
+ $output->writeln(implode("\n", $values));
}
}
diff --git a/src/Symfony/Component/Console/Completion/Suggestion.php b/src/Symfony/Component/Console/Completion/Suggestion.php
new file mode 100644
index 0000000000000..6c7bc4dc4c3bb
--- /dev/null
+++ b/src/Symfony/Component/Console/Completion/Suggestion.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Completion;
+
+/**
+ * Represents a single suggested value.
+ *
+ * @author Wouter de Jong
+ */
+class Suggestion
+{
+ private $value;
+
+ public function __construct(string $value)
+ {
+ $this->value = $value;
+ }
+
+ public function getValue(): string
+ {
+ return $this->value;
+ }
+
+ public function __toString(): string
+ {
+ return $this->getValue();
+ }
+}
diff --git a/src/Symfony/Component/Console/README.md b/src/Symfony/Component/Console/README.md
index c89b4a1a2066b..c4c129989cbd9 100644
--- a/src/Symfony/Component/Console/README.md
+++ b/src/Symfony/Component/Console/README.md
@@ -4,6 +4,18 @@ Console Component
The Console component eases the creation of beautiful and testable command line
interfaces.
+Sponsor
+-------
+
+The Console component for Symfony 5.4/6.0 is [backed][1] by [Les-Tilleuls.coop][2].
+
+Les-Tilleuls.coop is a team of 50+ Symfony experts who can help you design, develop and
+fix your projects. We provide a wide range of professional services including development,
+consulting, coaching, training and audits. We also are highly skilled in JS, Go and DevOps.
+We are a worker cooperative!
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -18,3 +30,7 @@ Credits
`Resources/bin/hiddeninput.exe` is a third party binary provided within this
component. Find sources and license at https://github.com/Seldaek/hidden-input.
+
+[1]: https://symfony.com/backers
+[2]: https://les-tilleuls.coop
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Console/Tester/CommandCompletionTester.php b/src/Symfony/Component/Console/Tester/CommandCompletionTester.php
index 95cec8982e70f..ade7327529c32 100644
--- a/src/Symfony/Component/Console/Tester/CommandCompletionTester.php
+++ b/src/Symfony/Component/Console/Tester/CommandCompletionTester.php
@@ -51,6 +51,6 @@ public function complete(array $input): array
$options[] = '--'.$option->getName();
}
- return array_merge($options, $suggestions->getValueSuggestions());
+ return array_map('strval', array_merge($options, $suggestions->getValueSuggestions()));
}
}
diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.json b/src/Symfony/Component/Console/Tests/Fixtures/application_1.json
index 8c8ba2285f59a..280a4247eb39f 100644
--- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.json
+++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.json
@@ -63,7 +63,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -72,7 +72,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -175,7 +175,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -184,7 +184,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -287,7 +287,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -296,7 +296,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -390,7 +390,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -399,7 +399,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.md b/src/Symfony/Component/Console/Tests/Fixtures/application_1.md
index dd88bef8724f6..98474874d2e59 100644
--- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.md
+++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.md
@@ -111,7 +111,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -222,7 +222,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -349,7 +349,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.json b/src/Symfony/Component/Console/Tests/Fixtures/application_2.json
index 172eaa310fb44..89171150ca858 100644
--- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.json
+++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.json
@@ -67,7 +67,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -76,7 +76,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -179,7 +179,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -188,7 +188,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -291,7 +291,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -300,7 +300,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -394,7 +394,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -403,7 +403,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -482,7 +482,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -491,7 +491,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -578,7 +578,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -587,7 +587,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -655,7 +655,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -664,7 +664,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
@@ -734,7 +734,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Force (or disable --no-ansi) ANSI output",
- "default": false
+ "default": null
},
"no-ansi": {
"name": "--no-ansi",
@@ -743,7 +743,7 @@
"is_value_required": false,
"is_multiple": false,
"description": "Negate the \"--ansi\" option",
- "default": false
+ "default": null
},
"no-interaction": {
"name": "--no-interaction",
diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.md b/src/Symfony/Component/Console/Tests/Fixtures/application_2.md
index f45be81999c5c..265e7117f21c9 100644
--- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.md
+++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.md
@@ -124,7 +124,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -235,7 +235,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -362,7 +362,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -437,7 +437,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -528,7 +528,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -600,7 +600,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md b/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md
index b64976d13a90c..2e6fc5f695b8a 100644
--- a/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md
+++ b/src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.md
@@ -115,7 +115,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -226,7 +226,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -353,7 +353,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
@@ -444,7 +444,7 @@ Force (or disable --no-ansi) ANSI output
* Is value required: no
* Is multiple: no
* Is negatable: yes
-* Default: `false`
+* Default: `NULL`
#### `--no-interaction|-n`
diff --git a/src/Symfony/Component/Console/composer.json b/src/Symfony/Component/Console/composer.json
index aece50f614f06..2a7b429ac1f8b 100644
--- a/src/Symfony/Component/Console/composer.json
+++ b/src/Symfony/Component/Console/composer.json
@@ -17,11 +17,11 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
"symfony/polyfill-php80": "^1.16",
- "symfony/service-contracts": "^1.1|^2",
+ "symfony/service-contracts": "^1.1|^2|^3",
"symfony/string": "^5.1|^6.0"
},
"require-dev": {
diff --git a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
index d3491acb3b3cc..6dfc1669fa837 100644
--- a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
+++ b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
@@ -268,7 +268,7 @@ private function addServices(\DOMElement $parent)
private function convertParameters(array $parameters, string $type, \DOMElement $parent, string $keyAttribute = 'key')
{
- $withKeys = array_keys($parameters) !== range(0, \count($parameters) - 1);
+ $withKeys = !array_is_list($parameters);
foreach ($parameters as $key => $value) {
$element = $this->document->createElement($type);
if ($withKeys) {
diff --git a/src/Symfony/Component/DependencyInjection/composer.json b/src/Symfony/Component/DependencyInjection/composer.json
index 7ca3476027a56..36eda6eea9e21 100644
--- a/src/Symfony/Component/DependencyInjection/composer.json
+++ b/src/Symfony/Component/DependencyInjection/composer.json
@@ -18,8 +18,9 @@
"require": {
"php": ">=7.2.5",
"psr/container": "^1.1.1",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16",
+ "symfony/polyfill-php81": "^1.22",
"symfony/service-contracts": "^1.1.6|^2"
},
"require-dev": {
diff --git a/src/Symfony/Component/DomCrawler/composer.json b/src/Symfony/Component/DomCrawler/composer.json
index dd5909116c6d9..f89432dacd1f2 100644
--- a/src/Symfony/Component/DomCrawler/composer.json
+++ b/src/Symfony/Component/DomCrawler/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.16"
diff --git a/src/Symfony/Component/Dotenv/composer.json b/src/Symfony/Component/Dotenv/composer.json
index 8ef8831988bee..bec034f87a14b 100644
--- a/src/Symfony/Component/Dotenv/composer.json
+++ b/src/Symfony/Component/Dotenv/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1"
+ "symfony/deprecation-contracts": "^2.1|^3"
},
"require-dev": {
"symfony/console": "^4.4|^5.0|^6.0",
diff --git a/src/Symfony/Component/ErrorHandler/composer.json b/src/Symfony/Component/ErrorHandler/composer.json
index f228d00f93e27..bc0d88e9d6884 100644
--- a/src/Symfony/Component/ErrorHandler/composer.json
+++ b/src/Symfony/Component/ErrorHandler/composer.json
@@ -23,7 +23,7 @@
"require-dev": {
"symfony/http-kernel": "^4.4|^5.0|^6.0",
"symfony/serializer": "^4.4|^5.0|^6.0",
- "symfony/deprecation-contracts": "^2.1"
+ "symfony/deprecation-contracts": "^2.1|^3"
},
"autoload": {
"psr-4": { "Symfony\\Component\\ErrorHandler\\": "" },
diff --git a/src/Symfony/Component/EventDispatcher/composer.json b/src/Symfony/Component/EventDispatcher/composer.json
index 9fe34f59d74ef..32b42e40848ae 100644
--- a/src/Symfony/Component/EventDispatcher/composer.json
+++ b/src/Symfony/Component/EventDispatcher/composer.json
@@ -17,8 +17,8 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
- "symfony/event-dispatcher-contracts": "^2",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/event-dispatcher-contracts": "^2|^3",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
@@ -27,7 +27,7 @@
"symfony/config": "^4.4|^5.0|^6.0",
"symfony/error-handler": "^4.4|^5.0|^6.0",
"symfony/http-foundation": "^4.4|^5.0|^6.0",
- "symfony/service-contracts": "^1.1|^2",
+ "symfony/service-contracts": "^1.1|^2|^3",
"symfony/stopwatch": "^4.4|^5.0|^6.0",
"psr/log": "^1|^2|^3"
},
diff --git a/src/Symfony/Component/ExpressionLanguage/composer.json b/src/Symfony/Component/ExpressionLanguage/composer.json
index e8feea5cb2544..93199741c94e8 100644
--- a/src/Symfony/Component/ExpressionLanguage/composer.json
+++ b/src/Symfony/Component/ExpressionLanguage/composer.json
@@ -18,7 +18,7 @@
"require": {
"php": ">=7.2.5",
"symfony/cache": "^4.4|^5.0|^6.0",
- "symfony/service-contracts": "^1.1|^2"
+ "symfony/service-contracts": "^1.1|^2|^3"
},
"autoload": {
"psr-4": { "Symfony\\Component\\ExpressionLanguage\\": "" },
diff --git a/src/Symfony/Component/Form/composer.json b/src/Symfony/Component/Form/composer.json
index 8cca7280e4525..ff9e6b9af6aa7 100644
--- a/src/Symfony/Component/Form/composer.json
+++ b/src/Symfony/Component/Form/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/event-dispatcher": "^4.4|^5.0|^6.0",
"symfony/options-resolver": "^5.1|^6.0",
"symfony/polyfill-ctype": "~1.8",
@@ -26,7 +26,7 @@
"symfony/polyfill-php80": "^1.16",
"symfony/polyfill-php81": "^1.23",
"symfony/property-access": "^5.0.8|^6.0",
- "symfony/service-contracts": "^1.1|^2"
+ "symfony/service-contracts": "^1.1|^2|^3"
},
"require-dev": {
"doctrine/collections": "~1.0",
diff --git a/src/Symfony/Component/HttpClient/HttpClientTrait.php b/src/Symfony/Component/HttpClient/HttpClientTrait.php
index f6ee2106c72b1..94a132706028c 100644
--- a/src/Symfony/Component/HttpClient/HttpClientTrait.php
+++ b/src/Symfony/Component/HttpClient/HttpClientTrait.php
@@ -496,7 +496,7 @@ private static function parseUrl(string $url, array $query = [], array $allowedS
throw new InvalidArgumentException(sprintf('Unsupported IDN "%s", try enabling the "intl" PHP extension or running "composer require symfony/polyfill-intl-idn".', $host));
}
- $host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, \IDNA_DEFAULT, \INTL_IDNA_VARIANT_UTS46) ?: strtolower($host) : strtolower($host);
+ $host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, \IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI | \IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII, \INTL_IDNA_VARIANT_UTS46) ?: strtolower($host) : strtolower($host);
$host .= $port ? ':'.$port : '';
}
diff --git a/src/Symfony/Component/HttpClient/README.md b/src/Symfony/Component/HttpClient/README.md
index 214489b7e7f76..0c55ccc118876 100644
--- a/src/Symfony/Component/HttpClient/README.md
+++ b/src/Symfony/Component/HttpClient/README.md
@@ -3,6 +3,16 @@ HttpClient component
The HttpClient component provides powerful methods to fetch HTTP resources synchronously or asynchronously.
+Sponsor
+-------
+
+The Httpclient component for Symfony 5.4/6.0 is [backed][1] by [Klaxoon][2].
+
+Klaxoon is a platform that empowers organizations to run effective and
+productive workshops easily in a hybrid environment. Anytime, Anywhere.
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -11,3 +21,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://klaxoon.com
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php
index cc44e9d5625cd..b811626c0c670 100644
--- a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php
@@ -163,6 +163,8 @@ public function provideParseUrl(): iterable
yield [[null, null, 'bar', '?a%5Bb%5Bc%5D=d', null], 'bar?a[b[c]=d', []];
yield [[null, null, 'bar', '?a%5Bb%5D%5Bc%5D=dd', null], 'bar?a[b][c]=d&e[f]=g', ['a' => ['b' => ['c' => 'dd']], 'e[f]' => null]];
yield [[null, null, 'bar', '?a=b&a%5Bb%20c%5D=d&e%3Df=%E2%9C%93', null], 'bar?a=b', ['a' => ['b c' => 'd'], 'e=f' => '✓']];
+ // IDNA 2008 compliance
+ yield [['https:', '//xn--fuball-cta.test', null, null, null], 'https://fußball.test'];
}
/**
diff --git a/src/Symfony/Component/HttpClient/composer.json b/src/Symfony/Component/HttpClient/composer.json
index 213495149b9d2..084c2581219f1 100644
--- a/src/Symfony/Component/HttpClient/composer.json
+++ b/src/Symfony/Component/HttpClient/composer.json
@@ -23,11 +23,11 @@
"require": {
"php": ">=7.2.5",
"psr/log": "^1|^2|^3",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/http-client-contracts": "^2.4",
"symfony/polyfill-php73": "^1.11",
"symfony/polyfill-php80": "^1.16",
- "symfony/service-contracts": "^1.0|^2"
+ "symfony/service-contracts": "^1.0|^2|^3"
},
"require-dev": {
"amphp/amp": "^2.5",
diff --git a/src/Symfony/Component/HttpFoundation/README.md b/src/Symfony/Component/HttpFoundation/README.md
index 5cf9007444456..424f2c4f0b848 100644
--- a/src/Symfony/Component/HttpFoundation/README.md
+++ b/src/Symfony/Component/HttpFoundation/README.md
@@ -4,6 +4,16 @@ HttpFoundation Component
The HttpFoundation component defines an object-oriented layer for the HTTP
specification.
+Sponsor
+-------
+
+The HttpFoundation component for Symfony 5.4/6.0 is [backed][1] by [Laravel][2].
+
+Laravel is a PHP web development framework that is passionate about maximum developer
+happiness. Laravel is built using a variety of bespoke and Symfony based components.
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -12,3 +22,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://laravel.com/
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json
index a61493232652b..d54bbfd16006b 100644
--- a/src/Symfony/Component/HttpFoundation/composer.json
+++ b/src/Symfony/Component/HttpFoundation/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-mbstring": "~1.1",
"symfony/polyfill-php80": "^1.16"
},
diff --git a/src/Symfony/Component/HttpKernel/HttpCache/SubRequestHandler.php b/src/Symfony/Component/HttpKernel/HttpCache/SubRequestHandler.php
index a453e432be80d..253071f07da7b 100644
--- a/src/Symfony/Component/HttpKernel/HttpCache/SubRequestHandler.php
+++ b/src/Symfony/Component/HttpKernel/HttpCache/SubRequestHandler.php
@@ -38,6 +38,7 @@ public static function handle(HttpKernelInterface $kernel, Request $request, int
'X_FORWARDED_HOST' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_HOST,
'X_FORWARDED_PROTO' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PROTO,
'X_FORWARDED_PORT' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PORT,
+ 'X_FORWARDED_PREFIX' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PREFIX,
];
foreach (array_filter($trustedHeaders) as $name => $key) {
$request->headers->remove($name);
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index 585651ee0b623..f55f5f693dcec 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -78,12 +78,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
*/
private static $freshCache = [];
- public const VERSION = '5.4.0-BETA3';
+ public const VERSION = '5.4.0-RC1';
public const VERSION_ID = 50400;
public const MAJOR_VERSION = 5;
public const MINOR_VERSION = 4;
public const RELEASE_VERSION = 0;
- public const EXTRA_VERSION = 'BETA3';
+ public const EXTRA_VERSION = 'RC1';
public const END_OF_MAINTENANCE = '11/2024';
public const END_OF_LIFE = '11/2025';
diff --git a/src/Symfony/Component/HttpKernel/README.md b/src/Symfony/Component/HttpKernel/README.md
index 18d15f5ad835f..ca504178278c4 100644
--- a/src/Symfony/Component/HttpKernel/README.md
+++ b/src/Symfony/Component/HttpKernel/README.md
@@ -5,6 +5,18 @@ The HttpKernel component provides a structured process for converting a Request
into a Response by making use of the EventDispatcher component. It's flexible
enough to create full-stack frameworks, micro-frameworks or advanced CMS systems like Drupal.
+Sponsor
+-------
+
+The HttpKernel component for Symfony 5.4/6.0 is [backed][1] by [Les-Tilleuls.coop][2].
+
+Les-Tilleuls.coop is a team of 50+ Symfony experts who can help you design, develop and
+fix your projects. We provide a wide range of professional services including development,
+consulting, coaching, training and audits. We also are highly skilled in JS, Go and DevOps.
+We are a worker cooperative!
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -13,3 +25,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://les-tilleuls.coop
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php
index 7ab9b6c45f037..f17abb20281f3 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/SubRequestHandlerTest.php
@@ -42,6 +42,7 @@ public function testTrustedHeadersAreKept()
$request->headers->set('X-Forwarded-Host', 'Good');
$request->headers->set('X-Forwarded-Port', '1234');
$request->headers->set('X-Forwarded-Proto', 'https');
+ $request->headers->set('X-Forwarded-Prefix', '/admin');
$kernel = new TestSubRequestHandlerKernel(function ($request, $type, $catch) {
$this->assertSame('127.0.0.1', $request->server->get('REMOTE_ADDR'));
@@ -49,6 +50,7 @@ public function testTrustedHeadersAreKept()
$this->assertSame('Good', $request->headers->get('X-Forwarded-Host'));
$this->assertSame('1234', $request->headers->get('X-Forwarded-Port'));
$this->assertSame('https', $request->headers->get('X-Forwarded-Proto'));
+ $this->assertSame('/admin', $request->headers->get('X-Forwarded-Prefix'));
});
SubRequestHandler::handle($kernel, $request, HttpKernelInterface::MAIN_REQUEST, true);
@@ -64,6 +66,7 @@ public function testUntrustedHeadersAreRemoved()
$request->headers->set('X-Forwarded-Host', 'Evil');
$request->headers->set('X-Forwarded-Port', '1234');
$request->headers->set('X-Forwarded-Proto', 'http');
+ $request->headers->set('X-Forwarded-Prefix', '/admin');
$request->headers->set('Forwarded', 'Evil2');
$kernel = new TestSubRequestHandlerKernel(function ($request, $type, $catch) {
@@ -72,6 +75,7 @@ public function testUntrustedHeadersAreRemoved()
$this->assertFalse($request->headers->has('X-Forwarded-Host'));
$this->assertFalse($request->headers->has('X-Forwarded-Port'));
$this->assertFalse($request->headers->has('X-Forwarded-Proto'));
+ $this->assertFalse($request->headers->has('X-Forwarded-Prefix'));
$this->assertSame('for="10.0.0.1";host="localhost";proto=http', $request->headers->get('Forwarded'));
});
@@ -112,12 +116,14 @@ public function testTrustedXForwardedForHeader()
$request->headers->set('X-Forwarded-For', '10.0.0.2');
$request->headers->set('X-Forwarded-Host', 'foo.bar');
$request->headers->set('X-Forwarded-Proto', 'https');
+ $request->headers->set('X-Forwarded-Prefix', '/admin');
$kernel = new TestSubRequestHandlerKernel(function ($request, $type, $catch) {
$this->assertSame('127.0.0.1', $request->server->get('REMOTE_ADDR'));
$this->assertSame('10.0.0.2', $request->getClientIp());
$this->assertSame('foo.bar', $request->getHttpHost());
$this->assertSame('https', $request->getScheme());
+ $this->assertSame('/admin', $request->getBaseUrl());
});
SubRequestHandler::handle($kernel, $request, HttpKernelInterface::MAIN_REQUEST, true);
diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json
index dfa9820a856f5..09682db49d2e6 100644
--- a/src/Symfony/Component/HttpKernel/composer.json
+++ b/src/Symfony/Component/HttpKernel/composer.json
@@ -17,10 +17,9 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/error-handler": "^4.4|^5.0|^6.0",
"symfony/event-dispatcher": "^5.0|^6.0",
- "symfony/http-client-contracts": "^1.1|^2",
"symfony/http-foundation": "^5.3.7|^6.0",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-php73": "^1.9",
@@ -36,11 +35,12 @@
"symfony/dom-crawler": "^4.4|^5.0|^6.0",
"symfony/expression-language": "^4.4|^5.0|^6.0",
"symfony/finder": "^4.4|^5.0|^6.0",
+ "symfony/http-client-contracts": "^1.1|^2|^3",
"symfony/process": "^4.4|^5.0|^6.0",
"symfony/routing": "^4.4|^5.0|^6.0",
"symfony/stopwatch": "^4.4|^5.0|^6.0",
"symfony/translation": "^4.4|^5.0|^6.0",
- "symfony/translation-contracts": "^1.1|^2",
+ "symfony/translation-contracts": "^1.1|^2|^3",
"psr/cache": "^1.0|^2.0|^3.0",
"twig/twig": "^2.13|^3.0.4"
},
diff --git a/src/Symfony/Component/Inflector/composer.json b/src/Symfony/Component/Inflector/composer.json
index e7d648a60dde9..5b7280c1f42ce 100644
--- a/src/Symfony/Component/Inflector/composer.json
+++ b/src/Symfony/Component/Inflector/composer.json
@@ -24,7 +24,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16",
"symfony/string": "^5.3.10|^6.0"
},
diff --git a/src/Symfony/Component/Intl/composer.json b/src/Symfony/Component/Intl/composer.json
index 5bc325d8e2c45..2a75c5662b5b9 100644
--- a/src/Symfony/Component/Intl/composer.json
+++ b/src/Symfony/Component/Intl/composer.json
@@ -25,7 +25,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
diff --git a/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php b/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php
index f93178d279c30..7de5e394c2660 100644
--- a/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php
@@ -229,7 +229,7 @@ public function supports(Request $request): ?bool
{
}
- public function authenticate(Request $request): PassportInterface
+ public function authenticate(Request $request): Passport
{
}
diff --git a/src/Symfony/Component/Lock/composer.json b/src/Symfony/Component/Lock/composer.json
index 46de4d5b0102a..dbb01a0056ee4 100644
--- a/src/Symfony/Component/Lock/composer.json
+++ b/src/Symfony/Component/Lock/composer.json
@@ -18,7 +18,7 @@
"require": {
"php": ">=7.2.5",
"psr/log": "^1|^2|^3",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json b/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json
index eae96452402b2..aad87e370e290 100644
--- a/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json
+++ b/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json
@@ -19,7 +19,7 @@
"php": ">=7.2.5",
"async-aws/ses": "^1.0",
"psr/event-dispatcher": "^1",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/mailer": "^4.4.21|^5.2.6|^6.0"
},
"require-dev": {
diff --git a/src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php b/src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php
index ff9e41058434f..51f0b3ba0f0f0 100644
--- a/src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php
@@ -12,7 +12,7 @@ class GmailTransportFactoryTest extends TransportFactoryTestCase
{
public function getFactory(): TransportFactoryInterface
{
- return new GmailTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger());
+ return new GmailTransportFactory($this->getDispatcher(), null, $this->getLogger());
}
public function supportsProvider(): iterable
diff --git a/src/Symfony/Component/Mailer/Bridge/Google/composer.json b/src/Symfony/Component/Mailer/Bridge/Google/composer.json
index a2bfb7a3ca162..d08d66043bf9c 100644
--- a/src/Symfony/Component/Mailer/Bridge/Google/composer.json
+++ b/src/Symfony/Component/Mailer/Bridge/Google/composer.json
@@ -20,9 +20,6 @@
"psr/event-dispatcher": "^1",
"symfony/mailer": "^4.4|^5.0|^6.0"
},
- "require-dev": {
- "symfony/http-client": "^4.4|^5.0|^6.0"
- },
"autoload": {
"psr-4": { "Symfony\\Component\\Mailer\\Bridge\\Google\\": "" },
"exclude-from-classmap": [
diff --git a/src/Symfony/Component/Mailer/composer.json b/src/Symfony/Component/Mailer/composer.json
index 0975a077d101a..53cf0f5119ad0 100644
--- a/src/Symfony/Component/Mailer/composer.json
+++ b/src/Symfony/Component/Mailer/composer.json
@@ -20,14 +20,14 @@
"egulias/email-validator": "^2.1.10|^3",
"psr/event-dispatcher": "^1",
"psr/log": "^1|^2|^3",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/event-dispatcher": "^4.4|^5.0|^6.0",
"symfony/mime": "^5.2.6|^6.0",
"symfony/polyfill-php80": "^1.16",
- "symfony/service-contracts": "^1.1|^2"
+ "symfony/service-contracts": "^1.1|^2|^3"
},
"require-dev": {
- "symfony/http-client-contracts": "^1.1|^2",
+ "symfony/http-client-contracts": "^1.1|^2|^3",
"symfony/messenger": "^4.4|^5.0|^6.0"
},
"conflict": {
diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/composer.json b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/composer.json
index 633ef2b602289..b076649e7e1f6 100644
--- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/composer.json
+++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/composer.json
@@ -20,11 +20,11 @@
"async-aws/core": "^1.5",
"async-aws/sqs": "^1.0",
"symfony/messenger": "^4.3|^5.0|^6.0",
- "symfony/service-contracts": "^1.1|^2",
+ "symfony/service-contracts": "^1.1|^2|^3",
"psr/log": "^1|^2|^3"
},
"require-dev": {
- "symfony/http-client-contracts": "^1.0|^2.0",
+ "symfony/http-client-contracts": "^1|^2|^3",
"symfony/property-access": "^4.4|^5.0|^6.0",
"symfony/serializer": "^4.4|^5.0|^6.0"
},
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/composer.json b/src/Symfony/Component/Messenger/Bridge/Amqp/composer.json
index 7a6a5159726ed..dd0ecf90ef068 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/composer.json
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/messenger": "^5.3|^6.0"
},
"require-dev": {
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/composer.json b/src/Symfony/Component/Messenger/Bridge/Doctrine/composer.json
index 9ba0de6982a9a..5a360a30521f7 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/composer.json
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/composer.json
@@ -18,7 +18,7 @@
"require": {
"php": ">=7.2.5",
"symfony/messenger": "^5.1|^6.0",
- "symfony/service-contracts": "^1.1|^2"
+ "symfony/service-contracts": "^1.1|^2|^3"
},
"require-dev": {
"doctrine/dbal": "^2.13|^3.0",
diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/composer.json b/src/Symfony/Component/Messenger/Bridge/Redis/composer.json
index a88a084410723..c663be4bc5ad9 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/composer.json
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/messenger": "^5.1|^6.0"
},
"require-dev": {
diff --git a/src/Symfony/Component/Messenger/README.md b/src/Symfony/Component/Messenger/README.md
index a253171a5529c..644269c7f34a1 100644
--- a/src/Symfony/Component/Messenger/README.md
+++ b/src/Symfony/Component/Messenger/README.md
@@ -4,6 +4,17 @@ Messenger Component
The Messenger component helps applications send and receive messages to/from
other applications or via message queues.
+Sponsor
+-------
+
+The Messenger component for Symfony 5.4/6.0 is [backed][1] by [SensioLabs][2].
+
+As the creator of Symfony, SensioLabs supports companies using Symfony, with an
+offering encompassing consultancy, expertise, services, training, and technical
+assistance to ensure the success of web application development projects.
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -12,3 +23,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://sensiolabs.com
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Messenger/composer.json b/src/Symfony/Component/Messenger/composer.json
index 9faf9f5ced4a7..a62537cc63a97 100644
--- a/src/Symfony/Component/Messenger/composer.json
+++ b/src/Symfony/Component/Messenger/composer.json
@@ -19,7 +19,7 @@
"php": ">=7.2.5",
"psr/log": "^1|^2|^3",
"symfony/amqp-messenger": "^5.1|^6.0",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/doctrine-messenger": "^5.1|^6.0",
"symfony/polyfill-php80": "^1.16",
"symfony/redis-messenger": "^5.1|^6.0"
@@ -34,7 +34,7 @@
"symfony/property-access": "^4.4|^5.0|^6.0",
"symfony/routing": "^4.4|^5.0|^6.0",
"symfony/serializer": "^5.0|^6.0",
- "symfony/service-contracts": "^1.1|^2",
+ "symfony/service-contracts": "^1.1|^2|^3",
"symfony/stopwatch": "^4.4|^5.0|^6.0",
"symfony/validator": "^4.4|^5.0|^6.0"
},
diff --git a/src/Symfony/Component/Mime/Encoder/IdnAddressEncoder.php b/src/Symfony/Component/Mime/Encoder/IdnAddressEncoder.php
index a14035ba794b9..b56e7e3963010 100644
--- a/src/Symfony/Component/Mime/Encoder/IdnAddressEncoder.php
+++ b/src/Symfony/Component/Mime/Encoder/IdnAddressEncoder.php
@@ -35,7 +35,7 @@ public function encodeString(string $address): string
$domain = substr($address, $i + 1);
if (preg_match('/[^\x00-\x7F]/', $domain)) {
- $address = sprintf('%s@%s', $local, idn_to_ascii($domain, 0, \INTL_IDNA_VARIANT_UTS46));
+ $address = sprintf('%s@%s', $local, idn_to_ascii($domain, \IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI | \IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII, \INTL_IDNA_VARIANT_UTS46));
}
}
diff --git a/src/Symfony/Component/Mime/Tests/Encoder/IdnAddressEncoderTest.php b/src/Symfony/Component/Mime/Tests/Encoder/IdnAddressEncoderTest.php
new file mode 100644
index 0000000000000..71e7716f8961b
--- /dev/null
+++ b/src/Symfony/Component/Mime/Tests/Encoder/IdnAddressEncoderTest.php
@@ -0,0 +1,13 @@
+assertSame('test@xn--fuball-cta.test', (new IdnAddressEncoder())->encodeString('test@fußball.test'));
+ }
+}
diff --git a/src/Symfony/Component/Mime/composer.json b/src/Symfony/Component/Mime/composer.json
index 66bd6aa4c771d..cd04969b9a9cc 100644
--- a/src/Symfony/Component/Mime/composer.json
+++ b/src/Symfony/Component/Mime/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-php80": "^1.16"
diff --git a/src/Symfony/Component/Notifier/Bridge/FakeChat/composer.json b/src/Symfony/Component/Notifier/Bridge/FakeChat/composer.json
index c28580fd33b8d..0d2a4792a0010 100644
--- a/src/Symfony/Component/Notifier/Bridge/FakeChat/composer.json
+++ b/src/Symfony/Component/Notifier/Bridge/FakeChat/composer.json
@@ -24,7 +24,7 @@
"php": ">=7.2.5",
"symfony/http-client": "^4.4|^5.2|^6.0",
"symfony/notifier": "^5.3|^6.0",
- "symfony/event-dispatcher-contracts": "^2",
+ "symfony/event-dispatcher-contracts": "^2|^3",
"symfony/mailer": "^5.2|^6.0"
},
"autoload": {
diff --git a/src/Symfony/Component/Notifier/Bridge/FakeSms/composer.json b/src/Symfony/Component/Notifier/Bridge/FakeSms/composer.json
index 0bd895212efc0..e7199872f3629 100644
--- a/src/Symfony/Component/Notifier/Bridge/FakeSms/composer.json
+++ b/src/Symfony/Component/Notifier/Bridge/FakeSms/composer.json
@@ -24,7 +24,7 @@
"php": ">=7.2.5",
"symfony/http-client": "^4.4|^5.2|^6.0",
"symfony/notifier": "^5.3|^6.0",
- "symfony/event-dispatcher-contracts": "^2",
+ "symfony/event-dispatcher-contracts": "^2|^3",
"symfony/mailer": "^5.2|^6.0"
},
"autoload": {
diff --git a/src/Symfony/Component/Notifier/Bridge/Mercure/composer.json b/src/Symfony/Component/Notifier/Bridge/Mercure/composer.json
index 3e55c680468f8..54137dd9d3cc3 100644
--- a/src/Symfony/Component/Notifier/Bridge/Mercure/composer.json
+++ b/src/Symfony/Component/Notifier/Bridge/Mercure/composer.json
@@ -20,7 +20,7 @@
"ext-json": "*",
"symfony/mercure": "^0.5.2",
"symfony/notifier": "^5.3|^6.0",
- "symfony/service-contracts": "^1.10|^2"
+ "symfony/service-contracts": "^1.10|^2|^3"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Notifier\\Bridge\\Mercure\\": "" },
diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/composer.json b/src/Symfony/Component/Notifier/Bridge/Slack/composer.json
index 8d7b8efdc1252..f5c7b522b2e1d 100644
--- a/src/Symfony/Component/Notifier/Bridge/Slack/composer.json
+++ b/src/Symfony/Component/Notifier/Bridge/Slack/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/http-client": "^4.3|^5.0|^6.0",
"symfony/notifier": "^5.3|^6.0"
},
diff --git a/src/Symfony/Component/Notifier/README.md b/src/Symfony/Component/Notifier/README.md
index 79e516f69871d..4a9631653841e 100644
--- a/src/Symfony/Component/Notifier/README.md
+++ b/src/Symfony/Component/Notifier/README.md
@@ -3,6 +3,19 @@ Notifier Component
The Notifier component sends notifications via one or more channels (email, SMS, ...).
+Sponsor
+-------
+
+The Notifier component for Symfony 5.4/6.0 is [backed][1] by [Mercure.rocks][2].
+
+Create real-time experiences in minutes! Mercure.rocks provides a realtime API service
+that is tightly integrated with Symfony: create UIs that update in live with UX Turbo,
+send notifications with the Notifier component, expose async APIs with API Platform and
+create low level stuffs with the Mercure component. We maintain and scale the complex
+infrastructure for you!
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -11,3 +24,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://mercure.rocks
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Notifier/composer.json b/src/Symfony/Component/Notifier/composer.json
index 3de18a4942ddb..dbc43a07154b6 100644
--- a/src/Symfony/Component/Notifier/composer.json
+++ b/src/Symfony/Component/Notifier/composer.json
@@ -21,8 +21,8 @@
"psr/log": "^1|^2|^3"
},
"require-dev": {
- "symfony/event-dispatcher-contracts": "^2",
- "symfony/http-client-contracts": "^2",
+ "symfony/event-dispatcher-contracts": "^2|^3",
+ "symfony/http-client-contracts": "^2|^3",
"symfony/messenger": "^4.4|^5.0|^6.0"
},
"conflict": {
diff --git a/src/Symfony/Component/OptionsResolver/composer.json b/src/Symfony/Component/OptionsResolver/composer.json
index 6e65a79e939a6..a38d1bd047a3d 100644
--- a/src/Symfony/Component/OptionsResolver/composer.json
+++ b/src/Symfony/Component/OptionsResolver/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php73": "~1.0",
"symfony/polyfill-php80": "^1.16"
},
diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php
index 60bd20393fb8f..f31e57358503c 100644
--- a/src/Symfony/Component/Process/Process.php
+++ b/src/Symfony/Component/Process/Process.php
@@ -340,7 +340,7 @@ public function start(callable $callback = null, array $env = [])
$envPairs = [];
foreach ($env as $k => $v) {
- if (false !== $v) {
+ if (false !== $v && 'argc' !== $k && 'argv' !== $k) {
$envPairs[] = $k.'='.$v;
}
}
@@ -1143,25 +1143,12 @@ public function getEnv()
/**
* Sets the environment variables.
*
- * Each environment variable value should be a string.
- * If it is an array, the variable is ignored.
- * If it is false or null, it will be removed when
- * env vars are otherwise inherited.
- *
- * That happens in PHP when 'argv' is registered into
- * the $_ENV array for instance.
- *
- * @param array $env The new environment variables
+ * @param array $env The new environment variables
*
* @return $this
*/
public function setEnv(array $env)
{
- // Process cannot handle env values that are arrays
- $env = array_filter($env, function ($value) {
- return !\is_array($value);
- });
-
$this->env = $env;
return $this;
@@ -1664,12 +1651,6 @@ private function getDefaultEnv(): array
$env = getenv();
$env = array_intersect_key($env, $_SERVER) ?: $env;
- foreach ($_ENV as $k => $v) {
- if (\is_string($v)) {
- $env[$k] = $v;
- }
- }
-
- return $env;
+ return $_ENV + $env;
}
}
diff --git a/src/Symfony/Component/Process/README.md b/src/Symfony/Component/Process/README.md
index afce5e45eee34..8777de4a65c52 100644
--- a/src/Symfony/Component/Process/README.md
+++ b/src/Symfony/Component/Process/README.md
@@ -3,6 +3,17 @@ Process Component
The Process component executes commands in sub-processes.
+Sponsor
+-------
+
+The Process component for Symfony 5.4/6.0 is [backed][1] by [SensioLabs][2].
+
+As the creator of Symfony, SensioLabs supports companies using Symfony, with an
+offering encompassing consultancy, expertise, services, training, and technical
+assistance to ensure the success of web application development projects.
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -11,3 +22,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://sensiolabs.com
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/PropertyAccess/composer.json b/src/Symfony/Component/PropertyAccess/composer.json
index 17f859f8cbbce..fb6103a5275b3 100644
--- a/src/Symfony/Component/PropertyAccess/composer.json
+++ b/src/Symfony/Component/PropertyAccess/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16",
"symfony/property-info": "^5.2|^6.0"
},
diff --git a/src/Symfony/Component/PropertyInfo/composer.json b/src/Symfony/Component/PropertyInfo/composer.json
index 0008ef0492ab1..e6a29c069e3e7 100644
--- a/src/Symfony/Component/PropertyInfo/composer.json
+++ b/src/Symfony/Component/PropertyInfo/composer.json
@@ -24,7 +24,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16",
"symfony/string": "^5.1|^6.0"
},
diff --git a/src/Symfony/Component/Routing/composer.json b/src/Symfony/Component/Routing/composer.json
index 740c524e908d8..b978c06263f27 100644
--- a/src/Symfony/Component/Routing/composer.json
+++ b/src/Symfony/Component/Routing/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
diff --git a/src/Symfony/Component/Security/Core/README.md b/src/Symfony/Component/Security/Core/README.md
index 6b3e5c990107c..b47ab331c82b3 100644
--- a/src/Symfony/Component/Security/Core/README.md
+++ b/src/Symfony/Component/Security/Core/README.md
@@ -6,6 +6,17 @@ which makes it possible to easily separate the actual authorization logic from
so called user providers that hold the users credentials. It is inspired by
the Java Spring framework.
+Sponsor
+-------
+
+The Security component for Symfony 5.4/6.0 is [backed][1] by [SymfonyCasts][2].
+
+Learn Symfony faster by watching real projects being built and actively coding
+along with them. SymfonyCasts bridges that learning gap, bringing you video
+tutorials and coding challenges. Code on!
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -14,3 +25,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://symfonycasts.com
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Security/Core/composer.json b/src/Symfony/Component/Security/Core/composer.json
index 43b8d4078cb60..2270a04c7416b 100644
--- a/src/Symfony/Component/Security/Core/composer.json
+++ b/src/Symfony/Component/Security/Core/composer.json
@@ -17,10 +17,10 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/event-dispatcher-contracts": "^1.1|^2",
+ "symfony/event-dispatcher-contracts": "^1.1|^2|^3",
"symfony/polyfill-php80": "^1.16",
- "symfony/service-contracts": "^1.1.6|^2",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/service-contracts": "^1.1.6|^2|^3",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/password-hasher": "^5.3|^6.0"
},
"require-dev": {
diff --git a/src/Symfony/Component/Security/Csrf/README.md b/src/Symfony/Component/Security/Csrf/README.md
index 8933061585ff9..a27d877284343 100644
--- a/src/Symfony/Component/Security/Csrf/README.md
+++ b/src/Symfony/Component/Security/Csrf/README.md
@@ -4,6 +4,17 @@ Security Component - CSRF
The Security CSRF (cross-site request forgery) component provides a class
`CsrfTokenManager` for generating and validating CSRF tokens.
+Sponsor
+-------
+
+The Security component for Symfony 5.4/6.0 is [backed][1] by [SymfonyCasts][2].
+
+Learn Symfony faster by watching real projects being built and actively coding
+along with them. SymfonyCasts bridges that learning gap, bringing you video
+tutorials and coding challenges. Code on!
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -12,3 +23,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://symfonycasts.com
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Security/Guard/README.md b/src/Symfony/Component/Security/Guard/README.md
index 968558f79f86a..7316a8dcb496d 100644
--- a/src/Symfony/Component/Security/Guard/README.md
+++ b/src/Symfony/Component/Security/Guard/README.md
@@ -5,6 +5,17 @@ The Guard component brings many layers of authentication together, making
it much easier to create complex authentication systems where you have
total control.
+Sponsor
+-------
+
+The Security component for Symfony 5.4/6.0 is [backed][1] by [SymfonyCasts][2].
+
+Learn Symfony faster by watching real projects being built and actively coding
+along with them. SymfonyCasts bridges that learning gap, bringing you video
+tutorials and coding challenges. Code on!
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -13,3 +24,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://symfonycasts.com
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Security/Guard/composer.json b/src/Symfony/Component/Security/Guard/composer.json
index ffd6bd5981cf0..4852ce9e0e34d 100644
--- a/src/Symfony/Component/Security/Guard/composer.json
+++ b/src/Symfony/Component/Security/Guard/composer.json
@@ -17,8 +17,8 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/security-core": "^5.0|^6.0",
- "symfony/security-http": "^5.3|^6.0",
+ "symfony/security-core": "^5.0",
+ "symfony/security-http": "^5.3",
"symfony/polyfill-php80": "^1.15"
},
"require-dev": {
diff --git a/src/Symfony/Component/Security/Http/README.md b/src/Symfony/Component/Security/Http/README.md
index e12d19fbeb697..594f5adb3aece 100644
--- a/src/Symfony/Component/Security/Http/README.md
+++ b/src/Symfony/Component/Security/Http/README.md
@@ -6,6 +6,17 @@ which makes it possible to easily separate the actual authorization logic from
so called user providers that hold the users credentials. It is inspired by
the Java Spring framework.
+Sponsor
+-------
+
+The Security component for Symfony 5.4/6.0 is [backed][1] by [SymfonyCasts][2].
+
+Learn Symfony faster by watching real projects being built and actively coding
+along with them. SymfonyCasts bridges that learning gap, bringing you video
+tutorials and coding challenges. Code on!
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -14,3 +25,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://symfonycasts.com
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Security/Http/composer.json b/src/Symfony/Component/Security/Http/composer.json
index 2e7064dd9f648..dc0deba03d20e 100644
--- a/src/Symfony/Component/Security/Http/composer.json
+++ b/src/Symfony/Component/Security/Http/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/security-core": "^5.4|^6.0",
"symfony/http-foundation": "^5.3|^6.0",
"symfony/http-kernel": "^5.3|^6.0",
diff --git a/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php b/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php
index 4afa17184ae9e..747178953feeb 100644
--- a/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php
+++ b/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php
@@ -36,7 +36,8 @@ class CsvEncoder implements EncoderInterface, DecoderInterface
private const UTF8_BOM = "\xEF\xBB\xBF";
- private $formulasStartCharacters = ['=', '-', '+', '@'];
+ private const FORMULAS_START_CHARACTERS = ['=', '-', '+', '@', "\t", "\r"];
+
private $defaultContext = [
self::DELIMITER_KEY => ',',
self::ENCLOSURE_KEY => '"',
@@ -227,8 +228,8 @@ private function flatten(iterable $array, array &$result, string $keySeparator,
if (is_iterable($value)) {
$this->flatten($value, $result, $keySeparator, $parentKey.$key.$keySeparator, $escapeFormulas);
} else {
- if ($escapeFormulas && \in_array(substr((string) $value, 0, 1), $this->formulasStartCharacters, true)) {
- $result[$parentKey.$key] = "\t".$value;
+ if ($escapeFormulas && \in_array(substr((string) $value, 0, 1), self::FORMULAS_START_CHARACTERS, true)) {
+ $result[$parentKey.$key] = "'".$value;
} else {
// Ensures an actual value is used when dealing with true and false
$result[$parentKey.$key] = false === $value ? 0 : (true === $value ? 1 : $value);
diff --git a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
index d84dd6335d481..b81862b570940 100644
--- a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
+++ b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
@@ -114,7 +114,7 @@ protected function extractAttributes(object $object, string $format = null, arra
}
} while ($reflectionObject = $reflectionObject->getParentClass());
- return $attributes;
+ return array_unique($attributes);
}
/**
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php
index c71a173d42b61..b28667b2e19d4 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php
@@ -257,31 +257,52 @@ public function testEncodeFormulas()
$this->assertSame(<<<'CSV'
0
-" =2+3"
+'=2+3
CSV
, $this->encoder->encode(['=2+3'], 'csv'));
$this->assertSame(<<<'CSV'
0
-" -2+3"
+'-2+3
CSV
, $this->encoder->encode(['-2+3'], 'csv'));
$this->assertSame(<<<'CSV'
0
-" +2+3"
+'+2+3
CSV
, $this->encoder->encode(['+2+3'], 'csv'));
$this->assertSame(<<<'CSV'
0
-" @MyDataColumn"
+'@MyDataColumn
CSV
, $this->encoder->encode(['@MyDataColumn'], 'csv'));
+
+ $this->assertSame(<<<'CSV'
+0
+"' tab"
+
+CSV
+ , $this->encoder->encode(["\ttab"], 'csv'));
+
+ $this->assertSame(<<<'CSV'
+0
+"'=1+2"";=1+2"
+
+CSV
+ , $this->encoder->encode(['=1+2";=1+2'], 'csv'));
+
+ $this->assertSame(<<<'CSV'
+0
+"'=1+2'"" ;,=1+2"
+
+CSV
+ , $this->encoder->encode(['=1+2\'" ;,=1+2'], 'csv'));
}
public function testDoNotEncodeFormulas()
@@ -313,13 +334,34 @@ public function testDoNotEncodeFormulas()
CSV
, $this->encoder->encode(['@MyDataColumn'], 'csv'));
+
+ $this->assertSame(<<<'CSV'
+0
+" tab"
+
+CSV
+ , $this->encoder->encode(["\ttab"], 'csv'));
+
+ $this->assertSame(<<<'CSV'
+0
+"=1+2"";=1+2"
+
+CSV
+ , $this->encoder->encode(['=1+2";=1+2'], 'csv'));
+
+ $this->assertSame(<<<'CSV'
+0
+"=1+2'"" ;,=1+2"
+
+CSV
+ , $this->encoder->encode(['=1+2\'" ;,=1+2'], 'csv'));
}
public function testEncodeFormulasWithSettingsPassedInContext()
{
$this->assertSame(<<<'CSV'
0
-" =2+3"
+'=2+3
CSV
, $this->encoder->encode(['=2+3'], 'csv', [
@@ -328,7 +370,7 @@ public function testEncodeFormulasWithSettingsPassedInContext()
$this->assertSame(<<<'CSV'
0
-" -2+3"
+'-2+3
CSV
, $this->encoder->encode(['-2+3'], 'csv', [
@@ -337,7 +379,7 @@ public function testEncodeFormulasWithSettingsPassedInContext()
$this->assertSame(<<<'CSV'
0
-" +2+3"
+'+2+3
CSV
, $this->encoder->encode(['+2+3'], 'csv', [
@@ -346,12 +388,39 @@ public function testEncodeFormulasWithSettingsPassedInContext()
$this->assertSame(<<<'CSV'
0
-" @MyDataColumn"
+'@MyDataColumn
CSV
, $this->encoder->encode(['@MyDataColumn'], 'csv', [
CsvEncoder::ESCAPE_FORMULAS_KEY => true,
]));
+
+ $this->assertSame(<<<'CSV'
+0
+"' tab"
+
+CSV
+ , $this->encoder->encode(["\ttab"], 'csv', [
+ CsvEncoder::ESCAPE_FORMULAS_KEY => true,
+ ]));
+
+ $this->assertSame(<<<'CSV'
+0
+"'=1+2"";=1+2"
+
+CSV
+ , $this->encoder->encode(['=1+2";=1+2'], 'csv', [
+ CsvEncoder::ESCAPE_FORMULAS_KEY => true,
+ ]));
+
+ $this->assertSame(<<<'CSV'
+0
+"'=1+2'"" ;,=1+2"
+
+CSV
+ , $this->encoder->encode(['=1+2\'" ;,=1+2'], 'csv', [
+ CsvEncoder::ESCAPE_FORMULAS_KEY => true,
+ ]));
}
public function testEncodeWithoutHeader()
diff --git a/src/Symfony/Component/Serializer/Tests/SerializerTest.php b/src/Symfony/Component/Serializer/Tests/SerializerTest.php
index 8d5ff1e6335eb..0d4c8700d432c 100644
--- a/src/Symfony/Component/Serializer/Tests/SerializerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/SerializerTest.php
@@ -1150,38 +1150,6 @@ public function getIterator(): \ArrayIterator
}
}
-class BazLegacy
-{
- public $list;
-
- public $settings = [];
-
- public function __construct(array $list)
- {
- $this->list = new DummyListLegacy($list);
- }
-}
-
-class DummyListLegacy implements \Countable, \IteratorAggregate
-{
- public $list;
-
- public function __construct(array $list)
- {
- $this->list = $list;
- }
-
- public function count(): int
- {
- return \count($this->list);
- }
-
- public function getIterator(): \Traversable
- {
- return new \ArrayIterator($this->list);
- }
-}
-
interface NormalizerAwareNormalizer extends NormalizerInterface, NormalizerAwareInterface
{
}
diff --git a/src/Symfony/Component/Serializer/composer.json b/src/Symfony/Component/Serializer/composer.json
index 0374c9d3e9149..403d04c0c85db 100644
--- a/src/Symfony/Component/Serializer/composer.json
+++ b/src/Symfony/Component/Serializer/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-php80": "^1.16"
},
diff --git a/src/Symfony/Component/Stopwatch/composer.json b/src/Symfony/Component/Stopwatch/composer.json
index 27224947e2c5a..ed918d36f1605 100644
--- a/src/Symfony/Component/Stopwatch/composer.json
+++ b/src/Symfony/Component/Stopwatch/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/service-contracts": "^1.0|^2"
+ "symfony/service-contracts": "^1|^2|^3"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Stopwatch\\": "" },
diff --git a/src/Symfony/Component/Translation/Bridge/Crowdin/README.md b/src/Symfony/Component/Translation/Bridge/Crowdin/README.md
index 7caef72eee8d9..a1b8a1a6cc46c 100644
--- a/src/Symfony/Component/Translation/Bridge/Crowdin/README.md
+++ b/src/Symfony/Component/Translation/Bridge/Crowdin/README.md
@@ -20,6 +20,15 @@ where:
[Generate Personal Access Token on Crowdin Enterprise](https://support.crowdin.com/enterprise/personal-access-tokens/)
+Sponsor
+-------
+
+This bridge for Symfony 5.4/6.0 is [backed][1] by [Crowdin][2].
+
+Crowdin is a cloud-based localization management software helping teams to go global and stay agile.
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -27,3 +36,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://crowdin.com
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Translation/Bridge/Lokalise/README.md b/src/Symfony/Component/Translation/Bridge/Lokalise/README.md
index 64e6cd0de7800..e91ac094f3cab 100644
--- a/src/Symfony/Component/Translation/Bridge/Lokalise/README.md
+++ b/src/Symfony/Component/Translation/Bridge/Lokalise/README.md
@@ -19,6 +19,16 @@ Go to the Project Settings in Lokalise to find the Project ID.
[Generate an API key on Lokalise](https://app.lokalise.com/api2docs/curl/#resource-authentication)
+Sponsor
+-------
+
+This bridge for Symfony 5.4/6.0 is [backed][1] by [Lokalise][2].
+
+Lokalise is a continuous localization and translation management platform. It integrates
+into your development workflow so you can ship localized products, faster.
+
+Help Symfony by [sponsoring][3] its development!
+
Resources
---------
@@ -26,3 +36,7 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://lokalise.com
+[3]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Translation/README.md b/src/Symfony/Component/Translation/README.md
index 720bee3b81086..adda9a5b21e55 100644
--- a/src/Symfony/Component/Translation/README.md
+++ b/src/Symfony/Component/Translation/README.md
@@ -23,6 +23,16 @@ $translator->addResource('array', [
echo $translator->trans('Hello World!'); // outputs « Bonjour ! »
```
+Sponsor
+-------
+
+The Translation component for Symfony 5.4/6.0 is [backed][1] by:
+
+ * [Crowdin][2], a cloud-based localization management software helping teams to go global and stay agile.
+ * [Lokalise][3], a continuous localization and translation management platform that integrates into your development workflow so you can ship localized products, faster.
+
+Help Symfony by [sponsoring][4] its development!
+
Resources
---------
@@ -31,3 +41,8 @@ Resources
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://crowdin.com
+[3]: https://lokalise.com
+[4]: https://symfony.com/sponsor
diff --git a/src/Symfony/Component/Translation/composer.json b/src/Symfony/Component/Translation/composer.json
index 52312ec4eaccd..5c9266b7eed6d 100644
--- a/src/Symfony/Component/Translation/composer.json
+++ b/src/Symfony/Component/Translation/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
+ "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.16",
"symfony/translation-contracts": "^2.3"
@@ -30,7 +30,7 @@
"symfony/http-kernel": "^5.0|^6.0",
"symfony/intl": "^4.4|^5.0|^6.0",
"symfony/polyfill-intl-icu": "^1.21",
- "symfony/service-contracts": "^1.1.2|^2",
+ "symfony/service-contracts": "^1.1.2|^2|^3",
"symfony/yaml": "^4.4|^5.0|^6.0",
"symfony/finder": "^4.4|^5.0|^6.0",
"psr/log": "^1|^2|^3"
diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf
index b341436bc5e18..75410192190ef 100644
--- a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf
+++ b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf
@@ -394,6 +394,14 @@
This value is not a valid CSS color.
Tato hodnota není platná barva CSS.
+
+ This value is not a valid CIDR notation.
+ Tato hodnota není platná notace CIDR.
+
+
+ The value of the netmask should be between {{ min }} and {{ max }}.
+ Hodnota masky sítě musí být mezi {{ min }} a {{ max }}.
+