diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md
index 8e7a8406ff391..7fc92f86eb326 100644
--- a/CHANGELOG-3.4.md
+++ b/CHANGELOG-3.4.md
@@ -7,6 +7,35 @@ in 3.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/v3.4.0...v3.4.1
+* 3.4.40 (2020-04-28)
+
+ * bug #36566 [PhpUnitBridge] Use COMPOSER_BINARY env var if available (fancyweb)
+ * bug #36560 [YAML] escape DEL(\x7f) (sdkawata)
+ * bug #36539 [PhpUnitBridge] fix compatibility with phpunit 9 (garak)
+ * bug #36555 [Cache] skip APCu in chains when the backend is disabled (nicolas-grekas)
+ * bug #36523 [Form] apply automatically step=1 for datetime-local input (ottaviano)
+ * bug #36498 [Security/Core] fix escape for username in LdapBindAuthenticationProvider.php (stoccc)
+ * bug #36506 [FrameworkBundle] Fix session.attribute_bag service definition (fancyweb)
+ * bug #36490 [HttpFoundation] workaround PHP bug in the session module (nicolas-grekas)
+ * bug #36483 [SecurityBundle] fix accepting env vars in remember-me configurations (zek)
+ * bug #36343 [Form] Fixed handling groups sequence validation (HeahDude)
+ * bug #36460 [Cache] Avoid memory leak in TraceableAdapter::reset() (lyrixx)
+ * bug #36411 [Form] RepeatedType should always have inner types mapped (biozshock)
+ * bug #36441 [DI] fix loading defaults when using the PHP-DSL (nicolas-grekas)
+ * bug #36434 [HttpKernel] silence E_NOTICE triggered since PHP 7.4 (xabbuh)
+ * bug #36365 [Validator] Fixed default group for nested composite constraints (HeahDude)
+ * bug #35591 [Validator] do not merge constraints within interfaces (greedyivan)
+ * bug #36375 [Workflow] Use a strict comparison when retrieving raw marking in MarkingStore (lyrixx)
+ * bug #36305 [PropertyInfo][ReflectionExtractor] Check the array mutator prefixes last when the property is singular (fancyweb)
+ * bug #35656 [HttpFoundation] Fixed session migration with custom cookie lifetime (Guite)
+ * bug #36315 [WebProfilerBundle] Support for Content Security Policy style-src-elem and script-src-elem in WebProfiler (ampaze)
+ * bug #36286 [Validator] Allow URL-encoded special characters in basic auth part of URLs (cweiske)
+ * bug #36332 [Serializer] Fix unitialized properties (from PHP 7.4.2) when serializing context for the cache key (alanpoulain)
+ * bug #36239 [HttpKernel][LoggerDataCollector] Prevent keys collisions in the sanitized logs processing (fancyweb)
+ * bug #36245 [Validator] Fixed calling getters before resolving groups (HeahDude)
+ * bug #36252 [Security/Http] Allow setting cookie security settings for delete_cookies (wouterj)
+ * bug #36261 [FrameworkBundle] revert to legacy wiring of the session when circular refs are detected (nicolas-grekas)
+
* 3.4.39 (2020-03-30)
* bug #36216 [Validator] Assert Valid with many groups (phucwan91)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 53a2faec2f45f..449973d7578eb 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -24,10 +24,10 @@ Symfony is the result of the work of many people who made the code better
- Kris Wallsmith (kriswallsmith)
- Yonel Ceruto (yonelceruto)
- Hugo Hamon (hhamon)
+ - Wouter de Jong (wouterj)
+ - Thomas Calvet (fancyweb)
- Abdellatif Ait boudad (aitboudad)
- Samuel ROZE (sroze)
- - Thomas Calvet (fancyweb)
- - Wouter de Jong (wouterj)
- Romain Neutron (romain)
- Pascal Borreli (pborreli)
- Joseph Bielawski (stloyd)
@@ -37,8 +37,8 @@ Symfony is the result of the work of many people who made the code better
- Jules Pietri (heah)
- Hamza Amrouche (simperfit)
- Martin Hasoň (hason)
- - Jeremy Mikola (jmikola)
- Jérémy DERUSSÉ (jderusse)
+ - Jeremy Mikola (jmikola)
- Jean-François Simon (jfsimon)
- Benjamin Eberlei (beberlei)
- Igor Wiedler (igorw)
@@ -50,9 +50,9 @@ Symfony is the result of the work of many people who made the code better
- Lynn van der Berg (kjarli)
- Diego Saint Esteben (dosten)
- Matthias Pigulla (mpdude)
+ - Pierre du Plessis (pierredup)
- Alexandre Salomé (alexandresalome)
- William Durand (couac)
- - Pierre du Plessis (pierredup)
- ornicar
- Dany Maillard (maidmaid)
- Francis Besset (francisbesset)
@@ -69,10 +69,10 @@ Symfony is the result of the work of many people who made the code better
- Gabriel Ostrolucký (gadelat)
- Miha Vrhovnik
- David Maicher (dmaicher)
- - Diego Saint Esteben (dii3g0)
- Gábor Egyed (1ed)
- - Titouan Galopin (tgalopin)
+ - Diego Saint Esteben (dii3g0)
- Jan Schädlich (jschaedl)
+ - Titouan Galopin (tgalopin)
- Konstantin Kudryashov (everzet)
- Bilal Amarni (bamarni)
- Mathieu Piot (mpiot)
@@ -110,6 +110,7 @@ Symfony is the result of the work of many people who made the code better
- Baptiste Clavié (talus)
- Michal Piotrowski (eventhorizon)
- Tim Nagel (merk)
+ - Sebastiaan Stok (sstok)
- Chris Wilkinson (thewilkybarkid)
- Brice BERNARD (brikou)
- marc.weistroff
@@ -119,7 +120,6 @@ Symfony is the result of the work of many people who made the code better
- lenar
- Alexander Schwenn (xelaris)
- Włodzimierz Gajda (gajdaw)
- - Sebastiaan Stok (sstok)
- Adrien Brault (adrienbrault)
- Jacob Dreesen (jdreesen)
- Florian Voutzinos (florianv)
@@ -139,18 +139,18 @@ Symfony is the result of the work of many people who made the code better
- Przemysław Bogusz (przemyslaw-bogusz)
- Eric GELOEN (gelo)
- Lars Strojny (lstrojny)
+ - Massimiliano Arione (garak)
- Jannik Zschiesche (apfelbox)
- Robert Schönthal (digitalkaoz)
- Gregor Harlan (gharlan)
- Florian Lonqueu-Brochard (florianlb)
+ - Alexander Schranz (alexander-schranz)
- Gabriel Caruso (carusogabriel)
- Stefano Sala (stefano.sala)
- Evgeniy (ewgraf)
- - Massimiliano Arione (garak)
- Julien Falque (julienfalque)
- Vincent AUBERT (vincent)
- Juti Noppornpitak (shiroyuki)
- - Alexander Schranz (alexander-schranz)
- Anthony MARTIN (xurudragon)
- Tigran Azatyan (tigranazatyan)
- Sebastian Hörl (blogsh)
@@ -176,6 +176,7 @@ Symfony is the result of the work of many people who made the code better
- Richard van Laak (rvanlaak)
- Richard Shank (iampersistent)
- Thomas Rabaix (rande)
+ - Ahmed TAILOULOUTE (ahmedtai)
- Vincent Touzet (vincenttouzet)
- jeremyFreeAgent (jeremyfreeagent)
- Rouven Weßling (realityking)
@@ -198,6 +199,7 @@ Symfony is the result of the work of many people who made the code better
- James Halsall (jaitsu)
- Matthieu Napoli (mnapoli)
- Florent Mata (fmata)
+ - Antoine Makdessi (amakdessi)
- Warnar Boekkooi (boekkooi)
- Dmitrii Chekaliuk (lazyhammer)
- Clément JOBEILI (dator)
@@ -213,15 +215,18 @@ Symfony is the result of the work of many people who made the code better
- Dennis Benkert (denderello)
- DQNEO
- Andre Rømcke (andrerom)
+ - Saif (╯°□°)╯ (azjezz)
- mcfedr (mcfedr)
- Gary PEGEOT (gary-p)
- Ruben Gonzalez (rubenrua)
- Benjamin Dulau (dbenjamin)
+ - Jan Rosier (rosier)
- Andreas Braun
- Mathieu Lemoine (lemoinem)
- Christian Schmidt
- Andreas Hucks (meandmymonkey)
- Tom Van Looy (tvlooy)
+ - Guillaume Pédelagrabe
- Noel Guilbert (noel)
- Anthony GRASSIOT (antograssiot)
- Stadly
@@ -233,7 +238,7 @@ Symfony is the result of the work of many people who made the code better
- Nikolay Labinskiy (e-moe)
- Martin Schuhfuß (usefulthink)
- apetitpa
- - Antoine Makdessi (amakdessi)
+ - Maxime Helias (maxhelias)
- Matthieu Bontemps (mbontemps)
- apetitpa
- Pierre Minnieur (pminnieur)
@@ -243,14 +248,13 @@ Symfony is the result of the work of many people who made the code better
- Laurent VOULLEMIER (lvo)
- Michael Lee (zerustech)
- Matthieu Auger (matthieuauger)
- - Ahmed TAILOULOUTE (ahmedtai)
+ - Mathias Arlaud (mtarld)
- Leszek Prabucki (l3l0)
- Fabien Bourigault (fbourigault)
- François Zaninotto (fzaninotto)
- Dustin Whittle (dustinwhittle)
- jeff
- John Kary (johnkary)
- - Jan Rosier (rosier)
- Justin Hileman (bobthecow)
- Blanchon Vincent (blanchonvincent)
- Michele Orselli (orso)
@@ -270,7 +274,6 @@ Symfony is the result of the work of many people who made the code better
- Marcel Beerta (mazen)
- Christopher Hertel (chertel)
- Ruud Kamphuis (ruudk)
- - Maxime Helias (maxhelias)
- Pavel Batanov (scaytrase)
- Mantis Development
- David Prévot
@@ -283,7 +286,6 @@ Symfony is the result of the work of many people who made the code better
- Lorenz Schori
- Sébastien Lavoie (lavoiesl)
- Dariusz
- - Saif (╯°□°)╯ (azjezz)
- Dmitrii Poddubnyi (karser)
- Michael Babker (mbabker)
- Francois Zaninotto
@@ -307,7 +309,6 @@ Symfony is the result of the work of many people who made the code better
- Arjen Brouwer (arjenjb)
- Katsuhiro OGAWA
- Patrick McDougle (patrick-mcdougle)
- - Guillaume Pédelagrabe
- Alif Rachmawadi
- Anton Chernikov (anton_ch1989)
- Kristen Gilden (kgilden)
@@ -336,9 +337,9 @@ Symfony is the result of the work of many people who made the code better
- Jeroen Spee (jeroens)
- Nikita Konstantinov
- Wodor Wodorski
+ - Olivier Dolbeau (odolbeau)
- Thomas Lallement (raziel057)
- Colin O'Dell (colinodell)
- - Mathias Arlaud (mtarld)
- Giorgio Premi
- renanbr
- Alex Rock (pierstoval)
@@ -364,6 +365,7 @@ Symfony is the result of the work of many people who made the code better
- Vilius Grigaliūnas
- David Badura (davidbadura)
- Chad Sikorra (chadsikorra)
+ - Alan Poulain (alanpoulain)
- Chris Smith (cs278)
- Thomas Bisignani (toma)
- Florian Klein (docteurklein)
@@ -413,7 +415,6 @@ Symfony is the result of the work of many people who made the code better
- Thomas Royer (cydonia7)
- Nicolas LEFEVRE (nicoweb)
- alquerci
- - Olivier Dolbeau (odolbeau)
- Oleg Andreyev
- Mateusz Sip (mateusz_sip)
- Francesco Levorato
@@ -426,6 +427,7 @@ Symfony is the result of the work of many people who made the code better
- Tomasz Kowalczyk (thunderer)
- Artur Eshenbrener
- Timo Bakx (timobakx)
+ - Antonio Pauletich (x-coder264)
- Thomas Perez (scullwm)
- Felix Labrecque
- Yaroslav Kiliba
@@ -443,7 +445,6 @@ Symfony is the result of the work of many people who made the code better
- Eduardo Gulias (egulias)
- giulio de donato (liuggio)
- ShinDarth
- - Alan Poulain
- Stéphane PY (steph_py)
- Philipp Kräutli (pkraeutli)
- Grzegorz (Greg) Zdanowski (kiler129)
@@ -540,10 +541,10 @@ Symfony is the result of the work of many people who made the code better
- Martijn Cuppens
- Vlad Gregurco (vgregurco)
- Boris Vujicic (boris.vujicic)
+ - Artem Lopata
- Chris Sedlmayr (catchamonkey)
- Kamil Kokot (pamil)
- Seb Koelen
- - Antonio Pauletich (x-coder264)
- Christoph Mewes (xrstf)
- Vitaliy Tverdokhlib (vitaliytv)
- Ariel Ferrandini (aferrandini)
@@ -553,14 +554,17 @@ Symfony is the result of the work of many people who made the code better
- Jonas Flodén (flojon)
- Tobias Weichart
- Gonzalo Vilaseca (gonzalovilaseca)
+ - Daniel STANCU
- Tarmo Leppänen (tarlepp)
- Marcin Sikoń (marphi)
- Dominik Zogg (dominik.zogg)
- Marek Pietrzak
- Luc Vieillescazes (iamluc)
- franek (franek)
+ - soyuka
- Raulnet
- Christian Wahler
+ - Giso Stallenberg (gisostallenberg)
- Gintautas Miselis
- Rob Bast
- Roberto Espinoza (respinoza)
@@ -599,6 +603,7 @@ Symfony is the result of the work of many people who made the code better
- Philipp Rieber (bicpi)
- Manuel de Ruiter (manuel)
- Nathanael Noblet (gnat)
+ - Dimitri Gritsajuk (ottaviano)
- nikos.sotiropoulos
- Eduardo Oliveira (entering)
- Ilya Antipenko (aivus)
@@ -744,6 +749,7 @@ Symfony is the result of the work of many people who made the code better
- Benjamin Cremer (bcremer)
- Javier López (loalf)
- Reinier Kip
+ - Jérôme Tamarelle (jtamarelle-prismamedia)
- Geoffrey Brier (geoffrey-brier)
- Alexandre Parent
- Vladimir Tsykun
@@ -778,7 +784,6 @@ Symfony is the result of the work of many people who made the code better
- Miquel Rodríguez Telep (mrtorrent)
- Sergey Kolodyazhnyy (skolodyazhnyy)
- umpirski
- - Artem Lopata
- M. Vondano
- Quentin de Longraye (quentinus95)
- Chris Heng (gigablah)
@@ -786,10 +791,10 @@ Symfony is the result of the work of many people who made the code better
- Richard Bradley
- Ulumuddin Yunus (joenoez)
- rtek
+ - Ivan Grigoriev
- Johann Saunier (prophet777)
- Sergey (upyx)
- Andreas Erhard
- - Giso Stallenberg (gisostallenberg)
- Michael Devery (mickadoo)
- Antoine Corcy
- Ahmed Ashraf (ahmedash95)
@@ -810,6 +815,7 @@ Symfony is the result of the work of many people who made the code better
- Cameron Porter
- Hossein Bukhamsin
- Oliver Hoff
+ - William Arslett
- Christian Sciberras (uuf6429)
- Disparity
- origaminal
@@ -856,7 +862,6 @@ Symfony is the result of the work of many people who made the code better
- Markus Fasselt (digilist)
- Julien DIDIER (juliendidier)
- Dominik Ritter (dritter)
- - Dimitri Gritsajuk (ottaviano)
- Sebastian Grodzicki (sgrodzicki)
- Mohamed Gamal
- Jeroen van den Enden (stoefke)
@@ -871,6 +876,7 @@ Symfony is the result of the work of many people who made the code better
- Yuen-Chi Lian
- Tarjei Huse (tarjei)
- Besnik Br
+ - Axel Guckelsberger (guite)
- Jose Gonzalez
- Jonathan (jls-esokia)
- Oleksii Zhurbytskyi
@@ -881,12 +887,14 @@ Symfony is the result of the work of many people who made the code better
- Jakub Kulhan (jakubkulhan)
- Shaharia Azam
- avorobiev
+ - stoccc
- Grégoire Penverne (gpenverne)
- Venu
- Lars Vierbergen
- Jonatan Männchen
- Dennis Hotson
- Andrew Tchircoff (andrewtch)
+ - Ahmed Raafat
- michaelwilliams
- Martin Kirilov
- 1emming
@@ -894,6 +902,7 @@ Symfony is the result of the work of many people who made the code better
- Tri Pham (phamuyentri)
- Jordan Deitch
- Casper Valdemar Poulsen
+ - Laurent Masforné (heisenberg)
- Josiah (josiah)
- Guillaume Verstraete (versgui)
- Greg ORIOL
@@ -961,10 +970,8 @@ Symfony is the result of the work of many people who made the code better
- Laurent Bassin (lbassin)
- andrey1s
- Abhoryo
- - Daniel STANCU
- Fabian Vogler (fabian)
- Korvin Szanto
- - soyuka
- Stéphan Kochen
- Arjan Keeman
- Alaattin Kahramanlar (alaattin)
@@ -1133,6 +1140,7 @@ Symfony is the result of the work of many people who made the code better
- Nicolas Le Goff (nlegoff)
- Ben Oman
- Chris de Kok
+ - Eduard Bulava (nonanerz)
- Lorenzo Millucci
- Andreas Kleemann
- Manuele Menozzi
@@ -1150,6 +1158,7 @@ Symfony is the result of the work of many people who made the code better
- hamza
- dantleech
- Bastien DURAND (deamon)
+ - Kajetan Kołtuniak (kajtii)
- Sander Goossens (sandergo90)
- Rudy Onfroy
- Tero Alén (tero)
@@ -1237,7 +1246,6 @@ Symfony is the result of the work of many people who made the code better
- Benjamin Paap (benjaminpaap)
- Claus Due (namelesscoder)
- Christian
- - William Arslett
- Denis Golubovskiy (bukashk0zzz)
- Sergii Smertin (nfx)
- Mikkel Paulson
@@ -1246,6 +1254,7 @@ Symfony is the result of the work of many people who made the code better
- Marc Duboc (icemad)
- Matthias Krauser (mkrauser)
- Martynas Narbutas
+ - Nilmar Sanchez Muguercia
- Toon Verwerft (veewee)
- Bailey Parker
- Eddie Jaoude
@@ -1289,6 +1298,7 @@ Symfony is the result of the work of many people who made the code better
- Stephen Clouse
- e-ivanov
- Michał (bambucha15)
+ - Benjamin Dos Santos
- Einenlum
- Jérémy Jarrié (gagnar)
- Jochen Bayer (jocl)
@@ -1344,6 +1354,7 @@ Symfony is the result of the work of many people who made the code better
- Klaus Purer
- arnaud (arnooo999)
- Gilles Doge (gido)
+ - Oscar Esteve (oesteve)
- abulford
- Philipp Kretzschmar
- antograssiot
@@ -1367,7 +1378,6 @@ Symfony is the result of the work of many people who made the code better
- Derek Lambert
- MightyBranch
- Kacper Gunia (cakper)
- - Jérôme Tamarelle (jtamarelle-prismamedia)
- Peter Thompson (petert82)
- error56
- Felicitus
@@ -1392,6 +1402,7 @@ Symfony is the result of the work of many people who made the code better
- Nyro (nyro)
- Marco
- Marc Torres
+ - Mark Spink
- Alberto Aldegheri
- Dmitri Petmanson
- heccjj
@@ -1412,7 +1423,6 @@ Symfony is the result of the work of many people who made the code better
- David Négrier (moufmouf)
- Quique Porta (quiqueporta)
- mohammadreza honarkhah
- - stoccc
- Andrea Quintino (dirk39)
- Tomasz Szymczyk (karion)
- Alex Vasilchenko
@@ -1468,7 +1478,6 @@ Symfony is the result of the work of many people who made the code better
- Walter Dal Mut (wdalmut)
- abluchet
- Ruud Arentsen
- - Ahmed Raafat
- Harald Tollefsen
- Matthieu
- Albin Kerouaton
@@ -1504,7 +1513,6 @@ Symfony is the result of the work of many people who made the code better
- Antal Áron (antalaron)
- Vašek Purchart (vasek-purchart)
- Janusz Jabłoński (yanoosh)
- - Ivan Grigoriev
- Fleuv
- Sandro Hopf
- Łukasz Makuch
@@ -1522,6 +1530,7 @@ Symfony is the result of the work of many people who made the code better
- Philip Frank
- David Brooks
- Lance McNearney
+ - Serhiy Lunak (slunak)
- Giorgio Premi
- Aurélien Fontaine
- ncou
@@ -1531,6 +1540,7 @@ Symfony is the result of the work of many people who made the code better
- Matt Daum (daum)
- Alberto Pirovano (geezmo)
- Pete Mitchell (peterjmit)
+ - phuc vo (phucwan)
- Tom Corrigan (tomcorrigan)
- Luis Galeas
- Bogdan Scordaliu
@@ -1543,7 +1553,6 @@ Symfony is the result of the work of many people who made the code better
- WedgeSama
- Felds Liscia
- Chihiro Adachi (chihiro-adachi)
- - Axel Guckelsberger (guite)
- Raphaëll Roussel
- Tadcka
- Beth Binkovitz
@@ -1651,6 +1660,7 @@ Symfony is the result of the work of many people who made the code better
- Flavian (2much)
- Gautier Deuette
- mike
+ - tadas
- Kirk Madera
- Keith Maika
- Mephistofeles
@@ -1834,6 +1844,7 @@ Symfony is the result of the work of many people who made the code better
- alefranz
- David Barratt
- Andrea Giannantonio
+ - Dries Vints
- Pavel.Batanov
- avi123
- Pavel Prischepa
@@ -1900,6 +1911,7 @@ Symfony is the result of the work of many people who made the code better
- Yannick Warnier (ywarnier)
- Kevin Decherf
- Jason Woods
+ - Christian Weiske
- Maria Grazia Patteri
- klemens
- dened
@@ -2149,6 +2161,7 @@ Symfony is the result of the work of many people who made the code better
- Evgeniy Tetenchuk
- Sjoerd Adema
- Shrey Puranik
+ - Evgeniy Koval
- Lars Moelleken
- dasmfm
- Mathias Geat
@@ -2208,6 +2221,7 @@ Symfony is the result of the work of many people who made the code better
- Niklas Keller
- Andras Debreczeni
- Vladimir Sazhin
+ - Michel Bardelmeijer
- Tomas Kmieliauskas
- Billie Thompson
- lol768
@@ -2241,6 +2255,7 @@ Symfony is the result of the work of many people who made the code better
- Michael Schneider
- Cédric Bertolini
- n-aleha
+ - Talha Zekeriya Durmuş
- Anatol Belski
- Anderson Müller
- Şəhriyar İmanov
@@ -2268,6 +2283,7 @@ Symfony is the result of the work of many people who made the code better
- Neophy7e
- bokonet
- Arrilot
+ - ampaze
- Markus Staab
- Pierre-Louis LAUNAY
- djama
@@ -2417,6 +2433,7 @@ Symfony is the result of the work of many people who made the code better
- Michal Čihař (mcihar)
- Matt Drollette (mdrollette)
- Adam Monsen (meonkeys)
+ - Mike Milano (mmilano)
- diego aguiar (mollokhan)
- Hugo Monteiro (monteiro)
- Ala Eddine Khefifi (nayzo)
diff --git a/phpunit b/phpunit
index c89d2e400b602..fbce26d8edcca 100755
--- a/phpunit
+++ b/phpunit
@@ -1,7 +1,7 @@
#!/usr/bin/env php
bindParam(':id', $sessionId, \PDO::PARAM_STR);
$stmt->execute();
} catch (\Exception $e) {
- throw new \RuntimeException(sprintf('Exception was thrown when trying to delete a session: %s.', $e->getMessage()), 0, $e);
+ throw new \RuntimeException('Exception was thrown when trying to delete a session: '.$e->getMessage(), 0, $e);
}
return true;
@@ -115,7 +115,7 @@ public function gc($maxlifetime)
$stmt->bindValue(':time', time() - $maxlifetime, \PDO::PARAM_INT);
$stmt->execute();
} catch (\Exception $e) {
- throw new \RuntimeException(sprintf('Exception was thrown when trying to delete expired sessions: %s.', $e->getMessage()), 0, $e);
+ throw new \RuntimeException('Exception was thrown when trying to delete expired sessions: '.$e->getMessage(), 0, $e);
}
return true;
@@ -142,7 +142,7 @@ public function read($sessionId)
return '';
} catch (\Exception $e) {
- throw new \RuntimeException(sprintf('Exception was thrown when trying to read the session data: %s.', $e->getMessage()), 0, $e);
+ throw new \RuntimeException('Exception was thrown when trying to read the session data: '.$e->getMessage(), 0, $e);
}
}
@@ -212,7 +212,7 @@ public function write($sessionId, $data)
}
}
} catch (\Exception $e) {
- throw new \RuntimeException(sprintf('Exception was thrown when trying to write the session data: %s.', $e->getMessage()), 0, $e);
+ throw new \RuntimeException('Exception was thrown when trying to write the session data: '.$e->getMessage(), 0, $e);
}
return true;
diff --git a/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php b/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php
index 1fe8a5c53a5ab..180341012fd1c 100644
--- a/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php
+++ b/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php
@@ -92,7 +92,7 @@ public function refreshUser(UserInterface $user)
$refreshedUser = $repository->find($id);
if (null === $refreshedUser) {
- throw new UsernameNotFoundException(sprintf('User with id %s not found.', json_encode($id)));
+ throw new UsernameNotFoundException('User with id '.json_encode($id).' not found.');
}
}
diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php
index 69bbcfc09eab0..e260fb8dd6854 100644
--- a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php
+++ b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php
@@ -46,9 +46,12 @@ class SymfonyTestsListenerTrait
public function __construct(array $mockedNamespaces = array())
{
if (class_exists('PHPUnit_Util_Blacklist')) {
- \PHPUnit_Util_Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait'] = 2;
+ \PHPUnit_Util_Blacklist::$blacklistedClassNames[__CLASS__] = 2;
+ } elseif (method_exists(Blacklist::class, 'addDirectory')) {
+ (new BlackList())->getBlacklistedDirectories();
+ Blacklist::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2));
} else {
- Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait'] = 2;
+ Blacklist::$blacklistedClassNames[__CLASS__] = 2;
}
$warn = false;
diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit
index d2c23f2025b74..92d4d6994af9c 100755
--- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit
+++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit
@@ -65,11 +65,13 @@ foreach ($defaultEnvs as $envName => $envValue) {
}
}
-$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar')
- || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`))
- || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer`) : `which composer 2> /dev/null`))
- ? (file_get_contents($COMPOSER, false, null, 0, 18) === '#!/usr/bin/env php' ? $PHP : '').' '.escapeshellarg($COMPOSER) // detect shell wrappers by looking at the shebang
- : 'composer';
+if (false === $COMPOSER = \getenv('COMPOSER_BINARY')) {
+ $COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar')
+ || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`))
+ || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer`) : `which composer 2> /dev/null`))
+ ? (file_get_contents($COMPOSER, false, null, 0, 18) === '#!/usr/bin/env php' ? $PHP : '').' '.escapeshellarg($COMPOSER) // detect shell wrappers by looking at the shebang
+ : 'composer';
+}
if (false === $SYMFONY_PHPUNIT_REMOVE = getenv('SYMFONY_PHPUNIT_REMOVE')) {
$SYMFONY_PHPUNIT_REMOVE = 'phpspec/prophecy symfony/yaml';
@@ -126,6 +128,10 @@ if (!class_exists('SymfonyBlacklistPhpunit', false)) {
if (class_exists('PHPUnit_Util_Blacklist')) {
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
+} elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
+ (new PHPUnit\Util\BlackList())->getBlacklistedDirectories();
+ PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistPhpunit'))->getFileName()));
+ PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistSimplePhpunit'))->getFileName()));
} else {
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
diff --git a/src/Symfony/Bridge/PhpUnit/composer.json b/src/Symfony/Bridge/PhpUnit/composer.json
index f7d9492613ab6..30b3cc23f63d8 100644
--- a/src/Symfony/Bridge/PhpUnit/composer.json
+++ b/src/Symfony/Bridge/PhpUnit/composer.json
@@ -24,7 +24,7 @@
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
},
"conflict": {
- "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0"
+ "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0|9.1.2"
},
"autoload": {
"files": [ "bootstrap.php" ],
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CacheCollectorPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CacheCollectorPass.php
index 7f8494d98e0ad..6bb614489eeb8 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CacheCollectorPass.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CacheCollectorPass.php
@@ -44,7 +44,9 @@ public function process(ContainerBuilder $container)
$recorder = new Definition(is_subclass_of($definition->getClass(), TagAwareAdapterInterface::class) ? TraceableTagAwareAdapter::class : TraceableAdapter::class);
$recorder->setTags($definition->getTags());
- $recorder->setPublic($definition->isPublic());
+ if (!$definition->isPublic() || !$definition->isPrivate()) {
+ $recorder->setPublic($definition->isPublic());
+ }
$recorder->setArguments([new Reference($innerId = $id.'.recorder_inner')]);
$definition->setTags([]);
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SessionPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SessionPass.php
new file mode 100644
index 0000000000000..0f4950615fbce
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SessionPass.php
@@ -0,0 +1,50 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * @internal to be removed in 6.0
+ */
+class SessionPass implements CompilerPassInterface
+{
+ public function process(ContainerBuilder $container)
+ {
+ if (!$container->hasDefinition('session')) {
+ return;
+ }
+
+ $bags = [
+ 'session.flash_bag' => $container->hasDefinition('session.flash_bag') ? $container->getDefinition('session.flash_bag') : null,
+ 'session.attribute_bag' => $container->hasDefinition('session.attribute_bag') ? $container->getDefinition('session.attribute_bag') : null,
+ ];
+
+ foreach ($container->getDefinition('session')->getArguments() as $v) {
+ if (!$v instanceof Reference || !isset($bags[$bag = (string) $v]) || !\is_array($factory = $bags[$bag]->getFactory())) {
+ continue;
+ }
+
+ if ([0, 1] !== array_keys($factory) || !$factory[0] instanceof Reference || 'session' !== (string) $factory[0]) {
+ continue;
+ }
+
+ if ('get'.ucfirst(substr($bag, 8, -4)).'Bag' !== $factory[1]) {
+ continue;
+ }
+
+ $bags[$bag]->setFactory(null);
+ }
+ }
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
index b472275ff530a..f8bf78d859054 100644
--- a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
+++ b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
@@ -22,6 +22,7 @@
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;
+use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SessionPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TemplatingPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\WorkflowGuardListenerPass;
@@ -125,6 +126,7 @@ public function build(ContainerBuilder $container)
$this->addCompilerPassIfExists($container, FormPass::class);
$container->addCompilerPass(new WorkflowGuardListenerPass());
$container->addCompilerPass(new ResettableServicePass());
+ $container->addCompilerPass(new SessionPass());
if ($container->getParameter('kernel.debug')) {
$container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml
index 9f3a5b78c1e2e..9080af9379899 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml
@@ -41,7 +41,8 @@
-
+
+ attributes
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SessionPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SessionPassTest.php
new file mode 100644
index 0000000000000..afc6f9b4b2577
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SessionPassTest.php
@@ -0,0 +1,44 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SessionPass;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Reference;
+
+class SessionPassTest extends TestCase
+{
+ public function testProcess()
+ {
+ $arguments = [
+ new Reference('session.flash_bag'),
+ new Reference('session.attribute_bag'),
+ ];
+ $container = new ContainerBuilder();
+ $container
+ ->register('session')
+ ->setArguments($arguments);
+ $container
+ ->register('session.flash_bag')
+ ->setFactory([new Reference('session'), 'getFlashBag']);
+ $container
+ ->register('session.attribute_bag')
+ ->setFactory([new Reference('session'), 'getAttributeBag']);
+
+ (new SessionPass())->process($container);
+
+ $this->assertSame($arguments, $container->getDefinition('session')->getArguments());
+ $this->assertNull($container->getDefinition('session.flash_bag')->getFactory());
+ $this->assertNull($container->getDefinition('session.attribute_bag')->getFactory());
+ }
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/src/CustomPathBundle.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/src/CustomPathBundle.php
index 166b606a459e2..a4049b8690522 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/src/CustomPathBundle.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/src/CustomPathBundle.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\FrameworkBundle\Tests;
+namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Fixtures\CustomPathBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php
index 2f090b2de8d53..c58b25066bf4a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\FrameworkBundle\Tests;
+namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Fixtures\TestBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
index df96cf2db78f5..1020c86e8e583 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
@@ -273,6 +273,8 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
->children()
->scalarNode('path')->defaultNull()->end()
->scalarNode('domain')->defaultNull()->end()
+ ->scalarNode('secure')->defaultFalse()->end()
+ ->scalarNode('samesite')->defaultNull()->end()
->end()
->end()
->end()
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
index 624deb0283fd7..cd7202019c2eb 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
@@ -146,8 +146,6 @@ public function addConfiguration(NodeDefinition $node)
foreach ($this->options as $name => $value) {
if (\is_bool($value)) {
$builder->booleanNode($name)->defaultValue($value);
- } elseif (\is_int($value)) {
- $builder->integerNode($name)->defaultValue($value);
} else {
$builder->scalarNode($name)->defaultValue($value);
}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php b/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php
index a38e7c686fd0a..e62895fe6d2b2 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php
@@ -128,7 +128,7 @@ private function updateCspHeaders(Response $response, array $nonces = [])
$headers = $this->getCspHeaders($response);
foreach ($headers as $header => $directives) {
- foreach (['script-src' => 'csp_script_nonce', 'style-src' => 'csp_style_nonce'] as $type => $tokenName) {
+ foreach (['script-src' => 'csp_script_nonce', 'script-src-elem' => 'csp_script_nonce', 'style-src' => 'csp_style_nonce', 'style-src-elem' => 'csp_style_nonce'] as $type => $tokenName) {
if ($this->authorizesInline($directives, $type)) {
continue;
}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig
index 268f8fdc7e3f6..49878a72d5d65 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig
@@ -5,18 +5,18 @@
{% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' : '' %}
{{ include('@WebProfiler/Icon/memory.svg') }}
{{ '%.1f'|format(collector.memory / 1024 / 1024) }}
- MB
+ MiB
{% endset %}
{% set text %}