Merge branch '2.3' into 2.4

* 2.3:
  [Process] Adjust PR #11264, make it Windows compatible and fix CS
  [Process] Fix unit tests on Windows platform
  bumped Symfony version to 2.3.19
  updated VERSION for 2.3.18
  update CONTRIBUTORS for 2.3.18
  updated CHANGELOG for 2.3.18
  [Process] Use correct test for empty string in UnixPipes

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
This commit is contained in:
Fabien Potencier 2014-07-16 15:12:41 +02:00
commit 2797df89b8
5 changed files with 61 additions and 19 deletions

View File

@ -7,6 +7,14 @@ 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 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 To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.3.0...v2.3.1
* 2.3.18 (2014-07-15)
* [Security] Forced validate of locales passed to the translator
* feature #11367 [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses... (CVE-2014-4671) (Andrew Moore)
* bug #11386 Remove Spaceless Blocks from Twig Form Templates (chrisguitarguy)
* bug #9719 [TwigBundle] fix configuration tree for paths (mdavis1982, cordoval)
* bug #11244 [HttpFoundation] Remove body-related headers when sending the response, if body is empty (SimonSimCity)
* 2.3.17 (2014-07-07) * 2.3.17 (2014-07-07)
* bug #11238 [Translation] Added unescaping of ids in PoFileLoader (JustBlackBird) * bug #11238 [Translation] Added unescaping of ids in PoFileLoader (JustBlackBird)

View File

