Merge branch '2.3' into 2.4

* 2.3:
  bumped Symfony version to 2.3.14
  updated VERSION for 2.3.13
  update CONTRIBUTORS for 2.3.13
  updated CHANGELOG for 2.3.13
  [Console] Fixed the rendering of exceptions on HHVM with a terminal width
  [WebProfilerBundle ] Fixed an edge case on WDT loading
  fixed typo
  [Process] Disable TTY mode on Windows platform
  [Validator] added missing ANNOTATION config to @Target annotation
  [Finder] Fix ignoring of unreadable dirs in the RecursiveDirectoryIterator.

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Validator/Constraints/Callback.php
This commit is contained in:
Fabien Potencier 2014-04-27 15:34:57 +02:00
commit 8003cfe801
14 changed files with 105 additions and 27 deletions

View File

@ -7,6 +7,29 @@ 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.13 (2014-04-27)
* bug #10789 [Console] Fixed the rendering of exceptions on HHVM with a terminal width (stof)
* bug #10773 [WebProfilerBundle ] Fixed an edge case on WDT loading (tucksaun)
* bug #10763 [Process] Disable TTY mode on Windows platform (romainneutron)
* bug #10772 [Finder] Fix ignoring of unreadable dirs in the RecursiveDirectoryIterator (jakzal)
* bug #10757 [Process] Setting STDIN while running should not be possible (romainneutron)
* bug #10749 Fixed incompatibility of x509 auth with nginx (alcaeus)
* bug #10735 [Translation] [PluralizationRules] Little correction for case 'ar' (klyk50)
* bug #10720 [HttpFoundation] Fix DbalSessionHandler (Tobion)
* bug #10721 [HttpFoundation] status 201 is allowed to have a body (Tobion)
* bug #10728 [Process] Fix #10681, process are failing on Windows Server 2003 (romainneutron)
* bug #10733 [DomCrawler] Textarea value should default to empty string instead of null. (Berdir)
* bug #10723 [Security] fix DBAL connection typehint (Tobion)
* bug #10700 Fixes various inconsistencies in the code (fabpot)
* bug #10697 [Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM. (idn2104)
* bug #10652 [HttpFoundation] fix PDO session handler under high concurrency (Tobion)
* bug #10669 [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates (stloyd)
* bug #10670 [Templating] PhpEngine should propagate charset to its helpers (stloyd)
* bug #10665 [DependencyInjection] Fix ticket #10663 - Added setCharset method call to PHP templating engine (koku)
* bug #10654 Changed the typehint of the EsiFragmentRenderer to the interface (stof)
* bug #10649 [BrowserKit] Fix #10641 : BrowserKit is broken when using ip as host (romainneutron)
* 2.3.12 (2014-04-03) * 2.3.12 (2014-04-03)
* bug #10586 Fixes URL validator to accept single part urls (merk) * bug #10586 Fixes URL validator to accept single part urls (merk)

View File

