From 1cd8aa1605b53b0bbea8f73ec5898ee7ca366b8a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 14 Jan 2016 10:14:30 +0100 Subject: [PATCH 1/6] updated CHANGELOG for 2.3.37 --- CHANGELOG-2.3.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG-2.3.md b/CHANGELOG-2.3.md index f520c60219..bdc4cb0ef6 100644 --- a/CHANGELOG-2.3.md +++ b/CHANGELOG-2.3.md @@ -7,6 +7,21 @@ 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.37 (2016-01-14) + + * security #17359 do not ship with a custom rng implementation (xabbuh, fabpot) + * bug #17326 [Console] Display console application name even when no version set (polc) + * bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur) + * bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase) + * bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity) + * bug #17287 [HttpKernel] Forcing string comparison on query parameters sort in UriSigner (Tim van Densen) + * bug #17278 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin) + * bug #17276 [Process] Fix potential race condition (nicolas-grekas) + * bug #17183 [FrameworkBundle] Set the kernel.name properly after a cache warmup (jakzal) + * bug #17159 [Yaml] recognize when a block scalar is left (xabbuh) + * bug #17195 bug #14246 [Filesystem] dumpFile() non atomic (Hidde Boomsma) + * bug #17177 [Process] Fix potential race condition leading to transient tests (nicolas-grekas) + * 2.3.36 (2015-12-26) * bug #16864 [Yaml] fix indented line handling in folded blocks (xabbuh) From 656a1939a1d4bb90b013c72ac1e7f5ec5a8cf7a7 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 14 Jan 2016 10:14:40 +0100 Subject: [PATCH 2/6] update CONTRIBUTORS for 2.3.37 --- CONTRIBUTORS.md | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e131844910..5786f19dde 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -75,45 +75,45 @@ Symfony is the result of the work of many people who made the code better - Arnaud Le Blanc (arnaud-lb) - Tim Nagel (merk) - Brice BERNARD (brikou) + - Graham Campbell (graham) - Jérôme Tamarelle (gromnan) - marc.weistroff - - lenar - - Graham Campbell (graham) - - Włodzimierz Gajda (gajdaw) - Michal Piotrowski (eventhorizon) + - lenar + - Włodzimierz Gajda (gajdaw) - Florian Voutzinos (florianv) - Peter Rehm (rpet) - Colin Frei + - Dariusz Ruminski - Adrien Brault (adrienbrault) - excelwebzone - Jacob Dreesen (jdreesen) - - Dariusz Ruminski - Peter Kokot (maastermedia) - Fabien Pennequin (fabienpennequin) - Pierre du Plessis (pierredup) - Alexander Schwenn (xelaris) - Gordon Franke (gimler) + - Iltar van der Berg (kjarli) - Robert Schönthal (digitalkaoz) - Jérémy DERUSSÉ (jderusse) - Joshua Thijssen - Stefano Sala (stefano.sala) - David Buchmann (dbu) - Issei Murasawa (issei_m) - - Iltar van der Berg (kjarli) - Juti Noppornpitak (shiroyuki) - Eric GELOEN (gelo) - Sebastian Hörl (blogsh) - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) + - Vladimir Reznichenko (kalessil) - Guilherme Blanco (guilhermeblanco) - Pablo Godel (pgodel) - - Vladimir Reznichenko (kalessil) + - Tigran Azatyan (tigranazatyan) - Jérémie Augustin (jaugustin) - Sebastiaan Stok (sstok) - Rafael Dohms (rdohms) - Arnaud Kleinpeter (nanocom) - Alexander M. Turek (derrabus) - - Tigran Azatyan (tigranazatyan) - Richard Shank (iampersistent) - Charles Sarrazin (csarrazi) - Clemens Tolboom @@ -149,6 +149,7 @@ Symfony is the result of the work of many people who made the code better - sun (sun) - Larry Garfield (crell) - Martin Schuhfuß (usefulthink) + - Jáchym Toušek - Matthieu Bontemps (mbontemps) - Pierre Minnieur (pminnieur) - fivestar @@ -166,7 +167,6 @@ Symfony is the result of the work of many people who made the code better - Rui Marinho (ruimarinho) - Julien Brochet (mewt) - Sergey Linnik (linniksa) - - Jáchym Toušek - Marcel Beerta (mazen) - Vincent AUBERT (vincent) - julien pauli (jpauli) @@ -177,6 +177,7 @@ Symfony is the result of the work of many people who made the code better - Elnur Abdurrakhimov (elnur) - Manuel Reinhard (sprain) - Danny Berger (dpb587) + - Diego Saint Esteben (dosten) - Roman Marintšenko (inori) - Xavier Montaña Carreras (xmontana) - Chris Wilkinson (thewilkybarkid) @@ -207,7 +208,6 @@ Symfony is the result of the work of many people who made the code better - Ruben Gonzalez (rubenrua) - Marcos Sánchez - Kim Hemsø Rasmussen (kimhemsoe) - - Diego Saint Esteben (dosten) - Tom Van Looy (tvlooy) - Wouter Van Hecke - Peter Kruithof (pkruithof) @@ -237,6 +237,7 @@ Symfony is the result of the work of many people who made the code better - Jan Decavele (jandc) - Gustavo Piltcher - Stepan Tanasiychuk (stfalcon) + - Titouan Galopin (tgalopin) - Tiago Ribeiro (fixe) - Bob den Otter (bopp) - Adrian Rudnik (kreischweide) @@ -321,6 +322,7 @@ Symfony is the result of the work of many people who made the code better - Jan Schumann - Niklas Fiekas - Mark Challoner (markchalloner) + - Gregor Harlan (gharlan) - Markus Bachmann (baachi) - lancergr - Olivier Dolbeau (odolbeau) @@ -337,6 +339,7 @@ Symfony is the result of the work of many people who made the code better - cedric lombardot (cedriclombardot) - Jonas Flodén (flojon) - Christian Schmidt + - Jakub Kucharovic (jkucharovic) - Marcin Sikoń (marphi) - Dominik Zogg (dominik.zogg) - Mathieu Lemoine @@ -396,7 +399,6 @@ Symfony is the result of the work of many people who made the code better - MatTheCat - John Bafford (jbafford) - Denis Gorbachev (starfall) - - Titouan Galopin (tgalopin) - Steven Surowiec - Kevin Saliou (kbsali) - Ryan @@ -440,7 +442,6 @@ Symfony is the result of the work of many people who made the code better - Wang Jingyu - Åsmund Garfors - Maxime Douailin - - Gregor Harlan - Michael Hirschler (mvhirsch) - Javier López (loalf) - Reinier Kip @@ -457,7 +458,6 @@ Symfony is the result of the work of many people who made the code better - Tristan Maindron (tmaindron) - Ke WANG (yktd26) - Strate - - Jakub Kucharovic - Miquel Rodríguez Telep (mrtorrent) - Sergey Kolodyazhnyy (skolodyazhnyy) - umpirski @@ -507,6 +507,7 @@ Symfony is the result of the work of many people who made the code better - Joshua Nye - Dave Marshall (davedevelopment) - avorobiev + - Gladhon - Venu - Lars Vierbergen - Dennis Hotson @@ -572,6 +573,7 @@ Symfony is the result of the work of many people who made the code better - Aleksey Podskrebyshev - Steffen Roßkamp - David Marín Carreño (davefx) + - Hidde Boomsma (hboomsma) - Jörn Lang (j.lang) - mwsaz - Benoît Bourgeois @@ -615,6 +617,7 @@ Symfony is the result of the work of many people who made the code better - Benoît Merlet (trompette) - Koen Kuipers - datibbaw + - Sébastien Santoro - Raul Fraile (raulfraile) - sensio - Patrick Kaufmann @@ -686,6 +689,7 @@ Symfony is the result of the work of many people who made the code better - Max Beutel - Michal Trojanowski - Catalin Dan + - Mihai Stancu - nacho - Piotr Antosik (antek88) - Artem Lopata @@ -698,6 +702,7 @@ Symfony is the result of the work of many people who made the code better - Max Grigorian (maxakawizard) - benatespina (benatespina) - Denis Kop + - EdgarPE - jfcixmedia - Martijn Evers - Benjamin Paap (benjaminpaap) @@ -980,6 +985,7 @@ Symfony is the result of the work of many people who made the code better - Michal Gebauer - Gleb Sidora - David Stone + - Adrien Lucas (adrienlucas) - Pablo Maria Martelletti (pmartelletti) - Yassine Guedidi (yguedidi) - Luis Muñoz @@ -1056,6 +1062,7 @@ Symfony is the result of the work of many people who made the code better - devel - Trevor Suarez - gedrox + - Mathieu MARCHOIS - dropfen - Andrey Chernykh - Edvinas Klovas @@ -1179,7 +1186,6 @@ Symfony is the result of the work of many people who made the code better - srsbiz - Taylan Kasap - Nicolas A. Bérard-Nault - - Gladhon - Saem Ghani - Stefan Oderbolz - Curtis @@ -1233,6 +1239,7 @@ Symfony is the result of the work of many people who made the code better - Eric J. Duran - cmfcmf - Drew Butler + - pawel-lewtak - Steve Müller - Andras Ratz - andreabreu98 @@ -1260,7 +1267,6 @@ Symfony is the result of the work of many people who made the code better - Pierre-Louis LAUNAY - djama - Eduardo Conceição - - Sébastien Santoro - Jon Cave - Sébastien HOUZE - Abdulkadir N. A. From 2f98f158c968d2bc247318fac612a7cc086316bc Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 14 Jan 2016 10:14:51 +0100 Subject: [PATCH 3/6] updated VERSION for 2.3.37 --- 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 4a88fb37fb..c90dadfbbd 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.3.37-DEV'; + const VERSION = '2.3.37'; const VERSION_ID = 20337; const MAJOR_VERSION = 2; const MINOR_VERSION = 3; const RELEASE_VERSION = 37; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; /** * Constructor. From bbbb0796f43be4017720e868df6558a73a0363a5 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 14 Jan 2016 10:59:28 +0100 Subject: [PATCH 4/6] bumped Symfony version to 2.3.38 --- 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 c90dadfbbd..04ec2c240b 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.3.37'; - const VERSION_ID = 20337; + const VERSION = '2.3.38-DEV'; + const VERSION_ID = 20338; const MAJOR_VERSION = 2; const MINOR_VERSION = 3; - const RELEASE_VERSION = 37; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 38; + const EXTRA_VERSION = 'DEV'; /** * Constructor. From f1f9754bcb69fb69192fed08e298026e13d958e8 Mon Sep 17 00:00:00 2001 From: Wouter de Wild Date: Thu, 14 Jan 2016 13:21:56 +0100 Subject: [PATCH 5/6] [HttpFoundation][Cookie] Cookie DateTimeInterface fix --- src/Symfony/Component/HttpFoundation/Cookie.php | 16 ++++++++-------- .../HttpFoundation/Tests/CookieTest.php | 11 +++++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Cookie.php b/src/Symfony/Component/HttpFoundation/Cookie.php index 061703d9ca..13d69f3bd2 100644 --- a/src/Symfony/Component/HttpFoundation/Cookie.php +++ b/src/Symfony/Component/HttpFoundation/Cookie.php @@ -29,13 +29,13 @@ class Cookie /** * Constructor. * - * @param string $name The name of the cookie - * @param string $value The value of the cookie - * @param int|string|\DateTime $expire The time the cookie expires - * @param string $path The path on the server in which the cookie will be available on - * @param string $domain The domain that the cookie is available to - * @param bool $secure Whether the cookie should only be transmitted over a secure HTTPS connection from the client - * @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol + * @param string $name The name of the cookie + * @param string $value The value of the cookie + * @param int|string|\DateTime|\DateTimeInterface $expire The time the cookie expires + * @param string $path The path on the server in which the cookie will be available on + * @param string $domain The domain that the cookie is available to + * @param bool $secure Whether the cookie should only be transmitted over a secure HTTPS connection from the client + * @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol * * @throws \InvalidArgumentException */ @@ -51,7 +51,7 @@ class Cookie } // convert expiration time to a Unix timestamp - if ($expire instanceof \DateTime) { + if ($expire instanceof \DateTime || $expire instanceof \DateTimeInterface) { $expire = $expire->format('U'); } elseif (!is_numeric($expire)) { $expire = strtotime($expire); diff --git a/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php b/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php index fd90103e42..222786533e 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php @@ -85,6 +85,17 @@ class CookieTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expire->format('U'), $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date'); } + /** + * @requires PHP 5.5 + */ + public function testConstructorWithDateTimeImmutable() + { + $expire = new \DateTimeImmutable(); + $cookie = new Cookie('foo', 'bar', $expire); + + $this->assertEquals($expire->format('U'), $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date'); + } + public function testGetExpiresTimeWithStringValue() { $value = '+1 day'; From 623595f0d6446ab29bfd40bf65fa3948ed8a77f9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 11 Jan 2016 10:55:59 +0100 Subject: [PATCH 6/6] [ClassLoader] Use symfony/polyfill-apcu --- .travis.yml | 5 +++-- composer.json | 1 + src/Symfony/Component/ClassLoader/ApcClassLoader.php | 8 ++++---- src/Symfony/Component/ClassLoader/composer.json | 3 ++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25897fabe6..20edf72737 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,8 +38,9 @@ before_install: - echo session.gc_probability = 0 >> $INI_FILE - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi; - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then echo extension = memcache.so >> $INI_FILE; fi; - - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.10 && echo apc.enable_cli = 1 >> $INI_FILE) || echo "Let's continue without apcu extension"; fi; - - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then pecl install -f memcached-2.1.0 || echo "Let's continue without memcached extension"; fi; + - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.10 && echo apc.enable_cli = 1 >> $INI_FILE); fi; + - if [[ $TRAVIS_PHP_VERSION = 7.* ]]; then (echo yes | pecl install -f apcu-5.1.2 && echo apc.enable_cli = 1 >> $INI_FILE); fi; + - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then pecl install -f memcached-2.1.0; fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo extension = ldap.so >> $INI_FILE; fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi; - if [[ $TRAVIS_REPO_SLUG = symfony/symfony ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; diff --git a/composer.json b/composer.json index d460e34439..0cd67a4c09 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ "php": ">=5.3.3", "doctrine/common": "~2.4", "paragonie/random_compat": "~1.0", + "symfony/polyfill-apcu": "~1.0,>=1.0.2", "twig/twig": "~1.23|~2.0", "psr/log": "~1.0" }, diff --git a/src/Symfony/Component/ClassLoader/ApcClassLoader.php b/src/Symfony/Component/ClassLoader/ApcClassLoader.php index 9170929a10..4f71ea173d 100644 --- a/src/Symfony/Component/ClassLoader/ApcClassLoader.php +++ b/src/Symfony/Component/ClassLoader/ApcClassLoader.php @@ -67,8 +67,8 @@ class ApcClassLoader */ public function __construct($prefix, $decorated) { - if (!extension_loaded('apc')) { - throw new \RuntimeException('Unable to use ApcClassLoader as APC is not enabled.'); + if (!function_exists('apcu_fetch')) { + throw new \RuntimeException('Unable to use ApcClassLoader as APC is not installed.'); } if (!method_exists($decorated, 'findFile')) { @@ -122,8 +122,8 @@ class ApcClassLoader */ public function findFile($class) { - if (false === $file = apc_fetch($this->prefix.$class)) { - apc_store($this->prefix.$class, $file = $this->decorated->findFile($class)); + if (false === $file = apcu_fetch($this->prefix.$class)) { + apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class)); } return $file; diff --git a/src/Symfony/Component/ClassLoader/composer.json b/src/Symfony/Component/ClassLoader/composer.json index 1796ab0b51..86bb70a6d7 100644 --- a/src/Symfony/Component/ClassLoader/composer.json +++ b/src/Symfony/Component/ClassLoader/composer.json @@ -17,7 +17,8 @@ ], "minimum-stability": "dev", "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "symfony/polyfill-apcu": "~1.0,>=1.0.2" }, "require-dev": { "symfony/finder": "~2.0,>=2.0.5"