@ -19,8 +19,8 @@ Symfony2 is the result of the work of many people who made the code better
- Ryan Weaver (weaverryan) - Ryan Weaver (weaverryan)
- Lukas Kahwe Smith (lsmith) - Lukas Kahwe Smith (lsmith)
- Jeremy Mikola (jmikola) - Jeremy Mikola (jmikola)
- Jean-François Simon (jfsimon)
- Romain Neutron (romain) - Romain Neutron (romain)
- Jean-François Simon (jfsimon)
- Benjamin Eberlei (beberlei) - Benjamin Eberlei (beberlei)
- Igor Wiedler (igorw) - Igor Wiedler (igorw)
- Hugo Hamon (hhamon) - Hugo Hamon (hhamon)
@ -44,18 +44,18 @@ Symfony2 is the result of the work of many people who made the code better
- Wouter De Jong (wouterj) - Wouter De Jong (wouterj)
- Eric Clemmons (ericclemmons) - Eric Clemmons (ericclemmons)
- Nicolas Grekas (nicolas-grekas) - Nicolas Grekas (nicolas-grekas)
- Andrej Hudec (pulzarraider)
- Deni - Deni
- Henrik Westphal (snc) - Henrik Westphal (snc)
- Dariusz Górecki (canni) - Dariusz Górecki (canni)
- Andrej Hudec (pulzarraider)
- Arnout Boks (aboks) - Arnout Boks (aboks)
- Christian Raue
- Michel Weimerskirch (mweimerskirch) - Michel Weimerskirch (mweimerskirch)
- Lee McDermott - Lee McDermott
- Brandon Turner - Brandon Turner
- Douglas Greenshields (shieldo) - Douglas Greenshields (shieldo)
- Daniel Holmes (dholmes) - Daniel Holmes (dholmes)
- Jordan Alliot (jalliot) - Jordan Alliot (jalliot)
- Christian Raue
- John Wards (johnwards) - John Wards (johnwards)
- Fran Moreno (franmomu) - Fran Moreno (franmomu)
- Bart van den Burg (burgov) - Bart van den Burg (burgov)
@ -75,21 +75,21 @@ Symfony2 is the result of the work of many people who made the code better
- Fabien Pennequin (fabienpennequin) - Fabien Pennequin (fabienpennequin)
- Jacob Dreesen (jdreesen) - Jacob Dreesen (jdreesen)
- Gábor Egyed (1ed) - Gábor Egyed (1ed)
- Ait Boudad Abdellatif (aitboudad)
- Adrien Brault (adrienbrault) - Adrien Brault (adrienbrault)
- Michal Piotrowski (eventhorizon) - Michal Piotrowski (eventhorizon)
- Ait Boudad Abdellatif (aitboudad)
- Robert Schönthal (digitalkaoz) - Robert Schönthal (digitalkaoz)
- Juti Noppornpitak (shiroyuki) - Juti Noppornpitak (shiroyuki)
- Sebastian Hörl (blogsh) - Sebastian Hörl (blogsh)
- Daniel Gomes (danielcsgomes) - Daniel Gomes (danielcsgomes)
- Hidenori Goto (hidenorigoto) - Hidenori Goto (hidenorigoto)
- Peter Kokot (maastermedia) - Peter Kokot (maastermedia)
- Christian Flothmann (xabbuh)
- Jérémie Augustin (jaugustin) - Jérémie Augustin (jaugustin)
- David Buchmann (dbu) - David Buchmann (dbu)
- Jérôme Tamarelle (gromnan) - Jérôme Tamarelle (gromnan)
- Tigran Azatyan (tigranazatyan) - Tigran Azatyan (tigranazatyan)
- Javier Eguiluz (javier.eguiluz) - Javier Eguiluz (javier.eguiluz)
- Christian Flothmann (xabbuh)
- Rafael Dohms (rdohms) - Rafael Dohms (rdohms)
- Richard Shank (iampersistent) - Richard Shank (iampersistent)
- Gordon Franke (gimler) - Gordon Franke (gimler)
@ -146,6 +146,7 @@ Symfony2 is the result of the work of many people who made the code better
- Manuel Reinhard (sprain) - Manuel Reinhard (sprain)
- Danny Berger (dpb587) - Danny Berger (dpb587)
- Xavier Montaña Carreras (xmontana) - Xavier Montaña Carreras (xmontana)
- Michele Orselli (orso)
- Xavier Perez - Xavier Perez
- Arjen Brouwer (arjenjb) - Arjen Brouwer (arjenjb)
- Katsuhiro OGAWA - Katsuhiro OGAWA
@ -168,7 +169,6 @@ Symfony2 is the result of the work of many people who made the code better
- Robert Kiss (kepten) - Robert Kiss (kepten)
- Kim Hemsø Rasmussen (kimhemsoe) - Kim Hemsø Rasmussen (kimhemsoe)
- Wouter Van Hecke - Wouter Van Hecke
- Michele Orselli (orso)
- Michael Holm (hollo) - Michael Holm (hollo)
- Marc Weistroff (futurecat) - Marc Weistroff (futurecat)
- Pierre-Yves LEBECQ (pylebecq) - Pierre-Yves LEBECQ (pylebecq)
@ -231,6 +231,7 @@ Symfony2 is the result of the work of many people who made the code better
- Ismael Ambrosi (iambrosi) - Ismael Ambrosi (iambrosi)
- Shein Alexey - Shein Alexey
- Issei Murasawa (issei_m) - Issei Murasawa (issei_m)
- hacfi (hifi)
- Joe Lencioni - Joe Lencioni
- Kai - Kai
- Xavier HAUSHERR - Xavier HAUSHERR
@ -274,6 +275,7 @@ Symfony2 is the result of the work of many people who made the code better
- François-Xavier de Guillebon (de-gui_f) - François-Xavier de Guillebon (de-gui_f)
- boombatower - boombatower
- Fabrice Bernhard (fabriceb) - Fabrice Bernhard (fabriceb)
- Clément Gautier (clementgautier)
- Fabian Lange (codingfabian) - Fabian Lange (codingfabian)
- Yoshio HANAWA - Yoshio HANAWA
- Baptiste Clavié (talus) - Baptiste Clavié (talus)
@ -294,11 +296,11 @@ Symfony2 is the result of the work of many people who made the code better
- Maks Slesarenko - Maks Slesarenko
- Markus Lanthaler (lanthaler) - Markus Lanthaler (lanthaler)
- Vicent Soria Durá (vicentgodella) - Vicent Soria Durá (vicentgodella)
- Chris Wilkinson (thewilkybarkid)
- Ioan Negulescu - Ioan Negulescu
- Andrew Udvare (audvare) - Andrew Udvare (audvare)
- alexpods - alexpods
- Erik Trapman (eriktrapman) - Erik Trapman (eriktrapman)
- hacfi (hifi)
- De Cock Xavier (xdecock) - De Cock Xavier (xdecock)
- Alex Pott - Alex Pott
- Norbert Orzechowicz (norzechowicz) - Norbert Orzechowicz (norzechowicz)
@ -365,6 +367,7 @@ Symfony2 is the result of the work of many people who made the code better
- Arturs Vonda - Arturs Vonda
- Sascha Grossenbacher - Sascha Grossenbacher
- Ben Davies (bendavies) - Ben Davies (bendavies)
- Simon Schick (simonsimcity)
- Hossein Bukhamsin - Hossein Bukhamsin
- Paweł Wacławczyk (pwc) - Paweł Wacławczyk (pwc)
- Oleg Zinchenko (cystbear) - Oleg Zinchenko (cystbear)
@ -372,6 +375,7 @@ Symfony2 is the result of the work of many people who made the code better
- Johannes Klauss (cloppy) - Johannes Klauss (cloppy)
- Evan Villemez - Evan Villemez
- fzerorubigd - fzerorubigd
- Benjamin Grandfond (benjamin)
- Tiago Brito (blackmx) - Tiago Brito (blackmx)
- Richard van den Brand (ricbra) - Richard van den Brand (ricbra)
- develop - develop
@ -403,7 +407,6 @@ Symfony2 is the result of the work of many people who made the code better
- Marek Štípek (maryo) - Marek Štípek (maryo)
- John Bohn (jbohn) - John Bohn (jbohn)
- Jakub Škvára (jskvara) - Jakub Škvára (jskvara)
- Chris Wilkinson (thewilkybarkid)
- Andrew Hilobok (hilobok) - Andrew Hilobok (hilobok)
- Christian Soronellas (theunic) - Christian Soronellas (theunic)
- Jérôme Vieilledent (lolautruche) - Jérôme Vieilledent (lolautruche)
@ -532,7 +535,6 @@ Symfony2 is the result of the work of many people who made the code better
- jfcixmedia - jfcixmedia
- Martijn Evers - Martijn Evers
- Benjamin Paap (benjaminpaap) - Benjamin Paap (benjaminpaap)
- Simon Schick (simonsimcity)
- Christian - Christian
- Sergii Smertin (nfx) - Sergii Smertin (nfx)
- Eddie Jaoude - Eddie Jaoude
@ -550,6 +552,7 @@ Symfony2 is the result of the work of many people who made the code better
- Benoit Garret - Benoit Garret
- DerManoMann - DerManoMann
- Asmir Mustafic (goetas) - Asmir Mustafic (goetas)
- Julien Bianchi (jubianchi)
- Marcin Chwedziak - Marcin Chwedziak
- Roland Franssen (ro0) - Roland Franssen (ro0)
- Maciej Malarz - Maciej Malarz
@ -562,20 +565,22 @@ Symfony2 is the result of the work of many people who made the code better
- kaiwa - kaiwa
- Albert Ganiev (helios-ag) - Albert Ganiev (helios-ag)
- Neil Katin - Neil Katin
- David Otton
- peter - peter
- Artem Kolesnikov (tyomo4ka) - Artem Kolesnikov (tyomo4ka)
- Gustavo Adrian - Gustavo Adrian
- Clément Gautier (clementgautier)
- Yannick - Yannick
- Luc Vieillescazes (iamluc) - Luc Vieillescazes (iamluc)
- Eduardo García Sanz (coma) - Eduardo García Sanz (coma)
- David de Boer (ddeboer) - David de Boer (ddeboer)
- Brooks Boyd - Brooks Boyd
- Roger Webb - Roger Webb
- Dmitriy Simushev
- Max Voloshin (maxvoloshin) - Max Voloshin (maxvoloshin)
- Nicolas Fabre (nfabre) - Nicolas Fabre (nfabre)
- Raul Rodriguez (raul782) - Raul Rodriguez (raul782)
- Patrick Landolt (scube) - Patrick Landolt (scube)
- WybrenKoelmans
- Derek Lambert - Derek Lambert
- Felicitus - Felicitus
- Krzysztof Przybyszewski - Krzysztof Przybyszewski
@ -730,6 +735,7 @@ Symfony2 is the result of the work of many people who made the code better
- catch - catch
- Alexandre Segura - Alexandre Segura
- Josef Cech - Josef Cech
- Nate (frickenate)
- Matthew Foster (mfoster) - Matthew Foster (mfoster)
- Maximilian Reichel (phramz) - Maximilian Reichel (phramz)
- Paul Seiffert (seiffert) - Paul Seiffert (seiffert)
@ -750,7 +756,6 @@ Symfony2 is the result of the work of many people who made the code better
- Andrey Ryaguzov - Andrey Ryaguzov
- Gunther Konig - Gunther Konig
- František Bereň - František Bereň
- Benjamin Grandfond (benjamin)
- Christoph Nissle (derstoffel) - Christoph Nissle (derstoffel)
- Ionel Scutelnicu (ionelscutelnicu) - Ionel Scutelnicu (ionelscutelnicu)
- Johnny Peck (johnnypeck) - Johnny Peck (johnnypeck)
@ -875,6 +880,7 @@ Symfony2 is the result of the work of many people who made the code better
- Yorkie Chadwick (yorkie76) - Yorkie Chadwick (yorkie76)
- Yanick Witschi - Yanick Witschi
- Ondrej Mirtes - Ondrej Mirtes
- akimsko
- Youpie - Youpie
- srsbiz - srsbiz
- Nicolas A. Bérard-Nault - Nicolas A. Bérard-Nault
@ -1010,6 +1016,7 @@ Symfony2 is the result of the work of many people who made the code better
- Adam Monsen (meonkeys) - Adam Monsen (meonkeys)
- ollie harridge (ollietb) - ollie harridge (ollietb)
- Paweł Szczepanek (pauluz) - Paweł Szczepanek (pauluz)
- Christian López Espínola (penyaskito)
- Petr Jaroš (petajaros) - Petr Jaroš (petajaros)
- Philipp Hoffmann (philipphoffmann) - Philipp Hoffmann (philipphoffmann)
- Alex Carol (picard89) - Alex Carol (picard89)