@ -23,9 +23,9 @@ Symfony2 is the result of the work of many people who made the code better
- Benjamin Eberlei (beberlei) - Benjamin Eberlei (beberlei)
- Igor Wiedler (igorw) - Igor Wiedler (igorw)
- Hugo Hamon (hhamon) - Hugo Hamon (hhamon)
- Romain Neutron (romain)
- Eriksen Costa (eriksencosta) - Eriksen Costa (eriksencosta)
- Martin Hasoň (hason) - Martin Hasoň (hason)
- Romain Neutron (romain)
- Jonathan Wage (jwage) - Jonathan Wage (jwage)
- Alexandre Salomé (alexandresalome) - Alexandre Salomé (alexandresalome)
- William Durand (couac) - William Durand (couac)
@ -48,49 +48,49 @@ Symfony2 is the result of the work of many people who made the code better
- Dariusz Górecki (canni) - Dariusz Górecki (canni)
- Andrej Hudec (pulzarraider) - Andrej Hudec (pulzarraider)
- Arnout Boks (aboks) - Arnout Boks (aboks)
- Michel Weimerskirch (mweimerskirch)
- Lee McDermott - Lee McDermott
- Brandon Turner - Brandon Turner
- Douglas Greenshields (shieldo)
- Daniel Holmes (dholmes) - Daniel Holmes (dholmes)
- Jordan Alliot (jalliot) - Jordan Alliot (jalliot)
- Christian Raue - Christian Raue
- Douglas Greenshields (shieldo)
- John Wards (johnwards) - John Wards (johnwards)
- Fran Moreno (franmomu) - Fran Moreno (franmomu)
- Bart van den Burg (burgov) - Bart van den Burg (burgov)
- Antoine Hérault (herzult) - Antoine Hérault (herzult)
- Toni Uebernickel (havvg) - Toni Uebernickel (havvg)
- Michel Weimerskirch (mweimerskirch)
- Arnaud Le Blanc (arnaud-lb) - Arnaud Le Blanc (arnaud-lb)
- Brice BERNARD (brikou) - Brice BERNARD (brikou)
- Luis Cordova (cordoval) - Luis Cordova (cordoval)
- Tim Nagel (merk)
- Kevin Bond (kbond) - Kevin Bond (kbond)
- marc.weistroff - marc.weistroff
- lenar - lenar
- Tim Nagel (merk)
- Włodzimierz Gajda (gajdaw) - Włodzimierz Gajda (gajdaw)
- Colin Frei - Colin Frei
- excelwebzone - excelwebzone
- Fabien Pennequin (fabienpennequin) - Fabien Pennequin (fabienpennequin)
- Jacob Dreesen (jdreesen) - Jacob Dreesen (jdreesen)
- Adrien Brault (adrienbrault) - Adrien Brault (adrienbrault)
- Gábor Egyed (1ed)
- Michal Piotrowski (eventhorizon) - Michal Piotrowski (eventhorizon)
- Florian Voutzinos (florianv) - Florian Voutzinos (florianv)
- Robert Schönthal (digitalkaoz) - Robert Schönthal (digitalkaoz)
- Juti Noppornpitak (shiroyuki) - Juti Noppornpitak (shiroyuki)
- Sebastian Hörl (blogsh) - Sebastian Hörl (blogsh)
- Hidenori Goto (hidenorigoto) - Hidenori Goto (hidenorigoto)
- Gábor Egyed (1ed)
- Daniel Gomes (danielcsgomes) - Daniel Gomes (danielcsgomes)
- Peter Kokot (maastermedia)
- Jérémie Augustin (jaugustin) - Jérémie Augustin (jaugustin)
- David Buchmann (dbu) - David Buchmann (dbu)
- Ait Boudad Abdellatif (aitboudad) - Ait Boudad Abdellatif (aitboudad)
- Peter Kokot (maastermedia) - Jérôme Tamarelle (gromnan)
- Tigran Azatyan (tigranazatyan) - Tigran Azatyan (tigranazatyan)
- Javier Eguiluz (javier.eguiluz) - Javier Eguiluz (javier.eguiluz)
- Rafael Dohms (rdohms) - Rafael Dohms (rdohms)
- Richard Shank (iampersistent) - Richard Shank (iampersistent)
- Gordon Franke (gimler) - Gordon Franke (gimler)
- Jérôme Tamarelle (gromnan)
- Helmer Aaviksoo - Helmer Aaviksoo
- Sebastiaan Stok (sstok) - Sebastiaan Stok (sstok)
- Matthieu Ouellette-Vachon (maoueh) - Matthieu Ouellette-Vachon (maoueh)
@ -99,6 +99,7 @@ Symfony2 is the result of the work of many people who made the code better
- Jonathan Ingram (jonathaningram) - Jonathan Ingram (jonathaningram)
- Artur Kotyrba - Artur Kotyrba
- Guilherme Blanco (guilhermeblanco) - Guilherme Blanco (guilhermeblanco)
- Nicolas Grekas (nicolas-grekas)
- Pablo Godel (pgodel) - Pablo Godel (pgodel)
- Eric GELOEN (gelo) - Eric GELOEN (gelo)
- Dmitrii Chekaliuk (lazyhammer) - Dmitrii Chekaliuk (lazyhammer)
@ -122,7 +123,6 @@ Symfony2 is the result of the work of many people who made the code better
- fivestar - fivestar
- Dominique Bongiraud - Dominique Bongiraud
- Leszek Prabucki (l3l0) - Leszek Prabucki (l3l0)
- Nicolas Grekas (nicolas-grekas)
- François Zaninotto (fzaninotto) - François Zaninotto (fzaninotto)
- Dustin Whittle (dustinwhittle) - Dustin Whittle (dustinwhittle)
- jeff - jeff
@ -228,6 +228,7 @@ Symfony2 is the result of the work of many people who made the code better
- Xavier HAUSHERR - Xavier HAUSHERR
- Albert Jessurum (ajessu) - Albert Jessurum (ajessu)
- Laszlo Korte - Laszlo Korte
- Miha Vrhovnik
- Alessandro Desantis - Alessandro Desantis
- hubert lecorche (hlecorche) - hubert lecorche (hlecorche)
- Eugene Leonovich (rybakit) - Eugene Leonovich (rybakit)
@ -259,11 +260,13 @@ Symfony2 is the result of the work of many people who made the code better
- Vitaliy Tverdokhlib (vitaliytv) - Vitaliy Tverdokhlib (vitaliytv)
- Dirk Pahl (dirkaholic) - Dirk Pahl (dirkaholic)
- cedric lombardot (cedriclombardot) - cedric lombardot (cedriclombardot)
- Charles Sarrazin (csarrazi)
- Jonas Flodén (flojon) - Jonas Flodén (flojon)
- Marcin Sikoń (marphi) - Marcin Sikoń (marphi)
- franek (franek) - franek (franek)
- Adam Harvey - Adam Harvey
- Robbert Klarenbeek (robbertkl) - Robbert Klarenbeek (robbertkl)
- François-Xavier de Guillebon (de-gui_f)
- boombatower - boombatower
- Fabrice Bernhard (fabriceb) - Fabrice Bernhard (fabriceb)
- Fabian Lange (codingfabian) - Fabian Lange (codingfabian)
@ -285,6 +288,7 @@ 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)
- Ioan Negulescu
- Andrew Udvare (audvare) - Andrew Udvare (audvare)
- alexpods - alexpods
- Erik Trapman (eriktrapman) - Erik Trapman (eriktrapman)
@ -312,10 +316,10 @@ Symfony2 is the result of the work of many people who made the code better
- Aurélien Fredouelle - Aurélien Fredouelle
- Karoly Negyesi (chx) - Karoly Negyesi (chx)
- Pavel Campr (pcampr) - Pavel Campr (pcampr)
- Miha Vrhovnik
- Geoffrey Tran (geoff) - Geoffrey Tran (geoff)
- Jan Behrens - Jan Behrens
- Thomas Lallement (raziel057) - Thomas Lallement (raziel057)
- alcaeus
- vitaliytv - vitaliytv
- Markus Bachmann (baachi) - Markus Bachmann (baachi)
- aubx - aubx
@ -349,8 +353,8 @@ Symfony2 is the result of the work of many people who made the code better
- Chris Heng (gigablah) - Chris Heng (gigablah)
- Ulumuddin Yunus (joenoez) - Ulumuddin Yunus (joenoez)
- Antoine Corcy - Antoine Corcy
- Sascha Grossenbacher
- Ben Davies (bendavies) - Ben Davies (bendavies)
- François-Xavier de Guillebon (de-gui_f)
- Hossein Bukhamsin - Hossein Bukhamsin
- Paweł Wacławczyk (pwc) - Paweł Wacławczyk (pwc)
- Oleg Zinchenko (cystbear) - Oleg Zinchenko (cystbear)
@ -387,6 +391,7 @@ Symfony2 is the result of the work of many people who made the code better
- Casper Valdemar Poulsen - Casper Valdemar Poulsen
- Josiah (josiah) - Josiah (josiah)
- John Bohn (jbohn) - John Bohn (jbohn)
- Jakub Škvára (jskvara)
- Andrew Hilobok (hilobok) - Andrew Hilobok (hilobok)
- Christian Soronellas (theunic) - Christian Soronellas (theunic)
- Jérôme Vieilledent (lolautruche) - Jérôme Vieilledent (lolautruche)
@ -400,6 +405,7 @@ Symfony2 is the result of the work of many people who made the code better
- Jayson Xu (superjavason) - Jayson Xu (superjavason)
- Jaik Dean (jaikdean) - Jaik Dean (jaikdean)
- Jan Prieser - Jan Prieser
- Issei Murasawa (issei_m)
- James Michael DuPont - James Michael DuPont
- Tom Klingenberg - Tom Klingenberg
- Christopher Hall (mythmakr) - Christopher Hall (mythmakr)
@ -458,13 +464,14 @@ Symfony2 is the result of the work of many people who made the code better
- Robert Gruendler (pulse00) - Robert Gruendler (pulse00)
- Simon Terrien (sterrien) - Simon Terrien (sterrien)
- Benoît Merlet (trompette) - Benoît Merlet (trompette)
- Koen Kuipers
- Raul Fraile (raulfraile) - Raul Fraile (raulfraile)
- sensio - sensio
- Patrick Kaufmann - Patrick Kaufmann
- alcaeus
- Ben Ramsey (ramsey) - Ben Ramsey (ramsey)
- Christian Jul Jensen - Christian Jul Jensen
- The Whole Life to Learn - The Whole Life to Learn
- Liverbool (liverbool)
- Phan Thanh Ha (haphan) - Phan Thanh Ha (haphan)
- Chris Jones (leek) - Chris Jones (leek)
- Colin O'Dell (colinodell) - Colin O'Dell (colinodell)
@ -506,7 +513,6 @@ Symfony2 is the result of the work of many people who made the code better
- Catalin Dan - Catalin Dan
- Piotr Antosik (antek88) - Piotr Antosik (antek88)
- Artem Lopata - Artem Lopata
- Sascha Grossenbacher
- Marcos Quesada (marcos_quesada) - Marcos Quesada (marcos_quesada)
- Dan Finnie - Dan Finnie
- Ken Marfilla (marfillaster) - Ken Marfilla (marfillaster)
@ -570,6 +576,7 @@ Symfony2 is the result of the work of many people who made the code better
- heccjj - heccjj
- Alexandre Melard - Alexandre Melard
- Sergey Yuferev - Sergey Yuferev
- Mario Young
- Mo Di (modi) - Mo Di (modi)
- Jeroen van den Enden (stoefke) - Jeroen van den Enden (stoefke)
- Quique Porta (quiqueporta) - Quique Porta (quiqueporta)
@ -623,7 +630,6 @@ Symfony2 is the result of the work of many people who made the code better
- WedgeSama - WedgeSama
- Beth Binkovitz - Beth Binkovitz
- Romain Geissler - Romain Geissler
- Charles Sarrazin (csarrazi)
- Marcus Stöhr (dafish) - Marcus Stöhr (dafish)
- Emmanuel Vella (emmanuel.vella) - Emmanuel Vella (emmanuel.vella)
- Carsten Nielsen (phreaknerd) - Carsten Nielsen (phreaknerd)
@ -674,7 +680,6 @@ Symfony2 is the result of the work of many people who made the code better
- Olivier - Olivier
- pscheit - pscheit
- Ramon Kleiss (akathos) - Ramon Kleiss (akathos)
- Jakub Škvára (jskvara)
- Nicolas Badey (nico-b) - Nicolas Badey (nico-b)
- Shane Preece (shane) - Shane Preece (shane)
- povilas - povilas
@ -698,6 +703,7 @@ Symfony2 is the result of the work of many people who made the code better
- 2manypeople - 2manypeople
- Wing - Wing
- Thomas Bibb - Thomas Bibb
- catch
- Alexandre Segura - Alexandre Segura
- Josef Cech - Josef Cech
- Matthew Foster (mfoster) - Matthew Foster (mfoster)
@ -748,6 +754,7 @@ Symfony2 is the result of the work of many people who made the code better
- Jordi Llonch (jordillonch) - Jordi Llonch (jordillonch)
- Cédric Dugat (ph3nol) - Cédric Dugat (ph3nol)
- Philip Dahlstrøm (phidah) - Philip Dahlstrøm (phidah)
- Loick Piera (pyrech)
- Rénald Casagraude (rcasagraude) - Rénald Casagraude (rcasagraude)
- Robin Duval (robin-duval) - Robin Duval (robin-duval)
- Artem Lopata (bumz) - Artem Lopata (bumz)
@ -814,6 +821,7 @@ Symfony2 is the result of the work of many people who made the code better
- Alex - Alex
- Klaas Naaijkens - Klaas Naaijkens
- Rafał - Rafał
- Adria Lopez (adlpz)
- Masao Maeda (brtriver) - Masao Maeda (brtriver)
- Dave Hulbert (dave1010) - Dave Hulbert (dave1010)
- Dave Marshall (davedevelopment) - Dave Marshall (davedevelopment)
@ -861,6 +869,7 @@ Symfony2 is the result of the work of many people who made the code better
- Myke79 - Myke79
- Brian Debuire - Brian Debuire
- Sylvain Lorinet - Sylvain Lorinet
- klyk50
- jc - jc
- BenjaminBeck - BenjaminBeck
- Aurelijus Rožėnas - Aurelijus Rožėnas
@ -948,6 +957,7 @@ Symfony2 is the result of the work of many people who made the code better
- Yohan Giarelli (frequence-web) - Yohan Giarelli (frequence-web)
- Massimiliano Arione (garak) - Massimiliano Arione (garak)
- Ghazy Ben Ahmed (ghazy) - Ghazy Ben Ahmed (ghazy)
- ibasaw (ibasaw)
- Vladislav Krupenkin (ideea) - Vladislav Krupenkin (ideea)
- joris de wit (jdewit) - joris de wit (jdewit)
- Jérémy CROMBEZ (jeremy) - Jérémy CROMBEZ (jeremy)
@ -992,6 +1002,7 @@ Symfony2 is the result of the work of many people who made the code better
- Gustavo Adrian - Gustavo Adrian
- Michael - Michael
- fh-github@fholzhauer.de - fh-github@fholzhauer.de
- Mark Topper
- Xavier REN - Xavier REN
- Philipp Scheit - Philipp Scheit
- max - max

