From 1dcca1a8df40258168e22a58077873a87b3b623a Mon Sep 17 00:00:00 2001 From: Nicolas Macherey Date: Thu, 9 Jul 2015 13:44:18 +0200 Subject: [PATCH 01/27] =?UTF-8?q?[PropertyAccess]=C2=A0setValue=20&=20isWr?= =?UTF-8?q?itable=20loops=20must=20only=20stops=20on=20reference=20and=20o?= =?UTF-8?q?bject.=20References=20can=20also=20be=20arrays=20and=20if=20the?= =?UTF-8?q?=20loop=20stops=20the=20value=20is=20never=20set=20in=20the=20o?= =?UTF-8?q?bject.=20(Breaks=20since=202.6.5=20commit=20e3e4695)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This merge request fixes the following cases taht was working with version previous to 2.6.5: A class with a property myArray which can be a multi dimensional array can now be accesed using myArray[foo][bar][baz] Previously only myArray[foo] was working. The break is since commit e3e4695 This commit adds additionnal testing, and is rebased from 2.6 upstream --- .../PropertyAccess/PropertyAccessor.php | 4 +- .../Tests/Fixtures/TestClassIsWritable.php | 27 +++++++++++ .../Tests/Fixtures/TestClassSetValue.php | 32 +++++++++++++ .../Tests/PropertyAccessorTest.php | 45 ++++++++++++++++++- 4 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php create mode 100644 src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index f13a5c9175..182d9fc024 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -88,7 +88,7 @@ class PropertyAccessor implements PropertyAccessorInterface $this->writeProperty($objectOrArray, $property, $value); } - if ($propertyValues[$i][self::IS_REF]) { + if ($propertyValues[$i][self::IS_REF] && is_object($objectOrArray)) { return; } @@ -149,7 +149,7 @@ class PropertyAccessor implements PropertyAccessorInterface } } - if ($propertyValues[$i][self::IS_REF]) { + if ($propertyValues[$i][self::IS_REF] && is_object($objectOrArray)) { return true; } } diff --git a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php new file mode 100644 index 0000000000..d07c7c0fa8 --- /dev/null +++ b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests\Fixtures; + +class TestClassIsWritable +{ + protected $value; + + public function getValue() + { + return $this->value; + } + + public function __construct($value) + { + $this->value = $value; + } +} \ No newline at end of file diff --git a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php new file mode 100644 index 0000000000..638afee6af --- /dev/null +++ b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess\Tests\Fixtures; + +class TestClassSetValue +{ + protected $value; + + public function getValue() + { + return $this->value; + } + + public function setValue($value) + { + $this->value = $value; + } + + public function __construct($value) + { + $this->value = $value; + } +} \ No newline at end of file diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php index 9a5324f781..aedca2e822 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php @@ -16,6 +16,8 @@ use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClass; use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClassMagicCall; use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClassMagicGet; use Symfony\Component\PropertyAccess\Tests\Fixtures\Ticket5775Object; +use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClassSetValue; +use Symfony\Component\PropertyAccess\Tests\Fixtures\TestClassIsWritable; class PropertyAccessorTest extends \PHPUnit_Framework_TestCase { @@ -446,4 +448,45 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase $this->propertyAccessor->setValue($obj, 'publicProperty[foo][bar]', 'Updated'); $this->assertSame('Updated', $obj->publicProperty['foo']['bar']); } -} + + public function getReferenceChainObjectsForSetValue() + { + return array( + array(array('a' => array('b' => array('c' => 'old-value'))), '[a][b][c]', 'new-value'), + array(new TestClassSetValue(new TestClassSetValue('old-value')), 'value.value', 'new-value'), + array(new TestClassSetValue(array('a' => array('b' => array('c' => new TestClassSetValue('old-value'))))), 'value[a][b][c].value', 'new-value'), + array(new TestClassSetValue(array('a' => array('b' => 'old-value'))), 'value[a][b]', 'new-value'), + array(new \ArrayIterator(array('a' => array('b' => array('c' => 'old-value')))), '[a][b][c]', 'new-value'), + ); + + } + + /** + * @dataProvider getReferenceChainObjectsForSetValue + */ + public function testSetValueForReferenceChainIssue($object, $path, $value) + { + $this->propertyAccessor->setValue($object, $path, $value); + + $this->assertEquals($value, $this->propertyAccessor->getValue($object, $path)); + } + + public function getReferenceChainObjectsForIsWritable() + { + return array( + array(new TestClassIsWritable(array('a' => array('b' => 'old-value'))), 'value[a][b]', false), + array(new TestClassIsWritable(new \ArrayIterator(array('a' => array('b' => 'old-value')))), 'value[a][b]', true), + array(new TestClassIsWritable(array('a' => array('b' => array('c' => new TestClassSetValue('old-value'))))), 'value[a][b][c].value', true), + ); + + } + + /** + * @dataProvider getReferenceChainObjectsForIsWritable + */ + public function testIsWritableForReferenceChainIssue($object, $path, $value) + { + $this->assertEquals($value, $this->propertyAccessor->isWritable($object, $path)); + } + +} \ No newline at end of file From 38dc79faf31c3ee3f5b18f7f7eeb23796ea9b128 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 11:11:40 +0200 Subject: [PATCH 02/27] updated CHANGELOG for 2.3.31 --- CHANGELOG-2.3.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/CHANGELOG-2.3.md b/CHANGELOG-2.3.md index 84a17f9fdc..e261767b55 100644 --- a/CHANGELOG-2.3.md +++ b/CHANGELOG-2.3.md @@ -7,6 +7,37 @@ in 2.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/v2.3.0...v2.3.1 +* 2.3.31 (2015-07-13) + + * bug #15248 Added 'default' color (jaytaph) + * bug #15243 Reload the session after regenerating its id (jakzal) + * bug #15202 [Security] allow to use `method` in XML configs (xabbuh) + * bug #15223 [Finder] Command::addAtIndex() fails with Command instance argument (thunderer) + * bug #15220 [DependencyInjection] Freeze also FrozenParameterBag::remove (lyrixx) + * bug #15110 Add a way to reset the singleton (dawehner) + * bug #15163 Update DateTimeToArrayTransformer.php (zhil) + * bug #15150 [Translation] Azerbaijani language pluralization rule is wrong (shehi) + * bug #15146 Towards 100% HHVM compat (nicolas-grekas) + * bug #15069 [Form] Fixed: Data mappers always receive forms indexed by their names (webmozart) + * bug #15137 [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser (Rvanlaak, xabbuh) + * bug #15083 [DependencyInjection] Fail when dumping a Definition with no class nor factory (nicolas-grekas) + * bug #15127 [Validator] fix validation for Maestro UK card numbers (xabbuh) + * bug #15128 DbalLogger: Small nonutf8 array fix (vpetrovych, weaverryan) + * bug #15048 [Translation][Form][choice] empty_value shouldn't be translated when it has an empty value (Restless-ET) + * bug #15117 [Form] fixed sending non array data on submit to ResizeListener (BruceWouaigne) + * bug #15086 Fixed the regexp for the validator of Maestro-based credit/debit cards (javiereguiluz) + * bug #15058 [Console] Fix STDERR output text on IBM iSeries OS400 (johnkary) + * bug #15065 [Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern) (webmozart) + * bug #15039 [Translation][update cmd] taken account into bundle overrides path. (aitboudad) + * bug #14964 [bugfix][MonologBridge] WebProcessor: passing $extraFields to BaseWebProcessor (MacDada) + * bug #15027 [Form] Fixed: Filter non-integers when selecting entities by int ID (webmozart, nicolas-grekas) + * bug #15000 [Debug] Fix fatal-errors handling on HHVM (nicolas-grekas) + * bug #14897 Allow new lines in Messages translated with transchoice() (replacement for #14867) (azine) + * bug #14895 [Form] Support DateTimeImmutable in transform() (c960657) + * bug #14859 Improve the config validation in TwigBundle (stof) + * bug #14785 [BrowserKit] Fix bug when uri starts with http. (amouhzi) + * bug #14807 [Security][Acl] enforce string identifiers (xabbuh) + * 2.3.30 (2015-05-30) * bug #14262 [REVERTED] [TwigBundle] Refresh twig paths when resources change. (aitboudad) From 14e95b221a880a9717f1c44f20a8ff82addfb019 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 11:11:54 +0200 Subject: [PATCH 03/27] update CONTRIBUTORS for 2.3.31 --- CONTRIBUTORS.md | 113 ++++++++++++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 41 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f3397b53ec..af5724f4a7 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -15,11 +15,11 @@ Symfony is the result of the work of many people who made the code better - Christophe Coevoet (stof) - Jakub Zalas (jakubzalas) - Pascal Borreli (pborreli) + - Christian Flothmann (xabbuh) - Hugo Hamon (hhamon) - Joseph Bielawski (stloyd) - Karma Dordrak (drak) - Ryan Weaver (weaverryan) - - Christian Flothmann (xabbuh) - Lukas Kahwe Smith (lsmith) - Romain Neutron (romain) - Jeremy Mikola (jmikola) @@ -27,22 +27,23 @@ Symfony is the result of the work of many people who made the code better - Benjamin Eberlei (beberlei) - Igor Wiedler (igorw) - Martin Hasoň (hason) - - Eriksen Costa (eriksencosta) - Abdellatif Ait boudad (aitboudad) + - Eriksen Costa (eriksencosta) - Grégoire Pineau (lyrixx) - Wouter De Jong (wouterj) - Jonathan Wage (jwage) - Alexandre Salomé (alexandresalome) - William Durand (couac) + - Kévin Dunglas (dunglas) - ornicar - stealth35 ‏ (stealth35) - Alexander Mols (asm89) - - Kévin Dunglas (dunglas) - Bulat Shakirzyanov (avalanche123) - Francis Besset (francisbesset) - Saša Stamenković (umpirsky) - Henrik Bjørnskov (henrikbjorn) - Miha Vrhovnik + - Diego Saint Esteben (dii3g0) - Sarah Khalil (saro0h) - Konstantin Kudryashov (everzet) - Bilal Amarni (bamarni) @@ -55,15 +56,14 @@ Symfony is the result of the work of many people who made the code better - Arnout Boks (aboks) - Christian Raue - Michel Weimerskirch (mweimerskirch) - - Diego Saint Esteben (dii3g0) - Lee McDermott - Brandon Turner - Luis Cordova (cordoval) - Douglas Greenshields (shieldo) + - Kevin Bond (kbond) - Daniel Holmes (dholmes) - Bart van den Burg (burgov) - Jordan Alliot (jalliot) - - Kevin Bond (kbond) - John Wards (johnwards) - Fran Moreno (franmomu) - Antoine Hérault (herzult) @@ -71,6 +71,7 @@ Symfony is the result of the work of many people who made the code better - Gábor Egyed (1ed) - Arnaud Le Blanc (arnaud-lb) - Tim Nagel (merk) + - Maxime Steinhausser (ogizanagi) - Brice BERNARD (brikou) - marc.weistroff - lenar @@ -83,16 +84,16 @@ Symfony is the result of the work of many people who made the code better - excelwebzone - Jacob Dreesen (jdreesen) - Matthias Pigulla (mpdude) - - Fabien Pennequin (fabienpennequin) - - Peter Kokot (maastermedia) - - Peter Rehm (rpet) - - Michal Piotrowski (eventhorizon) - - Stefano Sala (stefano.sala) - Javier Eguiluz (javier.eguiluz) + - Fabien Pennequin (fabienpennequin) + - Peter Rehm (rpet) + - Peter Kokot (maastermedia) - Gordon Franke (gimler) - Robert Schönthal (digitalkaoz) - - Juti Noppornpitak (shiroyuki) - Dariusz Ruminski + - Michal Piotrowski (eventhorizon) + - Stefano Sala (stefano.sala) + - Juti Noppornpitak (shiroyuki) - Sebastian Hörl (blogsh) - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) @@ -102,10 +103,13 @@ Symfony is the result of the work of many people who made the code better - Pablo Godel (pgodel) - Eric GELOEN (gelo) - Jérémie Augustin (jaugustin) - - Rafael Dohms (rdohms) - - Tigran Azatyan (tigranazatyan) - Alexander Schwenn (xelaris) + - Rafael Dohms (rdohms) - Arnaud Kleinpeter (nanocom) + - Joshua Thijssen + - Vladimir Reznichenko (kalessil) + - Tigran Azatyan (tigranazatyan) + - Issei Murasawa (issei_m) - Richard Shank (iampersistent) - Clemens Tolboom - Helmer Aaviksoo @@ -113,15 +117,16 @@ Symfony is the result of the work of many people who made the code better - Hiromi Hishida (77web) - Matthieu Ouellette-Vachon (maoueh) - Michał Pipa (michal.pipa) - - Issei Murasawa (issei_m) - Amal Raghav (kertz) - Jonathan Ingram (jonathaningram) - Artur Kotyrba + - Iltar van der Berg - Rouven Weßling (realityking) - Andréia Bohner (andreia) - Dmitrii Chekaliuk (lazyhammer) - Clément JOBEILI (dator) - Dorian Villet (gnutix) + - Javier Spagnoletti (phansys) - Richard Miller (mr_r_miller) - hacfi (hifi) - Mario A. Alvarez Garcia (nomack84) @@ -136,21 +141,17 @@ Symfony is the result of the work of many people who made the code better - Larry Garfield (crell) - Martin Schuhfuß (usefulthink) - Thomas Rabaix (rande) - - Javier Spagnoletti (phansys) - Matthieu Bontemps (mbontemps) - Pierre Minnieur (pminnieur) - fivestar - Dominique Bongiraud - - Iltar van der Berg - Leszek Prabucki (l3l0) - François Zaninotto (fzaninotto) - Dustin Whittle (dustinwhittle) - jeff - - Maxime Steinhausser (ogizanagi) - - Joshua Thijssen - Justin Hileman (bobthecow) - Sven Paulus (subsven) - - Vladimir Reznichenko (kalessil) + - Warnar Boekkooi (boekkooi) - Lars Strojny (lstrojny) - Rui Marinho (ruimarinho) - Mikael Pajunen @@ -158,11 +159,14 @@ Symfony is the result of the work of many people who made the code better - Tugdual Saunier (tucksaun) - Sergey Linnik (linniksa) - Marcel Beerta (mazen) + - Vincent AUBERT (vincent) - julien pauli (jpauli) - Francois Zaninotto - Alexander Kotynia (olden) - Daniel Tschinder + - Alexander M. Turek (derrabus) - Elnur Abdurrakhimov (elnur) + - John Kary (johnkary) - Manuel Reinhard (sprain) - Danny Berger (dpb587) - Roman Marintšenko (inori) @@ -187,11 +191,10 @@ Symfony is the result of the work of many people who made the code better - Jeremy Livingston (jeremylivingston) - Nikita Konstantinov - Wodor Wodorski - - Vincent AUBERT (vincent) - Matthieu Auger (matthieuauger) + - Sébastien Lavoie (lavoiesl) - Beau Simensen (simensen) - Robert Kiss (kepten) - - John Kary (johnkary) - Ruben Gonzalez (rubenrua) - Kim Hemsø Rasmussen (kimhemsoe) - Florian Lonqueu-Brochard (florianlb) @@ -199,8 +202,8 @@ Symfony is the result of the work of many people who made the code better - Wouter Van Hecke - Peter Kruithof (pkruithof) - Michael Holm (hollo) - - Warnar Boekkooi (boekkooi) - Marc Weistroff (futurecat) + - Kristen Gilden (kgilden) - Chris Smith (cs278) - Florian Klein (docteurklein) - Manuel Kiessling (manuelkiessling) @@ -226,6 +229,7 @@ Symfony is the result of the work of many people who made the code better - Julien Galenski (ruian) - Bongiraud Dominique - janschoenherr + - Thomas Schulz (king2500) - Marco Pivetta (ocramius) - Ricard Clau (ricardclau) - Erin Millard @@ -235,18 +239,18 @@ Symfony is the result of the work of many people who made the code better - Vitaliy Zakharov (zakharovvi) - Tobias Sjösten (tobiassjosten) - Gyula Sallai (salla) - - Alexander M. Turek (derrabus) - Konstantin Myakshin (koc) - Inal DJAFAR (inalgnu) - Christian Gärtner (dagardner) + - Tomasz Kowalczyk (thunderer) + - Daniel Wehner - Felix Labrecque - Yaroslav Kiliba - - Sébastien Lavoie (lavoiesl) - Stepan Anchugov (kix) - Terje Bråten - - Kristen Gilden (kgilden) - Robbert Klarenbeek (robbertkl) - Blanchon Vincent (blanchonvincent) + - Dawid Nowak - hossein zolfi (ocean) - Clément Gautier (clementgautier) - Eduardo Gulias (egulias) @@ -261,6 +265,7 @@ 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) + - Hassan Amouhzi - Tamas Szijarto - Pavel Volokitin (pvolok) - Endre Fejes @@ -283,9 +288,9 @@ Symfony is the result of the work of many people who made the code better - Oscar Cubo Medina (ocubom) - Karel Souffriau - Christophe L. (christophelau) + - Massimiliano Arione (garak) - Anthon Pang (robocoder) - Jáchym Toušek - - Thomas Schulz (king2500) - Jannik Zschiesche (apfelbox) - Emanuele Gaspari (inmarelibero) - Dariusz Rumiński @@ -304,7 +309,6 @@ Symfony is the result of the work of many people who made the code better - Asier Illarramendi (doup) - Chris Sedlmayr (catchamonkey) - Seb Koelen - - Daniel Wehner - Christoph Mewes (xrstf) - Vitaliy Tverdokhlib (vitaliytv) - Ariel Ferrandini (aferrandini) @@ -313,7 +317,9 @@ Symfony is the result of the work of many people who made the code better - Jonas Flodén (flojon) - Christian Schmidt - Marcin Sikoń (marphi) + - Dominik Zogg (dominik.zogg) - franek (franek) + - Damien Alexandre (damienalexandre) - Adam Harvey - Alex Bakhturin - François-Xavier de Guillebon (de-gui_f) @@ -322,7 +328,6 @@ Symfony is the result of the work of many people who made the code better - Jérôme Macias (jeromemacias) - Fabian Lange (codingfabian) - Yoshio HANAWA - - Tomasz Kowalczyk (thunderer) - Sebastian Bergmann - Pablo Díez (pablodip) - Kevin McBride @@ -359,6 +364,7 @@ Symfony is the result of the work of many people who made the code better - Nils Adermann (naderman) - Gábor Fási - Benjamin Leveque (benji07) + - Ivan Kurnosov - sasezaki - Dawid Pakuła (zulusx) - Florian Rey (nervo) @@ -369,13 +375,14 @@ Symfony is the result of the work of many people who made the code better - Daniel Tschinder - Ryan - Alexander Deruwe (aderuwe) + - Dave Hulbert (dave1010) - François Pluchino (francoispluchino) - - Massimiliano Arione (garak) - Ivan Rey (ivanrey) - Marcin Chyłek (songoq) - Ned Schwartz - Ziumin - Lenar Lõhmus + - Benjamin Laugueux (yzalis) - Zach Badgett (zachbadgett) - Aurélien Fredouelle - Pavel Campr (pcampr) @@ -416,6 +423,7 @@ Symfony is the result of the work of many people who made the code better - David Fuhr - Kamil Kokot (pamil) - Rostyslav Kinash + - Maciej Malarz (malarzm) - Daisuke Ohata - Vincent Simonin - Stefan Warman @@ -428,7 +436,6 @@ Symfony is the result of the work of many people who made the code better - umpirski - Chris Heng (gigablah) - Ulumuddin Yunus (joenoez) - - Dominik Zogg (dominik.zogg) - Luc Vieillescazes (iamluc) - Johann Saunier (prophet777) - Antoine Corcy @@ -461,9 +468,11 @@ Symfony is the result of the work of many people who made the code better - Alexander Volochnev (exelenz) - Michael Piecko - yclian + - Sergio Santoro - Sebastian Grodzicki (sgrodzicki) - Pascal Helfenstein - Baldur Rensch (brensch) + - Vladyslav Petrovych - Alex Xandra Albert Sim - Yuen-Chi Lian - Besnik Br @@ -485,6 +494,7 @@ Symfony is the result of the work of many people who made the code better - Marc Morera (mmoreram) - Andrew Hilobok (hilobok) - Christian Soronellas (theunic) + - Romain Gautier (mykiwi) - Yosmany Garcia (yosmanyga) - Degory Valentine - Benoit Lévêque (benoit_leveque) @@ -501,7 +511,7 @@ Symfony is the result of the work of many people who made the code better - fago - Harm van Tilborg - Jan Prieser - - Damien Alexandre (damienalexandre) + - Artur Melo (restless) - James Michael DuPont - Tom Klingenberg - Christopher Hall (mythmakr) @@ -510,14 +520,17 @@ Symfony is the result of the work of many people who made the code better - Berny Cantos (xphere81) - Reen Lokum - Martin Parsiegla (spea) + - Possum + - Denis Charrier (brucewouaigne) - Quentin Schuler - Pierre Vanliefland (pvanliefland) - frost-nzcr4 + - Oskar Stark (oskarstark) - Abhoryo - Fabian Vogler (fabian) - Korvin Szanto + - MatTheCat - Maksim Kotlyar (makasim) - - Ivan Kurnosov - Neil Ferreira - Dmitry Parnas (parnas) - DQNEO @@ -541,10 +554,11 @@ Symfony is the result of the work of many people who made the code better - Shin Ohno (ganchiku) - Geert De Deckere (geertdd) - Jan Kramer (jankramer) + - Jean-Baptiste GOMOND (mjbgo) + - Richard van Laak (rvanlaak) - abdul malik ikhsan (samsonasik) - Henry Snoek (snoek09) - Timothée Barray (tyx) - - Benjamin Laugueux (yzalis) - Christian Morgan - Alexander Miehe (engerim) - Morgan Auchede (mauchede) @@ -578,6 +592,7 @@ Symfony is the result of the work of many people who made the code better - Raul Fraile (raulfraile) - sensio - Patrick Kaufmann + - Reece Fowell (reecefowell) - stefan.r - Matthieu Napoli (mnapoli) - Ben Ramsey (ramsey) @@ -594,22 +609,26 @@ Symfony is the result of the work of many people who made the code better - Michael Tibben - Sander Marechal - Radosław Benkel + - Gennady Telegin (gtelegin) - Marcos Sánchez - ttomor - Mei Gwilym (meigwilym) - Michael H. Arieli (excelwebzone) - Luciano Mammino (loige) - fabios + - Jérôme Vasseur - Sander Coolen (scoolen) - Nicolas Le Goff (nlegoff) - Manuele Menozzi - Anton Babenko (antonbabenko) - Irmantas Šiupšinskas (irmantas) + - Charles-Henri Bruyand - Danilo Silva - Zachary Tong (polyfractal) - Hryhorii Hrebiniuk - dantleech - Xavier Leune + - Christian Schmidt - Tero Alén (tero) - DerManoMann - Guillaume Royer @@ -671,12 +690,12 @@ Symfony is the result of the work of many people who made the code better - Marcin Chwedziak - Roland Franssen (ro0) - Tony Cosentino (tony-co) - - Maciej Malarz - Rodrigo Díez Villamuera (rodrigodiez) - e-ivanov - Jochen Bayer (jocl) - Jeremy Bush - wizhippo + - Diego Saint Esteben (dosten) - rpg600 - Péter Buri (burci) - Davide Borsatto (davide.borsatto) @@ -701,6 +720,7 @@ Symfony is the result of the work of many people who made the code better - Brooks Boyd - Roger Webb - Dmitriy Simushev + - Martin Hujer (martinhujer) - Max Voloshin (maxvoloshin) - Nicolas Fabre (nfabre) - Raul Rodriguez (raul782) @@ -747,6 +767,7 @@ Symfony is the result of the work of many people who made the code better - Tatsuya Tsuruoka - Ross Tuck - Kévin Gomez (kevin) + - azine - Dawid Sajdak - Ludek Stepan - Geoffrey Brier @@ -769,6 +790,7 @@ Symfony is the result of the work of many people who made the code better - Cédric Lahouste (rapotor) - Samuel Vogel (samuelvogel) - Berat Doğan + - twifty - Anthony Ferrara - ShiraNai7 - Janusz Jabłoński (yanoosh) @@ -812,6 +834,7 @@ Symfony is the result of the work of many people who made the code better - Samuel Gordalina (gordalina) - Max Romanovsky (maxromanovsky) - Mathieu Morlon + - Daniel Tschinder - Rafał Muszyński (rafmus90) - Timothy Anido (xanido) - Rick Prent @@ -829,7 +852,6 @@ Symfony is the result of the work of many people who made the code better - Thomas Chmielowiec (chmielot) - Jānis Lukss - rkerner - - Vladyslav Petrovych - Matthew J Mucklo - fdgdfg (psampaz) - Stéphane Seng @@ -846,6 +868,7 @@ Symfony is the result of the work of many people who made the code better - Jonathan Gough - Benjamin Bender - Konrad Mohrfeldt + - Lance Chen - kor3k kor3k (kor3k) - Stelian Mocanita (stelian) - Flavian (2much) @@ -877,7 +900,6 @@ Symfony is the result of the work of many people who made the code better - Adrian Olek (adrianolek) - Przemysław Piechota (kibao) - Leonid Terentyev (li0n) - - Oskar Stark (oskarstark) - Adam Prager (padam87) - ryunosuke - victoria @@ -892,7 +914,6 @@ Symfony is the result of the work of many people who made the code better - catch - Alexandre Segura - Josef Cech - - Possum - Arnau González (arnaugm) - Nate (frickenate) - Matthew Foster (mfoster) @@ -930,6 +951,7 @@ Symfony is the result of the work of many people who made the code better - Grayson Koonce (breerly) - Karim Cassam Chenaï (ka) - Nicolas Bastien (nicolas_bastien) + - Andrew Zhilin (zhil) - Andy Stanberry - Luiz “Felds” Liscia - Thomas Rothe @@ -937,11 +959,13 @@ Symfony is the result of the work of many people who made the code better - avi123 - alsar - Mike Meier + - michalmarcinkowski - Warwick - Chris - efeen - Michał Dąbrowski (defrag) - Simone Fumagalli (hpatoio) + - Brian Graham (incognito) - Kevin Vergauwen (innocenzo) - Alessio Baglio (ioalessio) - John Bafford (jbafford) @@ -960,7 +984,6 @@ Symfony is the result of the work of many people who made the code better - Daan van Renterghem - Bram Van der Sype (brammm) - Julien Moulin (lizjulien) - - Romain Gautier (mykiwi) - Nikita Nefedov (nikita2206) - Mauro Foti (skler) - Yannick Warnier (ywarnier) @@ -989,7 +1012,6 @@ Symfony is the result of the work of many people who made the code better - Mark de Haan (markdehaan) - Dan Patrick (mdpatrick) - Rares Vlaseanu (raresvla) - - Artur Melo (restless) - Sofiane HADDAG (sofhad) - tante kinast (tante) - Vincent LEFORT (vlefort) @@ -1013,7 +1035,6 @@ Symfony is the result of the work of many people who made the code better - Florian Pfitzer (marmelatze) - Martin Mayer (martin) - Grzegorz Łukaszewicz (newicz) - - Richard van Laak (rvanlaak) - grifx - Robert Campbell - Matt Lehner @@ -1022,6 +1043,7 @@ Symfony is the result of the work of many people who made the code better - Ruben Kruiswijk - Michael J - Joseph Maarek + - Alexander Menk - Alex Pods - timaschew - Ian Phillips @@ -1040,6 +1062,7 @@ Symfony is the result of the work of many people who made the code better - Maerlyn - Even André Fiskvik - Diego Agulló + - Gerrit Drost - Lenar Lõhmus - Cristian Gonzalez - Juan M Martínez @@ -1056,7 +1079,6 @@ Symfony is the result of the work of many people who made the code better - Jeroen Thora (bolle) - Masao Maeda (brtriver) - Darius Leskauskas (darles) - - Dave Hulbert (dave1010) - David Joos (djoos) - Denis Klementjev (dklementjev) - Tomáš Polívka (draczris) @@ -1085,6 +1107,7 @@ Symfony is the result of the work of many people who made the code better - akimsko - Youpie - srsbiz + - Taylan Kasap - Nicolas A. Bérard-Nault - Gladhon - Saem Ghani @@ -1108,6 +1131,7 @@ Symfony is the result of the work of many people who made the code better - Wotre - goohib - Xavier HAUSHERR + - Mantas Urnieža - Cas - Dusan Kasan - Myke79 @@ -1142,6 +1166,7 @@ Symfony is the result of the work of many people who made the code better - andreabreu98 - Michael Schneider - n-aleha + - Şəhriyar İmanov - Kaipi Yann - Sam Williams - Adrian Philipp @@ -1150,6 +1175,7 @@ Symfony is the result of the work of many people who made the code better - Ondrej Slinták - vlechemin - Brian Corrigan + - Ladislav Tánczos - Brian Freytag - Skorney - mieszko4 @@ -1175,6 +1201,7 @@ Symfony is the result of the work of many people who made the code better - Sergiy Sokolenko - dinitrol - Penny Leach + - Richard Trebichavský - g123456789l - Giorgio Premi - oscartv @@ -1200,6 +1227,7 @@ Symfony is the result of the work of many people who made the code better - Alex Olmos (alexolmos) - Antonio Mansilla (amansilla) - Juan Ases García (ases) + - Siragusa (asiragusa) - Daniel Basten (axhm3a) - DUPUCH (bdupuch) - Bill Hance (billhance) @@ -1239,6 +1267,7 @@ Symfony is the result of the work of many people who made the code better - Adam Monsen (meonkeys) - Ala Eddine Khefifi (nayzo) - emilienbouard (neime) + - Nicholas Byfleet (nickbyfleet) - ollie harridge (ollietb) - Paul Andrieux (paulandrieux) - Paweł Szczepanek (pauluz) @@ -1270,6 +1299,7 @@ Symfony is the result of the work of many people who made the code better - Jesper Søndergaard Pedersen (zerrvox) - Florent Cailhol - szymek + - Kovacs Nicolas - craigmarvelley - Stano Turza - simpson @@ -1281,6 +1311,7 @@ Symfony is the result of the work of many people who made the code better - fh-github@fholzhauer.de - Mark Topper - Xavier REN + - Zander Baldwin - Philipp Scheit - max - Mohamed Karnichi (amiral) From bd506a5e84fdce41966ef4986255fff1e31fc056 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 11:12:26 +0200 Subject: [PATCH 04/27] updated VERSION for 2.3.31 --- 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 5391021318..a6cc4e6001 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -60,12 +60,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.3.31-DEV'; + const VERSION = '2.3.31'; const VERSION_ID = '20331'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '3'; const RELEASE_VERSION = '31'; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; /** * Constructor. From 9962f36f97753b725c2c53d50b7c3159d0d1f560 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 11:30:54 +0200 Subject: [PATCH 05/27] bumped Symfony version to 2.3.32 --- 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 a6cc4e6001..5655275e53 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -60,12 +60,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.3.31'; - const VERSION_ID = '20331'; + const VERSION = '2.3.32-DEV'; + const VERSION_ID = '20332'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '3'; - const RELEASE_VERSION = '31'; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = '32'; + const EXTRA_VERSION = 'DEV'; /** * Constructor. From 524ccac97c9e3b180461cac46a9e14e27a60897d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 11:34:21 +0200 Subject: [PATCH 06/27] updated CHANGELOG for 2.6.10 --- CHANGELOG-2.6.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/CHANGELOG-2.6.md b/CHANGELOG-2.6.md index 8d179c384c..e466668f8f 100644 --- a/CHANGELOG-2.6.md +++ b/CHANGELOG-2.6.md @@ -7,6 +7,55 @@ in 2.6 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.6.0...v2.6.1 +* 2.6.10 (2015-07-13) + + * bug #15248 Added 'default' color (jaytaph) + * bug #15243 Reload the session after regenerating its id (jakzal) + * bug #15202 [Security] allow to use `method` in XML configs (xabbuh) + * bug #15218 [Twig][Bridge] replaced `extends` with `use` in bootstrap_3_horizontal_layout.html.twig (MatTheCat) + * bug #15223 [Finder] Command::addAtIndex() fails with Command instance argument (thunderer) + * bug #15220 [DependencyInjection] Freeze also FrozenParameterBag::remove (lyrixx) + * bug #15110 Add a way to reset the singleton (dawehner) + * bug #15115 [Validator] always evaluate binary format when changed (xabbuh) + * bug #15163 Update DateTimeToArrayTransformer.php (zhil) + * bug #15150 [Translation] Azerbaijani language pluralization rule is wrong (shehi) + * bug #15159 Towards 100% HHVM compat (nicolas-grekas) + * bug #15146 Towards 100% HHVM compat (nicolas-grekas) + * bug #15069 [Form] Fixed: Data mappers always receive forms indexed by their names (webmozart) + * bug #15137 [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser (Rvanlaak, xabbuh) + * bug #15126 [Validator] Fix BC for Validator's validate method (michalmarcinkowski) + * bug #15083 [DependencyInjection] Fail when dumping a Definition with no class nor factory (nicolas-grekas) + * bug #15127 [Validator] fix validation for Maestro UK card numbers (xabbuh) + * bug #15128 DbalLogger: Small nonutf8 array fix (vpetrovych, weaverryan) + * bug #15048 [Translation][Form][choice] empty_value shouldn't be translated when it has an empty value (Restless-ET) + * bug #15117 [Form] fixed sending non array data on submit to ResizeListener (BruceWouaigne) + * bug #15102 [Translation][debug cmd] fixed failing tests. (aitboudad) + * bug #13750 [DependencyInjection] Fixed decoration of service for service with parent (hason) + * bug #15086 Fixed the regexp for the validator of Maestro-based credit/debit cards (javiereguiluz) + * bug #15058 [Console] Fix STDERR output text on IBM iSeries OS400 (johnkary) + * bug #14853 [Validator] more strict e-mail validation regex (xabbuh) + * bug #15065 [Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern) (webmozart) + * bug #15039 [Translation][update cmd] taken account into bundle overrides path. (aitboudad) + * bug #15038 [Translation][debug cmd] taken account into bundle overrides path. (aitboudad) + * bug #14964 [bugfix][MonologBridge] WebProcessor: passing $extraFields to BaseWebProcessor (MacDada) + * bug #15036 [VarDumper] Fix dump output for better readability (nicolas-grekas) + * bug #15027 [Form] Fixed: Filter non-integers when selecting entities by int ID (webmozart, nicolas-grekas) + * bug #15000 [Debug] Fix fatal-errors handling on HHVM (nicolas-grekas) + * bug #14999 [Debug] Fix fatal-errors handling on HHVM (nicolas-grekas, digitalkaoz) + * bug #14959 [Debug+VarDumper] Fix handling of PHP7 "Throwable" exceptions (nicolas-grekas) + * bug #15010 [Debug] Fix log level of stacked errors (nicolas-grekas) + * bug #15017 [VarDumper] Fix uninitialized id in HtmlDumper (nicolas-grekas) + * bug #14980 Fixed fluent interface (jaytaph) + * bug #14974 [Security][Translation] #14920 update translations (vincentaubert) + * bug #14930 Bug #14836 [HttpFoundation] Moves default JSON encoding assignment fr… (Incognito) + * bug #14897 Allow new lines in Messages translated with transchoice() (replacement for #14867) (azine) + * bug #14895 [Form] Support DateTimeImmutable in transform() (c960657) + * bug #14891 without this change allways the legacy code get called (dominikzogg) + * bug #14859 Improve the config validation in TwigBundle (stof) + * bug #14785 [BrowserKit] Fix bug when uri starts with http. (amouhzi) + * bug #14807 [Security][Acl] enforce string identifiers (xabbuh) + * bug #14808 [WebProfilerBundle][logger] added missing deprecation message. (aitboudad) + * 2.6.9 (2015-05-30) * bug #14777 Avoid using the app global variable in the profiler templates (stof) From e246af5f3bdf64fa5a85936ee78e3574e094cf5f Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 11:34:32 +0200 Subject: [PATCH 07/27] updated VERSION for 2.6.10 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 3efc7d52ea..99dd895a96 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -60,12 +60,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.6.10-DEV'; + const VERSION = '2.6.10'; const VERSION_ID = '20610'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '6'; const RELEASE_VERSION = '10'; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; /** * Constructor. From 1e668dd8058b12c4fb787907eb0ca5518ad304d8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 11:49:29 +0200 Subject: [PATCH 08/27] bumped Symfony version to 2.6.11 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 99dd895a96..7bae3bc5ce 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -60,12 +60,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.6.10'; - const VERSION_ID = '20610'; + const VERSION = '2.6.11-DEV'; + const VERSION_ID = '20611'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '6'; - const RELEASE_VERSION = '10'; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = '11'; + const EXTRA_VERSION = 'DEV'; /** * Constructor. From e816d28a065925c4ecad07fd40201c753ccef060 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 20:24:43 +0200 Subject: [PATCH 09/27] updated CHANGELOG for 2.7.2 --- CHANGELOG-2.7.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md index 1d6ef7e6a0..ed61259f28 100644 --- a/CHANGELOG-2.7.md +++ b/CHANGELOG-2.7.md @@ -7,6 +7,60 @@ 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.2 (2015-07-13) + + * bug #15248 Added 'default' color (jaytaph) + * bug #15243 Reload the session after regenerating its id (jakzal) + * bug #15176 [Serializer] Fix ClassMetadata::sleep() (dunglas) + * bug #15202 [Security] allow to use `method` in XML configs (xabbuh) + * bug #15218 [Twig][Bridge] replaced `extends` with `use` in bootstrap_3_horizontal_layout.html.twig (MatTheCat) + * bug #15223 [Finder] Command::addAtIndex() fails with Command instance argument (thunderer) + * bug #15220 [DependencyInjection] Freeze also FrozenParameterBag::remove (lyrixx) + * bug #15110 Add a way to reset the singleton (dawehner) + * bug #15183 [TwigBridge] fix for legacy asset() with EmptyVersionStrategy (xabbuh) + * bug #15115 [Validator] always evaluate binary format when changed (xabbuh) + * bug #15163 Update DateTimeToArrayTransformer.php (zhil) + * bug #15150 [Translation] Azerbaijani language pluralization rule is wrong (shehi) + * bug #15159 Towards 100% HHVM compat (nicolas-grekas) + * bug #15146 Towards 100% HHVM compat (nicolas-grekas) + * bug #15061 [Form] Fixed handling of choices passed in choice groups (webmozart) + * bug #15145 [Bridge/PhpUnit] Enforce a consistent locale (nicolas-grekas) + * bug #15069 [Form] Fixed: Data mappers always receive forms indexed by their names (webmozart) + * bug #15137 [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser (Rvanlaak, xabbuh) + * bug #15142 Fix choice translation domain for expanded choice widget (jvasseur) + * bug #15126 [Validator] Fix BC for Validator's validate method (michalmarcinkowski) + * bug #15101 [Form] Fixed compatibility with FormTypeInterface implementations that don't extend AbstractType (webmozart) + * bug #15083 [DependencyInjection] Fail when dumping a Definition with no class nor factory (nicolas-grekas) + * bug #15127 [Validator] fix validation for Maestro UK card numbers (xabbuh) + * bug #15128 DbalLogger: Small nonutf8 array fix (vpetrovych, weaverryan) + * bug #15048 [Translation][Form][choice] empty_value shouldn't be translated when it has an empty value (Restless-ET) + * bug #15117 [Form] fixed sending non array data on submit to ResizeListener (BruceWouaigne) + * bug #15122 [Console] respect multi-character shortcuts (xabbuh) + * bug #15012 [Validator] don't trigger deprecation with empty group array (xabbuh) + * bug #15102 [Translation][debug cmd] fixed failing tests. (aitboudad) + * bug #13750 [DependencyInjection] Fixed decoration of service for service with parent (hason) + * bug #15086 Fixed the regexp for the validator of Maestro-based credit/debit cards (javiereguiluz) + * bug #15058 [Console] Fix STDERR output text on IBM iSeries OS400 (johnkary) + * bug #14853 [Validator] more strict e-mail validation regex (xabbuh) + * bug #15064 [Form] Fixed: Support objects with __toString() in choice groups (webmozart) + * bug #15065 [Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern) (webmozart) + * bug #15039 [Translation][update cmd] taken account into bundle overrides path. (aitboudad) + * bug #15038 [Translation][debug cmd] taken account into bundle overrides path. (aitboudad) + * bug #14964 [bugfix][MonologBridge] WebProcessor: passing $extraFields to BaseWebProcessor (MacDada) + * bug #14989 [FrameworkBundle] Reuse PropertyAccessor service for ObjectNormalizer (dunglas) + * bug #15036 [VarDumper] Fix dump output for better readability (nicolas-grekas) + * bug #15031 [PhpUnitBridge] Enforce @-silencing of deprecation notices according to new policy (nicolas-grekas) + * bug #15027 [Form] Fixed: Filter non-integers when selecting entities by int ID (webmozart, nicolas-grekas) + * bug #15000 [Debug] Fix fatal-errors handling on HHVM (nicolas-grekas) + * bug #14999 [Debug] Fix fatal-errors handling on HHVM (nicolas-grekas, digitalkaoz) + * bug #14959 [Debug+VarDumper] Fix handling of PHP7 "Throwable" exceptions (nicolas-grekas) + * bug #15010 [Debug] Fix log level of stacked errors (nicolas-grekas) + * bug #15017 [VarDumper] Fix uninitialized id in HtmlDumper (nicolas-grekas) + * bug #14980 Fixed fluent interface (jaytaph) + * bug #14974 [Security][Translation] #14920 update translations (vincentaubert) + * bug #14950 [Form] Fixed: Filter non-integers when selecting entities by int ID (webmozart) + * bug #14930 Bug #14836 [HttpFoundation] Moves default JSON encoding assignment fr… (Incognito) + * 2.7.1 (2015-06-11) * bug #14835 [DependencyInjection] Fixed resolving of service configurators containing Definition objects (webmozart) From 969d709ad428076bf1084e386dc26dd904d9fb84 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 21:27:49 +0200 Subject: [PATCH 10/27] updated VERSION for 2.7.2 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 2da885a815..73c4b8b419 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -60,12 +60,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.2-DEV'; + const VERSION = '2.7.2'; const VERSION_ID = '20702'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '7'; const RELEASE_VERSION = '2'; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; From 095bfd61ca0d68f04f4121c18aa4518cb28e960c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 13 Jul 2015 22:39:19 +0200 Subject: [PATCH 11/27] bumped Symfony version to 2.7.3 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 73c4b8b419..b9e6a52c13 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -60,12 +60,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.2'; - const VERSION_ID = '20702'; + const VERSION = '2.7.3-DEV'; + const VERSION_ID = '20703'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '7'; - const RELEASE_VERSION = '2'; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = '3'; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; From 3fcf61e664ccb12e9dd8ae98b33418cbfd095460 Mon Sep 17 00:00:00 2001 From: Sebastiaan Stok Date: Tue, 14 Jul 2015 11:47:38 +0200 Subject: [PATCH 12/27] fix broken ChoiceQuestion --- src/Symfony/Component/Console/Question/ChoiceQuestion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Question/ChoiceQuestion.php b/src/Symfony/Component/Console/Question/ChoiceQuestion.php index a61b410d51..a36c739e56 100644 --- a/src/Symfony/Component/Console/Question/ChoiceQuestion.php +++ b/src/Symfony/Component/Console/Question/ChoiceQuestion.php @@ -162,7 +162,7 @@ class ChoiceQuestion extends Question throw new \InvalidArgumentException(sprintf($errorMessage, $value)); } - $multiselectChoices[] = $choices[(string) $result]; + $multiselectChoices[] = (string) $result; } if ($multiselect) { From 03642b8ffeaf68b25a61308a7ee9f60e3993bdba Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 14 Jul 2015 19:21:52 +0100 Subject: [PATCH 13/27] [Form] Fix a BC break in the entity --- .../Doctrine/Form/Type/DoctrineType.php | 2 +- .../Tests/Form/Type/EntityTypeTest.php | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php index 2c5012dedf..f84d4965bf 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php @@ -87,7 +87,7 @@ abstract class DoctrineType extends AbstractType */ public static function createChoiceName($choice, $key, $value) { - return (string) $value; + return str_replace('-', '_', (string) $value); } /** diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index e22db0093c..b9680b45e5 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -495,6 +495,31 @@ class EntityTypeTest extends TypeTestCase $this->assertSame('3', $field['3']->getViewData()); } + public function testSubmitMultipleExpandedWithNegativeIntegerId() + { + $entity1 = new SingleIntIdEntity(-1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + + $field = $this->factory->createNamed('name', 'entity', null, array( + 'multiple' => true, + 'expanded' => true, + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'choice_label' => 'name', + )); + + $field->submit(array('-1')); + + $expected = new ArrayCollection(array($entity1)); + + $this->assertTrue($field->isSynchronized()); + $this->assertEquals($expected, $field->getData()); + $this->assertTrue($field['_1']->getData()); + $this->assertFalse($field['2']->getData()); + } + public function testOverrideChoices() { $entity1 = new SingleIntIdEntity(1, 'Foo'); From 23bc2649ba7b155e846d11e9e4f88ae1d850ff3b Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 15 Jul 2015 08:34:36 +0100 Subject: [PATCH 14/27] [Console] Set QuestionHelper max attempts in tests Otherwise the process will block if a test fails. --- .../Component/Console/Tests/Helper/QuestionHelperTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php index 99c89edc0e..a1f85b1740 100644 --- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -36,15 +36,18 @@ class QuestionHelperTest extends \PHPUnit_Framework_TestCase $questionHelper->setInputStream($this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n")); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '2'); + $question->setMaxAttempts(1); // first answer is an empty answer, we're supposed to receive the default value $this->assertEquals('Spiderman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); + $question->setMaxAttempts(1); $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); $question->setErrorMessage('Input "%s" is not a superhero!'); + $question->setMaxAttempts(2); $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); rewind($output->getStream()); @@ -61,6 +64,7 @@ class QuestionHelperTest extends \PHPUnit_Framework_TestCase } $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, null); + $question->setMaxAttempts(1); $question->setMultiselect(true); $this->assertEquals(array('Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); @@ -68,11 +72,13 @@ class QuestionHelperTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1'); + $question->setMaxAttempts(1); $question->setMultiselect(true); $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 '); + $question->setMaxAttempts(1); $question->setMultiselect(true); $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); @@ -227,6 +233,7 @@ class QuestionHelperTest extends \PHPUnit_Framework_TestCase $dialog->setHelperSet($helperSet); $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); + $question->setMaxAttempts(1); $answer = $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); $this->assertSame($expectedValue, $answer); From ba6000baff99addb29890b134fabb4792be506dd Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Wed, 15 Jul 2015 10:22:14 +0200 Subject: [PATCH 15/27] [HttpFoundation] Behaviour change in PHP7 for substr In PHP7 the behaviour of substr() changed. To resume: "Truncating an entire string should result in a string." See: https://bugs.php.net/bug.php?id=62922 --- src/Symfony/Component/HttpFoundation/Request.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 84b3a69ade..3b31d8e593 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1790,7 +1790,8 @@ class Request $requestUri = substr($requestUri, 0, $pos); } - if (null !== $baseUrl && false === $pathInfo = substr($requestUri, strlen($baseUrl))) { + $pathInfo = substr($requestUri, strlen($baseUrl)); + if (null !== $baseUrl && (false === $pathInfo || '' === $pathInfo)) { // If substr() returns false then PATH_INFO is set to an empty string return '/'; } elseif (null === $baseUrl) { From 7fa79dadbad26f4091742dde8800f001941bf3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 15 Jul 2015 23:26:13 +0200 Subject: [PATCH 16/27] [DependencyInjection] Remove unused code in XmlFileLoader --- .../Component/DependencyInjection/Loader/XmlFileLoader.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 08067fa798..95470ce7f7 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -48,7 +48,7 @@ class XmlFileLoader extends FileLoader $this->parseImports($xml, $path); // parameters - $this->parseParameters($xml, $path); + $this->parseParameters($xml); // extensions $this->loadFromExtensions($xml); @@ -69,9 +69,8 @@ class XmlFileLoader extends FileLoader * Parses parameters. * * @param SimpleXMLElement $xml - * @param string $file */ - private function parseParameters(SimpleXMLElement $xml, $file) + private function parseParameters(SimpleXMLElement $xml) { if (!$xml->parameters) { return; From b65d0a26eaf37994a180cfdc5fe44f784cdeac55 Mon Sep 17 00:00:00 2001 From: Alexander Schwenn Date: Tue, 7 Apr 2015 23:28:35 +0200 Subject: [PATCH 17/27] [WebProfilerBundle] Add link to show profile of latest request --- .../Controller/ProfilerController.php | 4 ++++ .../Resources/views/Profiler/info.html.twig | 15 +++++++++++---- .../Resources/views/Profiler/layout.html.twig | 1 + .../Resources/views/Profiler/profiler.css.twig | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 2748910a19..cada4ee6ca 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -91,6 +91,10 @@ class ProfilerController $panel = $request->query->get('panel', 'request'); $page = $request->query->get('page', 'home'); + if ('latest' === $token && $latest = current($this->profiler->find(null, null, 1, null, null, null))) { + $token = $latest['token']; + } + if (!$profile = $this->profiler->loadProfile($token)) { return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array('about' => 'no_token', 'token' => $token)), 200, array('Content-Type' => 'text/html')); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig index aeffb2cf25..9be617a3ec 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/info.html.twig @@ -25,10 +25,17 @@ The token already exists in the database.

