From 4ff9d99f23fa4b8061983a93d1937d8ad05aa682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 4 Dec 2017 17:28:00 +0100 Subject: [PATCH 01/21] [Serializer] Unset attributes when creating child context --- .../Serializer/Normalizer/AbstractNormalizer.php | 2 ++ .../Tests/Normalizer/ObjectNormalizerTest.php | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index c1e621fe90..c8b9bdac7d 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -402,6 +402,8 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N { if (isset($parentContext[self::ATTRIBUTES][$attribute])) { $parentContext[self::ATTRIBUTES] = $parentContext[self::ATTRIBUTES][$attribute]; + } else { + unset($parentContext[self::ATTRIBUTES]); } return $parentContext; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php index 9407fdf52d..b8a628f0f8 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -673,6 +673,16 @@ class ObjectNormalizerTest extends TestCase ), $serializer->normalize($objectDummy, null, $context) ); + + $context = array('attributes' => array('foo', 'baz', 'object')); + $this->assertEquals( + array( + 'foo' => 'foo', + 'baz' => true, + 'object' => array('foo' => 'innerFoo', 'bar' => 'innerBar'), + ), + $serializer->normalize($objectDummy, null, $context) + ); } public function testAttributesContextDenormalize() From 3d5380b6c4cae396f79724fd9f5f505981ba51a3 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 12:39:56 -0800 Subject: [PATCH 02/21] updated CHANGELOG for 2.7.39 --- CHANGELOG-2.7.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md index 7ac65a7737..916ce96ddb 100644 --- a/CHANGELOG-2.7.md +++ b/CHANGELOG-2.7.md @@ -7,6 +7,20 @@ 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.39 (2017-12-04) + + * bug #25278 Fix for missing whitespace control modifier in form layout (kubawerlos) + * bug #25236 [Form][TwigBridge] Fix collision between view properties and form fields (yceruto) + * bug #25258 [link] Prevent warnings when running link with 2.7 (dunglas) + * bug #24750 [Validator] ExpressionValidator should use OBJECT_TO_STRING (Simperfit) + * bug #25182 [HttpFoundation] AutExpireFlashBag should not clear new flashes (Simperfit, sroze) + * bug #25152 [Form] Don't rely on `Symfony\Component\HttpFoundation\File\File` if http-foundation isn't in FileType (issei-m) + * bug #24987 [Console] Fix global console flag when used in chain (Simperfit) + * bug #25043 [Yaml] added ability for substitute aliases when mapping is on single line (Michał Strzelecki, xabbuh) + * bug #25102 [Form] Fixed ContextErrorException in FileType (chihiro-adachi) + * bug #25130 [DI] Fix handling of inlined definitions by ContainerBuilder (nicolas-grekas) + * bug #24956 Fix ambiguous pattern (weltling) + * 2.7.38 (2017-11-16) * security #24995 Validate redirect targets using the session cookie domain (nicolas-grekas) From 963d72c5f013812ad0fd57a47eb8510d9e0c2fd4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 12:40:02 -0800 Subject: [PATCH 03/21] update CONTRIBUTORS for 2.7.39 --- CONTRIBUTORS.md | 51 +++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0f3e9c22ad..30d8ae3f82 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,8 +14,8 @@ Symfony is the result of the work of many people who made the code better - Victor Berchet (victor) - Johannes S (johannes) - Jakub Zalas (jakubzalas) - - Kris Wallsmith (kriswallsmith) - Kévin Dunglas (dunglas) + - Kris Wallsmith (kriswallsmith) - Ryan Weaver (weaverryan) - Javier Eguiluz (javier.eguiluz) - Maxime Steinhausser (ogizanagi) @@ -29,8 +29,8 @@ Symfony is the result of the work of many people who made the code better - Joseph Bielawski (stloyd) - Karma Dordrak (drak) - Lukas Kahwe Smith (lsmith) - - Martin Hasoň (hason) - Roland Franssen (ro0) + - Martin Hasoň (hason) - Jeremy Mikola (jmikola) - Jean-François Simon (jfsimon) - Benjamin Eberlei (beberlei) @@ -52,24 +52,24 @@ Symfony is the result of the work of many people who made the code better - Peter Rehm (rpet) - Saša Stamenković (umpirsky) - Henrik Bjørnskov (henrikbjorn) + - Yonel Ceruto (yonelceruto) - Miha Vrhovnik - Matthias Pigulla (mpdude) - Diego Saint Esteben (dii3g0) - Konstantin Kudryashov (everzet) - Bilal Amarni (bamarni) - - Yonel Ceruto (yonelceruto) - - Dany Maillard (maidmaid) - Kevin Bond (kbond) + - Dany Maillard (maidmaid) + - Pierre du Plessis (pierredup) - Florin Patan (florinpatan) - Jérémy DERUSSÉ (jderusse) - - Pierre du Plessis (pierredup) - Gábor Egyed (1ed) - Michel Weimerskirch (mweimerskirch) - Andrej Hudec (pulzarraider) + - Alexander M. Turek (derrabus) - Eric Clemmons (ericclemmons) - Jáchym Toušek (enumag) - Charles Sarrazin (csarrazi) - - Alexander M. Turek (derrabus) - Konstantin Myakshin (koc) - Christian Raue - Arnout Boks (aboks) @@ -79,6 +79,7 @@ Symfony is the result of the work of many people who made the code better - Titouan Galopin (tgalopin) - Douglas Greenshields (shieldo) - Tobias Nyholm (tobias) + - Issei Murasawa (issei_m) - Lee McDermott - Brandon Turner - Luis Cordova (cordoval) @@ -91,13 +92,14 @@ Symfony is the result of the work of many people who made the code better - John Wards (johnwards) - Dariusz Ruminski - Fran Moreno (franmomu) - - Issei Murasawa (issei_m) - Antoine Hérault (herzult) - Paráda József (paradajozsef) - Arnaud Le Blanc (arnaud-lb) - Maxime STEINHAUSSER - Michal Piotrowski (eventhorizon) + - Samuel ROZE (sroze) - Tim Nagel (merk) + - Amrouche Hamza (simperfit) - Brice BERNARD (brikou) - Baptiste Clavié (talus) - Vladimir Reznichenko (kalessil) @@ -126,6 +128,7 @@ Symfony is the result of the work of many people who made the code better - Sebastiaan Stok (sstok) - Stefano Sala (stefano.sala) - Evgeniy (ewgraf) + - Grégoire Paris (greg0ire) - Vincent AUBERT (vincent) - Juti Noppornpitak (shiroyuki) - Tigran Azatyan (tigranazatyan) @@ -135,7 +138,6 @@ Symfony is the result of the work of many people who made the code better - Guilherme Blanco (guilhermeblanco) - Pablo Godel (pgodel) - Jérémie Augustin (jaugustin) - - Grégoire Paris (greg0ire) - Andréia Bohner (andreia) - Rafael Dohms (rdohms) - Arnaud Kleinpeter (nanocom) @@ -149,6 +151,7 @@ Symfony is the result of the work of many people who made the code better - Vyacheslav Pavlov - Richard van Laak (rvanlaak) - Javier Spagnoletti (phansys) + - Julien Falque (julienfalque) - Richard Shank (iampersistent) - Thomas Rabaix (rande) - Rouven Weßling (realityking) @@ -160,7 +163,6 @@ 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 - - Julien Falque (julienfalque) - Amal Raghav (kertz) - Jonathan Ingram (jonathaningram) - Artur Kotyrba @@ -171,8 +173,6 @@ Symfony is the result of the work of many people who made the code better - Warnar Boekkooi (boekkooi) - Dmitrii Chekaliuk (lazyhammer) - Clément JOBEILI (dator) - - Amrouche Hamza - - Samuel ROZE (sroze) - Daniel Espendiller - Possum - Dorian Villet (gnutix) @@ -190,6 +190,7 @@ Symfony is the result of the work of many people who made the code better - Stepan Anchugov (kix) - bronze1man - sun (sun) + - Valentin Udaltsov (vudaltsov) - Larry Garfield (crell) - Martin Schuhfuß (usefulthink) - apetitpa @@ -248,7 +249,6 @@ Symfony is the result of the work of many people who made the code better - Pierre-Yves LEBECQ (pylebecq) - Jordan Samouh (jordansamouh) - Jakub Kucharovic (jkucharovic) - - Valentin Udaltsov (vudaltsov) - Uwe Jäger (uwej711) - Eugene Leonovich (rybakit) - Filippo Tessarotto @@ -261,6 +261,7 @@ 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) - Jhonny Lidfors (jhonne) @@ -299,8 +300,8 @@ Symfony is the result of the work of many people who made the code better - Thomas Tourlourat (armetiz) - Andrey Esaulov (andremaha) - Grégoire Passault (gregwar) + - Jerzy Zawadzki (jzawadzki) - Ismael Ambrosi (iambrosi) - - gadelat (gadelat) - Baptiste Lafontaine - Aurelijus Valeiša (aurelijus) - Victor Bocharsky (bocharsky_bw) @@ -345,6 +346,7 @@ Symfony is the result of the work of many people who made the code better - Yaroslav Kiliba - Terje Bråten - Robbert Klarenbeek (robbertkl) + - Edi Modrić (emodric) - Thomas Calvet (fancyweb) - Niels Keurentjes (curry684) - JhonnyL @@ -364,7 +366,6 @@ Symfony is the result of the work of many people who made the code better - Loïc Chardonnet (gnusat) - Marek Kalnik (marekkalnik) - Vyacheslav Salakhutdinov (megazoll) - - Jerzy Zawadzki (jzawadzki) - Hassan Amouhzi - Tamas Szijarto - Pavel Volokitin (pvolok) @@ -375,6 +376,7 @@ Symfony is the result of the work of many people who made the code better - Tobias Naumann (tna) - Daniel Beyer - Shein Alexey + - Alex Rock Ancelet (pierstoval) - Romain Gautier (mykiwi) - Joe Lencioni - Daniel Tschinder @@ -434,7 +436,6 @@ Symfony is the result of the work of many people who made the code better - cedric lombardot (cedriclombardot) - Jonas Flodén (flojon) - Thomas Perez (scullwm) - - Edi Modrić (emodric) - Marcin Sikoń (marphi) - Dominik Zogg (dominik.zogg) - Marek Pietrzak @@ -446,6 +447,7 @@ Symfony is the result of the work of many people who made the code better - Rob Bast - Zander Baldwin - Adam Harvey + - Anton Bakai - Maxime Veber (nek-) - Alex Bakhturin - Yanick Witschi (toflar) @@ -495,7 +497,6 @@ Symfony is the result of the work of many people who made the code better - Arjen van der Meijden - Michele Locati - Dariusz Ruminski - - Alex Rock Ancelet (pierstoval) - Erik Trapman (eriktrapman) - De Cock Xavier (xdecock) - Almog Baku (almogbaku) @@ -619,7 +620,6 @@ Symfony is the result of the work of many people who made the code better - Catalin Dan - Stephan Vock - Benjamin Zikarsky (bzikarsky) - - Anton Bakai - Simon Schick (simonsimcity) - redstar504 - Tristan Roussel @@ -711,8 +711,10 @@ 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) - Hubert Lenoir (hubert_lenoir) - Jaik Dean (jaikdean) - fago @@ -733,6 +735,7 @@ Symfony is the result of the work of many people who made the code better - Pierre Vanliefland (pvanliefland) - Sofiane HADDAG (sofhad) - frost-nzcr4 + - Bozhidar Hristov - Abhoryo - Fabian Vogler (fabian) - Korvin Szanto @@ -763,6 +766,7 @@ Symfony is the result of the work of many people who made the code better - Fabien LUCAS (flucas2) - Jörn Lang (j.lang) - Omar Yepez (oyepez003) + - Gawain Lynch (gawain) - mwsaz - Jelle Kapitein - Benoît Bourgeois @@ -925,6 +929,7 @@ Symfony is the result of the work of many people who made the code better - Christian - Denis Golubovskiy (bukashk0zzz) - Sergii Smertin (nfx) + - Michał Strzelecki - hugofonseca (fonsecas72) - Martynas Narbutas - Bailey Parker @@ -1002,6 +1007,7 @@ Symfony is the result of the work of many people who made the code better - Brooks Boyd - Roger Webb - Dmitriy Simushev + - pkowalczyk - Max Voloshin (maxvoloshin) - Nicolas Fabre (nfabre) - Raul Rodriguez (raul782) @@ -1127,6 +1133,7 @@ Symfony is the result of the work of many people who made the code better - Max Summe - WedgeSama - Felds Liscia + - Chihiro Adachi (chihiro-adachi) - Sullivan SENECHAL - Tadcka - Beth Binkovitz @@ -1283,6 +1290,7 @@ Symfony is the result of the work of many people who made the code better - nuncanada - flack - František Bereň + - Jeremiah VALERIE - Mike Francis - Christoph Nissle (derstoffel) - Ionel Scutelnicu (ionelscutelnicu) @@ -1305,6 +1313,7 @@ Symfony is the result of the work of many people who made the code better - Andrew Zhilin (zhil) - Oleksii Zhurbytskyi - Andy Stanberry + - Felix Marezki - Luiz “Felds” Liscia - Thomas Rothe - nietonfir @@ -1352,7 +1361,6 @@ Symfony is the result of the work of many people who made the code better - Nicole Cordes - Martin Kirilov - Bram Van der Sype (brammm) - - Christopher Hertel (chertel) - Guile (guile) - Julien Moulin (lizjulien) - Mauro Foti (skler) @@ -1386,7 +1394,6 @@ Symfony is the result of the work of many people who made the code better - Bertalan Attila - Yannick Bensacq (cibou) - Freek Van der Herten (freekmurze) - - Gawain Lynch (gawain) - Luca Genuzio (genuzio) - Hans Nilsson (hansnilsson) - Andrew Marcinkevičius (ifdattic) @@ -1444,6 +1451,7 @@ Symfony is the result of the work of many people who made the code better - David Windell - Gabriel Birke - skafandri + - Derek Bonner - Alan Chen - Maerlyn - Even André Fiskvik @@ -1487,6 +1495,7 @@ Symfony is the result of the work of many people who made the code better - Ian Jenkins (jenkoian) - Jorge Martin (jorgemartind) - Joeri Verdeyen (jverdeyen) + - Dmitrii Poddubnyi (karser) - Kevin Verschaeve (keversc) - Kevin Herrera (kherge) - Luis Ramón López López (lrlopez) @@ -1500,6 +1509,7 @@ Symfony is the result of the work of many people who made the code better - Jimmy Leger (redpanda) - Marcin Szepczynski (szepczynski) - Cyrille Jouineau (tuxosaurus) + - Vladimir Chernyshev (volch) - Yorkie Chadwick (yorkie76) - GuillaumeVerdon - Ondrej Mirtes @@ -1582,9 +1592,11 @@ Symfony is the result of the work of many people who made the code better - Michael Schneider - Cédric Bertolini - n-aleha + - Anatol Belski - Şəhriyar İmanov - Kaipi Yann - Sam Williams + - Guillaume Aveline - Adrian Philipp - James Michael DuPont - Kasperki @@ -1744,6 +1756,7 @@ Symfony is the result of the work of many people who made the code better - Schuyler Jager (sjager) - Pascal Luna (skalpa) - Volker (skydiablo) + - Serkan Yildiz (srknyldz) - Julien Sanchez (sumbobyboys) - Guillermo Gisinger (t3chn0r) - Markus Tacker (tacker) From c7f09523e4739bc76ee06e7af2fce42749158a5a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 12:40:11 -0800 Subject: [PATCH 04/21] updated VERSION for 2.7.39 --- 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 466e01b172..47c3fd69c7 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.39-DEV'; + const VERSION = '2.7.39'; const VERSION_ID = 20739; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; const RELEASE_VERSION = 39; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; From 2c3344b8b72f0202d671c0abeccb73669f1539a8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 13:53:49 -0800 Subject: [PATCH 05/21] bumped Symfony version to 2.7.40 --- 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 47c3fd69c7..5ff8305d34 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.39'; - const VERSION_ID = 20739; + const VERSION = '2.7.40-DEV'; + const VERSION_ID = 20740; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; - const RELEASE_VERSION = 39; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 40; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; From 67eb592d0e664bc72706f351a1b5b1dddbc54b49 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 14:02:09 -0800 Subject: [PATCH 06/21] updated CHANGELOG for 2.8.32 --- CHANGELOG-2.8.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG-2.8.md b/CHANGELOG-2.8.md index 626c310af4..2e8fc7e470 100644 --- a/CHANGELOG-2.8.md +++ b/CHANGELOG-2.8.md @@ -7,6 +7,21 @@ 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.32 (2017-12-04) + + * bug #25278 Fix for missing whitespace control modifier in form layout (kubawerlos) + * bug #25236 [Form][TwigBridge] Fix collision between view properties and form fields (yceruto) + * bug #25258 [link] Prevent warnings when running link with 2.7 (dunglas) + * bug #24750 [Validator] ExpressionValidator should use OBJECT_TO_STRING (Simperfit) + * bug #25182 [HttpFoundation] AutExpireFlashBag should not clear new flashes (Simperfit, sroze) + * bug #25152 [Form] Don't rely on `Symfony\Component\HttpFoundation\File\File` if http-foundation isn't in FileType (issei-m) + * bug #24987 [Console] Fix global console flag when used in chain (Simperfit) + * bug #25043 [Yaml] added ability for substitute aliases when mapping is on single line (Michał Strzelecki, xabbuh) + * bug #25102 [Form] Fixed ContextErrorException in FileType (chihiro-adachi) + * bug #25130 [DI] Fix handling of inlined definitions by ContainerBuilder (nicolas-grekas) + * bug #25072 [Bridge/PhpUnit] Remove trailing "\n" from ClockMock::microtime(false) (joky) + * bug #24956 Fix ambiguous pattern (weltling) + * 2.8.31 (2017-11-16) * security #24995 Validate redirect targets using the session cookie domain (nicolas-grekas) From 525b5ff9765acd73fe01fb2558b64cc31c57e313 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 14:02:14 -0800 Subject: [PATCH 07/21] updated VERSION for 2.8.32 --- 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 0bfec287a9..6ec30910cb 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.32-DEV'; + const VERSION = '2.8.32'; const VERSION_ID = 20832; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; const RELEASE_VERSION = 32; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From e8b5aa1cd13e39ce617b28cbc21aae6df27706e9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 14:24:43 -0800 Subject: [PATCH 08/21] bumped Symfony version to 2.8.33 --- 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 6ec30910cb..67ae1cb8d6 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.32'; - const VERSION_ID = 20832; + const VERSION = '2.8.33-DEV'; + const VERSION_ID = 20833; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 32; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 33; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From b1a1a8fb5c121087d5d1268021386641e97d7559 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 14:26:15 -0800 Subject: [PATCH 09/21] updated CHANGELOG for 3.3.14 --- CHANGELOG-3.3.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/CHANGELOG-3.3.md b/CHANGELOG-3.3.md index 3102844440..eeb42846f5 100644 --- a/CHANGELOG-3.3.md +++ b/CHANGELOG-3.3.md @@ -7,6 +7,41 @@ in 3.3 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.3.0...v3.3.1 +* 3.3.14 (2017-12-04) + + * bug #25304 [Bridge/PhpUnit] Prefer $_SERVER['argv'] over $argv (ricknox) + * bug #25308 [FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash (Simperfit) + * bug #25278 Fix for missing whitespace control modifier in form layout (kubawerlos) + * bug #25305 [Form][TwigBridge] Fix collision between view properties and form fields (yceruto) + * bug #25236 [Form][TwigBridge] Fix collision between view properties and form fields (yceruto) + * bug #25312 [DI] Fix deep-inlining of non-shared refs (nicolas-grekas) + * bug #25309 [Yaml] parse newlines in quoted multiline strings (xabbuh) + * bug #25241 [Yaml] do not eagerly filter comment lines (xabbuh) + * bug #25258 [link] Prevent warnings when running link with 2.7 (dunglas) + * bug #24750 [Validator] ExpressionValidator should use OBJECT_TO_STRING (Simperfit) + * bug #25232 [WebProfilerBundle] [TwigBundle] Fix Profiler breaking XHTML pages (tistre) + * bug #25209 [VarDumper] Dont use empty(), it chokes on eg GMP objects (nicolas-grekas) + * bug #25200 [HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice (Simperfit) + * bug #25217 [Dotenv] Changed preg_match flags from null to 0 (deekthesqueak) + * bug #25203 [DI] Fix infinite loop in InlineServiceDefinitionsPass (nicolas-grekas) + * bug #25185 [Serializer] Do not cache attributes if `attributes` in context (sroze) + * bug #25182 [HttpFoundation] AutExpireFlashBag should not clear new flashes (Simperfit, sroze) + * bug #25179 [FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed (ogizanagi) + * bug #25163 [DI] Fix tracking of env vars in exceptions (nicolas-grekas) + * bug #25152 [Form] Don't rely on `Symfony\Component\HttpFoundation\File\File` if http-foundation isn't in FileType (issei-m) + * bug #24987 [Console] Fix global console flag when used in chain (Simperfit) + * bug #25146 [DI] Dont resolve envs in service ids (nicolas-grekas) + * bug #25113 [Routing] Fix "config-file-relative" annotation loader resources (nicolas-grekas, sroze) + * bug #25109 Make debug:container search command case-insensitive (jzawadzki) + * bug #25043 [Yaml] added ability for substitute aliases when mapping is on single line (Michał Strzelecki, xabbuh) + * bug #25102 [Form] Fixed ContextErrorException in FileType (chihiro-adachi) + * bug #25130 [DI] Fix handling of inlined definitions by ContainerBuilder (nicolas-grekas) + * bug #25094 [FrameworkBundle][DX] Display a nice error message if an enabled component is missing (derrabus) + * bug #25097 [Bridge\PhpUnit] Turn "preserveGlobalState" to false by default, revert "Blacklist" removal (nicolas-grekas) + * bug #25072 [Bridge/PhpUnit] Remove trailing "\n" from ClockMock::microtime(false) (joky) + * bug #25032 [Bridge\PhpUnit] Disable broken auto-require mechanism of phpunit (nicolas-grekas) + * bug #24956 Fix ambiguous pattern (weltling) + * 3.3.13 (2017-11-16) * security #24995 Validate redirect targets using the session cookie domain (nicolas-grekas) From 4965ef5311c284aa4b5a23094239f976b836a99a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 14:26:28 -0800 Subject: [PATCH 10/21] updated VERSION for 3.3.14 --- 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 711f410e0d..d904460cf4 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -61,12 +61,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface private $projectDir; - const VERSION = '3.3.14-DEV'; + const VERSION = '3.3.14'; const VERSION_ID = 30314; const MAJOR_VERSION = 3; const MINOR_VERSION = 3; const RELEASE_VERSION = 14; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2018'; const END_OF_LIFE = '07/2018'; From b78360262268060d74b095e387d8bbcb7694c449 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 4 Dec 2017 15:02:34 -0800 Subject: [PATCH 11/21] bumped Symfony version to 3.3.15 --- 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 d904460cf4..42d176612e 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -61,12 +61,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface private $projectDir; - const VERSION = '3.3.14'; - const VERSION_ID = 30314; + const VERSION = '3.3.15-DEV'; + const VERSION_ID = 30315; const MAJOR_VERSION = 3; const MINOR_VERSION = 3; - const RELEASE_VERSION = 14; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 15; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '01/2018'; const END_OF_LIFE = '07/2018'; From a7d44895e0bf0624e0bcf48e0e35182edd5c149a Mon Sep 17 00:00:00 2001 From: Dany Maillard Date: Tue, 5 Dec 2017 23:53:48 +1000 Subject: [PATCH 12/21] Fix php doc in Table class --- src/Symfony/Component/Console/Helper/Table.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index 11bed884c2..e91ff83ea5 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -188,6 +188,7 @@ class Table * Renders table to output. * * Example: + * * +---------------+-----------------------+------------------+ * | ISBN | Title | Author | * +---------------+-----------------------+------------------+ @@ -195,6 +196,7 @@ class Table * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | * +---------------+-----------------------+------------------+ + * */ public function render() { @@ -226,7 +228,7 @@ class Table /** * Renders horizontal header separator. * - * Example: +-----+-----------+-------+ + * Example: +-----+-----------+-------+ */ private function renderRowSeparator() { @@ -257,7 +259,7 @@ class Table /** * Renders table row. * - * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | * * @param array $row * @param string $cellFormat From 22f35239a46f5a4cf659bd0e5f373281fa7f29f7 Mon Sep 17 00:00:00 2001 From: Samuel ROZE Date: Wed, 6 Dec 2017 16:27:14 +0000 Subject: [PATCH 13/21] Prevent a loop in aliases within the `findDefinition` method --- .../DependencyInjection/ContainerBuilder.php | 7 +++++++ .../Tests/ContainerBuilderTest.php | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index c3aee4e6fd..f58adfc7d0 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -993,8 +993,15 @@ class ContainerBuilder extends Container implements TaggedContainerInterface { $id = $this->normalizeId($id); + $seen = array(); while (isset($this->aliasDefinitions[$id])) { $id = (string) $this->aliasDefinitions[$id]; + + if (isset($seen[$id])) { + throw new ServiceCircularReferenceException($id, array_keys($seen)); + } + + $seen[$id] = true; } return $this->getDefinition($id); diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 8b905746b2..fd24d80d1b 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -1044,6 +1044,22 @@ class ContainerBuilderTest extends TestCase $this->assertNotSame($bar->foo, $barUser->foo); } + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException + * @expectedExceptionMessage Circular reference detected for service "app.test_class", path: "app.test_class -> App\TestClass". + */ + public function testThrowsCircularExceptionForCircularAliases() + { + $builder = new ContainerBuilder(); + + $builder->setAliases(array( + 'app.test_class' => new Alias('App\\TestClass'), + 'App\\TestClass' => new Alias('app.test_class'), + )); + + $builder->findDefinition('App\\TestClass'); + } + public function testInitializePropertiesBeforeMethodCalls() { $container = new ContainerBuilder(); From 78abc8964848bfe6f640885d2942c42e3187534a Mon Sep 17 00:00:00 2001 From: Amrouche Hamza Date: Tue, 5 Dec 2017 07:03:41 +0100 Subject: [PATCH 14/21] [ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice --- .../ExpressionLanguage/Tests/ExpressionLanguageTest.php | 9 +++++++++ src/Symfony/Component/ExpressionLanguage/TokenStream.php | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php index 50a0eb5e95..ff8aab2cde 100644 --- a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php +++ b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php @@ -84,6 +84,15 @@ class ExpressionLanguageTest extends TestCase $this->assertSame($expected, $result); } + /** + * @expectedException \Symfony\Component\ExpressionLanguage\SyntaxError + * @expectedExceptionMessage Unexpected end of expression around position 6 for expression `node.`. + */ + public function testParseThrowsInsteadOfNotice() + { + (new ExpressionLanguage())->parse('node.', array('node')); + } + public function shortCircuitProviderEvaluate() { $object = $this->getMockBuilder('stdClass')->setMethods(array('foo'))->getMock(); diff --git a/src/Symfony/Component/ExpressionLanguage/TokenStream.php b/src/Symfony/Component/ExpressionLanguage/TokenStream.php index 9426bfeb7e..9096b183ff 100644 --- a/src/Symfony/Component/ExpressionLanguage/TokenStream.php +++ b/src/Symfony/Component/ExpressionLanguage/TokenStream.php @@ -50,12 +50,12 @@ class TokenStream */ public function next() { + ++$this->position; + if (!isset($this->tokens[$this->position])) { throw new SyntaxError('Unexpected end of expression', $this->current->cursor, $this->expression); } - ++$this->position; - $this->current = $this->tokens[$this->position]; } From f1a7b075a6098e891b91511e4584ad43e274a7c0 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 7 Dec 2017 18:06:18 +0100 Subject: [PATCH 15/21] [DI] Fix circular-aliases message --- .../Component/DependencyInjection/ContainerBuilder.php | 8 ++++++-- .../DependencyInjection/Tests/ContainerBuilderTest.php | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index f58adfc7d0..e67d924f23 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -998,10 +998,14 @@ class ContainerBuilder extends Container implements TaggedContainerInterface $id = (string) $this->aliasDefinitions[$id]; if (isset($seen[$id])) { - throw new ServiceCircularReferenceException($id, array_keys($seen)); + $seen = array_values($seen); + $seen = array_slice($seen, array_search($id, $seen)); + $seen[] = $id; + + throw new ServiceCircularReferenceException($id, $seen); } - $seen[$id] = true; + $seen[$id] = $id; } return $this->getDefinition($id); diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index fd24d80d1b..f4583b1338 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -1046,18 +1046,19 @@ class ContainerBuilderTest extends TestCase /** * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException - * @expectedExceptionMessage Circular reference detected for service "app.test_class", path: "app.test_class -> App\TestClass". + * @expectedExceptionMessage Circular reference detected for service "app.test_class", path: "app.test_class -> App\TestClass -> app.test_class". */ public function testThrowsCircularExceptionForCircularAliases() { $builder = new ContainerBuilder(); $builder->setAliases(array( + 'foo' => new Alias('app.test_class'), 'app.test_class' => new Alias('App\\TestClass'), 'App\\TestClass' => new Alias('app.test_class'), )); - $builder->findDefinition('App\\TestClass'); + $builder->findDefinition('foo'); } public function testInitializePropertiesBeforeMethodCalls() From 520cc97e189b48dc2451f148039130c561eb70b8 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 7 Dec 2017 19:55:09 +0100 Subject: [PATCH 16/21] [HttpKernel] remove noisy frame in controller stack traces --- src/Symfony/Component/HttpKernel/HttpKernel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/Symfony/Component/HttpKernel/HttpKernel.php index f1114bf632..f971e248f9 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernel.php +++ b/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -134,7 +134,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface $arguments = $this->resolver->getArguments($request, $controller); // call controller - $response = call_user_func_array($controller, $arguments); + $response = \call_user_func_array($controller, $arguments); // view if (!$response instanceof Response) { From 2249f43c023ddb5069a0f81e11d5fad3cc346c9b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 7 Dec 2017 20:30:27 +0100 Subject: [PATCH 17/21] [ExpressionLanguage] Fix parse error on 5.3 --- .../ExpressionLanguage/Tests/ExpressionLanguageTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php index ff8aab2cde..ec5f0f1d75 100644 --- a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php +++ b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php @@ -90,7 +90,8 @@ class ExpressionLanguageTest extends TestCase */ public function testParseThrowsInsteadOfNotice() { - (new ExpressionLanguage())->parse('node.', array('node')); + $expressionLanguage = new ExpressionLanguage(); + $expressionLanguage->parse('node.', array('node')); } public function shortCircuitProviderEvaluate() From b201c22d441868c0f7028a9045d8999d4d165e21 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 5 Dec 2017 11:00:13 +0100 Subject: [PATCH 18/21] fix some edge cases with indented blocks Now that comment-like lines are no longer ignored when subparsers are created, we need to ignore them in some functions (e.g. when detecting the indentation depth of the next block). --- src/Symfony/Component/Yaml/Parser.php | 56 +++++++++++++---- .../Component/Yaml/Tests/ParserTest.php | 62 +++++++++++++++++++ 2 files changed, 107 insertions(+), 11 deletions(-) diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index a6e39007df..773837c995 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -537,7 +537,27 @@ class Parser } if (null === $indentation) { - $newIndent = $this->getCurrentLineIndentation(); + $newIndent = null; + $movements = 0; + + do { + $EOF = false; + + // comment-like lines do not influence the indentation depth + if ($this->isCurrentLineComment()) { + $EOF = !$this->moveToNextLine(); + + if (!$EOF) { + ++$movements; + } + } else { + $newIndent = $this->getCurrentLineIndentation(); + } + } while (!$EOF && null === $newIndent); + + for ($i = 0; $i < $movements; ++$i) { + $this->moveToPreviousLine(); + } $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem(); @@ -551,6 +571,8 @@ class Parser $data = array(); if ($this->getCurrentLineIndentation() >= $newIndent) { $data[] = substr($this->currentLine, $newIndent); + } elseif ($this->isCurrentLineComment()) { + $data[] = $this->currentLine; } else { $this->moveToPreviousLine(); @@ -866,11 +888,15 @@ class Parser private function isNextLineIndented() { $currentIndentation = $this->getCurrentLineIndentation(); - $EOF = !$this->moveToNextLine(); + $movements = 0; - while (!$EOF && $this->isCurrentLineEmpty()) { + do { $EOF = !$this->moveToNextLine(); - } + + if (!$EOF) { + ++$movements; + } + } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); if ($EOF) { return false; @@ -878,7 +904,9 @@ class Parser $ret = $this->getCurrentLineIndentation() > $currentIndentation; - $this->moveToPreviousLine(); + for ($i = 0; $i < $movements; ++$i) { + $this->moveToPreviousLine(); + } return $ret; } @@ -967,19 +995,25 @@ class Parser private function isNextLineUnIndentedCollection() { $currentIndentation = $this->getCurrentLineIndentation(); - $notEOF = $this->moveToNextLine(); + $movements = 0; - while ($notEOF && $this->isCurrentLineEmpty()) { - $notEOF = $this->moveToNextLine(); - } + do { + $EOF = !$this->moveToNextLine(); - if (false === $notEOF) { + if (!$EOF) { + ++$movements; + } + } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); + + if ($EOF) { return false; } $ret = $this->getCurrentLineIndentation() === $currentIndentation && $this->isStringUnIndentedCollectionItem(); - $this->moveToPreviousLine(); + for ($i = 0; $i < $movements; ++$i) { + $this->moveToPreviousLine(); + } return $ret; } diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index 1d35ecc1bd..73a482b939 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -2013,6 +2013,68 @@ foo: { &foo { a: Steve, <<: *foo} } EOE; $this->parser->parse($yaml); } + + /** + * @dataProvider indentedMappingData + */ + public function testParseIndentedMappings($yaml, $expected) + { + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + public function indentedMappingData() + { + $tests = array(); + + $yaml = << array( + array( + 'bar' => 'foobar', + 'baz' => 'foobaz', + ), + ), + ); + $tests['comment line is first line in indented block'] = array($yaml, $expected); + + $yaml = << array( + array( + 'bar' => array( + 'baz' => array(1, 2, 3), + ), + ), + ), + ); + $tests['mapping value on new line starting with a comment line'] = array($yaml, $expected); + + $yaml = << array( + array( + 'bar' => 'foobar', + ), + ), + ); + $tests['mapping in sequence starting on a new line'] = array($yaml, $expected); + + return $tests; + } } class B From 30e227392ab65e516e5038addffebd1c8f6f1ba5 Mon Sep 17 00:00:00 2001 From: Titouan Galopin Date: Fri, 8 Dec 2017 11:23:50 +0100 Subject: [PATCH 19/21] Remove some unused variables, properties and methods --- .../FrameworkBundle/Templating/Helper/AssetsHelper.php | 2 +- src/Symfony/Component/CssSelector/Parser/TokenStream.php | 9 +-------- .../Compiler/AnalyzeServiceReferencesPass.php | 3 +-- .../Compiler/InlineServiceDefinitionsPass.php | 3 +-- .../EventDispatcher/ContainerAwareEventDispatcher.php | 2 +- .../Component/Form/Extension/Core/Type/TimezoneType.php | 7 ------- .../HttpKernel/DataCollector/ConfigDataCollector.php | 3 +-- src/Symfony/Component/HttpKernel/HttpCache/Store.php | 2 +- .../Tests/DataCollector/ConfigDataCollectorTest.php | 1 - src/Symfony/Component/Process/Pipes/AbstractPipes.php | 2 +- src/Symfony/Component/Process/Pipes/UnixPipes.php | 2 +- .../Validator/Context/LegacyExecutionContext.php | 4 ---- 12 files changed, 9 insertions(+), 31 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php index 172417924c..f3d960f9c6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php @@ -43,7 +43,7 @@ class AssetsHelper extends Helper public function getUrl($path, $packageName = null, $version = null) { // BC layer to be removed in 3.0 - if (3 === $count = func_num_args()) { + if (3 === func_num_args()) { @trigger_error('Forcing a version for an asset was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); $args = func_get_args(); diff --git a/src/Symfony/Component/CssSelector/Parser/TokenStream.php b/src/Symfony/Component/CssSelector/Parser/TokenStream.php index ac87d313c9..54f7af3eb2 100644 --- a/src/Symfony/Component/CssSelector/Parser/TokenStream.php +++ b/src/Symfony/Component/CssSelector/Parser/TokenStream.php @@ -29,11 +29,6 @@ class TokenStream */ private $tokens = array(); - /** - * @var bool - */ - private $frozen = false; - /** * @var Token[] */ @@ -47,7 +42,7 @@ class TokenStream /** * @var Token|null */ - private $peeked = null; + private $peeked; /** * @var bool @@ -73,8 +68,6 @@ class TokenStream */ public function freeze() { - $this->frozen = true; - return $this; } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php index 12e27298a6..cafa3d4ed6 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php @@ -30,7 +30,6 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface private $container; private $currentId; private $currentDefinition; - private $repeatedPass; private $onlyConstructorArguments; /** @@ -46,7 +45,7 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface */ public function setRepeatedPass(RepeatedPass $repeatedPass) { - $this->repeatedPass = $repeatedPass; + // no-op for BC } /** diff --git a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php index 5d7fa1ba63..78f0ebb41f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php @@ -23,7 +23,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; */ class InlineServiceDefinitionsPass implements RepeatablePassInterface { - private $repeatedPass; private $graph; private $compiler; private $formatter; @@ -34,7 +33,7 @@ class InlineServiceDefinitionsPass implements RepeatablePassInterface */ public function setRepeatedPass(RepeatedPass $repeatedPass) { - $this->repeatedPass = $repeatedPass; + // no-op for BC } /** diff --git a/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php index 03670bb44c..197fafd593 100644 --- a/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php @@ -67,7 +67,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher if (isset($this->listenerIds[$eventName])) { foreach ($this->listenerIds[$eventName] as $i => $args) { - list($serviceId, $method, $priority) = $args; + list($serviceId, $method) = $args; $key = $serviceId.'.'.$method; if (isset($this->listeners[$eventName][$key]) && $listener === array($this->listeners[$eventName][$key], $method)) { unset($this->listeners[$eventName][$key]); diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php index 13c27f9da8..0592ef4d26 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php @@ -23,13 +23,6 @@ class TimezoneType extends AbstractType */ private static $timezones; - /** - * Stores the available timezone choices. - * - * @var array - */ - private static $flippedTimezones; - /** * {@inheritdoc} */ diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index c1c085cbed..318c6522b4 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -27,7 +27,6 @@ class ConfigDataCollector extends DataCollector private $kernel; private $name; private $version; - private $cacheVersionInfo = true; /** * @param string $name The name of the application using the web profiler @@ -123,7 +122,7 @@ class ConfigDataCollector extends DataCollector public function setCacheVersionInfo($cacheVersionInfo) { - $this->cacheVersionInfo = $cacheVersionInfo; + // no-op for BC } /** diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Store.php b/src/Symfony/Component/HttpKernel/HttpCache/Store.php index 8eeb93192c..fa0d4a8671 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Store.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Store.php @@ -151,7 +151,7 @@ class Store implements StoreInterface return; } - list($req, $headers) = $match; + $headers = $match[1]; if (file_exists($body = $this->getPath($headers['x-content-digest'][0]))) { return $this->restoreResponse($headers, $body); } diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php index b6dfb70c1b..6d9f65d0ac 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php @@ -24,7 +24,6 @@ class ConfigDataCollectorTest extends TestCase { $kernel = new KernelForTest('test', true); $c = new ConfigDataCollector(); - $c->setCacheVersionInfo(false); $c->setKernel($kernel); $c->collect(new Request(), new Response()); diff --git a/src/Symfony/Component/Process/Pipes/AbstractPipes.php b/src/Symfony/Component/Process/Pipes/AbstractPipes.php index d46a861388..9a23d93c98 100644 --- a/src/Symfony/Component/Process/Pipes/AbstractPipes.php +++ b/src/Symfony/Component/Process/Pipes/AbstractPipes.php @@ -94,7 +94,7 @@ abstract class AbstractPipes implements PipesInterface $w = array($this->pipes[0]); // let's have a look if something changed in streams - if (false === $n = @stream_select($r, $w, $e, 0, 0)) { + if (false === @stream_select($r, $w, $e, 0, 0)) { return; } diff --git a/src/Symfony/Component/Process/Pipes/UnixPipes.php b/src/Symfony/Component/Process/Pipes/UnixPipes.php index b5b88358a4..65f32ecf27 100644 --- a/src/Symfony/Component/Process/Pipes/UnixPipes.php +++ b/src/Symfony/Component/Process/Pipes/UnixPipes.php @@ -99,7 +99,7 @@ class UnixPipes extends AbstractPipes unset($r[0]); // let's have a look if something changed in streams - if (($r || $w) && false === $n = @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { + if (($r || $w) && false === @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { // if a system call has been interrupted, forget about it, let's try again // otherwise, an error occurred, let's reset pipes if (!$this->hasSystemCallBeenInterrupted()) { diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php index 3d5181f09a..318a0a4a68 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php @@ -26,8 +26,6 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; */ class LegacyExecutionContext extends ExecutionContext { - private $metadataFactory; - /** * Creates a new context. * @@ -44,7 +42,5 @@ class LegacyExecutionContext extends ExecutionContext $translator, $translationDomain ); - - $this->metadataFactory = $metadataFactory; } } From 8bc2fbb934fc1dff897acfc206aaf10835cbfb68 Mon Sep 17 00:00:00 2001 From: Titouan Galopin Date: Fri, 8 Dec 2017 14:17:14 +0100 Subject: [PATCH 20/21] Remove some unused variables and properties --- .../RegisterEventListenersAndSubscribersPass.php | 2 +- src/Symfony/Component/Dotenv/Dotenv.php | 2 +- .../DataTransformer/DateIntervalToStringTransformer.php | 7 ++----- .../RemoveEmptyControllerArgumentLocatorsPass.php | 2 +- src/Symfony/Component/Serializer/Encoder/JsonDecode.php | 3 +-- src/Symfony/Component/Serializer/Encoder/JsonEncode.php | 3 +-- .../Validator/Test/ConstraintValidatorTestCase.php | 3 +-- 7 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php index f918d0d211..e7015fd1e4 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php @@ -112,7 +112,7 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface } $instance['event'] = array($instance['event']); - if ($lazy = !empty($instance['lazy'])) { + if (!empty($instance['lazy'])) { $this->container->getDefinition($id)->setPublic(true); } } diff --git a/src/Symfony/Component/Dotenv/Dotenv.php b/src/Symfony/Component/Dotenv/Dotenv.php index dde92f46af..3ae735c7db 100644 --- a/src/Symfony/Component/Dotenv/Dotenv.php +++ b/src/Symfony/Component/Dotenv/Dotenv.php @@ -112,7 +112,7 @@ final class Dotenv $this->end = strlen($this->data); $this->state = self::STATE_VARNAME; $this->values = array(); - $name = $value = ''; + $name = ''; $this->skipEmptyLines(); diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php index dffe146623..4624e585e7 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateIntervalToStringTransformer.php @@ -23,20 +23,17 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException; class DateIntervalToStringTransformer implements DataTransformerInterface { private $format; - private $parseSigned; /** * Transforms a \DateInterval instance to a string. * * @see \DateInterval::format() for supported formats * - * @param string $format The date format - * @param bool $parseSigned Whether to parse as a signed interval + * @param string $format The date format */ - public function __construct($format = 'P%yY%mM%dDT%hH%iM%sS', $parseSigned = false) + public function __construct($format = 'P%yY%mM%dDT%hH%iM%sS') { $this->format = $format; - $this->parseSigned = $parseSigned; } /** diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php index 440b0d0025..ab50cec353 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php @@ -50,7 +50,7 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface $action = substr(strrchr($controller, ':'), 1); $id = substr($controller, 0, -1 - strlen($action)); $controllerDef = $container->getDefinition($id); - foreach ($controllerDef->getMethodCalls() as list($method, $args)) { + foreach ($controllerDef->getMethodCalls() as list($method)) { if (0 === strcasecmp($action, $method)) { $reason = sprintf('Removing method "%s" of service "%s" from controller candidates: the method is called at instantiation, thus cannot be an action.', $action, $id); break; diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 213caab9fe..455d1378c3 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -24,7 +24,6 @@ class JsonDecode implements DecoderInterface private $associative; private $recursionDepth; - private $lastError = JSON_ERROR_NONE; /** * Constructs a new JsonDecode instance. @@ -75,7 +74,7 @@ class JsonDecode implements DecoderInterface $decodedData = json_decode($data, $associative, $recursionDepth, $options); - if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) { + if (JSON_ERROR_NONE !== json_last_error()) { throw new UnexpectedValueException(json_last_error_msg()); } diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index 620193f206..6ed558f7dc 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -21,7 +21,6 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException; class JsonEncode implements EncoderInterface { private $options; - private $lastError = JSON_ERROR_NONE; public function __construct($bitmask = 0) { @@ -39,7 +38,7 @@ class JsonEncode implements EncoderInterface $encodedJson = json_encode($data, $context['json_encode_options']); - if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) { + if (JSON_ERROR_NONE !== json_last_error()) { throw new UnexpectedValueException(json_last_error_msg()); } diff --git a/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php b/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php index c2932f81e8..8e3b2a9f79 100644 --- a/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php +++ b/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php @@ -227,7 +227,6 @@ class ConstraintViolationAssertion private $parameters = array(); private $invalidValue = 'InvalidValue'; private $propertyPath = 'property.path'; - private $translationDomain; private $plural; private $code; private $constraint; @@ -264,7 +263,7 @@ class ConstraintViolationAssertion public function setTranslationDomain($translationDomain) { - $this->translationDomain = $translationDomain; + // no-op for BC return $this; } From 362f9bcb6f357ace73b9b7d72074a4faea772efd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 8 Dec 2017 16:04:33 +0100 Subject: [PATCH 21/21] [appveyor] disable memory limit on composer up --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a1ba60ac1b..6cee17f6fe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,7 +51,7 @@ install: - copy /Y .composer\* %APPDATA%\Composer\ - php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit - IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev) - - php composer.phar update --no-progress --no-suggest --ansi + - php -dmemory_limit=-1 composer.phar update --no-progress --no-suggest --ansi - php phpunit install test_script: