8000 Merge branch '2.3' into 2.7 · symfony/symfony@f9caa24 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f9caa24

Browse files
Merge branch '2.3' into 2.7
* 2.3: [ClassLoader] Use symfony/polyfill-apcu [HttpFoundation][Cookie] Cookie DateTimeInterface fix bumped Symfony version to 2.3.38 updated VERSION for 2.3.37 update CONTRIBUTORS for 2.3.37 updated CHANGELOG for 2.3.37 Conflicts: .travis.yml src/Symfony/Component/ClassLoader/composer.json src/Symfony/Component/HttpKernel/Kernel.php
2 parents 07673dc + eaef88c commit f9caa24

File tree

9 files changed

+66
-31
lines changed

9 files changed

+66
-31
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ before_install:
3838
- echo session.gc_probability = 0 >> $INI_FILE
3939
- if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then echo extension = mongo.so >> $INI_FILE; fi;
4040
- if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then echo extension = memcache.so >> $INI_FILE; fi;
41-
- 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;
42-
- if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then pecl install -f memcached-2.1.0 || echo "Let's continue without memcached extension"; fi;
41+
- if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.10 && echo apc.enable_cli = 1 >> $INI_FILE); fi;
42+
- if [[ $TRAVIS_PHP_VERSION = 7.* ]]; then (echo yes | pecl install -f apcu-5.1.2 && echo apc.enable_cli = 1 >> $INI_FILE); fi;
4343
- if [[ $TRAVIS_PHP_VERSION = 5.* && ! $deps ]]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> $INI_FILE); fi;
44+
- if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then pecl install -f memcached-2.1.0; fi;
4445
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo extension = ldap.so >> $INI_FILE; fi;
4546
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
4647
- if [[ $TRAVIS_REPO_SLUG = symfony/symfony ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;

CHANGELOG-2.3.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ in 2.3 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.3.0...v2.3.1
99

10+
* 2.3.37 (2016-01-14)
11+
12+
* security #17359 do not ship with a custom rng implementation (xabbuh, fabpot)
13+
* bug #17326 [Console] Display console application name even when no version set (polc)
14+
* bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur)
15+
* bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase)
16+
* bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity)
17+
* bug #17287 [HttpKernel] Forcing string comparison on query parameters sort in UriSigner (Tim van Densen)
18+
* bug #17278 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin)
19+
* bug #17276 [Process] Fix potential race condition (nicolas-grekas)
20+
* bug #17183 [FrameworkBundle] Set the kernel.name properly after a cache warmup (jakzal)
21+
* bug #17159 [Yaml] recognize when a block scalar is left (xabbuh)
22+
* bug #17195 bug #14246 [Filesystem] dumpFile() non atomic (Hidde Boomsma)
23+
* bug #17177 [Process] Fix potential race condition leading to transient tests (nicolas-grekas)
24+
1025
* 2.3.36 (2015-12-26)
1126

1227
* bug #16864 [Yaml] fix indented line handling in folded blocks (xabbuh)

CONTRIBUTORS.md

Lines changed: 19 additions & 13 deletions
10000
Original file line numberDiff line numberDiff line change
@@ -75,45 +75,45 @@ Symfony is the result of the work of many people who made the code better
7575
- Arnaud Le Blanc (arnaud-lb)
7676
- Tim Nagel (merk)
7777
- Brice BERNARD (brikou)
78+
- Graham Campbell (graham)
7879
- Jérôme Tamarelle (gromnan)
7980
- marc.weistroff
81+
- Michal Piotrowski (eventhorizon)
8082
- lenar
81< A935 code>-
- Graham Campbell (graham)
8283
- Włodzimierz Gajda (gajdaw)
83-
- Michal Piotrowski (eventhorizon)
8484
- Florian Voutzinos (florianv)
8585
- Peter Rehm (rpet)
8686
- Colin Frei
87+
- Dariusz Ruminski
8788
- Adrien Brault (adrienbrault)
8889
- excelwebzone
8990
- Jacob Dreesen (jdreesen)
90-
- Dariusz Ruminski
9191
- Peter Kokot (maastermedia)
9292
- Fabien Pennequin (fabienpennequin)
9393
- Pierre du Plessis (pierredup)
9494
- Alexander Schwenn (xelaris)
9595
- Gordon Franke (gimler)
96+
- Iltar van der Berg (kjarli)
9697
- Robert Schönthal (digitalkaoz)
9798
- Jérémy DERUSSÉ (jderusse)
9899
- Joshua Thijssen
99100
- Stefano Sala (stefano.sala)
100101
- David Buchmann (dbu)
101102
- Issei Murasawa (issei_m)
102-
- Iltar van der Berg (kjarli)
103103
- Juti Noppornpitak (shiroyuki)
104104
- Eric GELOEN (gelo)
105105
- Sebastian Hörl (blogsh)
106106
- Daniel Gomes (danielcsgomes)
107107
- Hidenori Goto (hidenorigoto)
108+
- Vladimir Reznichenko (kalessil)
108109
- Guilherme Blanco (guilhermeblanco)
109110
- Pablo Godel (pgodel)
110-
- Vladimir Reznichenko (kalessil)
111+
- Tigran Azatyan (tigranazatyan)
111112
- Jérémie Augustin (jaugustin)
112113
- Sebastiaan Stok (sstok)
113114
- Rafael Dohms (rdohms)
114115
- Arnaud Kleinpeter (nanocom)
115116
- Alexander M. Turek (derrabus)
116-
- Tigran Azatyan (tigranazatyan)
117117
- Richard Shank (iampersistent)
118118
- Charles Sarrazin (csarrazi)
119119
- Clemens Tolboom
@@ -149,6 +149,7 @@ Symfony is the result of the work of many people who made the code better
149149
- sun (sun)
150150
- Larry Garfield (crell)
151151
- Martin Schuhfuß (usefulthink)
152+
- Jáchym Toušek
152153
- Matthieu Bontemps (mbontemps)
153154
- Pierre Minnieur (pminnieur)
154155
- fivestar
@@ -166,7 +167,6 @@ Symfony is the result of the work of many people who made the code better
166167
- Rui Marinho (ruimarinho)
167168
- Julien Brochet (mewt)
168169
- Sergey Linnik (linniksa)
169-
- Jáchym Toušek
170170
- Marcel Beerta (mazen)
171171
- Vincent AUBERT (vincent)
172172
- julien pauli (jpauli)
@@ -177,6 +177,7 @@ Symfony is the result of the work of many people who made the code better
177177
- Elnur Abdurrakhimov (elnur)
178178
- Manuel Reinhard (sprain)
179179
- Danny Berger (dpb587)
180+
- Diego Saint Esteben (dosten)
180181
- Roman Marintšenko (inori)
181182
- Xavier Montaña Carreras (xmontana)
182183
- Chris Wilkinson (thewilkybarkid)
@@ -207,7 +208,6 @@ Symfony is the result of the work of many people who made the code better
207208
- Ruben Gonzalez (rubenrua)
208209
- Marcos Sánchez
209210
- Kim Hemsø Rasmussen (kimhemsoe)
210-
- Diego Saint Esteben (dosten)
211211
- Tom Van Looy (tvlooy)
212212
- Wouter Van Hecke
213213
- Peter Kruithof (pkruithof)
@@ -237,6 +237,7 @@ Symfony is the result of the work of many people who made the code better
237237
- Jan Decavele (jandc)
238238
- Gustavo Piltcher
239239
- Stepan Tanasiychuk (stfalcon)
240+
- Titouan Galopin (tgalopin)
240241
- Tiago Ribeiro (fixe)
241242
- Bob den Otter (bopp)
242243
- Adrian Rudnik (kreischweide)
@@ -321,6 +322,7 @@ Symfony is the result of the work of many people who made the code better
321322
- Jan Schumann
322323
- Niklas Fiekas
323324
- Mark Challoner (markchalloner)
325+
- Gregor Harlan (gharlan)
324326
- Markus Bachmann (baachi)
325327
- lancergr
326328
- Olivier Dolbeau (odolbeau)
@@ -337,6 +339,7 @@ Symfony is the result of the work of many people who made the code better
337339
- cedric lombardot (cedriclombardot)
338340
- Jonas Flodén (flojon)
339341
- Christian Schmidt
342+
- Jakub Kucharovic (jkucharovic)
340343
- Marcin Sikoń (marphi)
341344
- Dominik Zogg (dominik.zogg)
342345
- Mathieu Lemoine
@@ -396,7 +399,6 @@ Symfony is the result of the work of many people who made the code better
396399
- MatTheCat
397400
- John Bafford (jbafford)
398401
- Denis Gorbachev (starfall)
399-
- Titouan Galopin (tgalopin)
400402
- Steven Surowiec
401403
- Kevin Saliou (kbsali)
402404
- Ryan
@@ -440,7 +442,6 @@ Symfony is the result of the work of many people who made the code better
440442
- Wang Jingyu
441443
- Åsmund Garfors
442444
- Maxime Douailin
443-
- Gregor Harlan
444445
- Michael Hirschler (mvhirsch)
445446
- Javier López (loalf)
446447
- Reinier Kip
@@ -457,7 +458,6 @@ Symfony is the result of the work of many people who made the code better
457458
- Tristan Maindron (tmaindron)
458459
- Ke WANG (yktd26)
459460
- Strate
460-
- Jakub Kucharovic
461461
- Miquel Rodríguez Telep (mrtorrent)
462462
- Sergey Kolodyazhnyy (skolodyazhnyy)
463463
- umpirski
@@ -507,6 +507,7 @@ Symfony is the result of the work of many people who made the code better
507507
- Joshua Nye
508508
- Dave Marshall (davedevelopment)
509509
- avorobiev
510+
- Gladhon
510511
- Venu
511512
- Lars Vierbergen
512513
- Dennis Hotson
@@ -572,6 +573,7 @@ Symfony is the result of the work of many people who made the code better
572573
- Aleksey Podskrebyshev
573574
- Steffen Roßkamp
574575
- David Marín Carreño (davefx)
576+
- Hidde Boomsma (hboomsma)
575577
- Jörn Lang (j.lang)
576578
- mwsaz
577579
- Benoît Bourgeois
@@ -615,6 +617,7 @@ Symfony is the result of the work of many people who made the code better
615617
- Benoît Merlet (trompette)
616618
- Koen Kuipers
617619
- datibbaw
620+
- Sébastien Santoro
618621
- Raul Fraile (raulfraile)
619622
- sensio
620623
- Patrick Kaufmann
@@ -686,6 +689,7 @@ Symfony is the result of the work of many people who made the code better
686689
- Max Beutel
687690
- Michal Trojanowski
688691
- Catalin Dan
692+
- Mihai Stancu
689693
- nacho
690694
- Piotr Antosik (antek88)
691695
- Artem Lopata
@@ -698,6 +702,7 @@ Symfony is the result of the work of many people who made the code better
698702
- Max Grigorian (maxakawizard)
699703
- benatespina (benatespina)
700704
- Denis Kop
705+
- EdgarPE
701706
- jfcixmedia
702707
- Martijn Evers
703708
- Benjamin Paap (benjaminpaap)
@@ -980,6 +985,7 @@ Symfony is the result of the work of many people who made the code better
980985
- Michal Gebauer
981986
- Gleb Sidora
982987
- David Stone
988+
- Adrien Lucas (adrienlucas)
983989
- Pablo Maria Martelletti (pmartelletti)
984990
- Yassine Guedidi (yguedidi)
985991
- Luis Muñoz
@@ -1056,6 +1062,7 @@ Symfony is the result of the work of many people who made the code better
10561062
- devel
10571063
- Trevor Suarez
10581064
- gedrox
1065+
- Mathieu MARCHOIS
10591066
- dropfen
10601067
- Andrey Chernykh
10611068
- Edvinas Klovas
@@ -1179,7 +1186,6 @@ Symfony is the result of the work of many people who made the code better
11791186
- srsbiz
11801187
- Taylan Kasap
11811188
- Nicolas A. Bérard-Nault
1182-
- Gladhon
11831189
- Saem Ghani
11841190
- Stefan Oderbolz
11851191
- Curtis
@@ -1233,6 +1239,7 @@ Symfony is the result of the work of many people who made the code better
12331239
- Eric J. Duran
12341240
- cmfcmf
12351241
- Drew Butler
1242+
- pawel-lewtak
12361243
- Steve Müller
12371244
- Andras Ratz
12381245
- andreabreu98
@@ -1260,7 +1267,6 @@ Symfony is the result of the work of many people who made the code better
12601267
- Pierre-Louis LAUNAY
12611268
- djama
12621269
- Eduardo Conceição
1263-
- Sébastien Santoro
12641270
- Jon Cave
12651271
- Sébastien HOUZE
12661272
- Abdulkadir N. A.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"php": ">=5.3.9",
2020
"doctrine/common": "~2.4",
2121
"paragonie/random_compat": "~1.0",
22+
"symfony/polyfill-apcu": "~1.0,>=1.0.2",
2223
"twig/twig": "~1.23|~2.0",
2324
"psr/log": "~1.0"
2425
},

src/Symfony/Component/ClassLoader/ApcClassLoader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class ApcClassLoader
6767
*/
6868
public function __construct($prefix, $decorated)
6969
{
70-
if (!extension_loaded('apc')) {
71-
throw new \RuntimeException('Unable to use ApcClassLoader as APC is not enabled.');
70+
if (!function_exists('apcu_fetch')) {
71+
throw new \RuntimeException('Unable to use ApcClassLoader as APC is not installed.');
7272
}
7373

7474
if (!method_exists($decorated, 'findFile')) {
@@ -122,8 +122,8 @@ public function loadClass($class)
122122
*/
123123
public function findFile($class)
124124
{
125-
if (false === $file = apc_fetch($this->prefix.$class)) {
126-
apc_store($this->prefix.$class, $file = $this->decorated->findFile($class));
125+
if (false === $file = apcu_fetch($this->prefix.$class)) {
126+
apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class));
127127
}
128128

129129
return $file;

src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ protected function setUp()
2424
if (!(ini_get('apc.enabled') && ini_get('apc.enable_cli'))) {
2525
$this->markTestSkipped('The apc extension is available, but not enabled.');
2626
} else {
27-
apc_clear_cache('user');
27+
apcu_clear_cache();
2828
}
2929
}
3030

3131
protected function tearDown()
3232
{
3333
if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) {
34-
apc_clear_cache('user');
34+
apcu_clear_cache();
3535
}
3636
}
3737

@@ -42,7 +42,7 @@ public function testConstructor()
4242

4343
$loader = new ApcClassLoader('test.prefix.', $loader);
4444

45-
$this->assertEquals($loader->findFile('\Apc\Namespaced\FooBar'), apc_fetch('test.prefix.\Apc\Namespaced\FooBar'), '__construct() takes a prefix as its first argument');
45+
$this->assertEquals($loader->findFile('\Apc\Namespaced\FooBar'), apcu_fetch('test.prefix.\Apc\Namespaced\FooBar'), '__construct() takes a prefix as its first argument');
4646
}
4747

