From 30002704525ac022d177dba972a0a978e5340568 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 28 Feb 2018 14:53:13 -0800 Subject: [PATCH 01/18] updated CHANGELOG for 2.7.42 --- CHANGELOG-2.7.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md index 3b9be1a043a02..fbc5fec755ecf 100644 --- a/CHANGELOG-2.7.md +++ b/CHANGELOG-2.7.md @@ -7,6 +7,30 @@ in 2.7 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.7.0...v2.7.1 +* 2.7.42 (2018-02-28) + + * bug #26338 [Debug] Keep previous errors of Error instances (Philipp91) + * bug #26312 [Routing] Don't throw 405 when scheme requirement doesn't match (nicolas-grekas) + * bug #26298 Fix ArrayInput::toString() for InputArgument::IS_ARRAY args (maximium) + * bug #25557 [WebProfilerBundle] add a way to limit ajax request (Simperfit) + * bug #26228 [HttpFoundation] Fix missing "throw" in JsonResponse (nicolas-grekas) + * bug #26211 [Console] Suppress warning from sapi_windows_vt100_support (adawolfa) + * bug #26156 Fixes #26136: Avoid emitting warning in hasParameterOption() (greg-1-anderson) + * bug #26183 [DI] Add null check for removeChild (changmin.keum) + * bug #26159 created validator.tl.xlf for Form/Translations (ergiegonzaga) + * bug #26100 [Routing] Throw 405 instead of 404 when redirect is not possible (nicolas-grekas) + * bug #26040 [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder (nicolas-grekas) + * bug #26012 Exit as late as possible (greg0ire) + * bug #25893 [Console] Fix hasParameterOption / getParameterOption when used with multiple flags (greg-1-anderson) + * bug #25940 [Form] keep the context when validating forms (xabbuh) + * bug #25373 Use the PCRE_DOLLAR_ENDONLY modifier in route regexes (mpdude) + * bug #26010 [CssSelector] For AND operator, the left operand should have parentheses, not only right operand (Arnaud CHASSEUX) + * bug #25971 [Debug] Fix bad registration of exception handler, leading to mem leak (nicolas-grekas) + * bug #25962 [Routing] Fix trailing slash redirection for non-safe verbs (nicolas-grekas) + * bug #25948 [Form] Fixed empty data on expanded ChoiceType and FileType (HeahDude) + * bug #25972 support sapi_windows_vt100_support for php 7.2+ (jhdxr) + * bug #25744 [TwigBridge] Allow label translation to be safe (MatTheCat) + * 2.7.41 (2018-01-29) * bug #25922 [HttpFoundation] Use the correct syntax for session gc based on Pdo driver (tanasecosminromeo) From 621d4402173e1136fa427674337fe3808c5499ce Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 28 Feb 2018 14:53:19 -0800 Subject: [PATCH 02/18] update CONTRIBUTORS for 2.7.42 --- CONTRIBUTORS.md | 103 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 69 insertions(+), 34 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 96a8a8f23cc19..0b1fbb47f3562 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -12,31 +12,31 @@ Symfony is the result of the work of many people who made the code better - Christophe Coevoet (stof) - Jordi Boggiano (seldaek) - Victor Berchet (victor) - - Johannes S (johannes) - Kévin Dunglas (dunglas) + - Johannes S (johannes) - Jakub Zalas (jakubzalas) - - Kris Wallsmith (kriswallsmith) - Robin Chalas (chalas_r) + - Kris Wallsmith (kriswallsmith) - Ryan Weaver (weaverryan) - Javier Eguiluz (javier.eguiluz) - Maxime Steinhausser (ogizanagi) - Hugo Hamon (hhamon) - - Abdellatif Ait boudad (aitboudad) - Grégoire Pineau (lyrixx) + - Abdellatif Ait boudad (aitboudad) - Romain Neutron (romain) - Pascal Borreli (pborreli) - Wouter De Jong (wouterj) - Joseph Bielawski (stloyd) - Karma Dordrak (drak) - - Lukas Kahwe Smith (lsmith) - Roland Franssen (ro0) + - Lukas Kahwe Smith (lsmith) - Martin Hasoň (hason) - Jeremy Mikola (jmikola) - Jean-François Simon (jfsimon) - Benjamin Eberlei (beberlei) - Igor Wiedler (igorw) - - Eriksen Costa (eriksencosta) - Jules Pietri (heah) + - Eriksen Costa (eriksencosta) - Guilhem Niot (energetick) - Sarah Khalil (saro0h) - Jonathan Wage (jwage) @@ -45,28 +45,28 @@ Symfony is the result of the work of many people who made the code better - William Durand (couac) - ornicar - Francis Besset (francisbesset) + - Iltar van der Berg (kjarli) - stealth35 ‏ (stealth35) + - Hamza Amrouche (simperfit) - Alexander Mols (asm89) - - Iltar van der Berg (kjarli) - Yonel Ceruto (yonelceruto) - Bulat Shakirzyanov (avalanche123) - Peter Rehm (rpet) - Saša Stamenković (umpirsky) + - Matthias Pigulla (mpdude) - Henrik Bjørnskov (henrikbjorn) - Miha Vrhovnik - - Matthias Pigulla (mpdude) - Diego Saint Esteben (dii3g0) - Dany Maillard (maidmaid) + - Pierre du Plessis (pierredup) - Konstantin Kudryashov (everzet) - - Amrouche Hamza (simperfit) - Kevin Bond (kbond) - - Pierre du Plessis (pierredup) - Bilal Amarni (bamarni) - - Florin Patan (florinpatan) + - Alexander M. Turek (derrabus) - Jérémy DERUSSÉ (jderusse) + - Florin Patan (florinpatan) - Samuel ROZE (sroze) - Gábor Egyed (1ed) - - Alexander M. Turek (derrabus) - Michel Weimerskirch (mweimerskirch) - Andrej Hudec (pulzarraider) - Eric Clemmons (ericclemmons) @@ -75,39 +75,40 @@ Symfony is the result of the work of many people who made the code better - Titouan Galopin (tgalopin) - Konstantin Myakshin (koc) - Christian Raue + - Tobias Nyholm (tobias) - Arnout Boks (aboks) - Deni - Henrik Westphal (snc) - Dariusz Górecki (canni) - - Issei Murasawa (issei_m) - Douglas Greenshields (shieldo) - - Tobias Nyholm (tobias) + - Issei Murasawa (issei_m) - Lee McDermott - Brandon Turner - Luis Cordova (cordoval) - Graham Campbell (graham) - Daniel Holmes (dholmes) + - Dariusz Ruminski - Toni Uebernickel (havvg) - Bart van den Burg (burgov) - Jordan Alliot (jalliot) - Jérôme Tamarelle (gromnan) - John Wards (johnwards) - - Dariusz Ruminski - Fran Moreno (franmomu) - Antoine Hérault (herzult) - Paráda József (paradajozsef) + - David Maicher (dmaicher) - Arnaud Le Blanc (arnaud-lb) - Maxime STEINHAUSSER + - Vladimir Reznichenko (kalessil) - Michal Piotrowski (eventhorizon) - Tim Nagel (merk) - - David Maicher (dmaicher) - - Vladimir Reznichenko (kalessil) - Brice BERNARD (brikou) - Baptiste Clavié (talus) - marc.weistroff - lenar - Alexander Schwenn (xelaris) - Włodzimierz Gajda (gajdaw) + - Grégoire Paris (greg0ire) - Jacob Dreesen (jdreesen) - Florian Voutzinos (florianv) - Colin Frei @@ -117,7 +118,6 @@ Symfony is the result of the work of many people who made the code better - Peter Kokot (maastermedia) - David Buchmann (dbu) - excelwebzone - - Grégoire Paris (greg0ire) - Fabien Pennequin (fabienpennequin) - Gordon Franke (gimler) - Eric GELOEN (gelo) @@ -129,15 +129,18 @@ Symfony is the result of the work of many people who made the code better - Sebastiaan Stok (sstok) - Stefano Sala (stefano.sala) - Evgeniy (ewgraf) + - Lars Strojny (lstrojny) + - Alex Pott + - Javier Spagnoletti (phansys) - Vincent AUBERT (vincent) - Juti Noppornpitak (shiroyuki) - Tigran Azatyan (tigranazatyan) - Sebastian Hörl (blogsh) - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) - - Alex Pott - Guilherme Blanco (guilhermeblanco) - Pablo Godel (pgodel) + - Jérôme Vasseur (jvasseur) - Jérémie Augustin (jaugustin) - Andréia Bohner (andreia) - Julien Falque (julienfalque) @@ -146,20 +149,18 @@ Symfony is the result of the work of many people who made the code better - jwdeitch - Mikael Pajunen - Joel Wurtz (brouznouf) - - Jérôme Vasseur (jvasseur) - Chris Wilkinson (thewilkybarkid) - Oleg Voronkovich - Philipp Wahala (hifi) - Vyacheslav Pavlov - Richard van Laak (rvanlaak) - - Javier Spagnoletti (phansys) - Richard Shank (iampersistent) - Thomas Rabaix (rande) - Rouven Weßling (realityking) - Teoh Han Hui (teohhanhui) + - Valentin Udaltsov (vudaltsov) - Clemens Tolboom - Helmer Aaviksoo - - Lars Strojny (lstrojny) - Hiromi Hishida (77web) - Matthieu Ouellette-Vachon (maoueh) - Michał Pipa (michal.pipa) @@ -170,11 +171,11 @@ Symfony is the result of the work of many people who made the code better - GDIBass - jeremyFreeAgent (Jérémy Romey) (jeremyfreeagent) - James Halsall (jaitsu) + - Gabriel Caruso - Warnar Boekkooi (boekkooi) - Dmitrii Chekaliuk (lazyhammer) - Clément JOBEILI (dator) - Daniel Espendiller - - Valentin Udaltsov (vudaltsov) - Possum - Dorian Villet (gnutix) - Sergey Linnik (linniksa) @@ -182,6 +183,7 @@ Symfony is the result of the work of many people who made the code better - Mario A. Alvarez Garcia (nomack84) - Dennis Benkert (denderello) - SpacePossum + - Matthieu Napoli (mnapoli) - Benjamin Dulau (dbenjamin) - Mathieu Lemoine (lemoinem) - Christian Schmidt @@ -192,6 +194,7 @@ Symfony is the result of the work of many people who made the code better - bronze1man - sun (sun) - Larry Garfield (crell) + - Gabriel Ostrolucký - Martin Schuhfuß (usefulthink) - apetitpa - Matthieu Bontemps (mbontemps) @@ -216,10 +219,10 @@ Symfony is the result of the work of many people who made the code better - Niels Keurentjes (curry684) - Eugene Wissner - Julien Brochet (mewt) - - Gabriel Ostrolucký - Tristan Darricau (nicofuma) - Michaël Perrin (michael.perrin) - Marcel Beerta (mazen) + - gadelat (gadelat) - Loïc Faugeron - Jannik Zschiesche (apfelbox) - Hidde Wieringa (hiddewie) @@ -229,6 +232,7 @@ Symfony is the result of the work of many people who made the code better - Lorenz Schori - Sébastien Lavoie (lavoiesl) - Gregor Harlan (gharlan) + - Dariusz - Francois Zaninotto - Alexander Kotynia (olden) - Daniel Tschinder @@ -244,6 +248,7 @@ Symfony is the result of the work of many people who made the code better - Xavier Perez - Arjen Brouwer (arjenjb) - Katsuhiro OGAWA + - Thomas Calvet (fancyweb) - Patrick McDougle (patrick-mcdougle) - Alif Rachmawadi - Alessandro Chitolina @@ -263,9 +268,9 @@ Symfony is the result of the work of many people who made the code better - Nikolay Labinskiy (e-moe) - Leo Feyer - Chekote - - gadelat (gadelat) - Thomas Adam - Albert Casademont (acasademont) + - Viktor Bocharskyi (bocharsky_bw) - Jhonny Lidfors (jhonne) - Diego Agulló (aeoris) - Andreas Schempp (aschempp) @@ -276,10 +281,8 @@ Symfony is the result of the work of many people who made the code better - Nikita Konstantinov - Wodor Wodorski - Oskar Stark (oskarstark) - - Dariusz - Thomas Lallement (raziel057) - Giorgio Premi - - Matthieu Napoli (mnapoli) - Beau Simensen (simensen) - Michael Hirschler (mvhirsch) - Robert Kiss (kepten) @@ -296,7 +299,6 @@ Symfony is the result of the work of many people who made the code better - Christian Schmidt - Yanick Witschi (toflar) - Edi Modrić (emodric) - - Thomas Calvet (fancyweb) - Chad Sikorra (chadsikorra) - Chris Smith (cs278) - Florian Klein (docteurklein) @@ -315,7 +317,6 @@ Symfony is the result of the work of many people who made the code better - Baptiste Lafontaine - François Pluchino (francoispluchino) - Aurelijus Valeiša (aurelijus) - - Victor Bocharsky (bocharsky_bw) - Jan Decavele (jandc) - Gustavo Piltcher - Stepan Tanasiychuk (stfalcon) @@ -418,7 +419,6 @@ Symfony is the result of the work of many people who made the code better - Jan Schumann - Niklas Fiekas - Markus Bachmann (baachi) - - Gabriel Caruso - lancergr - Mihai Stancu - Olivier Dolbeau (odolbeau) @@ -467,6 +467,7 @@ Symfony is the result of the work of many people who made the code better - Gladhon - Sebastian Bergmann - Miroslav Sustek + - Sullivan SENECHAL (soullivaneuh) - Pablo Díez (pablodip) - Martin Hujer (martinhujer) - Kevin McBride @@ -499,6 +500,7 @@ Symfony is the result of the work of many people who made the code better - Arjen van der Meijden - Michele Locati - Dariusz Ruminski + - Mathieu Lechat - Erik Trapman (eriktrapman) - De Cock Xavier (xdecock) - Almog Baku (almogbaku) @@ -554,6 +556,7 @@ Symfony is the result of the work of many people who made the code better - Jean-Christophe Cuvelier [Artack] - alcaeus - vitaliytv + - Dalibor Karlović (dkarlovi) - Sebastian Blum - aubx - Marvin Butkereit @@ -609,6 +612,7 @@ Symfony is the result of the work of many people who made the code better - Ivo Bathke (ivoba) - Strate - Anton A. Sumin + - Israel J. Carberry - Miquel Rodríguez Telep (mrtorrent) - Sergey Kolodyazhnyy (skolodyazhnyy) - umpirski @@ -649,9 +653,9 @@ Symfony is the result of the work of many people who made the code better - Tiago Brito (blackmx) - Richard van den Brand (ricbra) - develop + - Greg Anderson - VJ - Delf Tonder (leberknecht) - - Sullivan SENECHAL (soullivaneuh) - Mark Sonnabaum - Richard Quadling - jochenvdv @@ -720,7 +724,6 @@ Symfony is the result of the work of many people who made the code better - Nikita Nefedov (nikita2206) - cgonzalez - Ben - - Mathieu Lechat - Vincent Composieux (eko) - Jayson Xu (superjavason) - Christopher Hertel (chertel) @@ -802,6 +805,7 @@ Symfony is the result of the work of many people who made the code better - Thibault Duplessis - Marc Abramowitz - Martijn Evers + - Tony Tran - Jacques Moati - Balazs Csaba (balazscsaba2006) - Douglas Reith (douglas_reith) @@ -812,6 +816,7 @@ Symfony is the result of the work of many people who made the code better - Michael Roterman (wtfzdotnet) - Arno Geurts - Adán Lobato (adanlobato) + - Ian Jenkins (jenkoian) - Matthew Davis (mdavis1982) - Maks - Antoine LA @@ -834,6 +839,7 @@ Symfony is the result of the work of many people who made the code better - Rootie - Raul Fraile (raulfraile) - sensio + - Sebastien Morel (plopix) - Patrick Kaufmann - Piotr Stankowski - Reece Fowell (reecefowell) @@ -846,6 +852,7 @@ Symfony is the result of the work of many people who made the code better - Christian Jul Jensen - Alexandre GESLIN (alexandregeslin) - The Whole Life to Learn + - ergiegonzaga - Farhad Safarov - Liverbool (liverbool) - Sam Malone @@ -877,6 +884,7 @@ Symfony is the result of the work of many people who made the code better - Danilo Silva - Arnaud PETITPAS (apetitpa) - Zachary Tong (polyfractal) + - Ashura - Hryhorii Hrebiniuk - Dennis Fridrich (dfridrich) - hamza @@ -896,11 +904,11 @@ Symfony is the result of the work of many people who made the code better - Wojciech Sznapka - Gavin Staniforth - Ariel J. Birnbaum + - Mathieu Santostefano - Arjan Keeman - Máximo Cuadros (mcuadros) - tamirvs - julien.galenski - - Israel J. Carberry - Bob van de Vijver - Christian Neff - Oliver Hoff @@ -923,6 +931,7 @@ Symfony is the result of the work of many people who made the code better - Antanas Arvasevicius - Maximilian Berghoff (electricmaxxx) - nacho + - Mathieu Piot - Piotr Antosik (antek88) - Artem Lopata - Sergey Novikov (s12v) @@ -964,6 +973,7 @@ Symfony is the result of the work of many people who made the code better - DerManoMann - Olaf Klischat - orlovv + - Peter Smeets (darkspartan) - Haralan Dobrev (hkdobrev) - Jhonny Lidfors (jhonny) - Julien Bianchi (jubianchi) @@ -1010,6 +1020,7 @@ Symfony is the result of the work of many people who made the code better - fduch (fduch) - Rhodri Pugh (rodnaph) - David de Boer (ddeboer) + - Ryan Rogers - Klaus Purer - arnaud (arnooo999) - Gilles Doge (gido) @@ -1020,6 +1031,7 @@ Symfony is the result of the work of many people who made the code better - Brooks Boyd - Roger Webb - Dmitriy Simushev + - Pawel Smolinski - pkowalczyk - Max Voloshin (maxvoloshin) - Nicolas Fabre (nfabre) @@ -1033,6 +1045,7 @@ Symfony is the result of the work of many people who made the code better - Felicitus - Krzysztof Przybyszewski - Paul Matthews + - Jakub Kisielewski - Vacheslav Silyutin - Juan Traverso - Alain Flaus (halundra) @@ -1047,7 +1060,7 @@ Symfony is the result of the work of many people who made the code better - Marco - Marc Torres - Alberto Aldegheri - - Dalibor Karlović + - Dmitri Petmanson - heccjj - Alexandre Melard - Jay Klehr @@ -1089,6 +1102,7 @@ Symfony is the result of the work of many people who made the code better - Pierre Tachoire (krichprollsch) - Marc J. Schmidt (marcjs) - Marco Jantke + - Remon van de Kamp - Saem Ghani - Clément LEFEBVRE - Conrad Kleinespel @@ -1173,7 +1187,9 @@ Symfony is the result of the work of many people who made the code better - Mathieu Morlon - Daniel Tschinder - Alexander Schranz + - Arnaud CHASSEUX - Rafał Muszyński (rafmus90) + - Sébastien Decrême (sebdec) - Timothy Anido (xanido) - Mara Blaga - Rick Prent @@ -1184,6 +1200,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) + - Thomas Counsell - BilgeXA - r1pp3rj4ck - Robert Queck @@ -1197,6 +1214,7 @@ Symfony is the result of the work of many people who made the code better - rkerner - Alex Silcock - Qingshan Luo + - Ergie Gonzaga - Matthew J Mucklo - fdgdfg (psampaz) - Stéphane Seng @@ -1217,6 +1235,7 @@ Symfony is the result of the work of many people who made the code better - Patrik Gmitter (patie) - Jonathan Gough - Benjamin Bender + - Jared Farrish - Konrad Mohrfeldt - Lance Chen - Andrew (drew) @@ -1302,6 +1321,7 @@ Symfony is the result of the work of many people who made the code better - Waqas Ahmed - Luis Muñoz - Matthew Donadio + - Houziaux mike - Andreas - Thomas Chmielowiec - shdev @@ -1329,6 +1349,7 @@ Symfony is the result of the work of many people who made the code better - loru88 - Romain Dorgueil - Christopher Parotat + - 蝦米 - Grayson Koonce (breerly) - Indra Gunawan (indragunawan) - Karim Cassam Chenaï (ka) @@ -1376,6 +1397,7 @@ Symfony is the result of the work of many people who made the code better - Artem Lopata (bumz) - Nicole Cordes - Roman Orlov + - andrey1s - VolCh - Alexey Popkov - Gijs Kunze @@ -1416,6 +1438,7 @@ Symfony is the result of the work of many people who made the code better - Tischoi - J Bruni - Alexey Prilipko + - Dmitriy Fedorenko - vlakoff - bertillon - Bertalan Attila @@ -1447,6 +1470,7 @@ Symfony is the result of the work of many people who made the code better - David Zuelke - Oleg Andreyev - Pierre Rineau + - Maxim Lovchikov - adenkejawen - Ari Pringle (apringle) - Dan Ordille (dordille) @@ -1463,6 +1487,7 @@ Symfony is the result of the work of many people who made the code better - Matt Lehner - Hein Zaw Htet™ - Ruben Kruiswijk + - Cosmin-Romeo TANASE - Michael J - Joseph Maarek - Alexander Menk @@ -1488,6 +1513,7 @@ Symfony is the result of the work of many people who made the code better - Even André Fiskvik - Arjan Keeman - Erik van Wingerden + - Valouleloup - Dane Powell - Gerrit Drost - Linnaea Von Lavia @@ -1517,14 +1543,15 @@ Symfony is the result of the work of many people who made the code better - David Joos (djoos) - Denis Klementjev (dklementjev) - Tomáš Polívka (draczris) + - Dennis Smink (dsmink) - Franz Liedke (franzliedke) + - Gaylord Poillon (gaylord_p) - Christophe BECKER (goabonga) - gondo (gondo) - Gusakov Nikita (hell0w0rd) - Osman Üngür (import) - Javier Núñez Berrocoso (javiernuber) - Jelle Bekker (jbekker) - - Ian Jenkins (jenkoian) - Giovanni Albero (johntree) - Jorge Martin (jorgemartind) - Joeri Verdeyen (jverdeyen) @@ -1536,6 +1563,7 @@ Symfony is the result of the work of many people who made the code better - Muriel (metalmumu) - Michael Pohlers (mick_the_big) - mlpo (mlpo) + - Marek Šimeček (mssimi) - Cayetano Soriano Gallego (neoshadybeat) - Ondrej Machulda (ondram) - Pablo Monterde Perez (plebs) @@ -1650,6 +1678,7 @@ Symfony is the result of the work of many people who made the code better - fmarchalemisys - mieszko4 - Steve Preston + - Kevin Frantz - Neophy7e - bokonet - Arrilot @@ -1659,9 +1688,11 @@ Symfony is the result of the work of many people who made the code better - djama - Michael Gwynne - Eduardo Conceição + - changmin.keum - Jon Cave - Sébastien HOUZE - Abdulkadir N. A. + - Adam Klvač - Yevgen Kovalienia - Lebnik - Shude @@ -1697,6 +1728,7 @@ Symfony is the result of the work of many people who made the code better - Oncle Tom - Sam Anthony - Christian Stocker + - Oussama Elgoumri - Dawid Nowak - Lesnykh Ilia - darnel @@ -1754,6 +1786,7 @@ Symfony is the result of the work of many people who made the code better - joris de wit (jdewit) - Jérémy CROMBEZ (jeremy) - Jose Manuel Gonzalez (jgonzalez) + - Joachim Krempel (jkrempel) - Jorge Maiden (jorgemaiden) - Justin Rainbow (jrainbow) - Juan Luis (juanlugb) @@ -1764,6 +1797,7 @@ Symfony is the result of the work of many people who made the code better - Krzysztof Menżyk (krymen) - samuel laulhau (lalop) - Laurent Bachelier (laurentb) + - Luís Cobucci (lcobucci) - Florent Viel (luxifer) - Matthieu Mota (matthieumota) - Matthieu Moquet (mattketmo) @@ -1788,6 +1822,7 @@ Symfony is the result of the work of many people who made the code better - Phil Taylor (prazgod) - Brayden Williams (redstar504) - Rich Sage (richsage) + - Rokas Mikalkėnas (rokasm) - Bart Ruysseveldt (ruyss) - Sascha Dens (saschadens) - scourgen hung (scourgen) From 751196e8f0a532ef7ad60cfc16c79938acf52e56 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 28 Feb 2018 14:53:23 -0800 Subject: [PATCH 03/18] updated VERSION for 2.7.42 --- 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 159bde4d1bccc..9b7f5e6865782 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -58,12 +58,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.42-DEV'; + const VERSION = '2.7.42'; const VERSION_ID = 20742; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; const RELEASE_VERSION = 42; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; From 31c69ec90de9dffd0cda74903d3bc1d0c960d28e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 1 Mar 2018 06:32:34 -0800 Subject: [PATCH 04/18] bumped Symfony version to 2.7.43 --- 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 9b7f5e6865782..fb24b4d650370 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -58,12 +58,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.42'; - const VERSION_ID = 20742; + const VERSION = '2.7.43-DEV'; + const VERSION_ID = 20743; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; - const RELEASE_VERSION = 42; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 43; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; From 3ba624af9fe64c564c6c643405108d273d5d2bd5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 1 Mar 2018 15:51:10 +0100 Subject: [PATCH 05/18] [FrameworkBundle] Silence "Failed to remove directory" on cache:clear --- .../Bundle/FrameworkBundle/Command/CacheClearCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index 5437b0bcc23b5..9c77853101534 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -156,7 +156,9 @@ protected function execute(InputInterface $input, OutputInterface $output) try { $fs->remove($oldCacheDir); } catch (IOException $e) { - $io->warning($e->getMessage()); + if ($output->isVerbose()) { + $io->warning($e->getMessage()); + } } if ($output->isVerbose()) { From 586f697610b33fd387739243b4822bb79317e8ac Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 1 Mar 2018 08:45:24 -0800 Subject: [PATCH 06/18] updated CHANGELOG for 2.8.35 --- CHANGELOG-2.8.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CHANGELOG-2.8.md b/CHANGELOG-2.8.md index c4b5466e54e3c..239dbb5c839c2 100644 --- a/CHANGELOG-2.8.md +++ b/CHANGELOG-2.8.md @@ -7,6 +7,33 @@ 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.35 (2018-03-01) + + * bug #26338 [Debug] Keep previous errors of Error instances (Philipp91) + * bug #26312 [Routing] Don't throw 405 when scheme requirement doesn't match (nicolas-grekas) + * bug #26298 Fix ArrayInput::toString() for InputArgument::IS_ARRAY args (maximium) + * bug #26236 [PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties (dunglas) + * bug #25557 [WebProfilerBundle] add a way to limit ajax request (Simperfit) + * bug #26228 [HttpFoundation] Fix missing "throw" in JsonResponse (nicolas-grekas) + * bug #26211 [Console] Suppress warning from sapi_windows_vt100_support (adawolfa) + * bug #26156 Fixes #26136: Avoid emitting warning in hasParameterOption() (greg-1-anderson) + * bug #26183 [DI] Add null check for removeChild (changmin.keum) + * bug #26173 [Security] fix accessing request values (xabbuh) + * bug #26159 created validator.tl.xlf for Form/Translations (ergiegonzaga) + * bug #26100 [Routing] Throw 405 instead of 404 when redirect is not possible (nicolas-grekas) + * bug #26040 [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder (nicolas-grekas) + * bug #26012 Exit as late as possible (greg0ire) + * bug #26111 [Security] fix merge of 2.7 into 2.8 + add test case (dmaicher) + * bug #25893 [Console] Fix hasParameterOption / getParameterOption when used with multiple flags (greg-1-anderson) + * bug #25940 [Form] keep the context when validating forms (xabbuh) + * bug #25373 Use the PCRE_DOLLAR_ENDONLY modifier in route regexes (mpdude) + * bug #26010 [CssSelector] For AND operator, the left operand should have parentheses, not only right operand (Arnaud CHASSEUX) + * bug #25971 [Debug] Fix bad registration of exception handler, leading to mem leak (nicolas-grekas) + * bug #25962 [Routing] Fix trailing slash redirection for non-safe verbs (nicolas-grekas) + * bug #25948 [Form] Fixed empty data on expanded ChoiceType and FileType (HeahDude) + * bug #25972 support sapi_windows_vt100_support for php 7.2+ (jhdxr) + * bug #25744 [TwigBridge] Allow label translation to be safe (MatTheCat) + * 2.8.34 (2018-01-29) * bug #25922 [HttpFoundation] Use the correct syntax for session gc based on Pdo driver (tanasecosminromeo) From fbf0d0cce12fcc0f73faaa4c8a0d05a404279c17 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 1 Mar 2018 08:45:28 -0800 Subject: [PATCH 07/18] updated VERSION for 2.8.35 --- 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 7f61bdc645e80..df4421a131bad 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.35-DEV'; + const VERSION = '2.8.35'; const VERSION_ID = 20835; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; const RELEASE_VERSION = 35; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From 3ff74ada0d50c4fe27edb249532495355b6efd5f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 1 Mar 2018 11:16:54 -0800 Subject: [PATCH 08/18] bumped Symfony version to 2.8.36 --- 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 df4421a131bad..52b08bf2bc9ca 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.35'; - const VERSION_ID = 20835; + const VERSION = '2.8.36-DEV'; + const VERSION_ID = 20836; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 35; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 36; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From b3f807cc5aa64a3892799ff0db2abe888ce78757 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 1 Mar 2018 11:47:22 -0800 Subject: [PATCH 09/18] bumped Symfony version to 3.4.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 89cc15e19335b..26236e2d22936 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.5'; - const VERSION_ID = 30405; + const VERSION = '3.4.6-DEV'; + const VERSION_ID = 30406; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; - const RELEASE_VERSION = 5; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 6; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From d6e2b8188c38865858218193c4cc7eec51c08c22 Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Fri, 23 Feb 2018 00:16:20 -0300 Subject: [PATCH 10/18] Add entry for `container.dumper.inline_class_loader` param at `UPGRADE-3.4.md` and `UPGRADE-4.0.md` --- UPGRADE-3.4.md | 10 ++++++++++ UPGRADE-4.0.md | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/UPGRADE-3.4.md b/UPGRADE-3.4.md index 00d6422f7695e..2638d84c802b1 100644 --- a/UPGRADE-3.4.md +++ b/UPGRADE-3.4.md @@ -72,6 +72,16 @@ DependencyInjection * The `ResolveDefinitionTemplatesPass` class is deprecated and will be removed in 4.0. Use the `ResolveChildDefinitionsPass` class instead. + * Unless you're using a custom autoloader, you should enable the `container.dumper.inline_class_loader` + parameter. This can drastically improve DX by reducing the time to load classes + when the `DebugClassLoader` is enabled. If you're using `FrameworkBundle`, this + performance improvement will also impact the "dev" environment: + + ```yml + parameters: + container.dumper.inline_class_loader: true + ``` + Debug ----- diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 4eb1a0ed2a923..4a6d02b37440b 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -236,6 +236,17 @@ DependencyInjection * The `ExtensionCompilerPass` has been moved to before-optimization passes with priority -1000. + * In 3.4, parameter `container.dumper.inline_class_loader` was introduced. Unless + you're using a custom autoloader, you should enable this parameter. This can + drastically improve DX by reducing the time to load classes when the `DebugClassLoader` + is enabled. If you're using `FrameworkBundle`, this performance improvement will + also impact the "dev" environment: + + ```yml + parameters: + container.dumper.inline_class_loader: true + ``` + DoctrineBridge -------------- From e29677858fe10276dbfa172c5a532daf1896b875 Mon Sep 17 00:00:00 2001 From: Remon van de Kamp Date: Fri, 2 Mar 2018 09:07:37 +0100 Subject: [PATCH 11/18] Use fill instead of style for svg colors Using style does not work when a Content Security Policy is in place, resulting in non-styles (black) images instead of grey. --- .../Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg | 2 +- .../Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg index 96a5bd7d22e02..8b92d448fefd6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/forward.svg @@ -1,4 +1,4 @@ - diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg index 54ff4187a4c81..dcdd15c288bd8 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/redirect.svg @@ -1,5 +1,5 @@ - lazy = false; foreach ($container->getAliases() as $id => $alias) { - $this->graph->connect($id, $alias, (string) $alias, $this->getDefinition((string) $alias), null); + $targetId = $this->getDefinitionId((string) $alias); + $this->graph->connect($id, $alias, $targetId, $this->getDefinition($targetId), null); } parent::process($container); @@ -87,12 +88,13 @@ protected function processValue($value, $isRoot = false) return $value; } if ($value instanceof Reference) { - $targetDefinition = $this->getDefinition((string) $value); + $targetId = $this->getDefinitionId((string) $value); + $targetDefinition = $this->getDefinition($targetId); $this->graph->connect( $this->currentId, $this->currentDefinition, - $this->getDefinitionId((string) $value), + $targetId, $targetDefinition, $value, $this->lazy || ($targetDefinition && $targetDefinition->isLazy()), @@ -134,8 +136,6 @@ protected function processValue($value, $isRoot = false) */ private function getDefinition($id) { - $id = $this->getDefinitionId($id); - return null === $id ? null : $this->container->getDefinition($id); } @@ -149,7 +149,7 @@ private function getDefinitionId($id) return; } - return $id; + return $this->container->normalizeId($id); } private function getExpressionLanguage() @@ -163,11 +163,12 @@ private function getExpressionLanguage() $this->expressionLanguage = new ExpressionLanguage(null, $providers, function ($arg) { if ('""' === substr_replace($arg, '', 1, -1)) { $id = stripcslashes(substr($arg, 1, -1)); + $id = $this->getDefinitionId($id); $this->graph->connect( $this->currentId, $this->currentDefinition, - $this->getDefinitionId($id), + $id, $this->getDefinition($id) ); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php index ae58f62bd0813..59fa1b502c3b1 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -281,7 +281,7 @@ private function getAutowiredReference(TypedReference $reference, $deprecationMe $this->lastFailure = null; $type = $reference->getType(); - if ($type !== (string) $reference || ($this->container->has($type) && !$this->container->findDefinition($type)->isAbstract())) { + if ($type !== $this->container->normalizeId($reference) || ($this->container->has($type) && !$this->container->findDefinition($type)->isAbstract())) { return $reference; } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php b/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php index 99234812d65ca..1976d0ac56340 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php @@ -50,7 +50,7 @@ public function process(ContainerBuilder $container) $alias = $container->getAlias($inner); $public = $alias->isPublic(); $private = $alias->isPrivate(); - $container->setAlias($renamedId, new Alias((string) $alias, false)); + $container->setAlias($renamedId, new Alias($container->normalizeId($alias), false)); } else { $decoratedDefinition = $container->getDefinition($inner); $definition->setTags(array_merge($decoratedDefinition->getTags(), $definition->getTags())); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php b/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php index 91497086c21de..825e117ccc016 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/FactoryReturnTypePass.php @@ -51,13 +51,12 @@ public function process(ContainerBuilder $container) private function updateDefinition(ContainerBuilder $container, $id, Definition $definition, array $resolveClassPassChanges, array $previous = array()) { // circular reference - $lcId = strtolower($id); - if (isset($previous[$lcId])) { + if (isset($previous[$id])) { return; } $factory = $definition->getFactory(); - if (null === $factory || (!isset($resolveClassPassChanges[$lcId]) && null !== $definition->getClass())) { + if (null === $factory || (!isset($resolveClassPassChanges[$id]) && null !== $definition->getClass())) { return; } @@ -73,9 +72,10 @@ private function updateDefinition(ContainerBuilder $container, $id, Definition $ } } else { if ($factory[0] instanceof Reference) { - $previous[$lcId] = true; - $factoryDefinition = $container->findDefinition((string) $factory[0]); - $this->updateDefinition($container, $factory[0], $factoryDefinition, $resolveClassPassChanges, $previous); + $previous[$id] = true; + $factoryId = $container->normalizeId($factory[0]); + $factoryDefinition = $container->findDefinition($factoryId); + $this->updateDefinition($container, $factoryId, $factoryDefinition, $resolveClassPassChanges, $previous); $class = $factoryDefinition->getClass(); } else { $class = $factory[0]; @@ -103,7 +103,7 @@ private function updateDefinition(ContainerBuilder $container, $id, Definition $ } } - if (null !== $returnType && (!isset($resolveClassPassChanges[$lcId]) || $returnType !== $resolveClassPassChanges[$lcId])) { + if (null !== $returnType && (!isset($resolveClassPassChanges[$id]) || $returnType !== $resolveClassPassChanges[$id])) { @trigger_error(sprintf('Relying on its factory\'s return-type to define the class of service "%s" is deprecated since Symfony 3.3 and won\'t work in 4.0. Set the "class" attribute to "%s" on the service definition instead.', $id, $returnType), E_USER_DEPRECATED); } $definition->setClass($returnType); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php index c704891856f9e..c64348ed1de3b 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php @@ -67,7 +67,7 @@ protected function processValue($value, $isRoot = false) $value = clone $value; } - if (!$value instanceof Reference || !$this->container->hasDefinition($id = (string) $value)) { + if (!$value instanceof Reference || !$this->container->hasDefinition($id = $this->container->normalizeId($value))) { return parent::processValue($value, $isRoot); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php index 572eabb7d99e7..63cacfad8359d 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php @@ -85,7 +85,7 @@ protected function processValue($value, $isRoot = false) $serviceMap[$key] = new Reference($type); } - $subscriberMap[$key] = new TypedReference((string) $serviceMap[$key], $type, $declaringClass, $optionalBehavior ?: ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); + $subscriberMap[$key] = new TypedReference($this->container->normalizeId($serviceMap[$key]), $type, $declaringClass, $optionalBehavior ?: ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); unset($serviceMap[$key]); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php index bc86e5ab9d11e..8e20676592454 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php @@ -36,7 +36,7 @@ public function process(ContainerBuilder $container) $seenAliasTargets = array(); $replacements = array(); foreach ($container->getAliases() as $definitionId => $target) { - $targetId = (string) $target; + $targetId = $container->normalizeId($target); // Special case: leave this target alone if ('service_container' === $targetId) { continue; @@ -77,7 +77,7 @@ public function process(ContainerBuilder $container) */ protected function processValue($value, $isRoot = false) { - if ($value instanceof Reference && isset($this->replacements[$referenceId = (string) $value])) { + if ($value instanceof Reference && isset($this->replacements[$referenceId = $this->container->normalizeId($value)])) { // Perform the replacement $newId = $this->replacements[$referenceId]; $value = new Reference($newId, $value->getInvalidBehavior()); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php index 73ca29d35f424..63f2a470bac6f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php @@ -49,7 +49,7 @@ public function process(ContainerBuilder $container) */ protected function processValue($value, $isRoot = false) { - if ($value instanceof TypedReference && $value->getType() === (string) $value) { + if ($value instanceof TypedReference && $value->getType() === $this->container->normalizeId($value)) { // Already checked $bindings = $this->container->getDefinition($this->currentId)->getBindings(); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php index 38e96d06f1a76..2888cf4d396dc 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php @@ -55,7 +55,7 @@ protected function processValue($value, $isRoot = false) if ($value instanceof Definition && $isRoot && (isset($this->resolvedIds[$this->currentId]) || !$value->hasTag($this->tagName) || $value->isDeprecated())) { return $value->isDeprecated() ? $value->clearTag($this->tagName) : $value; } - if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->has($id = (string) $value)) { + if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->has($id = $this->container->normalizeId($value))) { $definition = $this->container->findDefinition($id); if (!$definition->hasTag($this->tagName) && !$definition->isDeprecated()) { $this->resolvedIds[$id] = true; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php index cb05f90143525..d60272b276558 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php @@ -90,9 +90,7 @@ private function processValue($value, $rootLevel = 0, $level = 0) $value = array_values($value); } } elseif ($value instanceof Reference) { - $id = (string) $value; - - if ($this->container->has($id)) { + if ($this->container->has($value)) { return $value; } $invalidBehavior = $value->getInvalidBehavior(); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php index a46c74fbb65f1..831d994536918 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php @@ -30,7 +30,7 @@ public function process(ContainerBuilder $container) parent::process($container); foreach ($container->getAliases() as $id => $alias) { - $aliasId = (string) $alias; + $aliasId = $container->normalizeId($alias); if ($aliasId !== $defId = $this->getDefinitionId($aliasId, $container)) { $container->setAlias($id, $defId)->setPublic($alias->isPublic())->setPrivate($alias->isPrivate()); } @@ -43,7 +43,7 @@ public function process(ContainerBuilder $container) protected function processValue($value, $isRoot = false) { if ($value instanceof Reference) { - $defId = $this->getDefinitionId($id = (string) $value, $this->container); + $defId = $this->getDefinitionId($id = $this->container->normalizeId($value), $this->container); if ($defId !== $id) { return new Reference($defId, $value->getInvalidBehavior()); @@ -69,7 +69,7 @@ private function getDefinitionId($id, ContainerBuilder $container) throw new ServiceCircularReferenceException($id, array_keys($seen)); } $seen[$id] = true; - $id = (string) $container->getAlias($id); + $id = $container->normalizeId($container->getAlias($id)); } return $id; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveServiceSubscribersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveServiceSubscribersPass.php index 9245f21f74cb8..bde9433690f95 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveServiceSubscribersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveServiceSubscribersPass.php @@ -26,7 +26,7 @@ class ResolveServiceSubscribersPass extends AbstractRecursivePass protected function processValue($value, $isRoot = false) { - if ($value instanceof Reference && $this->serviceLocator && ContainerInterface::class === (string) $value) { + if ($value instanceof Reference && $this->serviceLocator && ContainerInterface::class === $this->container->normalizeId($value)) { return new Reference($this->serviceLocator); } diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index aa714728cd33a..5ca9b25adc0f5 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -507,7 +507,7 @@ protected function getEnv($name) */ public function normalizeId($id) { - if (!is_string($id)) { + if (!\is_string($id)) { $id = (string) $id; } if (isset($this->normalizedIds[$normalizedId = strtolower($id)])) { diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 6e025387f5c8b..678aa37e089ff 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -627,7 +627,7 @@ private function doGet($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_ * * @throws BadMethodCallException When this ContainerBuilder is compiled */ - public function merge(ContainerBuilder $container) + public function merge(self $container) { if ($this->isCompiled()) { throw new BadMethodCallException('Cannot merge on a compiled container.'); @@ -1373,16 +1373,16 @@ public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs $value = $bag->resolveValue($value); } - if (is_array($value)) { + if (\is_array($value)) { $result = array(); foreach ($value as $k => $v) { - $result[$this->resolveEnvPlaceholders($k, $format, $usedEnvs)] = $this->resolveEnvPlaceholders($v, $format, $usedEnvs); + $result[\is_string($k) ? $this->resolveEnvPlaceholders($k, $format, $usedEnvs) : $k] = $this->resolveEnvPlaceholders($v, $format, $usedEnvs); } return $result; } - if (!is_string($value)) { + if (!\is_string($value) || 38 > \strlen($value)) { return $value; } $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders; @@ -1455,6 +1455,18 @@ public function log(CompilerPassInterface $pass, $message) $this->getCompiler()->log($pass, $message); } + /** + * {@inheritdoc} + */ + public function normalizeId($id) + { + if (!\is_string($id)) { + $id = (string) $id; + } + + return isset($this->definitions[$id]) || isset($this->aliasDefinitions[$id]) || isset($this->removedIds[$id]) ? $id : parent::normalizeId($id); + } + /** * Returns the Service Conditionals. * diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 9461e1ccb53f1..f4aa0582f7983 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -1232,9 +1232,9 @@ private function addAliases() $code = " \$this->aliases = array(\n"; ksort($aliases); foreach ($aliases as $alias => $id) { - $id = (string) $id; + $id = $this->container->normalizeId($id); while (isset($aliases[$id])) { - $id = (string) $aliases[$id]; + $id = $this->container->normalizeId($aliases[$id]); } $code .= ' '.$this->doExport($alias).' => '.$this->doExport($id).",\n"; } @@ -1555,7 +1555,7 @@ private function getServiceCallsFromArguments(array $arguments, array &$calls, $ if (is_array($argument)) { $this->getServiceCallsFromArguments($argument, $calls, $isPreInstance, $callerId, $behavior, $step); } elseif ($argument instanceof Reference) { - $id = (string) $argument; + $id = $this->container->normalizeId($argument); if (!isset($calls[$id])) { $calls[$id] = (int) ($isPreInstance && isset($this->circularReferences[$callerId][$id])); @@ -1625,7 +1625,7 @@ private function hasReference($id, array $arguments, $deep = false, array &$visi continue; } elseif ($argument instanceof Reference) { - $argumentId = (string) $argument; + $argumentId = $this->container->normalizeId($argument); if ($id === $argumentId) { return true; } @@ -1790,11 +1790,12 @@ private function dumpValue($value, $interpolate = true) } elseif ($value instanceof Variable) { return '$'.$value; } elseif ($value instanceof Reference) { - if (null !== $this->referenceVariables && isset($this->referenceVariables[$id = (string) $value])) { + $id = $this->container->normalizeId($value); + if (null !== $this->referenceVariables && isset($this->referenceVariables[$id])) { return $this->dumpValue($this->referenceVariables[$id], $interpolate); } - return $this->getServiceCall((string) $value, $value); + return $this->getServiceCall($id, $value); } elseif ($value instanceof Expression) { return $this->getExpressionLanguage()->compile((string) $value, array('this' => 'container')); } elseif ($value instanceof Parameter) { @@ -1881,6 +1882,7 @@ private function getServiceCall($id, Reference $reference = null) while ($this->container->hasAlias($id)) { $id = (string) $this->container->getAlias($id); } + $id = $this->container->normalizeId($id); if ('service_container' === $id) { return '$this'; diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php index 257c4334300d5..bb3e2110254df 100644 --- a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php +++ b/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php @@ -173,16 +173,16 @@ public function resolve() */ public function resolveValue($value, array $resolving = array()) { - if (is_array($value)) { + if (\is_array($value)) { $args = array(); foreach ($value as $k => $v) { - $args[$this->resolveValue($k, $resolving)] = $this->resolveValue($v, $resolving); + $args[\is_string($k) ? $this->resolveValue($k, $resolving) : $k] = $this->resolveValue($v, $resolving); } return $args; } - if (!is_string($value)) { + if (!\is_string($value) || 2 > \strlen($value)) { return $value; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index f12fc608c9608..56046e735b998 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -1001,6 +1001,26 @@ public function testParameterWithLowerCase() $this->assertSame('bar', $container->getParameter('FOO')); } + + /** + * @group legacy + * @expectedDeprecation Service identifiers will be made case sensitive in Symfony 4.0. Using "foo" instead of "Foo" is deprecated since Symfony 3.3. + * @expectedDeprecation The "Foo" service is deprecated. You should stop using it, as it will soon be removed. + */ + public function testReferenceWithLowerCaseId() + { + $container = new ContainerBuilder(); + $container->register('Bar', 'stdClass')->setProperty('foo', new Reference('foo'))->setPublic(true); + $container->register('Foo', 'stdClass')->setDeprecated(); + $container->compile(); + + $dumper = new PhpDumper($container); + eval('?>'.$dumper->dump(array('class' => 'Symfony_DI_PhpDumper_Test_Reference_With_Lower_Case_Id'))); + + $container = new \Symfony_DI_PhpDumper_Test_Reference_With_Lower_Case_Id(); + + $this->assertEquals((object) array('foo' => (object) array()), $container->get('Bar')); + } } class Rot13EnvVarProcessor implements EnvVarProcessorInterface From 0fb83af015705a52c847c34725216ae24a9a5cd0 Mon Sep 17 00:00:00 2001 From: Marin Nicolae Date: Fri, 2 Mar 2018 12:25:15 +0000 Subject: [PATCH 14/18] [WebProfilerBundle] fix wrong variable for profiler counting ajax requests --- .../Resources/views/Profiler/base_js.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index ac4d6cd522c1e..780dad0cb4469 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -108,9 +108,9 @@ var rows = document.createDocumentFragment(); if (requestStack.length) { - var nbOfAjaxRequest = tbodies.rows.length; + var nbOfAjaxRequest = tbody.rows.length; if (nbOfAjaxRequest >= 100) { - tbodies.deleteRow(nbOfAjaxRequest - 1); + tbody.deleteRow(nbOfAjaxRequest - 1); } for (var i = 0; i < requestStack.length; i++) { From 0b748fac95b2540c52ab8afa6c12fedbd05a34d2 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sun, 4 Mar 2018 04:14:33 +0100 Subject: [PATCH 15/18] [DI] Skip resource tracking if disabled --- .../Component/DependencyInjection/ContainerBuilder.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index 678aa37e089ff..512abd1d271a0 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -346,9 +346,11 @@ public function getReflectionClass($class, $throw = true) try { if (isset($this->classReflectors[$class])) { $classReflector = $this->classReflectors[$class]; - } else { + } elseif ($this->trackResources) { $resource = new ClassExistenceResource($class, false); $classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class); + } else { + $classReflector = new \ReflectionClass($class); } } catch (\ReflectionException $e) { if ($throw) { From cc3084ed65d77a16bee47d254a994b20e3c28f8a Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Sun, 4 Mar 2018 16:13:29 +0100 Subject: [PATCH 16/18] Improve the documentation of `Finder::exclude()` --- src/Symfony/Component/Finder/Finder.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index 7b4d71d74eb38..8eb75fca62a42 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -386,6 +386,10 @@ public function size($size) /** * Excludes directories. * + * Directories passed as argument must be relative to the ones defined with the `in()` method. For example: + * + * $finder->in(__DIR__)->exclude('ruby'); + * * @param string|array $dirs A directory path or an array of directories * * @return $this From b010f4ffee938e513a4ae5d10baac20b3ef8fef6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 5 Mar 2018 11:40:57 -0800 Subject: [PATCH 17/18] updated CHANGELOG for 3.4.6 --- CHANGELOG-3.4.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md index e8f584e49635c..e735c49d847f0 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG-3.4.md @@ -7,6 +7,14 @@ 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.6 (2018-03-05) + + * bug #26393 [DI] Skip resource tracking if disabled (chalasr) + * bug #26355 [DI] Fix missing "id" normalization when dumping the container (nicolas-grekas) + * bug #26368 [WebProfilerBundle] Fix Debug toolbar breaks app (xkobal) + * bug #26369 Use fill instead of style for svg colors (rpkamp) + * bug #26358 [FrameworkBundle] Silence "Failed to remove directory" on cache:clear (nicolas-grekas) + * 3.4.5 (2018-03-01) * bug #26327 [Form][WCAG] Errors sign for people that do not see colors (Nyholm) From 932c275e651f4de51ae0e95f08f961bb2e50e2d3 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 5 Mar 2018 11:41:07 -0800 Subject: [PATCH 18/18] updated VERSION for 3.4.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 26236e2d22936..156a0f511fcb8 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.6-DEV'; + const VERSION = '3.4.6'; const VERSION_ID = 30406; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; const RELEASE_VERSION = 6; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021';