View File

@ -17,7 +17,7 @@ use Symfony\Component\Validator\Constraint;
* Constraint for the Unique Entity validator * Constraint for the Unique Entity validator
* *
* @Annotation * @Annotation
* @Target("CLASS") * @Target({"CLASS", "ANNOTATION"})
* *
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
*/ */

View File

@ -239,7 +239,7 @@ class ProfilerController
$this->profiler->disable(); $this->profiler->disable();
if (!$profile = $this->profiler->loadProfile($token)) { if (!$profile = $this->profiler->loadProfile($token)) {
return new Response('', 200, array('Content-Type' => 'text/html')); return new Response('', 404, array('Content-Type' => 'text/html'));
} }
// the toolbar position (top, bottom, normal, or null -- use the configuration) // the toolbar position (top, bottom, normal, or null -- use the configuration)

View File

@ -9,12 +9,26 @@
request = function(url, onSuccess, onError, payload, options) { request = function(url, onSuccess, onError, payload, options) {
var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
options = options || {}; options = options || {};
options.maxTries = options.maxTries || 0;
xhr.open(options.method || 'GET', url, true); xhr.open(options.method || 'GET', url, true);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.onreadystatechange = function(state) { xhr.onreadystatechange = function(state) {
if (4 === xhr.readyState && 200 === xhr.status) { if (4 !== xhr.readyState) {
return null;
}
if (xhr.status == 404 && options.maxTries > 1) {
setTimeout(function(){
options.maxTries--;
request(url, onSuccess, onError, payload, options);
}, 500);
return null;
}
if (200 === xhr.status) {
(onSuccess || noop)(xhr); (onSuccess || noop)(xhr);
} else if (4 === xhr.readyState && xhr.status != 200) { } else {
(onError || noop)(xhr); (onError || noop)(xhr);
} }
}; };
@ -75,6 +89,7 @@
(onSuccess || noop)(xhr, el); (onSuccess || noop)(xhr, el);
}, },
function(xhr) { (onError || noop)(xhr, el); }, function(xhr) { (onError || noop)(xhr, el); },
'',
options options
); );
} }