4848
/**

src/Symfony/Component/ClassLoader/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
],
1818
"minimum-stability": "dev",
1919
"require": {
20-
"php": ">=5.3.9"
20+
"php": ">=5.3.9",
21+
"symfony/polyfill-apcu": "~1.0,>=1.0.2"
2122
},
2223
"require-dev": {
2324
"symfony/finder": "~2.0,>=2.0.5"

src/Symfony/Component/HttpFoundation/Cookie.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ class Cookie
2929
/**
3030
* Constructor.
3131
*
32-
* @param string $name The name of the cookie
33-
* @param string $value The value of the cookie
34-
* @param int|string|\DateTime $expire The time the cookie expires
35-
* @param string $path The path on the server in which the cookie will be available on
36-
* @param string $domain The domain that the cookie is available to
37-
* @param bool $secure Whether the cookie should only be transmitted over a secure HTTPS connection from the client
38-
* @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol
32+
* @param string $name The name of the cookie
33+
* @param string $value The value of the cookie
34+
* @param int|string|\DateTime|\DateTimeInterface $expire The time the cookie expires
35+
* @param string $path The path on the server in which the cookie will be available on
36+
* @param string $domain The domain that the cookie is available to
37+
* @param bool $secure Whether the cookie should only be transmitted over a secure HTTPS connection from the client
38+
* @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol
3939
*
4040
* @throws \InvalidArgumentException
4141
*/
@@ -51,7 +51,7 @@ public function __construct($name, $value = null, $expire = 0, $path = '/', $dom
5151
}
5252

5353
// convert expiration time to a Unix timestamp
54-
if ($expire instanceof \DateTime) {
54+
if ($expire instanceof \DateTime || $expire instanceof \DateTimeInterface) {
5555
$expire = $expire->format('U');
5656
} elseif (!is_numeric($expire)) {
5757
$expire = strtotime($expire);

src/Symfony/Component/HttpFoundation/Tests/CookieTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ public function testConstructorWithDateTime()
8585
$this->assertEquals($expire->format('U'), $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date');
8686
}
8787

88+
/**
89+
* @requires PHP 5.5
90+
*/
91+
public function testConstructorWithDateTimeImmutable()
92+
{
93+
$expire = new \DateTimeImmutable();
94+
$cookie = new Cookie('foo', 'bar', $expire);
95+
96+
$this->assertEquals($expire->format('U'), $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date');
97+
}
98+
8899
public function testGetExpiresTimeWithStringValue()
89100
{
90101
$value = '+1 day';

0 commit comments

Comments
 (0)
0