View File

@ -313,11 +313,11 @@ class ProcessPipes
$type = array_search($pipe, $this->pipes); $type = array_search($pipe, $this->pipes);
$data = ''; $data = '';
while ($dataread = fread($pipe, self::CHUNK_SIZE)) { while ('' !== $dataread = (string) fread($pipe, self::CHUNK_SIZE)) {
$data .= $dataread; $data .= $dataread;
} }
if ($data) { if ('' !== $data) {
$read[$type] = $data; $read[$type] = $data;
} }

View File

@ -306,6 +306,19 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
$this->assertEmpty($p->getOutput()); $this->assertEmpty($p->getOutput());
} }
public function testZeroAsOutput()
{
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
// see http://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line
$p = $this->getProcess('echo | set /p dummyName=0');
} else {
$p = $this->getProcess('printf 0');
}
$p->run();
$this->assertSame('0', $p->getOutput());
}
public function testExitCodeCommandFailed() public function testExitCodeCommandFailed()
{ {
if (defined('PHP_WINDOWS_VERSION_BUILD')) { if (defined('PHP_WINDOWS_VERSION_BUILD')) {

View File

@ -47,9 +47,9 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
$this->setPath(dirname(PHP_BINARY)); $this->setPath(dirname(PHP_BINARY));
$finder = new ExecutableFinder; $finder = new ExecutableFinder;
$result = $finder->find(basename(PHP_BINARY)); $result = $finder->find($this->getPhpBinaryName());
$this->assertEquals($result, PHP_BINARY); $this->assertSamePath(PHP_BINARY, $result);
} }
public function testFindWithDefault() public function testFindWithDefault()
@ -83,9 +83,9 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
$extraDirs = array(dirname(PHP_BINARY)); $extraDirs = array(dirname(PHP_BINARY));
$finder = new ExecutableFinder; $finder = new ExecutableFinder;
$result = $finder->find(basename(PHP_BINARY), null, $extraDirs); $result = $finder->find($this->getPhpBinaryName(), null, $extraDirs);
$this->assertEquals(PHP_BINARY, $result); $this->assertSamePath(PHP_BINARY, $result);
} }
public function testFindWithOpenBaseDir() public function testFindWithOpenBaseDir()
@ -105,8 +105,22 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
ini_set('open_basedir', dirname(PHP_BINARY).PATH_SEPARATOR.'/'); ini_set('open_basedir', dirname(PHP_BINARY).PATH_SEPARATOR.'/');
$finder = new ExecutableFinder; $finder = new ExecutableFinder;
$result = $finder->find(basename(PHP_BINARY)); $result = $finder->find($this->getPhpBinaryName());
$this->assertEquals(PHP_BINARY, $result); $this->assertSamePath(PHP_BINARY, $result);
}
private function assertSamePath($expected, $tested)
{
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->assertEquals(strtolower($expected), strtolower($tested));
} else {
$this->assertEquals($expected, $tested);
}
}
private function getPhpBinaryName()
{
return basename(PHP_BINARY, defined('PHP_WINDOWS_VERSION_BUILD') ? '.exe' : '');
} }
} }