{% elseif about == 'no_token' %} -

Token not found

-

- Token "{{ token }}" was not found in the database. -

+ {% if token == 'latest' %} +

No profiles

+

+ No profiles found in the database. +

+ {% else %} +

Token not found

+

+ Token "{{ token }}" was not found in the database. +

+ {% endif %} {% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig index 12728b964d..6df82890c1 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig @@ -14,6 +14,7 @@ {% if profile %}
View last 10 + View latest Profile for: {{ profile.method|upper }} {% if profile.method|upper in ['GET', 'HEAD'] %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig index 4d84a6931c..fd32565347 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig @@ -217,7 +217,7 @@ li { border-top-right-radius: 16px; line-height: 18px; } -a#resume-view-all { +a#resume-view-all, a#resume-view-latest { display: inline-block; padding: 0.2em 0.7em; margin-right: 0.5em; From 1adb065d7017f07d6b79d345b7bd33448d426959 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 16 Jul 2015 10:43:55 +0200 Subject: [PATCH 18/27] [HttpFoundation] Fix Response::closeOutputBuffers() for HHVM 3.3 --- src/Symfony/Component/HttpFoundation/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index dc7203a8d1..17fb98102b 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -1242,7 +1242,7 @@ class Response { $status = ob_get_status(true); $level = count($status); - $flags = PHP_VERSION_ID >= 50400 ? PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE) : -1; + $flags = defined('PHP_OUTPUT_HANDLER_REMOVABLE') ? PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE) : -1; while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || $flags === ($s['flags'] & $flags) : $s['del'])) { if ($flush) { From ba129041ba19b6d5a62cfa34789d3b05e6efbacf Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 16 Jul 2015 09:25:41 +0100 Subject: [PATCH 19/27] [DependencyInjection] Forbid container cloning --- .../Component/DependencyInjection/Container.php | 4 ++++ .../DependencyInjection/Tests/ContainerTest.php | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 2b9fc5f487..0222d7063b 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -604,4 +604,8 @@ class Container implements IntrospectableContainerInterface { return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($id, '_', '.'))); } + + private function __clone() + { + } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php index 603269ccc6..09b4a12e2f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -662,6 +662,16 @@ class ContainerTest extends \PHPUnit_Framework_TestCase $this->assertTrue($c->has('alias')); $this->assertSame($c->get('alias'), $c->get('bar')); } + + public function testThatCloningIsNotSupported() + { + $class = new \ReflectionClass('Symfony\Component\DependencyInjection\Container'); + $clone = $class->getMethod('__clone'); + if (PHP_VERSION_ID >= 540000) { + $this->assertFalse($class->isCloneable()); + } + $this->assertTrue($clone->isPrivate()); + } } class ProjectServiceContainer extends Container From 059964daf33055015d42365f5404d7d97afc1afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 9 Jul 2015 11:23:44 +0200 Subject: [PATCH 20/27] [HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content --- .../Component/HttpFoundation/Request.php | 52 +++++++++++++------ .../HttpFoundation/Tests/RequestTest.php | 21 +++++++- 2 files changed, 57 insertions(+), 16 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 84b3a69ade..2d282517f7 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -199,13 +199,13 @@ class Request /** * Constructor. * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string $content The raw body data + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @param string|resource $content The raw body data * * @api */ @@ -219,13 +219,13 @@ class Request * * This method also re-initializes all properties. * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string $content The raw body data + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @param string|resource $content The raw body data * * @api */ @@ -1465,16 +1465,38 @@ class Request */ public function getContent($asResource = false) { - if (PHP_VERSION_ID < 50600 && (false === $this->content || (true === $asResource && null !== $this->content))) { + $currentContentIsResource = is_resource($this->content); + if (PHP_VERSION_ID < 50600 && false === $this->content) { throw new \LogicException('getContent() can only be called once when using the resource return type and PHP below 5.6.'); } if (true === $asResource) { + if ($currentContentIsResource) { + rewind($this->content); + + return $this->content; + } + + // Content passed in parameter (test) + if (is_string($this->content)) { + $resource = fopen('php://temp','r+'); + fwrite($resource, $this->content); + rewind($resource); + + return $resource; + } + $this->content = false; return fopen('php://input', 'rb'); } + if ($currentContentIsResource) { + rewind($this->content); + + return stream_get_contents($this->content); + } + if (null === $this->content) { $this->content = file_get_contents('php://input'); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index 366b555f92..797a00acda 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -923,6 +923,26 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertTrue(feof($retval)); } + public function testGetContentReturnsResourceWhenContentSetInConstructor() + { + $req = new Request(array(), array(), array(), array(), array(), array(), 'MyContent'); + $resource = $req->getContent(true); + + $this->assertTrue(is_resource($resource)); + $this->assertEquals('MyContent', stream_get_contents($resource)); + } + + public function testContentAsResource() + { + $resource = fopen('php://memory','r+'); + fwrite($resource, 'My other content'); + rewind($resource); + + $req = new Request(array(), array(), array(), array(), array(), array(), $resource); + $this->assertEquals('My other content', stream_get_contents($req->getContent(true))); + $this->assertEquals('My other content', $req->getContent()); + } + /** * @expectedException \LogicException * @dataProvider getContentCantBeCalledTwiceWithResourcesProvider @@ -967,7 +987,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase return array( 'Resource then fetch' => array(true, false), 'Resource then resource' => array(true, true), - 'Fetch then resource' => array(false, true), ); } From 72dce303095ace5643a8e1e2859a9f986ceb3a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 19 Jul 2015 14:40:25 +0200 Subject: [PATCH 21/27] [Serializer] Simplify AbstractNormalizer::prepareForDenormalization() --- .../Serializer/Normalizer/AbstractNormalizer.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index 78c82ff990..4de4771770 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -272,19 +272,7 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N */ protected function prepareForDenormalization($data) { - if (is_array($data) || is_object($data) && $data instanceof \ArrayAccess) { - $normalizedData = $data; - } elseif (is_object($data)) { - $normalizedData = array(); - - foreach ($data as $attribute => $value) { - $normalizedData[$attribute] = $value; - } - } else { - $normalizedData = array(); - } - - return $normalizedData; + return (array) $data; } /** From 6ecc38afd41c36b95c8e8e14adf9b30426a10deb Mon Sep 17 00:00:00 2001 From: Kevin Robatel Date: Tue, 21 Jul 2015 16:40:08 +0200 Subject: [PATCH 22/27] Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7 --- UPGRADE-2.7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE-2.7.md b/UPGRADE-2.7.md index ab1021fcdc..8fd61b41fd 100644 --- a/UPGRADE-2.7.md +++ b/UPGRADE-2.7.md @@ -599,7 +599,7 @@ FrameworkBundle * The `templating.helper.assets` was refactored and returns now an object of the type `Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper` instead of `Symfony\Component\Templating\Helper\CoreAssetsHelper`. You can update your class definition - or use the `assets.package` service instead. Using the `assets.package` service is the recommended + or use the `assets.packages` service instead. Using the `assets.packages` service is the recommended way. The `templating.helper.assets` service will be removed in Symfony 3.0. Before: From 1c9b43396f992f0aa89b6395a908e47bc5bfdb2e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 21 Jul 2015 15:40:18 +0200 Subject: [PATCH 23/27] [travis] Fix deps=high jobs --- .gitignore | 11 +++-- .travis.php | 45 +++++++++++++++++++ .travis.sh | 24 ---------- .travis.yml | 3 +- src/Symfony/Bridge/Twig/composer.json | 2 +- .../Bundle/FrameworkBundle/composer.json | 6 +-- 6 files changed, 56 insertions(+), 35 deletions(-) create mode 100644 .travis.php delete mode 100644 .travis.sh diff --git a/.gitignore b/.gitignore index f16d739d03..76f1ab9a39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ -.php_cs.cache -autoload.php +vendor/ composer.lock -composer.phar -package*.tar -packages.json phpunit.xml -/vendor/ +.php_cs.cache +composer.phar +package.tar +/packages.json diff --git a/.travis.php b/.travis.php new file mode 100644 index 0000000000..c27942913a --- /dev/null +++ b/.travis.php @@ -0,0 +1,45 @@ + $_SERVER['argc']) { + echo "Usage: commit-range branch dir1 dir2 ... dirN\n"; + exit(1); +} + +$dirs = $_SERVER['argv']; +array_shift($dirs); +$range = array_shift($dirs); +$branch = array_shift($dirs); + +$packages = array(); +$flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0; + +foreach ($dirs as $dir) { + if (!`git diff --name-only $range -- $dir`) { + continue; + } + echo "$dir\n"; + + $package = json_decode(file_get_contents($dir.'/composer.json')); + + $package->repositories = array(array( + 'type' => 'composer', + 'url' => 'file://'.__DIR__.'/', + )); + file_put_contents($dir.'/composer.json', json_encode($package, $flags)); + passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *"); + + $package->version = $branch.'.x-dev'; + $package->dist['type'] = 'tar'; + $package->dist['url'] = 'file://'.__DIR__."/$dir/package.tar"; + + $packages[$package->name][$package->version] = $package; + + $versions = file_get_contents('https://packagist.org/packages/'.$package->name.'.json'); + $versions = json_decode($versions); + + foreach ($versions->package->versions as $version => $package) { + $packages[$package->name] += array($version => $package); + } +} + +file_put_contents('packages.json', json_encode(compact('packages'), $flags)); diff --git a/.travis.sh b/.travis.sh deleted file mode 100644 index 55020cb012..0000000000 --- a/.travis.sh +++ /dev/null @@ -1,24 +0,0 @@ -branch=$1 -if [ -z "$branch" ]; then - echo 'Usage: branch dir1 dir2 ... dirN' - exit 1 -fi -shift -components=$* -if [ -z "$components" ]; then - echo 'Usage: branch dir1 dir2 ... dirN' - exit 1 -fi -echo '{"packages": {' > packages.json -for c in $components; do - sed -i ':a;N;$!ba;s#^{\n\(\s*\)\("name"\)#{\n\1"repositories": \[{ "type": "composer", "url": "file://'$(pwd)'/" }\],\n\1\2#' $c/composer.json - n=$(php -r '$n=json_decode(file_get_contents("'$c'/composer.json"));echo $n->name;') - echo '"'$n'": {"'$branch'.x-dev": ' >> packages.json - cat $c/composer.json >> packages.json - echo '"version": "'$branch.x-dev'",\n "dist": {"type": "tar", "url": "file://'$(pwd)/$c'/package'$branch'.tar"}\n}},' >> packages.json -done; -sed -i ':a;N;$!ba;s/\n}\n"/,\n "/g' packages.json -sed -i ':a;N;$!ba;s/}},$/\n}}\n}}/' packages.json -for c in $components; do - (cd $c && tar -cf package$branch.tar --exclude='package*.tar' *) -done diff --git a/.travis.yml b/.travis.yml index 915d6325cb..a780aa1d61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ env: before_install: - composer self-update + - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi; - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi; - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi; @@ -44,7 +45,7 @@ before_install: install: - if [ "$deps" = "no" ]; then composer --prefer-source install; fi; - components=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n') - - if [ "$deps" != "no" ]; then sh .travis.sh $TRAVIS_BRANCH $components; fi; + - if [ "$deps" != "no" ]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $components; fi; script: - if [ "$deps" = "no" ]; then echo "$components" | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index 66aa1587a1..b1952b9f5e 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -22,7 +22,7 @@ "require-dev": { "symfony/phpunit-bridge": "~2.7", "symfony/finder": "~2.3", - "symfony/form": "~2.3.5", + "symfony/form": "~2.3.31", "symfony/http-kernel": "~2.3", "symfony/intl": "~2.3", "symfony/routing": "~2.2", diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index f77297a293..1ef5af58a1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -17,8 +17,8 @@ ], "require": { "php": ">=5.3.3", - "symfony/dependency-injection" : "~2.3", - "symfony/config" : "~2.3,>=2.3.12", + "symfony/dependency-injection": "~2.3", + "symfony/config": "~2.3,>=2.3.12", "symfony/event-dispatcher": "~2.1", "symfony/http-foundation": "~2.3,>=2.3.19", "symfony/http-kernel": "~2.3,>=2.3.22", @@ -38,7 +38,7 @@ "symfony/finder": "~2.0,>=2.0.5", "symfony/intl": "~2.3", "symfony/security": "~2.3", - "symfony/form": "~2.3.0,>=2.3.5", + "symfony/form": "~2.3.31", "symfony/class-loader": "~2.1", "symfony/process": "~2.0,>=2.0.5", "symfony/validator": "~2.1", From b483ee2d02109321c13f37c7073cda494d71cda9 Mon Sep 17 00:00:00 2001 From: "Issei.M" Date: Wed, 22 Jul 2015 01:25:33 +0900 Subject: [PATCH 24/27] [Form] updated exception message of ButtonBuilder::setRequestHandler() --- src/Symfony/Component/Form/ButtonBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/ButtonBuilder.php b/src/Symfony/Component/Form/ButtonBuilder.php index 24bc2f8916..e8f7805561 100644 --- a/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/Symfony/Component/Form/ButtonBuilder.php @@ -498,7 +498,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ public function setRequestHandler(RequestHandlerInterface $requestHandler) { - throw new BadMethodCallException('Buttons do not support form processors.'); + throw new BadMethodCallException('Buttons do not support request handlers.'); } /** From 6585fe45a22e02994077667b1c5588d11a9c9a61 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 21 Jul 2015 20:37:10 +0200 Subject: [PATCH 25/27] [Security] fix check for empty usernames --- .../Component/Security/Acl/Domain/UserSecurityIdentity.php | 2 +- .../Core/Authentication/Provider/UserAuthenticationProvider.php | 2 +- .../Security/Core/Authentication/RememberMe/PersistentToken.php | 2 +- src/Symfony/Component/Security/Core/User/User.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php b/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php index 3bf277f364..ea17c635d5 100644 --- a/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php +++ b/src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php @@ -36,7 +36,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface */ public function __construct($username, $class) { - if (empty($username)) { + if ('' === $username || null === $username) { throw new \InvalidArgumentException('$username must not be empty.'); } if (empty($class)) { diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php index b65a16bbb2..a624ccfe63 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php @@ -62,7 +62,7 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter } $username = $token->getUsername(); - if (empty($username)) { + if ('' === $username || null === $username) { $username = 'NONE_PROVIDED'; } diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php b/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php index 92fcb4f2f7..d85572d0e0 100644 --- a/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php @@ -40,7 +40,7 @@ final class PersistentToken implements PersistentTokenInterface if (empty($class)) { throw new \InvalidArgumentException('$class must not be empty.'); } - if (empty($username)) { + if ('' === $username || null === $username) { throw new \InvalidArgumentException('$username must not be empty.'); } if (empty($series)) { diff --git a/src/Symfony/Component/Security/Core/User/User.php b/src/Symfony/Component/Security/Core/User/User.php index ea2c6a4da6..86f1acd775 100644 --- a/src/Symfony/Component/Security/Core/User/User.php +++ b/src/Symfony/Component/Security/Core/User/User.php @@ -30,7 +30,7 @@ final class User implements AdvancedUserInterface public function __construct($username, $password, array $roles = array(), $enabled = true, $userNonExpired = true, $credentialsNonExpired = true, $userNonLocked = true) { - if (empty($username)) { + if ('' === $username || null === $username) { throw new \InvalidArgumentException('The username cannot be empty.'); } From 07b3fa9c1cf0d15c325542393b789c371c0ae44e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 22 Jul 2015 13:18:53 +0200 Subject: [PATCH 26/27] [HttpKernel] Fix lowest dep --- src/Symfony/Component/HttpKernel/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index 2602186c1b..584afc263e 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2", + "symfony/event-dispatcher": "~2.6,>=2.6.7", "symfony/http-foundation": "~2.5,>=2.5.4", "symfony/debug": "~2.6,>=2.6.2", "psr/log": "~1.0" From 753812e746077dac7daf56d78fa7e99fb3da54f2 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 2 Jul 2015 20:36:17 +0200 Subject: [PATCH 27/27] [2.8] Fix 3.0 incompatible deps --- src/Symfony/Bridge/Twig/composer.json | 2 +- .../Tests/Console/Descriptor/AbstractDescriptorTest.php | 3 +++ src/Symfony/Bundle/FrameworkBundle/composer.json | 6 +++--- src/Symfony/Bundle/SecurityBundle/composer.json | 6 +++--- src/Symfony/Component/Form/composer.json | 2 +- src/Symfony/Component/HttpKernel/composer.json | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index 1963ece7f1..605901bc8a 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -23,7 +23,7 @@ "symfony/phpunit-bridge": "~2.7|~3.0.0", "symfony/asset": "~2.7|~3.0.0", "symfony/finder": "~2.3|~3.0.0", - "symfony/form": "~2.8|~3.0.0", + "symfony/form": "~2.8", "symfony/http-kernel": "~2.3|~3.0.0", "symfony/intl": "~2.3|~3.0.0", "symfony/routing": "~2.2|~3.0.0", diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php index 8a9800bc86..38dda10ba7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php @@ -75,6 +75,9 @@ abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase $this->assertDescription($expectedDescription, $definition); } + /** + * @group legacy + */ public function provideLegacySynchronizedServiceDefinitionTestData() { return $this->getDescriptionTestData(ObjectsProvider::getLegacyContainerDefinitions()); diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 3253eb1891..843a4cce7b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -22,14 +22,14 @@ "symfony/config": "~2.4", "symfony/event-dispatcher": "~2.8|~3.0.0", "symfony/http-foundation": "~2.4.9|~2.5,>=2.5.4|~3.0.0", - "symfony/http-kernel": "~2.7|~3.0.0", + "symfony/http-kernel": "~2.7", "symfony/filesystem": "~2.3|~3.0.0", "symfony/routing": "~2.8|~3.0.0", "symfony/security-core": "~2.6|~3.0.0", "symfony/security-csrf": "~2.6|~3.0.0", "symfony/stopwatch": "~2.3|~3.0.0", "symfony/templating": "~2.1|~3.0.0", - "symfony/translation": "~2.7|~3.0.0", + "symfony/translation": "~2.7", "doctrine/annotations": "~1.0" }, "require-dev": { @@ -41,7 +41,7 @@ "symfony/finder": "~2.0,>=2.0.5|~3.0.0", "symfony/intl": "~2.3|~3.0.0", "symfony/security": "~2.6|~3.0.0", - "symfony/form": "~2.8|~3.0.0", + "symfony/form": "~2.8", "symfony/class-loader": "~2.1|~3.0.0", "symfony/expression-language": "~2.6|~3.0.0", "symfony/process": "~2.0,>=2.0.5|~3.0.0", diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index ee648d131e..a929eb09b8 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -18,7 +18,7 @@ "require": { "php": ">=5.3.9", "symfony/security": "~2.8|~3.0.0", - "symfony/http-kernel": "~2.2|~3.0.0" + "symfony/http-kernel": "~2.2" }, "require-dev": { "symfony/phpunit-bridge": "~2.7|~3.0.0", @@ -28,8 +28,8 @@ "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", "symfony/dependency-injection": "~2.6,>=2.6.6|~3.0.0", "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", - "symfony/form": "~2.7|~3.0.0", - "symfony/framework-bundle": "~2.7|~3.0.0", + "symfony/form": "~2.7", + "symfony/framework-bundle": "~2.7", "symfony/http-foundation": "~2.4|~3.0.0", "symfony/twig-bundle": "~2.7|~3.0.0", "symfony/twig-bridge": "~2.7|~3.0.0", diff --git a/src/Symfony/Component/Form/composer.json b/src/Symfony/Component/Form/composer.json index 5cd6feceae..37c1d93304 100644 --- a/src/Symfony/Component/Form/composer.json +++ b/src/Symfony/Component/Form/composer.json @@ -25,7 +25,7 @@ "require-dev": { "symfony/phpunit-bridge": "~2.7|~3.0.0", "doctrine/collections": "~1.0", - "symfony/validator": "~2.6,>=2.6.8|~3.0.0", + "symfony/validator": "~2.8|~3.0.0", "symfony/http-foundation": "~2.2|~3.0.0", "symfony/http-kernel": "~2.4|~3.0.0", "symfony/security-csrf": "~2.4|~3.0.0", diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index a3439e2903..d702fac808 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -29,7 +29,7 @@ "symfony/config": "~2.7", "symfony/console": "~2.3|~3.0.0", "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.2|~3.0.0", + "symfony/dependency-injection": "~2.8|~3.0.0", "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", "symfony/finder": "~2.0,>=2.0.5|~3.0.0",