View File

@ -34,7 +34,8 @@
if (xhr.status !== 0) { if (xhr.status !== 0) {
confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '{{ path("_profiler", { "token": token }) }}'); confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '{{ path("_profiler", { "token": token }) }}');
} }
} },
{'maxTries': 5}
); );
})(); })();
/*]]>*/</script> /*]]>*/</script>

View File

@ -695,8 +695,11 @@ class Application
do { do {
$title = sprintf(' [%s] ', get_class($e)); $title = sprintf(' [%s] ', get_class($e));
$len = $strlen($title); $len = $strlen($title);
$width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 1 : PHP_INT_MAX;
// HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327 // HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327
$width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 1 : (defined('HHVM_VERSION') ? 1 << 31 : PHP_INT_MAX); if (defined('HHVM_VERSION') && $width > 1 << 31) {
$width = 1 << 31;
}
$formatter = $output->getFormatter(); $formatter = $output->getFormatter();
$lines = array(); $lines = array();
foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) { foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) {

View File

@ -68,7 +68,14 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
public function getChildren() public function getChildren()
{ {
try { try {
return parent::getChildren(); $children = parent::getChildren();
if ($children instanceof self) {
// parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore
$children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs;
}
return $children;
} catch (\UnexpectedValueException $e) { } catch (\UnexpectedValueException $e) {
if ($this->ignoreUnreadableDirs) { if ($this->ignoreUnreadableDirs) {
// If directory is unreadable and finder is set to ignore it, a fake empty content is returned. // If directory is unreadable and finder is set to ignore it, a fake empty content is returned.

View File

@ -824,9 +824,15 @@ class Process
* @param bool $tty True to enabled and false to disable * @param bool $tty True to enabled and false to disable
* *
* @return self The current Process instance * @return self The current Process instance
*
* @throws RuntimeException In case the TTY mode is not supported
*/ */
public function setTty($tty) public function setTty($tty)
{ {
if (defined('PHP_WINDOWS_VERSION_BUILD') && $tty) {
throw new RuntimeException('TTY mode is not supported on Windows platform.');
}
$this->tty = (bool) $tty; $this->tty = (bool) $tty;
return $this; return $this;

View File

@ -285,7 +285,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
} }
$process = $this->getProcess('echo "foo" >> /dev/null && php -r "usleep(100000);"'); $process = $this->getProcess('echo "foo" >> /dev/null && php -r "usleep(100000);"');
$process->setTTY(true); $process->setTty(true);
$process->start(); $process->start();
$this->assertTrue($process->isRunning()); $this->assertTrue($process->isRunning());
$process->wait(); $process->wait();
@ -300,12 +300,24 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
} }
$process = $this->getProcess('echo "foo" >> /dev/null'); $process = $this->getProcess('echo "foo" >> /dev/null');
$process->setTTY(true); $process->setTty(true);
$process->run(); $process->run();
$this->assertTrue($process->isSuccessful()); $this->assertTrue($process->isSuccessful());
} }
public function testTTYInWindowsEnvironment()
{
if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->markTestSkipped('This test is for Windows platform only');
}
$process = $this->getProcess('echo "foo" >> /dev/null');
$process->setTty(false);
$this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'TTY mode is not supported on Windows platform.');
$process->setTty(true);
}
public function testExitCodeTextIsNullWhenExitCodeIsNull() public function testExitCodeTextIsNullWhenExitCodeIsNull()
{ {
$process = $this->getProcess(''); $process = $this->getProcess('');

View File

@ -15,7 +15,7 @@ use Symfony\Component\Validator\Constraint;
/** /**
* @Annotation * @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"}) * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"})
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *

View File

@ -15,7 +15,7 @@ namespace Symfony\Component\Validator\Constraints;
* Annotation for group sequences * Annotation for group sequences
* *
* @Annotation * @Annotation
* @Target("CLASS") * @Target({"CLASS", "ANNOTATION"})
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *

View File

@ -15,7 +15,7 @@ namespace Symfony\Component\Validator\Constraints;
* Annotation to define a group sequence provider * Annotation to define a group sequence provider
* *
* @Annotation * @Annotation
* @Target("CLASS") * @Target({"CLASS", "ANNOTATION"})
*/ */
class GroupSequenceProvider class GroupSequenceProvider
{ {

View File

@ -180,7 +180,7 @@
</trans-unit> </trans-unit>
<trans-unit id="48"> <trans-unit id="48">
<source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source> <source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source>
<target>این مقدار می بایست دقیفا {{ limit }} کاراکتر داشته باشد.|این مقدرا می بایشت دقیقا {{ limit }} کاراکتر داشته باشد.</target> <target> این مقدار می بایست دقیقا {{ limit }} کاراکتر داشته باشد.| این مقدار می بایست دقیقا {{ limit }} کاراکتر داشته باشد.</target>
</trans-unit> </trans-unit>
<trans-unit id="49"> <trans-unit id="49">
<source>The file was only partially uploaded.</source> <source>The file was only partially uploaded.</source>