From 753bf7e0df22062f63d559135e64c5b4f5914906 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Wed, 26 Jun 2019 13:14:13 +0200 Subject: [PATCH 01/17] Fixed type annotation. --- .../Component/Routing/Generator/UrlGeneratorInterface.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php index f7d37b2564..64714d354d 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php +++ b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php @@ -71,9 +71,9 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface * * The special parameter _fragment will be used as the document fragment suffixed to the final URL. * - * @param string $name The name of the route - * @param mixed $parameters An array of parameters - * @param int $referenceType The type of reference to be generated (one of the constants) + * @param string $name The name of the route + * @param mixed[] $parameters An array of parameters + * @param int $referenceType The type of reference to be generated (one of the constants) * * @return string The generated URL * From 6425639fe0b80de683909b9bdb2765c21b1533ab Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 15:56:21 +0200 Subject: [PATCH 02/17] updated CHANGELOG for 3.4.29 --- CHANGELOG-3.4.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md index 7b2094530c..a358d609f3 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG-3.4.md @@ -7,6 +7,31 @@ 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.29 (2019-06-26) + + * bug #32137 [HttpFoundation] fix accessing session bags (xabbuh) + * bug #32164 [EventDispatcher] collect called listeners information only once (xabbuh) + * bug #32173 [FrameworkBundle] Fix calling Client::getProfile() before sending a request (dunglas) + * bug #32163 [DoctrineBridge] Fix type error (norkunas) + * bug #32170 [Security/Core] Don't use ParagonIE_Sodium_Compat (nicolas-grekas) + * bug #32123 [Form] fix translation domain (xabbuh) + * bug #32116 [FrameworkBundle] tag the FileType service as a form type (xabbuh) + * bug #32090 [Debug] workaround BC break in PHP 7.3 (nicolas-grekas) + * bug #32071 Fix expired lock not cleaned (jderusse) + * bug #32057 [HttpFoundation] Fix SA/phpdoc JsonResponse (ro0NL) + * bug #32025 SimpleCacheAdapter fails to cache any item if a namespace is used (moufmouf) + * bug #32037 [Form] validate composite constraints in all groups (xabbuh) + * bug #32007 [Serializer] Handle true and false appropriately in CSV encoder (battye) + * bug #32000 [Routing] fix absolute url generation when scheme is not known (Tobion) + * bug #32024 [VarDumper] fix dumping objects that implement __debugInfo() (nicolas-grekas) + * bug #31962 Fix reporting unsilenced deprecations from insulated tests (nicolas-grekas) + * bug #31865 [Form] Fix wrong DateTime on outdated ICU library (aweelex) + * bug #31863 [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor (Ivo) + * bug #31869 Fix json-encoding when JSON_THROW_ON_ERROR is used (nicolas-grekas) + * bug #31860 [HttpFoundation] work around PHP 7.3 bug related to json_encode() (nicolas-grekas) + * bug #31407 [Security] added support for updated "distinguished name" format in x509 authentication (Robert Kopera) + * bug #31654 [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping (vilius-g) + * 3.4.28 (2019-05-28) * bug #31584 [Workflow] Do not trigger extra guards (lyrixx) From 7f886dcef08bec35c18a956fa911569e16d974d9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 15:56:32 +0200 Subject: [PATCH 03/17] update CONTRIBUTORS for 3.4.29 --- CONTRIBUTORS.md | 70 ++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 27 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index fddccc428e..011ad9bee0 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -19,8 +19,8 @@ Symfony is the result of the work of many people who made the code better - Jakub Zalas (jakubzalas) - Johannes S (johannes) - Javier Eguiluz (javier.eguiluz) - - Kris Wallsmith (kriswallsmith) - Roland Franssen (ro0) + - Kris Wallsmith (kriswallsmith) - Grégoire Pineau (lyrixx) - Hugo Hamon (hhamon) - Abdellatif Ait boudad (aitboudad) @@ -31,9 +31,9 @@ Symfony is the result of the work of many people who made the code better - Joseph Bielawski (stloyd) - Karma Dordrak (drak) - Lukas Kahwe Smith (lsmith) + - Yonel Ceruto (yonelceruto) - Martin Hasoň (hason) - Jeremy Mikola (jmikola) - - Yonel Ceruto (yonelceruto) - Jean-François Simon (jfsimon) - Jules Pietri (heah) - Benjamin Eberlei (beberlei) @@ -45,35 +45,35 @@ Symfony is the result of the work of many people who made the code better - Jonathan Wage (jwage) - Tobias Nyholm (tobias) - Lynn van der Berg (kjarli) + - Jérémy DERUSSÉ (jderusse) - Diego Saint Esteben (dosten) - Alexandre Salomé (alexandresalome) - William Durand (couac) - ornicar - - Jérémy DERUSSÉ (jderusse) + - Alexander M. Turek (derrabus) - Dany Maillard (maidmaid) - Francis Besset (francisbesset) - stealth35 ‏ (stealth35) - Alexander Mols (asm89) - Matthias Pigulla (mpdude) - Bulat Shakirzyanov (avalanche123) - - Alexander M. Turek (derrabus) - Saša Stamenković (umpirsky) - Peter Rehm (rpet) - - Kevin Bond (kbond) - Pierre du Plessis (pierredup) + - Kevin Bond (kbond) - Henrik Bjørnskov (henrikbjorn) - Miha Vrhovnik - Diego Saint Esteben (dii3g0) + - Grégoire Paris (greg0ire) - Konstantin Kudryashov (everzet) - Gábor Egyed (1ed) - - Grégoire Paris (greg0ire) - - Bilal Amarni (bamarni) - Titouan Galopin (tgalopin) + - Konstantin Myakshin (koc) + - Bilal Amarni (bamarni) - Mathieu Piot (mpiot) - David Maicher (dmaicher) - Florin Patan (florinpatan) - Valentin Udaltsov (vudaltsov) - - Konstantin Myakshin (koc) - Gabriel Ostrolucký (gadelat) - Vladimir Reznichenko (kalessil) - Jáchym Toušek (enumag) @@ -95,12 +95,12 @@ Symfony is the result of the work of many people who made the code better - Luis Cordova (cordoval) - Graham Campbell (graham) - Daniel Holmes (dholmes) + - Thomas Calvet (fancyweb) - Toni Uebernickel (havvg) - Bart van den Burg (burgov) - Jordan Alliot (jalliot) - Jérôme Tamarelle (gromnan) - John Wards (johnwards) - - Thomas Calvet (fancyweb) - Fran Moreno (franmomu) - Antoine Hérault (herzult) - Paráda József (paradajozsef) @@ -120,6 +120,7 @@ Symfony is the result of the work of many people who made the code better - Peter Kokot (maastermedia) - Jacob Dreesen (jdreesen) - Florian Voutzinos (florianv) + - Jan Schädlich (jschaedl) - Colin Frei - Javier Spagnoletti (phansys) - Adrien Brault (adrienbrault) @@ -152,7 +153,6 @@ Symfony is the result of the work of many people who made the code better - Arnaud Kleinpeter (nanocom) - Jannik Zschiesche (apfelbox) - Guilherme Blanco (guilhermeblanco) - - Jan Schädlich (jschaedl) - SpacePossum - Pablo Godel (pgodel) - Jérémie Augustin (jaugustin) @@ -175,13 +175,17 @@ Symfony is the result of the work of many people who made the code better - Alessandro Chitolina (alekitto) - Hiromi Hishida (77web) - Matthieu Ouellette-Vachon (maoueh) + - Massimiliano Arione (garak) - Michał Pipa (michal.pipa) - Dawid Nowak + - George Mponos (gmponos) - Amal Raghav (kertz) - Jonathan Ingram (jonathaningram) - Artur Kotyrba - Tyson Andre - GDIBass + - Samuel NELA (snela) + - Vincent Touzet (vincenttouzet) - Alexander Schranz (alexander-schranz) - jeremyFreeAgent (Jérémy Romey) (jeremyfreeagent) - James Halsall (jaitsu) @@ -194,15 +198,12 @@ Symfony is the result of the work of many people who made the code better - Daniel Espendiller - Possum - Dorian Villet (gnutix) - - George Mponos (gmponos) - Sergey Linnik (linniksa) - Richard Miller (mr_r_miller) - Albert Casademont (acasademont) - Mario A. Alvarez Garcia (nomack84) - Dennis Benkert (denderello) - DQNEO - - Samuel NELA (snela) - - Vincent Touzet (vincenttouzet) - Gregor Harlan (gharlan) - Gary PEGEOT (gary-p) - Ruben Gonzalez (rubenrua) @@ -242,12 +243,12 @@ Symfony is the result of the work of many people who made the code better - Sven Paulus (subsven) - Maxime Veber (nek-) - Rui Marinho (ruimarinho) - - Massimiliano Arione (garak) - Eugene Wissner - Pascal Montoya - Julien Brochet (mewt) - Leo Feyer - Tristan Darricau (nicofuma) + - Victor Bocharsky (bocharsky_bw) - Marcel Beerta (mazen) - Pavel Batanov (scaytrase) - Mantis Development @@ -300,7 +301,6 @@ Symfony is the result of the work of many people who made the code better - Chekote - Antoine Makdessi (amakdessi) - Thomas Adam - - Viktor Bocharskyi (bocharsky_bw) - Jhonny Lidfors (jhonne) - Diego Agulló (aeoris) - jdhoek @@ -374,6 +374,7 @@ Symfony is the result of the work of many people who made the code better - Berny Cantos (xphere81) - Thierry Thuon (lepiaf) - Ricard Clau (ricardclau) + - dFayet - Mark Challoner (markchalloner) - Gennady Telegin (gtelegin) - Erin Millard @@ -438,6 +439,7 @@ Symfony is the result of the work of many people who made the code better - Joe Lencioni - Daniel Tschinder - vladimir.reznichenko + - Ruud Kamphuis (ruudk) - Kai - Lee Rowlands - Krzysztof Piasecki (krzysztek) @@ -458,6 +460,7 @@ Symfony is the result of the work of many people who made the code better - Karel Souffriau - Christophe L. (christophelau) - Anthon Pang (robocoder) + - Michael Käfer (michael_kaefer) - Sébastien Santoro (dereckson) - Brian King - Michel Salib (michelsalib) @@ -539,6 +542,7 @@ Symfony is the result of the work of many people who made the code better - Sergio Santoro - Robin van der Vleuten (robinvdvleuten) - Philipp Rieber (bicpi) + - Tomas Norkūnas (norkunas) - Manuel de Ruiter (manuel) - Eduardo Oliveira (entering) - Ilya Antipenko (aivus) @@ -563,6 +567,7 @@ Symfony is the result of the work of many people who made the code better - Jakub Škvára (jskvara) - Andrew Udvare (audvare) - alexpods + - Saif Eddin G - Adam Szaraniec (mimol) - Dariusz Ruminski - Erik Trapman (eriktrapman) @@ -597,7 +602,6 @@ Symfony is the result of the work of many people who made the code better - Martin Morávek (keeo) - Steven Surowiec - Kevin Saliou (kbsali) - - Ruud Kamphuis (ruudk) - Shawn Iwinski - Gawain Lynch (gawain) - NothingWeAre @@ -630,6 +634,7 @@ Symfony is the result of the work of many people who made the code better - Baptiste Leduc (bleduc) - Jean-Christophe Cuvelier [Artack] - Simon DELICATA + - Dmitry Simushev - alcaeus - Fred Cox - vitaliytv @@ -688,7 +693,6 @@ Symfony is the result of the work of many people who made the code better - Vincent Simonin - Alex Bogomazov (alebo) - maxime.steinhausser - - dFayet - adev - Stefan Warman - Arkadius Stefanski (arkadius) @@ -722,6 +726,7 @@ Symfony is the result of the work of many people who made the code better - Jaroslav Kuba - Stephan Vock - Benjamin Zikarsky (bzikarsky) + - battye - Simon Schick (simonsimcity) - redstar504 - Tristan Roussel @@ -763,10 +768,10 @@ Symfony is the result of the work of many people who made the code better - Arturas Smorgun (asarturas) - Alexander Volochnev (exelenz) - Michael Piecko + - Toni Peric (tperic) - yclian - Alan Poulain - Aleksey Prilipko - - Tomas Norkūnas (norkunas) - Andrew Berry - twifty - Indra Gunawan (guind) @@ -816,6 +821,7 @@ Symfony is the result of the work of many people who made the code better - John Bohn (jbohn) - Marc Morera (mmoreram) - Saif Eddin Gmati (azjezz) + - BENOIT POLASZEK (bpolaszek) - Andrew Hilobok (hilobok) - Noah Heck (myesain) - Christian Soronellas (theunic) @@ -837,6 +843,7 @@ Symfony is the result of the work of many people who made the code better - Olivier Maisonneuve (olineuve) - Pedro Miguel Maymone de Resende (pedroresende) - Masterklavi + - Franco Traversaro (belinde) - Francis Turmel (fturmel) - Nikita Nefedov (nikita2206) - cgonzalez @@ -851,6 +858,7 @@ Symfony is the result of the work of many people who made the code better - Antoine Lamirault - Adrien Lucas (adrienlucas) - Zhuravlev Alexander (scif) + - Stefano Degenkamp (steef) - James Michael DuPont - Tom Klingenberg - Christopher Hall (mythmakr) @@ -904,6 +912,7 @@ Symfony is the result of the work of many people who made the code better - Benoît Bourgeois - mantulo - Stefan Kruppa + - mmokhi - corphi - grizlik - Derek ROTH @@ -912,6 +921,7 @@ Symfony is the result of the work of many people who made the code better - Dmytro Boiko (eagle) - Shin Ohno (ganchiku) - Geert De Deckere (geertdd) + - Jacek Jędrzejewski (jacek.jedrzejewski) - Jan Kramer (jankramer) - abdul malik ikhsan (samsonasik) - Henry Snoek (snoek09) @@ -922,7 +932,6 @@ Symfony is the result of the work of many people who made the code better - Morgan Auchede (mauchede) - Sascha Dens (saschadens) - Don Pinkster - - Saif Eddin G - Maksim Muruev - Emil Einarsson - Thomas Landauer @@ -933,13 +942,14 @@ Symfony is the result of the work of many people who made the code better - Tony Tran - Jacques Moati - Balazs Csaba (balazscsaba2006) + - Bill Hance (billhance) - Douglas Reith (douglas_reith) - Forfarle (forfarle) - Harry Walter (haswalt) - Johnson Page (jwpage) - - Michael Käfer (michael_kaefer) - Ruben Gonzalez (rubenruateltek) - Michael Roterman (wtfzdotnet) + - Andrii Dembitskyi - Arno Geurts - Adán Lobato (adanlobato) - Ian Jenkins (jenkoian) @@ -986,7 +996,6 @@ Symfony is the result of the work of many people who made the code better - d-ph - Renan Taranto (renan-taranto) - Thomas Talbot (ioni) - - Dmitry Simushev - Rikijs Murgs - Uladzimir Tsykun - Ben Ramsey (ramsey) @@ -1132,7 +1141,6 @@ Symfony is the result of the work of many people who made the code better - hugofonseca (fonsecas72) - Martynas Narbutas - Toon Verwerft (veewee) - - battye - Bailey Parker - Eddie Jaoude - Antanas Arvasevicius @@ -1269,6 +1277,7 @@ Symfony is the result of the work of many people who made the code better - Pablo Schläpfer - Gert de Pagter - Jelte Steijaert (jelte) + - David Négrier (moufmouf) - Quique Porta (quiqueporta) - stoccc - Andrea Quintino (dirk39) @@ -1290,7 +1299,6 @@ Symfony is the result of the work of many people who made the code better - Lars Ambrosius Wallenborn (larsborn) - Oriol Mangas Abellan (oriolman) - Sebastian Göttschkes (sgoettschkes) - - Toni Peric (tperic) - Tatsuya Tsuruoka - Ross Tuck - Kévin Gomez (kevin) @@ -1324,7 +1332,6 @@ Symfony is the result of the work of many people who made the code better - Sébastien HOUZÉ - Jingyu Wang - steveYeah - - BENOIT POLASZEK (bpolaszek) - Samy Dindane (dinduks) - Keri Henare (kerihenare) - Cédric Lahouste (rapotor) @@ -1431,6 +1438,7 @@ Symfony is the result of the work of many people who made the code better - BilgeXA - r1pp3rj4ck - phydevs + - mmokhi - Robert Queck - Peter Bouwdewijn - mlively @@ -1455,6 +1463,7 @@ Symfony is the result of the work of many people who made the code better - Mike Meier - Tim Jabs - Sebastian Ionescu + - Robert Kopera - Pablo Ogando Ferreira - Thomas Ploch - Simon Neidhold @@ -1490,6 +1499,7 @@ Symfony is the result of the work of many people who made the code better - LubenZA - Olivier - Cyril PASCAL + - Michael Bessolov - pscheit - Wybren Koelmans - Zdeněk Drahoš @@ -1651,6 +1661,7 @@ Symfony is the result of the work of many people who made the code better - downace - Aarón Nieves Fernández - Mike Meier + - Vilius Grigaliūnas - Kirill Saksin - Julien Pauli - Koalabaerchen @@ -1698,6 +1709,7 @@ Symfony is the result of the work of many people who made the code better - Nicole Cordes - Martin Kirilov - amcastror + - Alexander Li (aweelex) - Bram Van der Sype (brammm) - Guile (guile) - Julien Moulin (lizjulien) @@ -1717,6 +1729,7 @@ Symfony is the result of the work of many people who made the code better - Sam Ward - Walther Lalk - Adam + - Ivo - Sören Bernstein - devel - taiiiraaa @@ -1751,7 +1764,6 @@ Symfony is the result of the work of many people who made the code better - Hans Nilsson (hansnilsson) - Andrew Marcinkevičius (ifdattic) - Ioana Hazsda (ioana-hazsda) - - Jacek Jędrzejewski (jacek.jedrzejewski) - Jan Marek (janmarek) - Mark de Haan (markdehaan) - Dan Patrick (mdpatrick) @@ -1760,6 +1772,7 @@ Symfony is the result of the work of many people who made the code better - tante kinast (tante) - Ahmed Hannachi (tiecoders) - Vincent LEFORT (vlefort) + - Walid BOUGHDIRI (walidboughdiri) - Darryl Hein (xmmedia) - Sadicov Vladimir (xtech) - Kevin EMO (zarcox) @@ -1774,6 +1787,7 @@ Symfony is the result of the work of many people who made the code better - Vincent Chalnot - James Hudson - Tom Maguire + - Mateusz Lerczak - Richard Quadling - David Zuelke - Adrian @@ -1948,6 +1962,7 @@ Symfony is the result of the work of many people who made the code better - Ulf Reimers (ureimers) - Wotre - goohib + - Chi-teck - Tom Counsell - Xavier HAUSHERR - Ron Gähler @@ -2007,6 +2022,7 @@ Symfony is the result of the work of many people who made the code better - Cédric Bertolini - n-aleha - Anatol Belski + - Anderson Müller - Şəhriyar İmanov - Alexis BOYER - Kaipi Yann @@ -2019,7 +2035,6 @@ Symfony is the result of the work of many people who made the code better - Tammy D - Daniel STANCU - Ryan Rud - - mmokhi - Ondrej Slinták - vlechemin - Brian Corrigan @@ -2110,10 +2125,10 @@ Symfony is the result of the work of many people who made the code better - Alex Olmos (alexolmos) - Antonio Mansilla (amansilla) - Robin Kanters (anddarerobin) + - Andrii Popov (andrii-popov) - Juan Ases García (ases) - Siragusa (asiragusa) - Daniel Basten (axhm3a) - - Bill Hance (billhance) - Bernd Matzner (bmatzner) - Bram Tweedegolf (bram_tweedegolf) - Brandon Kelly (brandonkelly) @@ -2150,6 +2165,7 @@ Symfony is the result of the work of many people who made the code better - Justin Rainbow (jrainbow) - Juan Luis (juanlugb) - JuntaTom (juntatom) + - Julien Manganne (juuuuuu) - Ismail Faizi (kanafghan) - Sébastien Armand (khepin) - Pierre-Chanel Gauthier (kmecnin) From 5296d2dfa08d99890ea31f684fc03f6c0f3ff3ab Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 15:56:39 +0200 Subject: [PATCH 04/17] updated VERSION for 3.4.29 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 092fb6c762..21d03f4ba5 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -67,12 +67,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.29-DEV'; + const VERSION = '3.4.29'; const VERSION_ID = 30429; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; const RELEASE_VERSION = 29; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From fe5a4ee9998b1696d0733e421e8d20cd8041e415 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 16:17:55 +0200 Subject: [PATCH 05/17] bumped Symfony version to 3.4.30 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 21d03f4ba5..551bb36f74 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -67,12 +67,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.29'; - const VERSION_ID = 30429; + const VERSION = '3.4.30-DEV'; + const VERSION_ID = 30430; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; - const RELEASE_VERSION = 29; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 30; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From 3b145df403d22ec7f7eb8835a641403d2e8bfbcb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 16:19:37 +0200 Subject: [PATCH 06/17] updated CHANGELOG for 4.2.10 --- CHANGELOG-4.2.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/CHANGELOG-4.2.md b/CHANGELOG-4.2.md index 7c7c018037..40e3209d1d 100644 --- a/CHANGELOG-4.2.md +++ b/CHANGELOG-4.2.md @@ -7,6 +7,41 @@ in 4.2 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.2.0...v4.2.1 +* 4.2.10 (2019-06-26) + + * bug #31972 Add missing rendering of form help block. (alexsegura) + * bug #32137 [HttpFoundation] fix accessing session bags (xabbuh) + * bug #32164 [EventDispatcher] collect called listeners information only once (xabbuh) + * bug #32173 [FrameworkBundle] Fix calling Client::getProfile() before sending a request (dunglas) + * bug #32163 [DoctrineBridge] Fix type error (norkunas) + * bug #32170 [Security/Core] Don't use ParagonIE_Sodium_Compat (nicolas-grekas) + * bug #32094 [Validator] Use LogicException for missing Property Access Component in comparison constraints (Lctrs) + * bug #32123 [Form] fix translation domain (xabbuh) + * bug #32116 [FrameworkBundle] tag the FileType service as a form type (xabbuh) + * bug #32090 [Debug] workaround BC break in PHP 7.3 (nicolas-grekas) + * bug #32076 [Lock] Fix PDO prune not called (jderusse) + * bug #32071 Fix expired lock not cleaned (jderusse) + * bug #32057 [HttpFoundation] Fix SA/phpdoc JsonResponse (ro0NL) + * bug #32025 SimpleCacheAdapter fails to cache any item if a namespace is used (moufmouf) + * bug #32037 [Form] validate composite constraints in all groups (xabbuh) + * bug #32007 [Serializer] Handle true and false appropriately in CSV encoder (battye) + * bug #32000 [Routing] fix absolute url generation when scheme is not known (Tobion) + * bug #32024 [VarDumper] fix dumping objects that implement __debugInfo() (nicolas-grekas) + * bug #31962 Fix reporting unsilenced deprecations from insulated tests (nicolas-grekas) + * bug #31925 [Form] fix usage of legacy TranslatorInterface (nicolas-grekas) + * bug #31908 [Validator] fix deprecation layer of ValidatorBuilder (nicolas-grekas) + * bug #31894 Fix wrong requirements for ocramius/proxy-manager in root composer.json (henrikvolmer) + * bug #31865 [Form] Fix wrong DateTime on outdated ICU library (aweelex) + * bug #31879 [Cache] Pass arg to get callback everywhere (fancyweb) + * bug #31863 [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor (Ivo) + * bug #31869 Fix json-encoding when JSON_THROW_ON_ERROR is used (nicolas-grekas) + * bug #31868 [HttpKernel] Fix handling non-catchable fatal errors (nicolas-grekas) + * bug #31860 [HttpFoundation] work around PHP 7.3 bug related to json_encode() (nicolas-grekas) + * bug #31407 [Security] added support for updated "distinguished name" format in x509 authentication (Robert Kopera) + * bug #31786 [Translation] Fixed case sensitivity of lint:xliff command (javiereguiluz) + * bug #31757 [DomCrawler] Fix type error with null Form::$currentUri (chalasr) + * bug #31654 [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping (vilius-g) + * 4.2.9 (2019-05-28) * bug #31584 [Workflow] Do not trigger extra guards (lyrixx) From c8899f37046eb54ac8331c5fc6decb92ce0ce415 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 16:19:57 +0200 Subject: [PATCH 07/17] updated VERSION for 4.2.10 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 4e316cdfdc..2cac878a58 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -73,12 +73,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.2.10-DEV'; + const VERSION = '4.2.10'; const VERSION_ID = 40210; const MAJOR_VERSION = 4; const MINOR_VERSION = 2; const RELEASE_VERSION = 10; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '07/2019'; const END_OF_LIFE = '01/2020'; From a84fb88d071c3def0555e7980e2e06d84261c70e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 16:23:57 +0200 Subject: [PATCH 08/17] bumped Symfony version to 4.2.11 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 2cac878a58..fab1ef5165 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -73,12 +73,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.2.10'; - const VERSION_ID = 40210; + const VERSION = '4.2.11-DEV'; + const VERSION_ID = 40211; const MAJOR_VERSION = 4; const MINOR_VERSION = 2; - const RELEASE_VERSION = 10; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 11; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '07/2019'; const END_OF_LIFE = '01/2020'; From fde0b1fa9ec1b6c500fc577c6e75dfa41d714ea2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 16:26:04 +0200 Subject: [PATCH 09/17] updated CHANGELOG for 4.3.2 --- CHANGELOG-4.3.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/CHANGELOG-4.3.md b/CHANGELOG-4.3.md index 29037980b3..965e52e7db 100644 --- a/CHANGELOG-4.3.md +++ b/CHANGELOG-4.3.md @@ -7,6 +7,69 @@ in 4.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/v4.3.0...v4.3.1 +* 4.3.2 (2019-06-26) + + * bug #31954 [PhpunitBridge] Read environment variable from superglobals (greg0ire) + * bug #32131 [Mailgun Mailer] fixed issue when using html body (alOneh) + * bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire) + * bug #31966 [Messenger] Doctrine Connection find and findAll now correctly decode headers (TimoBakx) + * bug #31972 Add missing rendering of form help block. (alexsegura) + * bug #32141 [HttpClient] fix dealing with 1xx informational responses (nicolas-grekas) + * bug #32138 [Filesystem] fix mirroring directory into parent directory (xabbuh) + * bug #32137 [HttpFoundation] fix accessing session bags (xabbuh) + * bug #32147 [HttpClient] fix timing measurements with NativeHttpClient (nicolas-grekas) + * bug #32165 revert #30525 due to performance penalty (bendavies) + * bug #32164 [EventDispatcher] collect called listeners information only once (xabbuh) + * bug #32173 [FrameworkBundle] Fix calling Client::getProfile() before sending a request (dunglas) + * bug #32163 [DoctrineBridge] Fix type error (norkunas) + * bug #32154 [Messenger] fix retrying handlers using DoctrineTransactionMiddleware (Tobion) + * bug #32169 [Security/Core] require libsodium >= 1.0.14 (nicolas-grekas) + * bug #32170 [Security/Core] Don't use ParagonIE_Sodium_Compat (nicolas-grekas) + * bug #32156 [Workflow] re-add workflow.definition tag to workflow services (nikossvnk) + * bug #32053 [Messenger] No need for retry to require SentStamp (Tobion) + * bug #32083 [HttpClient] fixing passing debug info to progress callback (nicolas-grekas) + * bug #32129 [DebugBundle] fix register ReflectionCaster::unsetClosureFileInfo caster in var cloner service (alekitto) + * bug #32027 [Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue (Nyholm) + * bug #32125 [Form] accept floats for input="string" in NumberType (xabbuh) + * bug #32094 [Validator] Use LogicException for missing Property Access Component in comparison constraints (Lctrs) + * bug #32136 [FrameworkBundle] sync `require-dev` and `conflict` constraints (xabbuh) + * bug #32123 [Form] fix translation domain (xabbuh) + * bug #32115 [SecurityBundle] don't validate IP addresses from env var placeholders (xabbuh) + * bug #32116 [FrameworkBundle] tag the FileType service as a form type (xabbuh) + * bug #32109 [Messenger] fix delay exchange recreation after disconnect (Tobion) + * bug #32090 [Debug] workaround BC break in PHP 7.3 (nicolas-grekas) + * bug #32076 [Lock] Fix PDO prune not called (jderusse) + * bug #32071 Fix expired lock not cleaned (jderusse) + * bug #32052 [Messenger] fix AMQP delay queue to be per exchange (Tobion) + * bug #32065 [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error (nicolas-grekas) + * bug #32057 [HttpFoundation] Fix SA/phpdoc JsonResponse (ro0NL) + * bug #32040 [DI] Show the right class autowired when providing a non-existing class (Simperfit) + * bug #32035 [Messenger] fix delay delivery for non-fanout exchanges (Tobion) + * bug #32025 SimpleCacheAdapter fails to cache any item if a namespace is used (moufmouf) + * bug #32022 [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set (nicolas-grekas) + * bug #32037 [Form] validate composite constraints in all groups (xabbuh) + * bug #32007 [Serializer] Handle true and false appropriately in CSV encoder (battye) + * bug #32036 [Messenger] improve logs (Tobion) + * bug #31998 Parameterize Mailgun's region (jderusse) + * bug #32000 [Routing] fix absolute url generation when scheme is not known (Tobion) + * bug #32012 Add statement to fileLink to ignore href code when no fileLink. (bmxmale) + * bug #32024 [VarDumper] fix dumping objects that implement __debugInfo() (nicolas-grekas) + * bug #32014 Do not log or call the proxy function when the locale is the same (gmponos) + * bug #32011 [HttpClient] fix closing debug stream prematurely (nicolas-grekas) + * bug #32017 [Contracts] add missing required dependencies (mbessolov) + * bug #31992 Fix sender/recipients in SMTP Envelope (fabpot) + * bug #31999 [PhpunitBridge] Restore php 5.5 compat (greg0ire) + * bug #31991 [EventDispatcher] collect called listeners information only once (xabbuh) + * bug #31988 [TwigBridge] add back possibility to use form themes without translations (xabbuh) + * bug #31982 [HttpClient] fix Psr18Client handling of non-200 response codes (nicolas-grekas) + * bug #31953 [DoctrineBridge] fix handling nested embeddables (xabbuh) + * bug #31962 Fix reporting unsilenced deprecations from insulated tests (nicolas-grekas) + * bug #31936 PropertyInfoLoader should not try to add validation to non-existent property (weaverryan) + * bug #31923 [Serializer] Fix DataUriNormalizer deprecation (MIME type guesser is optional) (ogizanagi) + * bug #31928 [FrameworkBundle] avoid service id conflicts with Swiftmailer (xabbuh) + * bug #31925 [Form] fix usage of legacy TranslatorInterface (nicolas-grekas) + * bug #31908 [Validator] fix deprecation layer of ValidatorBuilder (nicolas-grekas) + * 4.3.1 (2019-06-06) * bug #31894 Fix wrong requirements for ocramius/proxy-manager in root composer.json (henrikvolmer) From 6314d4f9bc49789cf8f41012fad14d19d8ae56c4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 16:26:16 +0200 Subject: [PATCH 10/17] updated VERSION for 4.3.2 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index b9edce2354..4752759004 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -73,12 +73,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.3.2-DEV'; + const VERSION = '4.3.2'; const VERSION_ID = 40302; const MAJOR_VERSION = 4; const MINOR_VERSION = 3; const RELEASE_VERSION = 2; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2020'; const END_OF_LIFE = '07/2020'; From 2afa71e0d8fa315997d44ca250611e0842f01cea Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 Jun 2019 16:31:16 +0200 Subject: [PATCH 11/17] bumped Symfony version to 4.3.3 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 4752759004..58e765d385 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -73,12 +73,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.3.2'; - const VERSION_ID = 40302; + const VERSION = '4.3.3-DEV'; + const VERSION_ID = 40303; const MAJOR_VERSION = 4; const MINOR_VERSION = 3; - const RELEASE_VERSION = 2; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 3; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '01/2020'; const END_OF_LIFE = '07/2020'; From df50685abfcc2b4f2ba8f79c6ec96f5fb5f22fe0 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 26 Jun 2019 20:07:24 +0200 Subject: [PATCH 12/17] [Security/Core] work around sodium_compat issue --- .../Component/Security/Core/Encoder/Argon2iPasswordEncoder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php index dae682bf31..99738365ad 100644 --- a/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php +++ b/src/Symfony/Component/Security/Core/Encoder/Argon2iPasswordEncoder.php @@ -26,7 +26,7 @@ class Argon2iPasswordEncoder extends BasePasswordEncoder implements SelfSaltingE return true; } - return \function_exists('sodium_crypto_pwhash_str') || \extension_loaded('libsodium'); + return version_compare(\extension_loaded('sodium') ? \SODIUM_LIBRARY_VERSION : phpversion('libsodium'), '1.0.9', '>='); } /** From 0b381dbe1d50a40f12115ea97b9bd0dd5a04b075 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 26 Jun 2019 17:59:51 +0200 Subject: [PATCH 13/17] improve error messages in the event dispatcher --- .../EventDispatcher/EventDispatcher.php | 10 +++---- .../LegacyEventDispatcherProxy.php | 12 ++++---- .../Tests/EventDispatcherTest.php | 27 +++++++++++++++++ .../Tests/LegacyEventDispatcherTest.php | 30 +++++++++++++++++++ 4 files changed, 66 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcher.php b/src/Symfony/Component/EventDispatcher/EventDispatcher.php index 304caec1d1..a5f0b7eda5 100644 --- a/src/Symfony/Component/EventDispatcher/EventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/EventDispatcher.php @@ -54,15 +54,13 @@ class EventDispatcher implements EventDispatcherInterface if (\is_object($event)) { $eventName = $eventName ?? \get_class($event); - } else { - @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.', EventDispatcherInterface::class), E_USER_DEPRECATED); + } elseif (\is_string($event) && (null === $eventName || $eventName instanceof Event)) { + @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', EventDispatcherInterface::class), E_USER_DEPRECATED); $swap = $event; $event = $eventName ?? new Event(); $eventName = $swap; - - if (!$event instanceof Event) { - throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of %s, %s given.', EventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event))); - } + } else { + throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, %s given.', EventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event))); } if (null !== $this->optimized && null !== $eventName) { diff --git a/src/Symfony/Component/EventDispatcher/LegacyEventDispatcherProxy.php b/src/Symfony/Component/EventDispatcher/LegacyEventDispatcherProxy.php index 534eec98a5..afa3e988d0 100644 --- a/src/Symfony/Component/EventDispatcher/LegacyEventDispatcherProxy.php +++ b/src/Symfony/Component/EventDispatcher/LegacyEventDispatcherProxy.php @@ -16,7 +16,7 @@ use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface; /** - * An helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch(). + * A helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch(). * * This class should be deprecated in Symfony 5.1 * @@ -57,15 +57,13 @@ final class LegacyEventDispatcherProxy implements EventDispatcherInterface if (\is_object($event)) { $eventName = $eventName ?? \get_class($event); - } else { - @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.', ContractsEventDispatcherInterface::class), E_USER_DEPRECATED); + } elseif (\is_string($event) && (null === $eventName || $eventName instanceof Event)) { + @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', ContractsEventDispatcherInterface::class), E_USER_DEPRECATED); $swap = $event; $event = $eventName ?? new Event(); $eventName = $swap; - - if (!$event instanceof Event) { - throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of %s, %s given.', ContractsEventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event))); - } + } else { + throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, %s given.', ContractsEventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event))); } $listeners = $this->getListeners($eventName); diff --git a/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php index e89f78cda8..658a941239 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php @@ -412,6 +412,33 @@ class EventDispatcherTest extends TestCase $this->assertTrue($testLoaded); } + + /** + * @group legacy + * @expectedDeprecation Calling the "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead. + */ + public function testLegacySignatureWithoutEvent() + { + $this->dispatcher->dispatch('foo'); + } + + /** + * @group legacy + * @expectedDeprecation Calling the "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead. + */ + public function testLegacySignatureWithEvent() + { + $this->dispatcher->dispatch('foo', new Event()); + } + + /** + * @expectedException \TypeError + * @expectedExceptionMessage Argument 1 passed to "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" must be an object, string given. + */ + public function testLegacySignatureWithNewEventObject() + { + $this->dispatcher->dispatch('foo', new ContractsEvent()); + } } class CallableClass diff --git a/src/Symfony/Component/EventDispatcher/Tests/LegacyEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/LegacyEventDispatcherTest.php index 49aa2f9ff3..ffa767cf8b 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/LegacyEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/LegacyEventDispatcherTest.php @@ -14,12 +14,42 @@ namespace Symfony\Component\EventDispatcher\Tests; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; +use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; /** * @group legacy */ class LegacyEventDispatcherTest extends EventDispatcherTest { + /** + * @group legacy + * @expectedDeprecation The signature of the "Symfony\Component\EventDispatcher\Tests\TestLegacyEventDispatcher::dispatch()" method should be updated to "dispatch($event, string $eventName = null)", not doing so is deprecated since Symfony 4.3. + * @expectedDeprecation Calling the "Symfony\Contracts\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead. + */ + public function testLegacySignatureWithoutEvent() + { + $this->createEventDispatcher()->dispatch('foo'); + } + + /** + * @group legacy + * @expectedDeprecation The signature of the "Symfony\Component\EventDispatcher\Tests\TestLegacyEventDispatcher::dispatch()" method should be updated to "dispatch($event, string $eventName = null)", not doing so is deprecated since Symfony 4.3. + * @expectedDeprecation Calling the "Symfony\Contracts\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead. + */ + public function testLegacySignatureWithEvent() + { + $this->createEventDispatcher()->dispatch('foo', new Event()); + } + + /** + * @expectedException \TypeError + * @expectedExceptionMessage Argument 1 passed to "Symfony\Contracts\EventDispatcher\EventDispatcherInterface::dispatch()" must be an object, string given. + */ + public function testLegacySignatureWithNewEventObject() + { + $this->createEventDispatcher()->dispatch('foo', new ContractsEvent()); + } + protected function createEventDispatcher() { return LegacyEventDispatcherProxy::decorate(new TestLegacyEventDispatcher()); From 0e7ed9e45cb623aed52f0d58be800873f92e21a3 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 27 Jun 2019 10:51:02 +0200 Subject: [PATCH 14/17] [Mailer] fixed timeout type hint --- .../Component/Mailer/Transport/Smtp/Stream/SocketStream.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php index 308201d538..0d075b0b6e 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php @@ -34,14 +34,14 @@ final class SocketStream extends AbstractStream private $sourceIp; private $streamContextOptions = []; - public function setTimeout(int $timeout): self + public function setTimeout(float $timeout): self { $this->timeout = $timeout; return $this; } - public function getTimeout(): int + public function getTimeout(): float { return $this->timeout; } From eb15bffa78a74ad4c003e79f5b4bff958c3836fb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 27 Jun 2019 11:08:50 +0200 Subject: [PATCH 15/17] [Mailer] fixed error message when connecting to a stream raises an error before connect() --- .../Smtp/Stream/SocketStreamTest.php | 49 +++++++++++++++++++ .../Transport/Smtp/Stream/SocketStream.php | 12 +++-- 2 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php new file mode 100644 index 0000000000..1f532d7c10 --- /dev/null +++ b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Mailer\Tests\Transport\Smtp\Stream; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream; + +class SocketStreamTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Mailer\Exception\TransportException + * @expectedExceptionMessage Connection refused + */ + public function testSocketErrorNoConnection() + { + $s = new SocketStream(); + $s->setTimeout(0.1); + $s->setPort(9999); + $s->initialize(); + } + + /** + * @expectedException \Symfony\Component\Mailer\Exception\TransportException + * @expectedExceptionMessage no valid certs found cafile stream + */ + public function testSocketErrorBeforeConnectError() + { + $s = new SocketStream(); + $s->setStreamOptions([ + 'ssl' => [ + // not a CA file :) + 'cafile' => __FILE__, + ], + ]); + $s->setEncryption('ssl'); + $s->setHost('smtp.gmail.com'); + $s->setPort(465); + $s->initialize(); + } +} diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php index 0d075b0b6e..a502c85e82 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php @@ -144,10 +144,16 @@ final class SocketStream extends AbstractStream $options['ssl']['crypto_method'] = $options['ssl']['crypto_method'] ?? STREAM_CRYPTO_METHOD_TLS_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; } $streamContext = stream_context_create($options); - $this->stream = @stream_socket_client($this->url, $errno, $errstr, $this->timeout, STREAM_CLIENT_CONNECT, $streamContext); - if (false === $this->stream) { - throw new TransportException(sprintf('Connection could not be established with host "%s": %s (%s)', $this->url, $errstr, $errno)); + + set_error_handler(function ($type, $msg) { + throw new TransportException(sprintf('Connection could not be established with host "%s": %s.', $this->url, $msg)); + }); + try { + $this->stream = stream_socket_client($this->url, $errno, $errstr, $this->timeout, STREAM_CLIENT_CONNECT, $streamContext); + } finally { + restore_error_handler(); } + stream_set_blocking($this->stream, true); stream_set_timeout($this->stream, $this->timeout); $this->in = &$this->stream; From 9b69dc651a3ba8f913688eaa7dd46d9cfe37cf55 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 27 Jun 2019 18:03:00 +0200 Subject: [PATCH 16/17] [PhpUnitBridge] fix tests --- composer.json | 2 +- .../Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt | 4 +++- .../Tests/DeprecationErrorHandler/deprecated_regexp.phpt | 3 ++- .../PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt | 3 ++- .../PhpUnit/Tests/DeprecationErrorHandler/eval_not_self.phpt | 3 ++- .../PhpUnit/Tests/DeprecationErrorHandler/lagging_vendor.phpt | 3 ++- .../Bridge/PhpUnit/Tests/DeprecationErrorHandler/quiet.phpt | 3 ++- .../Tests/DeprecationErrorHandler/self_on_non_vendor.phpt | 3 ++- .../Tests/DeprecationErrorHandler/shutdown_deprecations.phpt | 4 +++- .../Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt | 3 ++- .../weak_vendors_on_eval_d_deprecation.phpt | 3 ++- .../DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt | 3 ++- .../weak_vendors_on_phar_deprecation.phpt | 3 ++- .../Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt | 3 ++- 14 files changed, 29 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 897516fd30..206141f8a7 100644 --- a/composer.json +++ b/composer.json @@ -115,7 +115,7 @@ "psr/http-client": "^1.0", "psr/simple-cache": "^1.0", "egulias/email-validator": "~1.2,>=1.2.8|~2.0", - "symfony/phpunit-bridge": "~3.4|~4.0", + "symfony/phpunit-bridge": "~3.4|~4.0|~5.0", "symfony/security-acl": "~2.8|~3.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0" }, diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt index 126d23389a..7b4625979c 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt @@ -3,7 +3,9 @@ Test DeprecationErrorHandler in default mode --FILE-- Date: Thu, 27 Jun 2019 18:29:52 +0200 Subject: [PATCH 17/17] [Mailer] fixed tests on Windows --- .../Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php index 1f532d7c10..b825d1d19a 100644 --- a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php +++ b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php @@ -18,7 +18,7 @@ class SocketStreamTest extends TestCase { /** * @expectedException \Symfony\Component\Mailer\Exception\TransportException - * @expectedExceptionMessage Connection refused + * @expectedExceptionMessageRegExp /Connection refused|unable to connect/ */ public function testSocketErrorNoConnection() { @@ -30,7 +30,7 @@ class SocketStreamTest extends TestCase /** * @expectedException \Symfony\Component\Mailer\Exception\TransportException - * @expectedExceptionMessage no valid certs found cafile stream + * @expectedExceptionMessageRegExp /no valid certs found cafile stream|Unable to find the socket transport "ssl"/ */ public function testSocketErrorBeforeConnectError() {