From 25f53d7133d93fb5252752a811e0c2b90ef7cd07 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 05:51:35 +0200 Subject: [PATCH 01/28] updated CHANGELOG for 2.8.46 --- CHANGELOG-2.8.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG-2.8.md b/CHANGELOG-2.8.md index 7921dc3bcfa9b..1e7eae64e3ea0 100644 --- a/CHANGELOG-2.8.md +++ b/CHANGELOG-2.8.md @@ -7,6 +7,27 @@ in 2.8 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/v2.8.0...v2.8.1 +* 2.8.46 (2018-09-30) + + * bug #28376 [TwigBundle] Fixed caching of templates in src/Resources//views on cache warmup (yceruto) + * bug #28565 [HttpFoundation][Security] forward locale and format to subrequests (nicolas-grekas) + * bug #28545 [Console] Send the right exit code to console.terminate listeners (mpdude) + * bug #28466 [Form] fail reverse transforming invalid RFC 3339 dates (xabbuh) + * bug #28540 [Intl] parse numbers terminated with decimal separator (xabbuh) + * bug #28548 [Console] Fixed boxed table style with colspan (ro0NL) + * bug #28433 [HttpFoundation] Allow reuse of Session between requests if ID did not change (tgalopin) + * bug #28508 [Form] forward false label option to nested types (xabbuh) + * bug #28464 [Form] forward the invalid_message option in date types (xabbuh) + * bug #28499 [Ldap] Use shut up operator on connection errors at ldap_start_tls (Andras Debreczeni) + * bug #28372 [Form] Fix DateTimeType html5 input format (franzwilding, mcfedr) + * bug #28396 [Intl] Blacklist Eurozone and United Nations in Region Data Generator (gregurco) + * bug #28393 [Console] fixed corrupt error output for unknown multibyte short option (downace) + * bug #28401 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default (chalasr) + * bug #28377 fix fopen flags (SpacePossum) + * bug #27970 [FileValidator] Format file size in validation message according to binaryFormat option (jfredon) + * bug #28029 [TwigBundle] remove cache warmers when Twig cache is disabled (xabbuh) + * bug #28344 [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients (nicolas-grekas) + * 2.8.45 (2018-08-27) * bug #28278 [HttpFoundation] Fix unprepared BinaryFileResponse sends empty file (wackymole) From d506102802c9b104ec5ba613898f8732b26a14de Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 05:51:44 +0200 Subject: [PATCH 02/28] updated VERSION for 2.8.46 --- 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 4d5eb6a144eaa..b6db6ee97cd89 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.46-DEV'; + const VERSION = '2.8.46'; const VERSION_ID = 20846; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; const RELEASE_VERSION = 46; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From e457b294e0fcc09ed97eb8123bef8e40d7716012 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 05:52:49 +0200 Subject: [PATCH 03/28] update CONTRIBUTORS for 2.8.46 --- CONTRIBUTORS.md | 79 +++++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 629d8b80c98a3..66d9da5983a99 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -12,8 +12,8 @@ Symfony is the result of the work of many people who made the code better - Christophe Coevoet (stof) - Jordi Boggiano (seldaek) - Victor Berchet (victor) - - Kévin Dunglas (dunglas) - Robin Chalas (chalas_r) + - Kévin Dunglas (dunglas) - Johannes S (johannes) - Jakub Zalas (jakubzalas) - Maxime Steinhausser (ogizanagi) @@ -23,54 +23,54 @@ Symfony is the result of the work of many people who made the code better - Grégoire Pineau (lyrixx) - Hugo Hamon (hhamon) - Abdellatif Ait boudad (aitboudad) - - Romain Neutron (romain) - Roland Franssen (ro0) + - Romain Neutron (romain) - Pascal Borreli (pborreli) - Wouter De Jong (wouterj) - Joseph Bielawski (stloyd) - Karma Dordrak (drak) - Lukas Kahwe Smith (lsmith) + - Samuel ROZE (sroze) - Martin Hasoň (hason) - Jeremy Mikola (jmikola) - - Samuel ROZE (sroze) - Jean-François Simon (jfsimon) - Benjamin Eberlei (beberlei) - Igor Wiedler (igorw) - Jules Pietri (heah) - Eriksen Costa (eriksencosta) - - Guilhem Niot (energetick) - Yonel Ceruto (yonelceruto) + - Guilhem Niot (energetick) - Sarah Khalil (saro0h) - Jonathan Wage (jwage) - Hamza Amrouche (simperfit) - Diego Saint Esteben (dosten) - Iltar van der Berg (kjarli) + - Tobias Nyholm (tobias) - Alexandre Salomé (alexandresalome) - William Durand (couac) - ornicar - Francis Besset (francisbesset) + - Dany Maillard (maidmaid) - stealth35 ‏ (stealth35) - Alexander Mols (asm89) - Bulat Shakirzyanov (avalanche123) - - Dany Maillard (maidmaid) - - Peter Rehm (rpet) - Matthias Pigulla (mpdude) + - Peter Rehm (rpet) - Saša Stamenković (umpirsky) - - Kevin Bond (kbond) - - Tobias Nyholm (tobias) - Pierre du Plessis (pierredup) + - Kevin Bond (kbond) - Henrik Bjørnskov (henrikbjorn) - Miha Vrhovnik + - Jérémy DERUSSÉ (jderusse) - Diego Saint Esteben (dii3g0) - Alexander M. Turek (derrabus) - - Jérémy DERUSSÉ (jderusse) - Konstantin Kudryashov (everzet) - Bilal Amarni (bamarni) - Florin Patan (florinpatan) - Gábor Egyed (1ed) - Mathieu Piot (mpiot) - - Michel Weimerskirch (mweimerskirch) - Titouan Galopin (tgalopin) + - Michel Weimerskirch (mweimerskirch) - Andrej Hudec (pulzarraider) - Eric Clemmons (ericclemmons) - Jáchym Toušek (enumag) @@ -78,11 +78,11 @@ Symfony is the result of the work of many people who made the code better - David Maicher (dmaicher) - Konstantin Myakshin (koc) - Christian Raue + - Issei Murasawa (issei_m) - Arnout Boks (aboks) - Deni - Henrik Westphal (snc) - Dariusz Górecki (canni) - - Issei Murasawa (issei_m) - Douglas Greenshields (shieldo) - Vladimir Reznichenko (kalessil) - Lee McDermott @@ -92,6 +92,7 @@ Symfony is the result of the work of many people who made the code better - Daniel Holmes (dholmes) - Dariusz Ruminski - Toni Uebernickel (havvg) + - Grégoire Paris (greg0ire) - Bart van den Burg (burgov) - Jordan Alliot (jalliot) - Jérôme Tamarelle (gromnan) @@ -99,14 +100,13 @@ Symfony is the result of the work of many people who made the code better - Fran Moreno (franmomu) - Antoine Hérault (herzult) - Paráda József (paradajozsef) - - Grégoire Paris (greg0ire) - Arnaud Le Blanc (arnaud-lb) - Maxime STEINHAUSSER - Michal Piotrowski (eventhorizon) + - gadelat (gadelat) - Tim Nagel (merk) - Brice BERNARD (brikou) - Valentin Udaltsov (vudaltsov) - - gadelat (gadelat) - Baptiste Clavié (talus) - marc.weistroff - lenar @@ -121,8 +121,8 @@ Symfony is the result of the work of many people who made the code better - Joshua Thijssen - David Buchmann (dbu) - excelwebzone - - Fabien Pennequin (fabienpennequin) - Gordon Franke (gimler) + - Fabien Pennequin (fabienpennequin) - Eric GELOEN (gelo) - Sebastiaan Stok (sstok) - Lars Strojny (lstrojny) @@ -132,6 +132,7 @@ Symfony is the result of the work of many people who made the code better - Théo FIDRY (theofidry) - Robert Schönthal (digitalkaoz) - Florian Lonqueu-Brochard (florianlb) + - Chris Wilkinson (thewilkybarkid) - Stefano Sala (stefano.sala) - Jérôme Vasseur (jvasseur) - Evgeniy (ewgraf) @@ -142,7 +143,6 @@ Symfony is the result of the work of many people who made the code better - Sebastian Hörl (blogsh) - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) - - Chris Wilkinson (thewilkybarkid) - Arnaud Kleinpeter (nanocom) - Jannik Zschiesche (apfelbox) - Guilherme Blanco (guilhermeblanco) @@ -168,10 +168,12 @@ Symfony is the result of the work of many people who made the code better - Matthieu Ouellette-Vachon (maoueh) - Michał Pipa (michal.pipa) - Dawid Nowak + - Gabriel Ostrolucký - Amal Raghav (kertz) - Jonathan Ingram (jonathaningram) - Artur Kotyrba - GDIBass + - SpacePossum - jeremyFreeAgent (Jérémy Romey) (jeremyfreeagent) - James Halsall (jaitsu) - Matthieu Napoli (mnapoli) @@ -185,17 +187,17 @@ Symfony is the result of the work of many people who made the code better - Dorian Villet (gnutix) - Sergey Linnik (linniksa) - Richard Miller (mr_r_miller) - - Gabriel Ostrolucký - Mario A. Alvarez Garcia (nomack84) - Dennis Benkert (denderello) - DQNEO - - SpacePossum - Benjamin Dulau (dbenjamin) + - Florent Mata (fmata) - Mathieu Lemoine (lemoinem) - Thomas Calvet (fancyweb) - Christian Schmidt - Andreas Hucks (meandmymonkey) - Noel Guilbert (noel) + - Yanick Witschi (toflar) - Marek Štípek (maryo) - Stepan Anchugov (kix) - bronze1man @@ -222,7 +224,6 @@ Symfony is the result of the work of many people who made the code better - Michele Orselli (orso) - Tom Van Looy (tvlooy) - Sven Paulus (subsven) - - Yanick Witschi (toflar) - Rui Marinho (ruimarinho) - Alessandro Chitolina - Eugene Wissner @@ -233,6 +234,7 @@ Symfony is the result of the work of many people who made the code better - Nikolay Labinskiy (e-moe) - Marcel Beerta (mazen) - Albert Casademont (acasademont) + - Pavel Batanov (scaytrase) - Loïc Faugeron - Hidde Wieringa (hiddewie) - Marco Pivetta (ocramius) @@ -253,7 +255,6 @@ Symfony is the result of the work of many people who made the code better - Ruben Gonzalez (rubenrua) - Adam Prager (padam87) - Benoît Burnichon (bburnichon) - - Florent Mata (fmata) - Roman Marintšenko (inori) - Xavier Montaña Carreras (xmontana) - Mickaël Andrieu (mickaelandrieu) @@ -284,12 +285,12 @@ Symfony is the result of the work of many people who made the code better - Diego Agulló (aeoris) - Andreas Schempp (aschempp) - jdhoek - - Pavel Batanov (scaytrase) - Massimiliano Arione (garak) - Bob den Otter (bopp) - Nikita Konstantinov - Wodor Wodorski - Thomas Lallement (raziel057) + - mcfedr (mcfedr) - Giorgio Premi - Christian Schmidt - Beau Simensen (simensen) @@ -313,6 +314,7 @@ Symfony is the result of the work of many people who made the code better - Gary PEGEOT (gary-p) - Manuel Kiessling (manuelkiessling) - Atsuhiro KUBO (iteman) + - rudy onfroy (ronfroy) - Andrew Moore (finewolf) - Bertrand Zuchuat (garfield-fr) - Gabor Toth (tgabi333) @@ -435,6 +437,7 @@ Symfony is the result of the work of many people who made the code better - Jan Schumann - Niklas Fiekas - Markus Bachmann (baachi) + - Jan Schädlich - lancergr - Zan Baldwin - Mihai Stancu @@ -453,6 +456,7 @@ Symfony is the result of the work of many people who made the code better - Boris Vujicic (boris.vujicic) - Chris Sedlmayr (catchamonkey) - Mateusz Sip (mateusz_sip) + - Remon van de Kamp - Seb Koelen - Christoph Mewes (xrstf) - Vitaliy Tverdokhlib (vitaliytv) @@ -471,6 +475,7 @@ Symfony is the result of the work of many people who made the code better - Zander Baldwin - Adam Harvey - Anton Bakai + - Rhodri Pugh (rodnaph) - Alex Bakhturin - insekticid - Alexander Obuhovich (aik099) @@ -501,12 +506,14 @@ Symfony is the result of the work of many people who made the code better - Roy Van Ginneken (rvanginneken) - ondrowan - Barry vd. Heuvel (barryvdh) + - Sébastien Alfaiate (seb33300) - Evan S Kaufman (evanskaufman) - mcben - Jérôme Vieilledent (lolautruche) - Maks Slesarenko - Filip Procházka (fprochazka) - mmoreram + - Smaine Milianni (ismail1432) - Markus Lanthaler (lanthaler) - Remi Collet - Vicent Soria Durá (vicentgodella) @@ -522,6 +529,7 @@ Symfony is the result of the work of many people who made the code better - Erik Trapman (eriktrapman) - De Cock Xavier (xdecock) - Almog Baku (almogbaku) + - George Mponos (gmponos) - Scott Arciszewski - Xavier HAUSHERR - Norbert Orzechowicz (norzechowicz) @@ -594,6 +602,7 @@ Symfony is the result of the work of many people who made the code better - Nahuel Cuesta (ncuesta) - Chris Boden (cboden) - Christophe Villeger (seragan) + - Julien Fredon - Bob van de Vijver (bobvandevijver) - Stefan Gehrig (sgehrig) - Hany el-Kerdany @@ -607,6 +616,7 @@ Symfony is the result of the work of many people who made the code better - Javier López (loalf) - Reinier Kip - Geoffrey Brier (geoffrey-brier) + - Vlad Gregurco (vgregurco) - Vladimir Tsykun - Dustin Dobervich (dustin10) - dantleech @@ -618,7 +628,6 @@ Symfony is the result of the work of many people who made the code better - Kamil Kokot (pamil) - Max Grigorian (maxakawizard) - DerManoMann - - mcfedr (mcfedr) - Rostyslav Kinash - Maciej Malarz (malarzm) - Pascal Luna (skalpa) @@ -697,7 +706,6 @@ Symfony is the result of the work of many people who made the code better - Indra Gunawan (guind) - Peter Ward - Davide Borsatto (davide.borsatto) - - Rhodri Pugh (rodnaph) - Julien DIDIER (juliendidier) - Dominik Ritter (dritter) - Sebastian Grodzicki (sgrodzicki) @@ -733,13 +741,11 @@ Symfony is the result of the work of many people who made the code better - Nykopol (nykopol) - Jordan Deitch - Casper Valdemar Poulsen - - Remon van de Kamp - Josiah (josiah) - Joschi Kuphal - John Bohn (jbohn) - Marc Morera (mmoreram) - Saif Eddin Gmati (azjezz) - - Smaine Milianni (ismail1432) - Andrew Hilobok (hilobok) - Noah Heck (myesain) - Christian Soronellas (theunic) @@ -752,7 +758,6 @@ Symfony is the result of the work of many people who made the code better - Benoit Lévêque (benoit_leveque) - Jeroen Fiege (fieg) - Krzysiek Łabuś - - George Mponos (gmponos) - Xavier Lacot (xavier) - possum - Denis Zunke (donalberto) @@ -914,14 +919,16 @@ Symfony is the result of the work of many people who made the code better - Pieter - Michael Tibben - Billie Thompson + - Ganesh Chandrasekaran - Sander Marechal + - Franz Wilding (killerpoke) - ProgMiner - Oleg Golovakhin (doc_tr) - Icode4Food (icode4food) - Radosław Benkel + - kevin.nadin - jean pasqualini (darkilliant) - Ross Motley (rossmotley) - - Julien Fredon - ttomor - Mei Gwilym (meigwilym) - Michael H. Arieli (excelwebzone) @@ -932,6 +939,8 @@ Symfony is the result of the work of many people who made the code better - Sander Coolen (scoolen) - Nicolas Le Goff (nlegoff) - Ben Oman + - Guilhem N (guilhemn) + - Chris de Kok - Andreas Kleemann - Manuele Menozzi - Anton Babenko (antonbabenko) @@ -1047,8 +1056,10 @@ Symfony is the result of the work of many people who made the code better - Alexander Cheprasov - Rodrigo Díez Villamuera (rodrigodiez) - e-ivanov + - Roberto Espinoza (respinoza) - Einenlum - Jochen Bayer (jocl) + - Patrick Carlo-Hickman - Alex Bowers - Jeremy Bush - wizhippo @@ -1228,6 +1239,7 @@ Symfony is the result of the work of many people who made the code better - caponica - Matt Daum (daum) - Alberto Pirovano (geezmo) + - Nicolas LEFEVRE (nicoweb) - Pete Mitchell (peterjmit) - Tom Corrigan (tomcorrigan) - Luis Galeas @@ -1273,6 +1285,7 @@ Symfony is the result of the work of many people who made the code better - Jon Gotlin (jongotlin) - Michael Dowling (mtdowling) - Karlos Presumido (oneko) + - Sylvain Fabre (sylfabre) - Thomas Counsell - BilgeXA - r1pp3rj4ck @@ -1318,6 +1331,7 @@ Symfony is the result of the work of many people who made the code better - Andrew (drew) - kor3k kor3k (kor3k) - Stelian Mocanita (stelian) + - Justin (wackymole) - Flavian (2much) - Gautier Deuette - mike @@ -1361,6 +1375,7 @@ Symfony is the result of the work of many people who made the code better - Jody Mickey (jwmickey) - Przemysław Piechota (kibao) - Leonid Terentyev (li0n) + - Martynas Sudintas (martiis) - ryunosuke - zenmate - victoria @@ -1385,7 +1400,6 @@ Symfony is the result of the work of many people who made the code better - Vasily Khayrulin (sirian) - Stefan Koopmanschap (skoop) - Stefan Hüsges (tronsha) - - Vlad Gregurco (vgregurco) - Jake Bishop (yakobeyak) - Dan Blows - Matt Wells @@ -1440,13 +1454,16 @@ Symfony is the result of the work of many people who made the code better - loru88 - Romain Dorgueil - Christopher Parotat + - me_shaon - 蝦米 - Grayson Koonce (breerly) - Karim Cassam Chenaï (ka) + - Maksym Slesarenko (maksym_slesarenko) - Michal Kurzeja (mkurzeja) - Nicolas Bastien (nicolas_bastien) - Denis (yethee) - Andrew Zhilin (zhil) + - Sjors Ottjes - Andy Stanberry - Felix Marezki - Normunds @@ -1458,6 +1475,7 @@ Symfony is the result of the work of many people who made the code better - Pavel.Batanov - avi123 - alsar + - downace - Aarón Nieves Fernández - Mike Meier - Kirill Saksin @@ -1484,7 +1502,6 @@ Symfony is the result of the work of many people who made the code better - Milos Colakovic (project2481) - Rénald Casagraude (rcasagraude) - Robin Duval (robin-duval) - - rudy onfroy (ronfroy) - Grinbergs Reinis (shima5) - Artem Lopata (bumz) - Nicole Cordes @@ -1517,6 +1534,7 @@ Symfony is the result of the work of many people who made the code better - Sam Ward - Walther Lalk - Adam + - Sören Bernstein - devel - taiiiraaa - Trevor Suarez @@ -1597,6 +1615,7 @@ Symfony is the result of the work of many people who made the code better - Marin Nicolae - Alessandro Loffredo - Ian Phillips + - Marco Lipparini - Haritz - Matthieu Prat - Ion Bazan @@ -1741,6 +1760,7 @@ Symfony is the result of the work of many people who made the code better - Antonio Angelino - Matt Fields - Niklas Keller + - Andras Debreczeni - Vladimir Sazhin - Tomas Kmieliauskas - Billie Thompson @@ -1772,6 +1792,7 @@ Symfony is the result of the work of many people who made the code better - n-aleha - Anatol Belski - Şəhriyar İmanov + - Alexis BOYER - Kaipi Yann - Sam Williams - Guillaume Aveline @@ -1897,6 +1918,7 @@ Symfony is the result of the work of many people who made the code better - Arash Tabriziyan (ghost098) - ibasaw (ibasaw) - Vladislav Krupenkin (ideea) + - Ilija Tovilo (ilijatovilo) - Peter Orosz (ill_logical) - Imangazaliev Muhammad (imangazaliev) - j0k (j0k) @@ -1944,7 +1966,6 @@ Symfony is the result of the work of many people who made the code better - Bart Ruysseveldt (ruyss) - Sascha Dens (saschadens) - scourgen hung (scourgen) - - Sébastien Alfaiate (seb33300) - Sebastian Busch (sebu) - Sepehr Lajevardi (sepehr) - André Filipe Gonçalves Neves (seven) From d1db71aa344b3699855e3a192aeedb548a916674 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 06:05:12 +0200 Subject: [PATCH 04/28] bumped Symfony version to 2.8.47 --- 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 b6db6ee97cd89..1a75787eaff6b 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.46'; - const VERSION_ID = 20846; + const VERSION = '2.8.47-DEV'; + const VERSION_ID = 20847; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 46; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 47; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From 5bc57e200931ce3bc9e4c9caa03a97a19d0df865 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 06:53:42 +0200 Subject: [PATCH 05/28] updated CHANGELOG for 3.4.16 --- CHANGELOG-3.4.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md index 567f31a8c12c3..64cf429f3f5db 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG-3.4.md @@ -7,6 +7,43 @@ 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.16 (2018-09-30) + + * bug #28376 [TwigBundle] Fixed caching of templates in src/Resources//views on cache warmup (yceruto) + * bug #28565 [HttpFoundation][Security] forward locale and format to subrequests (nicolas-grekas) + * bug #28561 [Cache] prevent getting older entries when the version key is evicted (nicolas-grekas) + * bug #28562 [HttpFoundation] fix hidding warnings from session handlers (nicolas-grekas) + * bug #28545 [Console] Send the right exit code to console.terminate listeners (mpdude) + * bug #28553 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal" (nicolas-grekas) + * bug #28466 [Form] fail reverse transforming invalid RFC 3339 dates (xabbuh) + * bug #28540 [Intl] parse numbers terminated with decimal separator (xabbuh) + * bug #28548 [Console] Fixed boxed table style with colspan (ro0NL) + * bug #28433 [HttpFoundation] Allow reuse of Session between requests if ID did not change (tgalopin) + * bug #28508 [Form] forward false label option to nested types (xabbuh) + * bug #28471 [MonologBridge] Re-add option option to ignore empty context and extra data (mpdude) + * bug #28464 [Form] forward the invalid_message option in date types (xabbuh) + * bug #28524 [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file (soerenbernstein) + * bug #28512 [DI] fix infinite loop involving self-references in decorated services (nicolas-grekas) + * bug #28507 [DI] fix dumping lazy services (nicolas-grekas) + * bug #28495 [PhpUnitBridge] Implement startTest rather than startTestSuite (greg0ire) + * bug #28480 [DI] Detect circular references with ChildDefinition parent (Seb33300) + * bug #28497 [VarDumper] Fix global dump function return value for PHP7 (patrickcarlohickman) + * bug #28499 [Ldap] Use shut up operator on connection errors at ldap_start_tls (Andras Debreczeni) + * bug #28372 [Form] Fix DateTimeType html5 input format (franzwilding, mcfedr) + * bug #28396 [Intl] Blacklist Eurozone and United Nations in Region Data Generator (gregurco) + * bug #28393 [Console] fixed corrupt error output for unknown multibyte short option (downace) + * bug #28411 [Debug] fix detecting overriden final/internal methods implemented using traits (nicolas-grekas) + * bug #28404 [Controller][ServiceValueResolver] Making method access case insensitive (nicoweb) + * bug #28401 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default (chalasr) + * bug #28388 [DI] configure inlined services before injecting them when dumping the container (nicolas-grekas) + * bug #28377 fix fopen flags (SpacePossum) + * bug #27764 [TwigBundle] Fixed caching of templates in default path on cache warmup (yceruto) + * bug #28366 [DI] Fix dumping some complex service graphs (nicolas-grekas) + * bug #27970 [FileValidator] Format file size in validation message according to binaryFormat option (jfredon) + * bug #28029 [TwigBundle] remove cache warmers when Twig cache is disabled (xabbuh) + * bug #28344 [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients (nicolas-grekas) + * bug #28183 [WebProfilerBundle] fix wrong url when base path is the index (ismail1432) + * 3.4.15 (2018-08-28) * bug #28278 [HttpFoundation] Fix unprepared BinaryFileResponse sends empty file (wackymole) From 1a587f99ed136a8400000f7b6a8f2e32228263fb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 06:53:52 +0200 Subject: [PATCH 06/28] updated VERSION for 3.4.16 --- 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 ee2529a9e8013..820198028c70a 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.16-DEV'; + const VERSION = '3.4.16'; const VERSION_ID = 30416; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; const RELEASE_VERSION = 16; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From 00efcd48b5e09dcb762559a213b6efa0a3ce6be2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 07:04:55 +0200 Subject: [PATCH 07/28] bumped Symfony version to 3.4.17 --- 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 820198028c70a..f001134324f9c 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.16'; - const VERSION_ID = 30416; + const VERSION = '3.4.17-DEV'; + const VERSION_ID = 30417; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; - const RELEASE_VERSION = 16; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 17; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From 3cca29e68991afaf422c9147835c8302ba253b7b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 30 Sep 2018 07:08:20 +0200 Subject: [PATCH 08/28] bumped Symfony version to 4.1.6 --- 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 9e4e86dfff43b..6d01a2132e47f 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.1.5'; - const VERSION_ID = 40105; + const VERSION = '4.1.6-DEV'; + const VERSION_ID = 40106; const MAJOR_VERSION = 4; const MINOR_VERSION = 1; - const RELEASE_VERSION = 5; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 6; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '01/2019'; const END_OF_LIFE = '07/2019'; From e3732b63c6160934c13c8e9926ef4fdddb4b4f62 Mon Sep 17 00:00:00 2001 From: Albert Casdemont Date: Thu, 12 Jul 2018 14:04:46 +0200 Subject: [PATCH 09/28] [PHPUnitBridge] Fix microtime() format --- src/Symfony/Bridge/PhpUnit/ClockMock.php | 2 +- .../Bridge/PhpUnit/Tests/ClockMockTest.php | 60 +++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php diff --git a/src/Symfony/Bridge/PhpUnit/ClockMock.php b/src/Symfony/Bridge/PhpUnit/ClockMock.php index 5cd3531d6b67d..962649bcd6281 100644 --- a/src/Symfony/Bridge/PhpUnit/ClockMock.php +++ b/src/Symfony/Bridge/PhpUnit/ClockMock.php @@ -66,7 +66,7 @@ public static function microtime($asFloat = false) return self::$now; } - return sprintf('%0.6f %d', self::$now - (int) self::$now, (int) self::$now); + return sprintf('%0.6f00 %d', self::$now - (int) self::$now, (int) self::$now); } public static function register($class) diff --git a/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php b/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php new file mode 100644 index 0000000000000..82cfb6f566d9e --- /dev/null +++ b/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PhpUnit\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PhpUnit\ClockMock; + +/** + * @author Dominic Tubach + * + * @covers \Symfony\Bridge\PhpUnit\ClockMock + */ +class ClockMockTest extends TestCase +{ + public static function setUpBeforeClass() + { + ClockMock::register(__CLASS__); + } + + protected function setUp() + { + ClockMock::withClockMock(1234567890.125); + } + + public function testTime() + { + $this->assertSame(1234567890, time()); + } + + public function testSleep() + { + sleep(2); + $this->assertSame(1234567892, time()); + } + + public function testMicrotime() + { + $this->assertSame('0.12500000 1234567890', microtime()); + } + + public function testMicrotimeAsFloat() + { + $this->assertSame(1234567890.125, microtime(true)); + } + + public function testUsleep() + { + usleep(2); + $this->assertSame(1234567890.125002, microtime(true)); + } +} From f0bc2a64d790662da69d5ac369f30c430cb84e12 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sun, 30 Sep 2018 12:06:51 +0200 Subject: [PATCH 10/28] [Console] Add missing null to input values allowed types --- .../Component/Console/Input/InputArgument.php | 12 ++++++------ .../Component/Console/Input/InputInterface.php | 12 ++++++------ .../Component/Console/Input/InputOption.php | 14 +++++++------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Symfony/Component/Console/Input/InputArgument.php b/src/Symfony/Component/Console/Input/InputArgument.php index 2330cdc2ea565..5b3b98ba707e0 100644 --- a/src/Symfony/Component/Console/Input/InputArgument.php +++ b/src/Symfony/Component/Console/Input/InputArgument.php @@ -31,10 +31,10 @@ class InputArgument private $description; /** - * @param string $name The argument name - * @param int $mode The argument mode: self::REQUIRED or self::OPTIONAL - * @param string $description A description text - * @param mixed $default The default value (for self::OPTIONAL mode only) + * @param string $name The argument name + * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param string $description A description text + * @param string|string[]|null $default The default value (for self::OPTIONAL mode only) * * @throws InvalidArgumentException When argument mode is not valid */ @@ -86,7 +86,7 @@ public function isArray() /** * Sets the default value. * - * @param string|string[] $default The default value + * @param string|string[]|null $default The default value * * @throws LogicException When incorrect default value is given */ @@ -110,7 +110,7 @@ public function setDefault($default = null) /** * Returns the default value. * - * @return string|string[] The default value + * @return string|string[]|null The default value */ public function getDefault() { diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php index 354d198e046cf..7a4efbe71c595 100644 --- a/src/Symfony/Component/Console/Input/InputInterface.php +++ b/src/Symfony/Component/Console/Input/InputInterface.php @@ -83,7 +83,7 @@ public function getArguments(); * * @param string $name The argument name * - * @return string|string[] The argument value + * @return string|string[]|null The argument value * * @throws InvalidArgumentException When argument given doesn't exist */ @@ -92,8 +92,8 @@ public function getArgument($name); /** * Sets an argument value by name. * - * @param string $name The argument name - * @param string|string[] $value The argument value + * @param string $name The argument name + * @param string|string[]|null $value The argument value * * @throws InvalidArgumentException When argument given doesn't exist */ @@ -120,7 +120,7 @@ public function getOptions(); * * @param string $name The option name * - * @return string|string[]|bool The option value + * @return string|string[]|bool|null The option value * * @throws InvalidArgumentException When option given doesn't exist */ @@ -129,8 +129,8 @@ public function getOption($name); /** * Sets an option value by name. * - * @param string $name The option name - * @param string|string[]|bool $value The option value + * @param string $name The option name + * @param string|string[]|bool|null $value The option value * * @throws InvalidArgumentException When option given doesn't exist */ diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index 429c9f037d981..b5c1aa3a636f0 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -33,11 +33,11 @@ class InputOption private $description; /** - * @param string $name The option name - * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int $mode The option mode: One of the VALUE_* constants - * @param string $description A description text - * @param mixed $default The default value (must be null for self::VALUE_NONE) + * @param string $name The option name + * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param int|null $mode The option mode: One of the VALUE_* constants + * @param string $description A description text + * @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE) * * @throws InvalidArgumentException If option mode is invalid or incompatible */ @@ -149,7 +149,7 @@ public function isArray() /** * Sets the default value. * - * @param string|string[]|bool $default The default value + * @param string|string[]|bool|null $default The default value * * @throws LogicException When incorrect default value is given */ @@ -173,7 +173,7 @@ public function setDefault($default = null) /** * Returns the default value. * - * @return string|string[]|bool The default value + * @return string|string[]|bool|null The default value */ public function getDefault() { From b6c17dfb5e6aaff8a33482612ae2a6e6c8df1c0b Mon Sep 17 00:00:00 2001 From: Craig Duncan Date: Mon, 1 Oct 2018 15:53:15 +0100 Subject: [PATCH 11/28] Don't return early as this bypasses the auto exit feature --- src/Symfony/Component/Console/Application.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 6bad2b54256eb..1d415636fc3d8 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -162,8 +162,6 @@ public function run(InputInterface $input = null, OutputInterface $output = null } else { $exitCode = 1; } - - return $exitCode; } finally { // if the exception handler changed, keep it // otherwise, unregister $renderException From 07b67ec2cd1688efad88f07b71fad26fa4c6cba8 Mon Sep 17 00:00:00 2001 From: Achilles Kaloeridis Date: Mon, 1 Oct 2018 21:18:23 +0300 Subject: [PATCH 12/28] Fix a typo in error messages --- .../Security/Factory/GuardAuthenticationFactory.php | 2 +- .../Security/Guard/Firewall/GuardAuthenticationListener.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php index df3642b553530..466af4b57fecc 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php @@ -112,6 +112,6 @@ private function determineEntryPoint($defaultEntryPointId, array $config) } // we have multiple entry points - we must ask them to configure one - throw new \LogicException(sprintf('Because you have multiple guard configurators, you need to set the "guard.entry_point" key to one of your configurators (%s)', implode(', ', $authenticatorIds))); + throw new \LogicException(sprintf('Because you have multiple guard authenticators, you need to set the "guard.entry_point" key to one of your authenticators (%s)', implode(', ', $authenticatorIds))); } } diff --git a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php b/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php index 26f06ab5bedce..3d830f55084e5 100644 --- a/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php +++ b/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php @@ -91,7 +91,7 @@ private function executeGuardAuthenticator($uniqueGuardKey, GuardAuthenticatorIn $request = $event->getRequest(); try { if (null !== $this->logger) { - $this->logger->debug('Calling getCredentials() on guard configurator.', array('firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator))); + $this->logger->debug('Calling getCredentials() on guard authenticator.', array('firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator))); } // allow the authenticator to fetch authentication info from the request From c561e99394f0dcb5172d3ae514d3e2c33692e4bd Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Mon, 1 Oct 2018 23:42:26 -0300 Subject: [PATCH 13/28] [CS] Use combined assignment operators when possible --- .../Bundle/FrameworkBundle/Command/ServerRunCommand.php | 2 +- .../Bundle/FrameworkBundle/Command/ServerStartCommand.php | 2 +- .../Bundle/FrameworkBundle/Command/ServerStatusCommand.php | 2 +- .../Bundle/FrameworkBundle/Command/ServerStopCommand.php | 2 +- .../FrameworkBundle/Command/TranslationDebugCommand.php | 6 +++--- .../Tests/DependencyInjection/CompleteConfigurationTest.php | 2 +- src/Symfony/Component/ClassLoader/ClassCollectionLoader.php | 2 +- src/Symfony/Component/Console/Input/InputDefinition.php | 2 +- src/Symfony/Component/Form/Tests/Util/StringUtilTest.php | 2 +- src/Symfony/Component/HttpFoundation/Request.php | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index 909a4842a31e0..8c11c0cd214ed 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -90,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $address = $input->getArgument('address'); if (false === strpos($address, ':')) { - $address = $address.':'.$input->getOption('port'); + $address .= ':'.$input->getOption('port'); } if ($this->isOtherServerProcessRunning($address)) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php index 5b80cce2533df..f4e902e9ca665 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php @@ -112,7 +112,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $address = $input->getArgument('address'); if (false === strpos($address, ':')) { - $address = $address.':'.$input->getOption('port'); + $address .= ':'.$input->getOption('port'); } if (!$input->getOption('force') && $this->isOtherServerProcessRunning($address)) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php index 31f7078b1da08..a07cf4ba903e1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php @@ -49,7 +49,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $address = $input->getArgument('address'); if (false === strpos($address, ':')) { - $address = $address.':'.$input->getOption('port'); + $address .= ':'.$input->getOption('port'); } // remove an orphaned lock file diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php index 81c65868a43d1..6d98da6d475a7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php @@ -59,7 +59,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $address = $input->getArgument('address'); if (false === strpos($address, ':')) { - $address = $address.':'.$input->getOption('port'); + $address .= ':'.$input->getOption('port'); } $lockFile = $this->getLockFile($address); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php index ad8646f9c4679..1a0e1ed8a6a1b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -263,7 +263,7 @@ private function extractMessages($locale, $transPaths) { $extractedCatalogue = new MessageCatalogue($locale); foreach ($transPaths as $path) { - $path = $path.'views'; + $path .= 'views'; if (is_dir($path)) { $this->getContainer()->get('translation.extractor')->extract($path, $extractedCatalogue); } @@ -283,7 +283,7 @@ private function loadCurrentMessages($locale, $transPaths, TranslationLoader $lo { $currentCatalogue = new MessageCatalogue($locale); foreach ($transPaths as $path) { - $path = $path.'translations'; + $path .= 'translations'; if (is_dir($path)) { $loader->loadMessages($path, $currentCatalogue); } @@ -311,7 +311,7 @@ private function loadFallbackCatalogues($locale, $transPaths, TranslationLoader $fallbackCatalogue = new MessageCatalogue($fallbackLocale); foreach ($transPaths as $path) { - $path = $path.'translations'; + $path .= 'translations'; if (is_dir($path)) { $loader->loadMessages($path, $fallbackCatalogue); } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php index 61cb8b3a6b286..7ef554e7cde5a 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php @@ -264,7 +264,7 @@ public function testUserCheckerConfigWithNoCheckers() protected function getContainer($file) { - $file = $file.'.'.$this->getFileExtension(); + $file .= '.'.$this->getFileExtension(); if (isset(self::$containerCache[$file])) { return self::$containerCache[$file]; diff --git a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php index 19073ba574831..b96a4af63943f 100644 --- a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -53,7 +53,7 @@ public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = $classes = array_diff($classes, $declared); // the cache is different depending on which classes are already declared - $name = $name.'-'.substr(hash('sha256', implode('|', $classes)), 0, 5); + $name .= '-'.substr(hash('sha256', implode('|', $classes)), 0, 5); } $classes = array_unique($classes); diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php index 72f784cebb8b8..7d40881b191ae 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -390,7 +390,7 @@ public function getSynopsis($short = false) if (!$argument->isRequired()) { $element = '['.$element.']'; } elseif ($argument->isArray()) { - $element = $element.' ('.$element.')'; + $element .= ' ('.$element.')'; } if ($argument->isArray()) { diff --git a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php index 2103fa40e55d0..86c68ba3313d3 100644 --- a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php +++ b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php @@ -35,7 +35,7 @@ public function testTrimUtf8Separators($hex) // Convert UCS-2BE to UTF-8 $symbol = mb_convert_encoding($binary, 'UTF-8', 'UCS-2BE'); - $symbol = $symbol."ab\ncd".$symbol; + $symbol .= "ab\ncd".$symbol; $this->assertSame("ab\ncd", StringUtil::trim($symbol)); } diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 85b5a53f4fb10..f202d19f4dd3d 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -351,7 +351,7 @@ public static function create($uri, $method = 'GET', $parameters = array(), $coo if (isset($components['port'])) { $server['SERVER_PORT'] = $components['port']; - $server['HTTP_HOST'] = $server['HTTP_HOST'].':'.$components['port']; + $server['HTTP_HOST'] .= ':'.$components['port']; } if (isset($components['user'])) { From efbba25577230bc0e56e12e19291a9630acf3398 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 2 Oct 2018 00:12:00 -0300 Subject: [PATCH 14/28] [CS] Enforces null type hint on last position in phpDocs --- .../AbstractDoctrineExtension.php | 2 +- .../Form/ChoiceList/DoctrineChoiceLoader.php | 2 +- .../Translation/PhpStringTokenParser.php | 2 +- .../Component/Console/Command/Command.php | 2 +- .../Component/Console/Helper/QuestionHelper.php | 2 +- .../Component/Console/Question/Question.php | 12 ++++++------ .../Component/CssSelector/Node/ElementNode.php | 4 ++-- .../Component/CssSelector/Node/SelectorNode.php | 4 ++-- .../Component/CssSelector/Parser/TokenStream.php | 2 +- src/Symfony/Component/Debug/ErrorHandler.php | 2 +- .../Component/DependencyInjection/Definition.php | 6 +++--- src/Symfony/Component/DomCrawler/Crawler.php | 2 +- src/Symfony/Component/Filesystem/Filesystem.php | 2 +- src/Symfony/Component/Form/Button.php | 2 +- .../Factory/ChoiceListFactoryInterface.php | 16 ++++++++-------- .../Factory/PropertyAccessDecorator.php | 16 ++++++++-------- .../Component/Form/ChoiceList/LazyChoiceList.php | 4 ++-- .../ChoiceList/Loader/ChoiceLoaderInterface.php | 6 +++--- .../Form/Extension/Csrf/CsrfExtension.php | 2 +- .../EventListener/CsrfValidationListener.php | 2 +- .../Csrf/Type/FormTypeCsrfExtension.php | 2 +- .../Validator/Type/UploadValidatorExtension.php | 2 +- .../Validator/ViolationMapper/MappingRule.php | 2 +- .../ViolationMapper/ViolationMapper.php | 2 +- .../Form/FormConfigBuilderInterface.php | 2 +- .../Component/Form/FormConfigInterface.php | 4 ++-- src/Symfony/Component/Form/FormTypeInterface.php | 2 +- src/Symfony/Component/Form/SubmitButton.php | 2 +- src/Symfony/Component/Form/Util/ServerParams.php | 2 +- .../HttpFoundation/BinaryFileResponse.php | 4 ++-- .../Component/HttpFoundation/HeaderBag.php | 2 +- .../Storage/Handler/PdoSessionHandler.php | 2 +- .../Component/HttpKernel/Config/FileLocator.php | 2 +- .../Profiler/MongoDbProfilerStorage.php | 2 +- .../Component/HttpKernel/Profiler/Profile.php | 2 +- src/Symfony/Component/Intl/Intl.php | 2 +- src/Symfony/Component/Process/Process.php | 6 +++--- src/Symfony/Component/Process/ProcessBuilder.php | 4 ++-- .../Component/Process/Tests/ProcessTest.php | 6 +++--- .../PropertyAccess/PropertyPathBuilder.php | 2 +- src/Symfony/Component/Routing/Route.php | 2 +- .../Component/Security/Csrf/CsrfTokenManager.php | 2 +- .../Security/Guard/GuardAuthenticatorHandler.php | 4 ++-- .../CamelCaseToSnakeCaseNameConverter.php | 2 +- src/Symfony/Component/Stopwatch/Section.php | 2 +- .../Translation/Catalogue/AbstractOperation.php | 2 +- .../Component/Validator/ExecutionContext.php | 4 ++-- .../Validator/ExecutionContextInterface.php | 4 ++-- src/Symfony/Component/Validator/Validator.php | 2 +- .../Component/Validator/ValidatorBuilder.php | 2 +- 50 files changed, 86 insertions(+), 86 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index 736fa17bd142f..7a2a7adab0cf1 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -453,7 +453,7 @@ abstract protected function getMappingResourceExtension(); /** * Search for a manager that is declared as 'auto_mapping' = true. * - * @return null|string The name of the manager. If no one manager is found, returns null + * @return string|null The name of the manager. If no one manager is found, returns null * * @throws \LogicException */ diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php index 43120c6258577..ab92e61edd068 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php @@ -45,7 +45,7 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface * @param ObjectManager $manager The object manager * @param string $class The class name of the loaded objects * @param IdReader $idReader The reader for the object IDs - * @param null|EntityLoaderInterface $objectLoader The objects loader + * @param EntityLoaderInterface|null $objectLoader The objects loader */ public function __construct(ChoiceListFactoryInterface $factory, ObjectManager $manager, $class, IdReader $idReader = null, EntityLoaderInterface $objectLoader = null) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php index 1071e14b71178..c12f36c06131a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpStringTokenParser.php @@ -89,7 +89,7 @@ public static function parse($str) * Parses escape sequences in strings (all string types apart from single quoted). * * @param string $str String without quotes - * @param null|string $quote Quote type + * @param string|null $quote Quote type * * @return string String with escape sequences parsed */ diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 70b4546fde41c..dc6fa509ad026 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -140,7 +140,7 @@ protected function configure() * execute() method, you set the code to execute by passing * a Closure to the setCode() method. * - * @return null|int null or 0 if everything went fine, or an error code + * @return int|null null or 0 if everything went fine, or an error code * * @throws LogicException When this abstract method is not implemented * diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index 61e3945c18cb7..35974b06ae7b7 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -109,7 +109,7 @@ public function getName() * * This method is public for PHP 5.3 compatibility, it should be private. * - * @return bool|mixed|null|string + * @return bool|mixed|string|null * * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden */ diff --git a/src/Symfony/Component/Console/Question/Question.php b/src/Symfony/Component/Console/Question/Question.php index b0f3a695ba735..61c769af0ab03 100644 --- a/src/Symfony/Component/Console/Question/Question.php +++ b/src/Symfony/Component/Console/Question/Question.php @@ -117,7 +117,7 @@ public function setHiddenFallback($fallback) /** * Gets values for the autocompleter. * - * @return null|iterable + * @return iterable|null */ public function getAutocompleterValues() { @@ -127,7 +127,7 @@ public function getAutocompleterValues() /** * Sets values for the autocompleter. * - * @param null|iterable $values + * @param iterable|null $values * * @return $this * @@ -156,7 +156,7 @@ public function setAutocompleterValues($values) /** * Sets a validator for the question. * - * @param null|callable $validator + * @param callable|null $validator * * @return $this */ @@ -170,7 +170,7 @@ public function setValidator($validator) /** * Gets the validator for the question. * - * @return null|callable + * @return callable|null */ public function getValidator() { @@ -182,7 +182,7 @@ public function getValidator() * * Null means an unlimited number of attempts. * - * @param null|int $attempts + * @param int|null $attempts * * @return $this * @@ -204,7 +204,7 @@ public function setMaxAttempts($attempts) * * Null means an unlimited number of attempts. * - * @return null|int + * @return int|null */ public function getMaxAttempts() { diff --git a/src/Symfony/Component/CssSelector/Node/ElementNode.php b/src/Symfony/Component/CssSelector/Node/ElementNode.php index bcdce7a7a5207..54869af6cd30a 100644 --- a/src/Symfony/Component/CssSelector/Node/ElementNode.php +++ b/src/Symfony/Component/CssSelector/Node/ElementNode.php @@ -37,7 +37,7 @@ public function __construct($namespace = null, $element = null) } /** - * @return null|string + * @return string|null */ public function getNamespace() { @@ -45,7 +45,7 @@ public function getNamespace() } /** - * @return null|string + * @return string|null */ public function getElement() { diff --git a/src/Symfony/Component/CssSelector/Node/SelectorNode.php b/src/Symfony/Component/CssSelector/Node/SelectorNode.php index 5ef2be62a41b4..057107f6f5b57 100644 --- a/src/Symfony/Component/CssSelector/Node/SelectorNode.php +++ b/src/Symfony/Component/CssSelector/Node/SelectorNode.php @@ -28,7 +28,7 @@ class SelectorNode extends AbstractNode /** * @param NodeInterface $tree - * @param null|string $pseudoElement + * @param string|null $pseudoElement */ public function __construct(NodeInterface $tree, $pseudoElement = null) { @@ -45,7 +45,7 @@ public function getTree() } /** - * @return null|string + * @return string|null */ public function getPseudoElement() { diff --git a/src/Symfony/Component/CssSelector/Parser/TokenStream.php b/src/Symfony/Component/CssSelector/Parser/TokenStream.php index 24e8634ad6b86..d2aee541cd0c6 100644 --- a/src/Symfony/Component/CssSelector/Parser/TokenStream.php +++ b/src/Symfony/Component/CssSelector/Parser/TokenStream.php @@ -142,7 +142,7 @@ public function getNextIdentifier() /** * Returns nex identifier or star delimiter token. * - * @return null|string The identifier token value or null if star found + * @return string|null The identifier token value or null if star found * * @throws SyntaxErrorException If next token is not an identifier or a star delimiter */ diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php index 5606fd422e8ef..43d09ccd1c318 100644 --- a/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/Symfony/Component/Debug/ErrorHandler.php @@ -115,7 +115,7 @@ class ErrorHandler /** * Registers the error handler. * - * @param self|null|int $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels + * @param self|int|null $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels * @param bool $replace Whether to replace or not any existing handler * * @return self The registered error handler diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index 0880646b34abd..d9c37ea50420d 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -142,8 +142,8 @@ public function setFactoryMethod($factoryMethod) /** * Sets the service that this service is decorating. * - * @param null|string $id The decorated service id, use null to remove decoration - * @param null|string $renamedId The new decorated service id + * @param string|null $id The decorated service id, use null to remove decoration + * @param string|null $renamedId The new decorated service id * @param int $priority The priority of decoration * * @return $this @@ -168,7 +168,7 @@ public function setDecoratedService($id, $renamedId = null, $priority = 0) /** * Gets the service that this service is decorating. * - * @return null|array An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated + * @return array|null An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated */ public function getDecoratedService() { diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index afcfbe8cb824e..59f1af9e2a7dd 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -104,7 +104,7 @@ public function add($node) * HTTP 1.1 specification. * * @param string $content A string to parse as HTML/XML - * @param null|string $type The content type of the string + * @param string|null $type The content type of the string */ public function addContent($content, $type = null) { diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 5df92e733d366..df316205619fc 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -578,7 +578,7 @@ public function tempnam($dir, $prefix) * * @param string $filename The file to be written to * @param string $content The data to write into the file - * @param null|int $mode The file mode (octal). If null, file permissions are not modified + * @param int|null $mode The file mode (octal). If null, file permissions are not modified * Deprecated since version 2.3.12, to be removed in 3.0. * * @throws IOException if the file cannot be written to diff --git a/src/Symfony/Component/Form/Button.php b/src/Symfony/Component/Form/Button.php index d7832753131d9..b72e6ae9ee0c6 100644 --- a/src/Symfony/Component/Form/Button.php +++ b/src/Symfony/Component/Form/Button.php @@ -368,7 +368,7 @@ public function handleRequest($request = null) /** * Submits data to the button. * - * @param null|string $submittedData The data + * @param string|null $submittedData The data * @param bool $clearMissing Not used * * @return $this diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php b/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php index c66ce0f028d37..eae2abf411772 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php @@ -32,7 +32,7 @@ interface ChoiceListFactoryInterface * argument. * * @param iterable $choices The choices - * @param null|callable $value The callable generating the choice + * @param callable|null $value The callable generating the choice * values * * @return ChoiceListInterface The choice list @@ -51,7 +51,7 @@ public function createListFromChoices($choices, $value = null); * argument. * * @param array|\Traversable $choices The choices - * @param null|callable $value The callable generating the choice + * @param callable|null $value The callable generating the choice * values * * @return ChoiceListInterface The choice list @@ -69,7 +69,7 @@ public function createListFromFlippedChoices($choices, $value = null); * argument. * * @param ChoiceLoaderInterface $loader The choice loader - * @param null|callable $value The callable generating the choice + * @param callable|null $value The callable generating the choice * values * * @return ChoiceListInterface The choice list @@ -103,14 +103,14 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul * attributes that should be added to the respective choice. * * @param ChoiceListInterface $list The choice list - * @param null|array|callable $preferredChoices The preferred choices - * @param null|callable $label The callable generating the + * @param array|callable|null $preferredChoices The preferred choices + * @param callable|null $label The callable generating the * choice labels - * @param null|callable $index The callable generating the + * @param callable|null $index The callable generating the * view indices - * @param null|callable $groupBy The callable generating the + * @param callable|null $groupBy The callable generating the * group names - * @param null|array|callable $attr The callable generating the + * @param array|callable|null $attr The callable generating the * HTML attributes * * @return ChoiceListView The choice list view diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php index ee749ca029ae2..01e138411ced7 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php @@ -60,7 +60,7 @@ public function getDecoratedFactory() * {@inheritdoc} * * @param iterable $choices The choices - * @param null|callable|string|PropertyPath $value The callable or path for + * @param callable|string|PropertyPath|null $value The callable or path for * generating the choice values * * @return ChoiceListInterface The choice list @@ -91,7 +91,7 @@ public function createListFromChoices($choices, $value = null) * {@inheritdoc} * * @param array|\Traversable $choices The choices - * @param null|callable|string|PropertyPath $value The callable or path for + * @param callable|string|PropertyPath|null $value The callable or path for * generating the choice values * * @return ChoiceListInterface The choice list @@ -110,7 +110,7 @@ public function createListFromFlippedChoices($choices, $value = null, $triggerDe * {@inheritdoc} * * @param ChoiceLoaderInterface $loader The choice loader - * @param null|callable|string|PropertyPath $value The callable or path for + * @param callable|string|PropertyPath|null $value The callable or path for * generating the choice values * * @return ChoiceListInterface The choice list @@ -141,11 +141,11 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul * {@inheritdoc} * * @param ChoiceListInterface $list The choice list - * @param null|array|callable|string|PropertyPath $preferredChoices The preferred choices - * @param null|callable|string|PropertyPath $label The callable or path generating the choice labels - * @param null|callable|string|PropertyPath $index The callable or path generating the view indices - * @param null|callable|string|PropertyPath $groupBy The callable or path generating the group names - * @param null|array|callable|string|PropertyPath $attr The callable or path generating the HTML attributes + * @param array|callable|string|PropertyPath|null $preferredChoices The preferred choices + * @param callable|string|PropertyPath|null $label The callable or path generating the choice labels + * @param callable|string|PropertyPath|null $index The callable or path generating the view indices + * @param callable|string|PropertyPath|null $groupBy The callable or path generating the group names + * @param array|callable|string|PropertyPath|null $attr The callable or path generating the HTML attributes * * @return ChoiceListView The choice list view */ diff --git a/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php b/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php index ee00284bc4cf8..406fdd53053ae 100644 --- a/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php @@ -34,7 +34,7 @@ class LazyChoiceList implements ChoiceListInterface * * If null, choices are simply cast to strings. * - * @var null|callable + * @var callable|null */ private $value; @@ -51,7 +51,7 @@ class LazyChoiceList implements ChoiceListInterface * argument. * * @param ChoiceLoaderInterface $loader The choice loader - * @param null|callable $value The callable generating the choice values + * @param callable|null $value The callable generating the choice values */ public function __construct(ChoiceLoaderInterface $loader, $value = null) { diff --git a/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php b/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php index 573cc2d6e3c07..63e5f65210392 100644 --- a/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php +++ b/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php @@ -31,7 +31,7 @@ interface ChoiceLoaderInterface * The callable receives the choice as first and the array key as the second * argument. * - * @param null|callable $value The callable which generates the values + * @param callable|null $value The callable which generates the values * from choices * * @return ChoiceListInterface The loaded choice list @@ -50,7 +50,7 @@ public function loadChoiceList($value = null); * * @param string[] $values An array of choice values. Non-existing * values in this array are ignored - * @param null|callable $value The callable generating the choice values + * @param callable|null $value The callable generating the choice values * * @return array An array of choices */ @@ -68,7 +68,7 @@ public function loadChoicesForValues(array $values, $value = null); * * @param array $choices An array of choices. Non-existing choices in * this array are ignored - * @param null|callable $value The callable generating the choice values + * @param callable|null $value The callable generating the choice values * * @return string[] An array of choice values */ diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php index 99f8d824858c7..a577608fa719f 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php @@ -32,7 +32,7 @@ class CsrfExtension extends AbstractExtension /** * @param CsrfTokenManagerInterface $tokenManager The CSRF token manager * @param TranslatorInterface $translator The translator for translating error messages - * @param null|string $translationDomain The translation domain for translating + * @param string|null $translationDomain The translation domain for translating */ public function __construct($tokenManager, TranslatorInterface $translator = null, $translationDomain = null) { diff --git a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php index 6dc5599e84933..70c4595268815 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php @@ -51,7 +51,7 @@ public static function getSubscribedEvents() * same session and with the same tokenId * @param string $errorMessage The message displayed in case of an error * @param TranslatorInterface $translator - * @param null|string $translationDomain + * @param string|null $translationDomain * @param ServerParams $serverParams */ public function __construct($fieldName, $tokenManager, $tokenId, $errorMessage, TranslatorInterface $translator = null, $translationDomain = null, ServerParams $serverParams = null) diff --git a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php index 8ff1a061c9f68..d27160bb641d9 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php +++ b/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php @@ -47,7 +47,7 @@ class FormTypeCsrfExtension extends AbstractTypeExtension * @param bool $defaultEnabled * @param string $defaultFieldName * @param TranslatorInterface $translator - * @param null|string $translationDomain + * @param string|null $translationDomain * @param ServerParams $serverParams */ public function __construct($defaultTokenManager, $defaultEnabled = true, $defaultFieldName = '_token', TranslatorInterface $translator = null, $translationDomain = null, ServerParams $serverParams = null) diff --git a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php index 0147afcac232c..04e60f6cd3b09 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/Type/UploadValidatorExtension.php @@ -27,7 +27,7 @@ class UploadValidatorExtension extends AbstractTypeExtension /** * @param TranslatorInterface $translator The translator for translating error messages - * @param null|string $translationDomain The translation domain for translating + * @param string|null $translationDomain The translation domain for translating */ public function __construct(TranslatorInterface $translator, $translationDomain = null) { diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php index 98cb0de6a5594..590f7df2d8b58 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php @@ -51,7 +51,7 @@ public function getOrigin() * * @param string $propertyPath The property path to match against the rule * - * @return null|FormInterface The mapped form or null + * @return FormInterface|null The mapped form or null */ public function match($propertyPath) { diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php index b635646f6896b..9671082a651cc 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php @@ -144,7 +144,7 @@ public function mapViolation(ConstraintViolation $violation, FormInterface $form * @param FormInterface $form The form to search * @param PropertyPathIteratorInterface $it The iterator at its current position * - * @return null|FormInterface The found match or null + * @return FormInterface|null The found match or null */ private function matchChild(FormInterface $form, PropertyPathIteratorInterface $it) { diff --git a/src/Symfony/Component/Form/FormConfigBuilderInterface.php b/src/Symfony/Component/Form/FormConfigBuilderInterface.php index 31e5a82210998..f422840a82c45 100644 --- a/src/Symfony/Component/Form/FormConfigBuilderInterface.php +++ b/src/Symfony/Component/Form/FormConfigBuilderInterface.php @@ -146,7 +146,7 @@ public function setRequired($required); /** * Sets the property path that the form should be mapped to. * - * @param null|string|PropertyPathInterface $propertyPath The property path or null if the path should be set + * @param string|PropertyPathInterface|null $propertyPath The property path or null if the path should be set * automatically based on the form's name * * @return $this The configuration object diff --git a/src/Symfony/Component/Form/FormConfigInterface.php b/src/Symfony/Component/Form/FormConfigInterface.php index b7083544a436b..ce9171f3d496b 100644 --- a/src/Symfony/Component/Form/FormConfigInterface.php +++ b/src/Symfony/Component/Form/FormConfigInterface.php @@ -38,7 +38,7 @@ public function getName(); /** * Returns the property path that the form should be mapped to. * - * @return null|PropertyPathInterface The property path + * @return PropertyPathInterface|null The property path */ public function getPropertyPath(); @@ -167,7 +167,7 @@ public function getData(); /** * Returns the class of the form data or null if the data is scalar or an array. * - * @return null|string The data class or null + * @return string|null The data class or null */ public function getDataClass(); diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Component/Form/FormTypeInterface.php index 0ad9cae7b7e4a..3c095ab2bb01e 100644 --- a/src/Symfony/Component/Form/FormTypeInterface.php +++ b/src/Symfony/Component/Form/FormTypeInterface.php @@ -90,7 +90,7 @@ public function setDefaultOptions(OptionsResolverInterface $resolver); * Symfony 2.8 and will be unsupported as of Symfony 3.0. Return the * fully-qualified class name of the parent type instead. * - * @return string|null|FormTypeInterface The name of the parent type if any, null otherwise + * @return string|FormTypeInterface|null The name of the parent type if any, null otherwise */ public function getParent(); diff --git a/src/Symfony/Component/Form/SubmitButton.php b/src/Symfony/Component/Form/SubmitButton.php index 2422e11cd898a..a838542f975d8 100644 --- a/src/Symfony/Component/Form/SubmitButton.php +++ b/src/Symfony/Component/Form/SubmitButton.php @@ -34,7 +34,7 @@ public function isClicked() /** * Submits data to the button. * - * @param null|string $submittedData The data + * @param string|null $submittedData The data * @param bool $clearMissing Not used * * @return $this diff --git a/src/Symfony/Component/Form/Util/ServerParams.php b/src/Symfony/Component/Form/Util/ServerParams.php index 3d5b76a7c27c8..57b54a9c6e06e 100644 --- a/src/Symfony/Component/Form/Util/ServerParams.php +++ b/src/Symfony/Component/Form/Util/ServerParams.php @@ -41,7 +41,7 @@ public function hasPostMaxSizeBeenExceeded() /** * Returns maximum post size in bytes. * - * @return null|int The maximum post size in bytes + * @return int|null The maximum post size in bytes */ public function getPostMaxSize() { diff --git a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php index c0fd95ea6b661..f11515969a4b5 100644 --- a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +++ b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -40,7 +40,7 @@ class BinaryFileResponse extends Response * @param int $status The response status code * @param array $headers An array of response headers * @param bool $public Files are public by default - * @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename + * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename * @param bool $autoEtag Whether the ETag header should be automatically set * @param bool $autoLastModified Whether the Last-Modified header should be automatically set */ @@ -60,7 +60,7 @@ public function __construct($file, $status = 200, $headers = array(), $public = * @param int $status The response status code * @param array $headers An array of response headers * @param bool $public Files are public by default - * @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename + * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename * @param bool $autoEtag Whether the ETag header should be automatically set * @param bool $autoLastModified Whether the Last-Modified header should be automatically set * diff --git a/src/Symfony/Component/HttpFoundation/HeaderBag.php b/src/Symfony/Component/HttpFoundation/HeaderBag.php index 06c9e9a0c7c54..0ef7428254f97 100644 --- a/src/Symfony/Component/HttpFoundation/HeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/HeaderBag.php @@ -197,7 +197,7 @@ public function remove($key) * @param string $key The parameter key * @param \DateTime $default The default value * - * @return null|\DateTime The parsed DateTime or the default value if the header does not exist + * @return \DateTime|null The parsed DateTime or the default value if the header does not exist * * @throws \RuntimeException When the HTTP header is not parseable */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 1756ae564808a..aed690377d829 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -71,7 +71,7 @@ class PdoSessionHandler implements \SessionHandlerInterface private $pdo; /** - * @var string|null|false DSN string or null for session.save_path or false when lazy connection disabled + * @var string|false|null DSN string or null for session.save_path or false when lazy connection disabled */ private $dsn = false; diff --git a/src/Symfony/Component/HttpKernel/Config/FileLocator.php b/src/Symfony/Component/HttpKernel/Config/FileLocator.php index fb1f913bdff5d..c047ba3dac389 100644 --- a/src/Symfony/Component/HttpKernel/Config/FileLocator.php +++ b/src/Symfony/Component/HttpKernel/Config/FileLocator.php @@ -26,7 +26,7 @@ class FileLocator extends BaseFileLocator /** * @param KernelInterface $kernel A KernelInterface instance - * @param null|string $path The path the global resource directory + * @param string|null $path The path the global resource directory * @param array $paths An array of paths where to look for resources */ public function __construct(KernelInterface $kernel, $path = null, array $paths = array()) diff --git a/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php index 22b309cd6f3d7..19970f9b72236 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php @@ -235,7 +235,7 @@ private function getProfile(array $data) /** * @param string $dsn * - * @return null|array Array($server, $database, $collection) + * @return array|null Array($server, $database, $collection) */ private function parseDsn($dsn) { diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profile.php b/src/Symfony/Component/HttpKernel/Profiler/Profile.php index 5ebaae4f8d4ff..1f2796d537d34 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profile.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profile.php @@ -92,7 +92,7 @@ public function getParent() /** * Returns the parent token. * - * @return null|string The parent token + * @return string|null The parent token */ public function getParentToken() { diff --git a/src/Symfony/Component/Intl/Intl.php b/src/Symfony/Component/Intl/Intl.php index 7777b0bb57153..b4af8fb359fe2 100644 --- a/src/Symfony/Component/Intl/Intl.php +++ b/src/Symfony/Component/Intl/Intl.php @@ -187,7 +187,7 @@ public static function getRegionBundle() /** * Returns the version of the installed ICU library. * - * @return null|string The ICU version or NULL if it could not be determined + * @return string|null The ICU version or NULL if it could not be determined */ public static function getIcuVersion() { diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index b0a5916adfcaa..a261ea5340b1f 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -567,7 +567,7 @@ public function clearErrorOutput() /** * Returns the exit code returned by the process. * - * @return null|int The exit status code, null if the Process is not terminated + * @return int|null The exit status code, null if the Process is not terminated * * @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled */ @@ -588,7 +588,7 @@ public function getExitCode() * This method relies on the Unix exit code status standardization * and might not be relevant for other operating systems. * - * @return null|string A string representation for the exit status code, null if the Process is not terminated + * @return string|null A string representation for the exit status code, null if the Process is not terminated * * @see http://tldp.org/LDP/abs/html/exitcodes.html * @see http://en.wikipedia.org/wiki/Unix_signal @@ -1044,7 +1044,7 @@ public function getStdin() /** * Gets the Process input. * - * @return null|string The Process input + * @return string|null The Process input */ public function getInput() { diff --git a/src/Symfony/Component/Process/ProcessBuilder.php b/src/Symfony/Component/Process/ProcessBuilder.php index f246c871b87b7..1bac780d6329b 100644 --- a/src/Symfony/Component/Process/ProcessBuilder.php +++ b/src/Symfony/Component/Process/ProcessBuilder.php @@ -99,7 +99,7 @@ public function setArguments(array $arguments) /** * Sets the working directory. * - * @param null|string $cwd The working directory + * @param string|null $cwd The working directory * * @return $this */ @@ -131,7 +131,7 @@ public function inheritEnvironmentVariables($inheritEnv = true) * defined environment variable. * * @param string $name The variable name - * @param null|string $value The variable value + * @param string|null $value The variable value * * @return $this */ diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 8afff96727fbd..485d88c8c5333 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -1224,9 +1224,9 @@ public function provideVariousIncrementals() /** * @param string $commandline - * @param null|string $cwd - * @param null|array $env - * @param null|string $input + * @param string|null $cwd + * @param array|null $env + * @param string|null $input * @param int $timeout * @param array $options * diff --git a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php b/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php index 12e6f5e5247a4..e17c53c0d2129 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php @@ -24,7 +24,7 @@ class PropertyPathBuilder /** * Creates a new property path builder. * - * @param null|PropertyPathInterface|string $path The path to initially store + * @param PropertyPathInterface|string|null $path The path to initially store * in the builder. Optional. */ public function __construct($path = null) diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index 721cdf6e7c5e4..50400f87332c6 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -29,7 +29,7 @@ class Route implements \Serializable private $condition = ''; /** - * @var null|CompiledRoute + * @var CompiledRoute|null */ private $compiled; diff --git a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php index 861f228e155c8..450387a057899 100644 --- a/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php +++ b/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php @@ -31,7 +31,7 @@ class CsrfTokenManager implements CsrfTokenManagerInterface private $namespace; /** - * @param null|string|RequestStack|callable $namespace + * @param string|RequestStack|callable|null $namespace * * null: generates a namespace using $_SERVER['HTTPS'] * * string: uses the given string * * RequestStack: generates a namespace using the current master request diff --git a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php index 194e2e1908666..f2c7f7c212740 100644 --- a/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php +++ b/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php @@ -73,7 +73,7 @@ public function authenticateWithToken(TokenInterface $token, Request $request/*, * @param GuardAuthenticatorInterface $guardAuthenticator * @param string $providerKey The provider (i.e. firewall) key * - * @return null|Response + * @return Response|null */ public function handleAuthenticationSuccess(TokenInterface $token, Request $request, GuardAuthenticatorInterface $guardAuthenticator, $providerKey) { @@ -118,7 +118,7 @@ public function authenticateUserAndHandleSuccess(UserInterface $user, Request $r * @param GuardAuthenticatorInterface $guardAuthenticator * @param string $providerKey The key of the firewall * - * @return null|Response + * @return Response|null */ public function handleAuthenticationFailure(AuthenticationException $authenticationException, Request $request, GuardAuthenticatorInterface $guardAuthenticator, $providerKey) { diff --git a/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php b/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php index 9241d40357268..dbbb2410a6259 100644 --- a/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php +++ b/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php @@ -22,7 +22,7 @@ class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface private $lowerCamelCase; /** - * @param null|array $attributes The list of attributes to rename or null for all attributes + * @param array|null $attributes The list of attributes to rename or null for all attributes * @param bool $lowerCamelCase Use lowerCamelCase style */ public function __construct(array $attributes = null, $lowerCamelCase = true) diff --git a/src/Symfony/Component/Stopwatch/Section.php b/src/Symfony/Component/Stopwatch/Section.php index fe658a57e6645..2cddddb94dd4f 100644 --- a/src/Symfony/Component/Stopwatch/Section.php +++ b/src/Symfony/Component/Stopwatch/Section.php @@ -24,7 +24,7 @@ class Section private $events = array(); /** - * @var null|float + * @var float|null */ private $origin; diff --git a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php index 0a94476ab7b31..1acb7f76af813 100644 --- a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php @@ -29,7 +29,7 @@ abstract class AbstractOperation implements OperationInterface protected $result; /** - * @var null|array The domains affected by this operation + * @var array|null The domains affected by this operation */ private $domains; diff --git a/src/Symfony/Component/Validator/ExecutionContext.php b/src/Symfony/Component/Validator/ExecutionContext.php index 1eb322d997a97..8d93e69eec0d9 100644 --- a/src/Symfony/Component/Validator/ExecutionContext.php +++ b/src/Symfony/Component/Validator/ExecutionContext.php @@ -41,7 +41,7 @@ class ExecutionContext implements ExecutionContextInterface * * @param GlobalExecutionContextInterface $globalContext The global context storing node-independent state * @param TranslatorInterface $translator The translator for translating violation messages - * @param null|string $translationDomain The domain of the validation messages + * @param string|null $translationDomain The domain of the validation messages * @param MetadataInterface $metadata The metadata of the validated node * @param mixed $value The value of the validated node * @param string $group The current validation group @@ -255,7 +255,7 @@ private function executeConstraintValidators($value, array $constraints) /** * Returns an array of group names. * - * @param null|string|string[] $groups The groups to resolve. If a single string is + * @param string|string[]|null $groups The groups to resolve. If a single string is * passed, it is converted to an array. If null * is passed, an array containing the current * group of the context is returned. diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 08979cb964f6c..4d5d2f6f65f9b 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -134,7 +134,7 @@ public function addViolationAt($subPath, $message, array $parameters = array(), * * @param mixed $value The value to validate * @param string $subPath The path to append to the context's property path - * @param null|string|string[] $groups The groups to validate in. If you don't pass any + * @param string|string[]|null $groups The groups to validate in. If you don't pass any * groups here, the current group of the context * will be used. * @param bool $traverse Whether to traverse the value if it is an array @@ -166,7 +166,7 @@ public function validate($value, $subPath = '', $groups = null, $traverse = fals * @param mixed $value The value to validate * @param Constraint|Constraint[] $constraints The constraint(s) to validate against * @param string $subPath The path to append to the context's property path - * @param null|string|string[] $groups The groups to validate in. If you don't pass any + * @param string|string[]|null $groups The groups to validate in. If you don't pass any * groups here, the current group of the context * will be used. * diff --git a/src/Symfony/Component/Validator/Validator.php b/src/Symfony/Component/Validator/Validator.php index c151d92e3a4a4..1aa5fd18d6f5e 100644 --- a/src/Symfony/Component/Validator/Validator.php +++ b/src/Symfony/Component/Validator/Validator.php @@ -197,7 +197,7 @@ private function createVisitor($root) } /** - * @param null|string|string[] $groups + * @param string|string[]|null $groups * * @return string[] */ diff --git a/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index 98ecddc7aee96..c99de8cc790f0 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -70,7 +70,7 @@ class ValidatorBuilder implements ValidatorBuilderInterface private $translator; /** - * @var null|string + * @var string|null */ private $translationDomain; From 3bfd877e161fac81a95637922237f6bbcfbccac8 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 2 Oct 2018 00:29:33 -0300 Subject: [PATCH 15/28] [CS] Remove empty comment --- src/Symfony/Component/PropertyAccess/PropertyAccessor.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index c14afc2dd9449..0c05fa88c272c 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -170,7 +170,6 @@ public function setValue(&$objectOrArray, $propertyPath, $value) // '[a][b][c]' => 'old-value' // If you want to change its value to 'new-value', // you only need set value for '[a][b][c]' and it's safe to ignore '[a][b]' and '[a]' - // if ($overwrite) { $property = $propertyPath->getElement($i); From d60eb1aa338d6a0ff98c43e8f27de28dc634cf62 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 2 Oct 2018 08:41:34 +0200 Subject: [PATCH 16/28] [DI] fix dumping setters before their inlined instances --- .../DependencyInjection/Dumper/PhpDumper.php | 3 +- .../Fixtures/php/services_deep_graph.php | 1 + .../Tests/Fixtures/php/services_tsantos.php | 89 +++++++++++++++++++ .../Tests/Fixtures/xml/services_tsantos.xml | 65 ++++++++++++++ .../Tests/Loader/XmlFileLoaderTest.php | 13 +++ 5 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php create mode 100644 src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_tsantos.xml diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 9c1e22f6389db..c1916936bc40c 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -780,8 +780,9 @@ private function addInlineService(&$head, &$tail, $id, Definition $definition, $ $code = ''; $arguments = array($definition->getProperties(), $definition->getMethodCalls(), $definition->getConfigurator()); - $hasSelfRef = $this->addInlineVariables($code, $tail, $id, $arguments, false) || $hasSelfRef; + $hasSelfRef = $this->addInlineVariables($code, $code, $id, $arguments, false) || $hasSelfRef; + $code .= '' !== $code ? "\n" : ''; $code .= $this->addServiceProperties($definition, $name); $code .= $this->addServiceMethodCalls($definition, $name); $code .= $this->addServiceConfigurator($definition, $name); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php index 4bfa86e21109c..03441e6a49766 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deep_graph.php @@ -85,6 +85,7 @@ protected function getFooService() $b = new \stdClass(); $c = new \stdClass(); $c->p3 = new \stdClass(); + $b->p2 = $c; return $this->services['foo'] = new \Symfony\Component\DependencyInjection\Tests\Dumper\FooForDeepGraph($a, $b); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php new file mode 100644 index 0000000000000..c8b3f9d50d657 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_tsantos.php @@ -0,0 +1,89 @@ +services = array(); + $this->normalizedIds = array( + 'tsantos\\serializer\\serializerinterface' => 'TSantos\\Serializer\\SerializerInterface', + ); + $this->methodMap = array( + 'tsantos_serializer' => 'getTsantosSerializerService', + ); + $this->aliases = array( + 'TSantos\\Serializer\\SerializerInterface' => 'tsantos_serializer', + ); + } + + public function getRemovedIds() + { + return array( + 'Psr\\Container\\ContainerInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, + ); + } + + public function compile() + { + throw new LogicException('You cannot compile a dumped container that was already compiled.'); + } + + public function isCompiled() + { + return true; + } + + public function isFrozen() + { + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED); + + return true; + } + + /** + * Gets the public 'tsantos_serializer' shared service. + * + * @return \TSantos\Serializer\EventEmitterSerializer + */ + protected function getTsantosSerializerService() + { + $a = new \TSantos\Serializer\NormalizerRegistry(); + + $d = new \TSantos\Serializer\EventDispatcher\EventDispatcher(); + $d->addSubscriber(new \TSantos\SerializerBundle\EventListener\StopwatchListener(new \Symfony\Component\Stopwatch\Stopwatch(true))); + + $this->services['tsantos_serializer'] = $instance = new \TSantos\Serializer\EventEmitterSerializer(new \TSantos\Serializer\Encoder\JsonEncoder(), $a, $d); + + $b = new \TSantos\Serializer\Normalizer\CollectionNormalizer(); + + $b->setSerializer($instance); + + $c = new \TSantos\Serializer\Normalizer\JsonNormalizer(); + + $c->setSerializer($instance); + + $a->add(new \TSantos\Serializer\Normalizer\ObjectNormalizer(new \TSantos\SerializerBundle\Serializer\CircularReferenceHandler())); + $a->add($b); + $a->add($c); + + return $instance; + } +} diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_tsantos.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_tsantos.xml new file mode 100644 index 0000000000000..bb310b279d705 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services_tsantos.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php index 969bb09f0ce03..153f7f7fb6505 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -18,6 +18,7 @@ use Symfony\Component\Config\Resource\GlobResource; use Symfony\Component\DependencyInjection\Argument\IteratorArgument; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Dumper\PhpDumper; use Symfony\Component\DependencyInjection\Loader\IniFileLoader; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; @@ -807,4 +808,16 @@ public function testBindings() '$factory' => 'factory', ), array_map(function ($v) { return $v->getValues()[0]; }, $definition->getBindings())); } + + public function testTsantosContainer() + { + $container = new ContainerBuilder(); + $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')); + $loader->load('services_tsantos.xml'); + $container->compile(); + + $dumper = new PhpDumper($container); + $dump = $dumper->dump(); + $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_tsantos.php', $dumper->dump()); + } } From 48a70180da98aef68c89d3b02e03bf22bf73712d Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 2 Oct 2018 00:08:26 -0300 Subject: [PATCH 17/28] [CS] Remove unused variables passed to closures --- src/Symfony/Component/Console/Tests/ApplicationTest.php | 6 ++---- .../Component/Form/Tests/Fixtures/AlternatingRowType.php | 4 +--- .../Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php | 3 +-- .../Component/OptionsResolver/Tests/LegacyOptionsTest.php | 6 ++---- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index 8eb01d9f59f86..81391ea9b3b52 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -780,8 +780,7 @@ public function testRunDispatchesIntegerExitCode() // We can assume here that some other test asserts that the event is dispatched at all $dispatcher = new EventDispatcher(); - $self = $this; - $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($self, &$passedRightValue) { + $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) { $passedRightValue = (4 === $event->getExitCode()); }); @@ -820,8 +819,7 @@ public function testRunDispatchesExitCodeOneForExceptionCodeZero() // We can assume here that some other test asserts that the event is dispatched at all $dispatcher = new EventDispatcher(); - $self = $this; - $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($self, &$passedRightValue) { + $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) { $passedRightValue = (1 === $event->getExitCode()); }); diff --git a/src/Symfony/Component/Form/Tests/Fixtures/AlternatingRowType.php b/src/Symfony/Component/Form/Tests/Fixtures/AlternatingRowType.php index ea576af8f51a8..556166f5547ed 100644 --- a/src/Symfony/Component/Form/Tests/Fixtures/AlternatingRowType.php +++ b/src/Symfony/Component/Form/Tests/Fixtures/AlternatingRowType.php @@ -11,9 +11,7 @@ class AlternatingRowType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { - $formFactory = $builder->getFormFactory(); - - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($formFactory) { + $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { $form = $event->getForm(); $type = 0 === $form->getName() % 2 ? 'Symfony\Component\Form\Extension\Core\Type\TextType' diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php index 102d7644ed3e0..ccbe412e81819 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php @@ -964,8 +964,7 @@ public function testUsesCacheToRespondToHeadRequestsWhenFresh() public function testSendsNoContentWhenFresh() { $time = \DateTime::createFromFormat('U', time()); - $that = $this; - $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($that, $time) { + $this->setNextResponse(200, array(), 'Hello World', function ($request, $response) use ($time) { $response->headers->set('Cache-Control', 'public, max-age=10'); $response->headers->set('Last-Modified', $time->format(DATE_RFC2822)); }); diff --git a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php index 642d1d5e22fac..fe97b0fbef8e2 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php +++ b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php @@ -32,9 +32,7 @@ protected function setUp() public function testSetLazyOption() { - $test = $this; - - $this->options->set('foo', function (Options $options) use ($test) { + $this->options->set('foo', function (Options $options) { return 'dynamic'; }); @@ -89,7 +87,7 @@ public function testPreviousValueIsNotEvaluatedIfNoSecondArgument() }); // defined by subclass, no $previousValue argument defined! - $this->options->overload('foo', function (Options $options) use ($test) { + $this->options->overload('foo', function (Options $options) { return 'dynamic'; }); From 2d0aba6ff88f790898ef5c287fa5eb6665e5589c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 1 Oct 2018 23:02:25 +0200 Subject: [PATCH 18/28] [DI] fix error in dumped container --- .../DependencyInjection/Dumper/PhpDumper.php | 2 +- .../Tests/ContainerBuilderTest.php | 3 ++ .../Tests/Dumper/PhpDumperTest.php | 3 ++ .../containers/container_almost_circular.php | 14 +++++ .../php/services_almost_circular_private.php | 51 +++++++++++++++++++ .../php/services_almost_circular_public.php | 51 +++++++++++++++++++ 6 files changed, 123 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 9c1e22f6389db..cd11e7b1d2fd1 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -751,7 +751,7 @@ private function addInlineReference(&$head, &$tail, $id, $targetId, $forConstruc EOTXT , - $this->container->getDefinition($id)->isPublic() ? 'services' : 'privates', + 'services', $id ); diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 45a1d24ebee4a..7eccb7d74e0cc 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -1385,6 +1385,9 @@ public function testAlmostCircular($visibility) $manager = $container->get('manager2'); $this->assertEquals(new \stdClass(), $manager); + + $foo6 = $container->get('foo6'); + $this->assertEquals((object) array('bar6' => (object) array()), $foo6); } public function provideAlmostCircular() diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index 67a1de784f959..25761d28b086f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -830,6 +830,9 @@ public function testAlmostCircular($visibility) $manager = $container->get('manager2'); $this->assertEquals(new \stdClass(), $manager); + + $foo6 = $container->get('foo6'); + $this->assertEquals((object) array('bar6' => (object) array()), $foo6); } public function provideAlmostCircular() diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_almost_circular.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_almost_circular.php index 2079e136b74b3..3286f3d02ff70 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_almost_circular.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container_almost_circular.php @@ -101,4 +101,18 @@ $container->register('subscriber2', 'stdClass')->setPublic(false) ->addArgument(new Reference('manager2')); +// private service involved in a loop + +$container->register('foo6', 'stdClass') + ->setPublic(true) + ->setProperty('bar6', new Reference('bar6')); + +$container->register('bar6', 'stdClass') + ->setPublic(false) + ->addArgument(new Reference('foo6')); + +$container->register('baz6', 'stdClass') + ->setPublic(true) + ->setProperty('bar6', new Reference('bar6')); + return $container; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php index 18bd2a9b16f26..882f22843b50f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php @@ -25,17 +25,23 @@ public function __construct() $this->methodMap = array( 'bar2' => 'getBar2Service', 'bar3' => 'getBar3Service', + 'bar6' => 'getBar6Service', + 'baz6' => 'getBaz6Service', 'connection' => 'getConnectionService', 'connection2' => 'getConnection2Service', 'foo' => 'getFooService', 'foo2' => 'getFoo2Service', 'foo5' => 'getFoo5Service', + 'foo6' => 'getFoo6Service', 'foobar4' => 'getFoobar4Service', 'logger' => 'getLoggerService', 'manager' => 'getManagerService', 'manager2' => 'getManager2Service', 'subscriber' => 'getSubscriberService', ); + $this->privates = array( + 'bar6' => true, + ); $this->aliases = array(); } @@ -47,6 +53,7 @@ public function getRemovedIds() 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar' => true, 'bar5' => true, + 'bar6' => true, 'config' => true, 'config2' => true, 'dispatcher' => true, @@ -107,6 +114,20 @@ protected function getBar3Service() return $instance; } + /** + * Gets the public 'baz6' shared service. + * + * @return \stdClass + */ + protected function getBaz6Service() + { + $this->services['baz6'] = $instance = new \stdClass(); + + $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'}; + + return $instance; + } + /** * Gets the public 'connection' shared service. * @@ -203,6 +224,20 @@ protected function getFoo5Service() return $instance; } + /** + * Gets the public 'foo6' shared service. + * + * @return \stdClass + */ + protected function getFoo6Service() + { + $this->services['foo6'] = $instance = new \stdClass(); + + $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'}; + + return $instance; + } + /** * Gets the public 'foobar4' shared service. * @@ -286,4 +321,20 @@ protected function getSubscriberService() return $this->services['subscriber'] = new \stdClass($a); } + + /** + * Gets the private 'bar6' shared service. + * + * @return \stdClass + */ + protected function getBar6Service() + { + $a = ${($_ = isset($this->services['foo6']) ? $this->services['foo6'] : $this->getFoo6Service()) && false ?: '_'}; + + if (isset($this->services['bar6'])) { + return $this->services['bar6']; + } + + return $this->services['bar6'] = new \stdClass($a); + } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php index 177160bd921fc..573cc9befb78d 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php @@ -26,6 +26,8 @@ public function __construct() 'bar' => 'getBarService', 'bar3' => 'getBar3Service', 'bar5' => 'getBar5Service', + 'bar6' => 'getBar6Service', + 'baz6' => 'getBaz6Service', 'connection' => 'getConnectionService', 'connection2' => 'getConnection2Service', 'dispatcher' => 'getDispatcherService', @@ -34,6 +36,7 @@ public function __construct() 'foo2' => 'getFoo2Service', 'foo4' => 'getFoo4Service', 'foo5' => 'getFoo5Service', + 'foo6' => 'getFoo6Service', 'foobar' => 'getFoobarService', 'foobar2' => 'getFoobar2Service', 'foobar3' => 'getFoobar3Service', @@ -43,6 +46,9 @@ public function __construct() 'manager2' => 'getManager2Service', 'subscriber' => 'getSubscriberService', ); + $this->privates = array( + 'bar6' => true, + ); $this->aliases = array(); } @@ -53,6 +59,7 @@ public function getRemovedIds() 'Psr\\Container\\ContainerInterface' => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar2' => true, + 'bar6' => true, 'config' => true, 'config2' => true, 'logger2' => true, @@ -127,6 +134,20 @@ protected function getBar5Service() return $instance; } + /** + * Gets the public 'baz6' shared service. + * + * @return \stdClass + */ + protected function getBaz6Service() + { + $this->services['baz6'] = $instance = new \stdClass(); + + $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'}; + + return $instance; + } + /** * Gets the public 'connection' shared service. * @@ -251,6 +272,20 @@ protected function getFoo5Service() return $instance; } + /** + * Gets the public 'foo6' shared service. + * + * @return \stdClass + */ + protected function getFoo6Service() + { + $this->services['foo6'] = $instance = new \stdClass(); + + $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'}; + + return $instance; + } + /** * Gets the public 'foobar' shared service. * @@ -370,4 +405,20 @@ protected function getSubscriberService() { return $this->services['subscriber'] = new \stdClass(${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'}); } + + /** + * Gets the private 'bar6' shared service. + * + * @return \stdClass + */ + protected function getBar6Service() + { + $a = ${($_ = isset($this->services['foo6']) ? $this->services['foo6'] : $this->getFoo6Service()) && false ?: '_'}; + + if (isset($this->services['bar6'])) { + return $this->services['bar6']; + } + + return $this->services['bar6'] = new \stdClass($a); + } } From a164bb965df52ac7ca2e7c904ceabff825803047 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 2 Oct 2018 13:58:25 +0200 Subject: [PATCH 19/28] [php_cs] disable fopen_flags --- .php_cs.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/.php_cs.dist b/.php_cs.dist index c832b99114352..a9f928d1ebe75 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -11,6 +11,7 @@ return PhpCsFixer\Config::create() '@PHPUnit48Migration:risky' => true, 'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice 'array_syntax' => array('syntax' => 'long'), + 'fopen_flags' => false, 'ordered_imports' => true, 'protected_to_private' => false, // rule disabled due to https://bugs.php.net/bug.php?id=60573 bug; From 10795cf0960a37ac8fbea13ac2f910518b4f4f76 Mon Sep 17 00:00:00 2001 From: Colin O'Dell Date: Tue, 2 Oct 2018 08:07:35 -0400 Subject: [PATCH 20/28] Remove redundant path check The first `if` statement in this method already performs this same check, so the expression here always evaluated to `true`. --- src/Symfony/Component/HttpFoundation/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 85b5a53f4fb10..212722ed13b1f 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1120,7 +1120,7 @@ public function getRelativeUriForPath($path) } $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); - $targetDirs = explode('/', isset($path[0]) && '/' === $path[0] ? substr($path, 1) : $path); + $targetDirs = explode('/', substr($path, 1)); array_pop($sourceDirs); $targetFile = array_pop($targetDirs); From 41fd0a881e31a2e7e0efc0fc0a0e52096f6c1338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Tue, 2 Oct 2018 17:56:33 +0200 Subject: [PATCH 21/28] [FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed --- .../DependencyInjection/FrameworkExtension.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index c36b85cc9a498..6b33715ab6f1e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -61,6 +61,7 @@ use Symfony\Component\PropertyAccess\PropertyAccessor; use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface; use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader; @@ -296,7 +297,7 @@ public function load(array $configs, ContainerBuilder $container) } if ($this->isConfigEnabled($container, $config['property_info'])) { - $this->registerPropertyInfoConfiguration($config['property_info'], $container, $loader); + $this->registerPropertyInfoConfiguration($container, $loader); } if ($this->isConfigEnabled($container, $config['lock'])) { @@ -1543,8 +1544,12 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder } } - private function registerPropertyInfoConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) + private function registerPropertyInfoConfiguration(ContainerBuilder $container, XmlFileLoader $loader) { + if (!interface_exists(PropertyInfoExtractorInterface::class)) { + throw new LogicException('PropertyInfo support cannot be enabled as the PropertyInfo component is not installed. Try running "composer require symfony/property-info".'); + } + $loader->load('property_info.xml'); $container->getDefinition('property_info')->setPrivate(true); From ab80f290fdedca2c849391d7e228d5b73ebaf3eb Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 2 Oct 2018 18:22:14 +0200 Subject: [PATCH 22/28] [Debug] fix compat with PHP 7.3 --- .../Component/Debug/Tests/phpt/decorate_exception_hander.phpt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Debug/Tests/phpt/decorate_exception_hander.phpt b/src/Symfony/Component/Debug/Tests/phpt/decorate_exception_hander.phpt index 7211afbdf85ea..9cd44388c3166 100644 --- a/src/Symfony/Component/Debug/Tests/phpt/decorate_exception_hander.phpt +++ b/src/Symfony/Component/Debug/Tests/phpt/decorate_exception_hander.phpt @@ -1,5 +1,7 @@ --TEST-- Test catching fatal errors when handlers are nested +--INI-- +display_errors=0 --FILE-- --EXPECTF-- -Fatal error: Class 'Symfony\Component\Debug\missing' not found in %s on line %d object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) { ["message":protected]=> string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug". From aea4a62e5711db1bcea403f9aac427d50a8f26e1 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 2 Oct 2018 18:27:16 +0200 Subject: [PATCH 23/28] CS fix --- src/Symfony/Component/Console/Tests/Fixtures/Foo6Command.php | 1 - src/Symfony/Component/CssSelector/XPath/Translator.php | 2 +- src/Symfony/Component/Translation/Dumper/MoFileDumper.php | 2 +- src/Symfony/Component/Yaml/Inline.php | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Console/Tests/Fixtures/Foo6Command.php b/src/Symfony/Component/Console/Tests/Fixtures/Foo6Command.php index 6ae987e484255..ef5bd7702631b 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/Foo6Command.php +++ b/src/Symfony/Component/Console/Tests/Fixtures/Foo6Command.php @@ -1,6 +1,5 @@ writeLong($offset[2] + $sourcesStart + $sourcesSize); } - $output = implode(array_map(array($this, 'writeLong'), $header)) + $output = implode('', array_map(array($this, 'writeLong'), $header)) .$sourceOffsets .$targetOffsets .$sources diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php index 4288837bdb08a..639ff4a79ac14 100644 --- a/src/Symfony/Component/Yaml/Inline.php +++ b/src/Symfony/Component/Yaml/Inline.php @@ -234,7 +234,7 @@ public static function parseScalar($scalar, $delimiters = null, $stringDelimiter if (null !== $delimiters) { $tmp = ltrim(substr($scalar, $i), ' '); if ('' === $tmp) { - throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode($delimiters))); + throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode('', $delimiters))); } if (!\in_array($tmp[0], $delimiters)) { throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i))); From 83f5dfb544ceb91758615f5087ea90ca77f0601e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 2 Oct 2018 19:22:50 +0200 Subject: [PATCH 24/28] [FrameworkBundle] dont suggest hidden services in debug:container and debug:autow commands --- .../FrameworkBundle/Command/ContainerDebugCommand.php | 11 +++++++---- .../Command/DebugAutowiringCommand.php | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index bba19d60e82e5..d25ffaf9b157b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -132,7 +132,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } elseif ($tag = $input->getOption('tag')) { $options = array('tag' => $tag); } elseif ($name = $input->getArgument('name')) { - $name = $this->findProperServiceName($input, $errorIo, $object, $name); + $name = $this->findProperServiceName($input, $errorIo, $object, $name, $input->getOption('show-hidden')); $options = array('id' => $name); } else { $options = array(); @@ -208,13 +208,13 @@ protected function getContainerBuilder() return $this->containerBuilder = $container; } - private function findProperServiceName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $builder, $name) + private function findProperServiceName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $builder, string $name, bool $showHidden) { if ($builder->has($name) || !$input->isInteractive()) { return $name; } - $matchingServices = $this->findServiceIdsContaining($builder, $name); + $matchingServices = $this->findServiceIdsContaining($builder, $name, $showHidden); if (empty($matchingServices)) { throw new InvalidArgumentException(sprintf('No services found that match "%s".', $name)); } @@ -224,11 +224,14 @@ private function findProperServiceName(InputInterface $input, SymfonyStyle $io, return $io->choice('Select one of the following services to display its information', $matchingServices, $default); } - private function findServiceIdsContaining(ContainerBuilder $builder, $name) + private function findServiceIdsContaining(ContainerBuilder $builder, string $name, bool $showHidden) { $serviceIds = $builder->getServiceIds(); $foundServiceIds = array(); foreach ($serviceIds as $serviceId) { + if (!$showHidden && 0 === strpos($serviceId, '.')) { + continue; + } if (false === stripos($serviceId, $name)) { continue; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php index 41c9cc9fabc19..7ef48c78b1064 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php @@ -66,7 +66,7 @@ protected function execute(InputInterface $input, OutputInterface $output) if ($search = $input->getArgument('search')) { $serviceIds = array_filter($serviceIds, function ($serviceId) use ($search) { - return false !== stripos($serviceId, $search); + return false !== stripos($serviceId, $search) && 0 !== strpos($serviceId, '.'); }); if (empty($serviceIds)) { From 81ec57d7ce2895221e637ebed870fcf9c692c086 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sat, 29 Sep 2018 17:25:52 +0200 Subject: [PATCH 25/28] [Console] Fix clearing sections containing questions --- .../Console/Helper/QuestionHelper.php | 5 ++++ .../Console/Output/ConsoleSectionOutput.php | 18 +++++++++---- .../Tests/Output/ConsoleSectionOutputTest.php | 25 ++++++++++++++++++- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index a0141c83cd2a5..9bb5f493e2e47 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -17,6 +17,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\StreamableInputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\ConsoleSectionOutput; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\Question; @@ -123,6 +124,10 @@ private function doAsk(OutputInterface $output, Question $question) $ret = trim($this->autocomplete($output, $question, $inputStream, \is_array($autocomplete) ? $autocomplete : iterator_to_array($autocomplete, false))); } + if ($output instanceof ConsoleSectionOutput) { + $output->addContent($ret); + } + $ret = \strlen($ret) > 0 ? $ret : $question->getDefault(); if ($normalizer = $question->getNormalizer()) { diff --git a/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php b/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php index 98c778964a4de..d7e1685baac44 100644 --- a/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php +++ b/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php @@ -77,6 +77,18 @@ public function getContent(): string return implode('', $this->content); } + /** + * @internal + */ + public function addContent(string $input) + { + foreach (explode(PHP_EOL, $input) as $lineContent) { + $this->lines += ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1; + $this->content[] = $lineContent; + $this->content[] = PHP_EOL; + } + } + /** * {@inheritdoc} */ @@ -88,11 +100,7 @@ protected function doWrite($message, $newline) $erasedContent = $this->popStreamContentUntilCurrentSection(); - foreach (explode(PHP_EOL, $message) as $lineContent) { - $this->lines += ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1; - $this->content[] = $lineContent; - $this->content[] = PHP_EOL; - } + $this->addContent($message); parent::doWrite($message, true); parent::doWrite($erasedContent, false); diff --git a/src/Symfony/Component/Console/Tests/Output/ConsoleSectionOutputTest.php b/src/Symfony/Component/Console/Tests/Output/ConsoleSectionOutputTest.php index abf3911aa0d6e..e5cd0597e4245 100644 --- a/src/Symfony/Component/Console/Tests/Output/ConsoleSectionOutputTest.php +++ b/src/Symfony/Component/Console/Tests/Output/ConsoleSectionOutputTest.php @@ -13,9 +13,12 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Input\StreamableInputInterface; use Symfony\Component\Console\Output\ConsoleSectionOutput; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\StreamOutput; +use Symfony\Component\Console\Question\Question; class ConsoleSectionOutputTest extends TestCase { @@ -23,7 +26,7 @@ class ConsoleSectionOutputTest extends TestCase protected function setUp() { - $this->stream = fopen('php://memory', 'r+', false); + $this->stream = fopen('php://memory', 'r+b', false); } protected function tearDown() @@ -137,4 +140,24 @@ public function testMultipleSectionsOutput() rewind($output->getStream()); $this->assertEquals('Foo'.PHP_EOL.'Bar'.PHP_EOL."\x1b[2A\x1b[0JBar".PHP_EOL."\x1b[1A\x1b[0JBaz".PHP_EOL.'Bar'.PHP_EOL."\x1b[1A\x1b[0JFoobar".PHP_EOL, stream_get_contents($output->getStream())); } + + public function testClearSectionContainingQuestion() + { + $inputStream = fopen('php://memory', 'r+b', false); + fwrite($inputStream, "Batman & Robin\n"); + rewind($inputStream); + + $input = $this->getMockBuilder(StreamableInputInterface::class)->getMock(); + $input->expects($this->once())->method('isInteractive')->willReturn(true); + $input->expects($this->once())->method('getStream')->willReturn($inputStream); + + $sections = array(); + $output = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); + + (new QuestionHelper())->ask($input, $output, new Question('What\'s your favorite super hero?')); + $output->clear(); + + rewind($output->getStream()); + $this->assertSame('What\'s your favorite super hero?'.PHP_EOL."\x1b[2A\x1b[0J", stream_get_contents($output->getStream())); + } } From 9630a38d67811b1849293d29e18b7039b5507c33 Mon Sep 17 00:00:00 2001 From: Gerd Christian Kunze Date: Wed, 26 Sep 2018 12:57:02 +0200 Subject: [PATCH 26/28] [Finder] fixed root directory access for ftp/sftp wrapper --- src/Symfony/Component/Finder/Finder.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index 2270b362263cb..050162970113e 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -732,12 +732,20 @@ private function searchInDirectory($dir) /** * Normalizes given directory names by removing trailing slashes. * + * Excluding: (s)ftp:// wrapper + * * @param string $dir * * @return string */ private function normalizeDir($dir) { - return rtrim($dir, '/'.\DIRECTORY_SEPARATOR); + $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR); + + if (preg_match('#^s?ftp://#', $dir)) { + $dir .= '/'; + } + + return $dir; } } From f8b7aced2dc79245f0b5aab181b540d6bfee048f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 3 Oct 2018 14:53:34 +0200 Subject: [PATCH 27/28] updated CHANGELOG for 4.1.6 --- CHANGELOG-4.1.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG-4.1.md b/CHANGELOG-4.1.md index b8a496b945cfc..0bff86ba3e027 100644 --- a/CHANGELOG-4.1.md +++ b/CHANGELOG-4.1.md @@ -7,6 +7,17 @@ in 4.1 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.1.0...v4.1.1 +* 4.1.6 (2018-10-03) + + * bug #28604 [Finder] fixed root directory access for ftp/sftp wrapper (DerDu) + * bug #28688 [FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed (dunglas) + * bug #28638 [Console] Fix clearing sections containing questions (chalasr) + * bug #28690 [FrameworkBundle] dont suggest hidden services in debug:container and debug:autow commands (nicolas-grekas) + * bug #28648 [PHPUnitBridge] Fix ClockMock microtime() format (acasademont) + * bug #28678 [DI] fix dumping setters before their inlined instances (nicolas-grekas) + * bug #28672 [DI] fix error in dumped container (nicolas-grekas) + * bug #28664 [Console] Don't return early as this bypasses the auto exit feature (duncan3dc) + * 4.1.5 (2018-09-30) * bug #28636 [HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax (c960657) From 144bc350b6f2f5a57991dbe8eef8127d4136ae26 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 3 Oct 2018 14:53:38 +0200 Subject: [PATCH 28/28] updated VERSION for 4.1.6 --- 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 6d01a2132e47f..23e82059a873f 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.1.6-DEV'; + const VERSION = '4.1.6'; const VERSION_ID = 40106; const MAJOR_VERSION = 4; const MINOR_VERSION = 1; const RELEASE_VERSION = 6; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2019'; const END_OF_LIFE = '07/2019'; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy