Merge branch '2.2' into 2.3
* 2.2: [Form] fixed INF usage which does not work on Solaris (closes #8246) Fix grammar bumped Symfony version to 2.2.4 updated VERSION for 2.2.3 update CONTRIBUTORS for 2.2.3 updated CHANGELOG for 2.2.3 [Process] Disable exception on stream_select timeout [HttpFoundation] fixed issue with session_regenerate_id (closes #7380) [DomCrawler] added a note about the default charset [Console] fixed regression when calling a command foo:bar if there is another one like foo:bar:baz (closes #8245) force the Content-Type to html in the web profiler controllers Conflicts: src/Symfony/Component/HttpKernel/Kernel.php
This commit is contained in:
commit
d7999d7108
|
@ -7,6 +7,26 @@ in 2.2 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.2.0...v2.2.1
|
||||
|
||||
* 2.2.3 (2013-06-19)
|
||||
|
||||
* c0da3ae: [Process] Disable exception on stream_select timeout
|
||||
* 77f2aa8: [HttpFoundation] fixed issue with session_regenerate_id (closes #7380)
|
||||
* bcbbb28: Throw exception if value is passed to VALUE_NONE input, long syntax
|
||||
* 6b71513: fixed date type format pattern regex
|
||||
* 842f3fa: do not re-register commands each time a Console\Application is run
|
||||
* 0991cd0: [Process] moved env check to the Process class (refs #8227)
|
||||
* 8764944: fix issue where $_ENV contains array vals
|
||||
* 4139936: [DomCrawler] Fix handling file:// without a host
|
||||
* de289d2: [Form] corrected interface bind() method defined against in deprecation notice
|
||||
* 0c0a3e9: [Console] fixed regression when calling a command foo:bar if there is another one like foo:bar:baz (closes #8245)
|
||||
* 849f3ed: [Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol
|
||||
* 25e3abd: fix many-to-many Propel1 ModelChoiceList
|
||||
* bce6bd2: [DomCrawler] Fixed a fatal error when setting a value in a malformed field name.
|
||||
* 445b2e3: [Console] fix status code when Exception::getCode returns something like 0.1
|
||||
* bbfde62: Fixed exit code for exceptions with error code 0
|
||||
* afad9c7: instantiate valid commands only
|
||||
* 6d2135b: force the Content-Type to html in the web profiler controllers
|
||||
|
||||
* 2.2.2 (2013-06-02)
|
||||
|
||||
* 2038329: [Form] [Validator] Fixed post_max_size = 0 bug (Issue #8065)
|
||||
|
|
|
@ -9,8 +9,8 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Victor Berchet (victor)
|
||||
- Jordi Boggiano (seldaek)
|
||||
- Johannes S (johannes)
|
||||
- Kris Wallsmith (kriswallsmith)
|
||||
- Tobias Schultze (tobion)
|
||||
- Kris Wallsmith (kriswallsmith)
|
||||
- Christophe Coevoet (stof)
|
||||
- Pascal Borreli (pborreli)
|
||||
- Karma Dordrak (drak)
|
||||
|
@ -51,20 +51,20 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Hidenori Goto (hidenorigoto)
|
||||
- Fran Moreno (franmomu)
|
||||
- Andrej Hudec (pulzarraider)
|
||||
- Grégoire Pineau (lyrixx)
|
||||
- Lee McDermott
|
||||
- Brandon Turner
|
||||
- Daniel Holmes (dholmes)
|
||||
- Brikou Carré (brikou)
|
||||
- John Wards (johnwards)
|
||||
- Grégoire Pineau (lyrixx)
|
||||
- Antoine Hérault (herzult)
|
||||
- Bart van den Burg (burgov)
|
||||
- Toni Uebernickel (havvg)
|
||||
- Tim Nagel (merk)
|
||||
- Włodzimierz Gajda (gajdaw)
|
||||
- Michel Weimerskirch (mweimerskirch)
|
||||
- Christian Raue
|
||||
- Michal Piotrowski (eventhorizon)
|
||||
- Toni Uebernickel (havvg)
|
||||
- Colin Frei
|
||||
- lenar
|
||||
- Fabien Pennequin (fabienpennequin)
|
||||
|
@ -220,6 +220,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Emanuele Gaspari (inmarelibero)
|
||||
- Brian King
|
||||
- Jan Schumann
|
||||
- Ruben Gonzalez (rubenrua)
|
||||
- Antonio J. García Lagar (ajgarlag)
|
||||
- Olivier Dolbeau (odolbeau)
|
||||
- Robert Kiss (kepten)
|
||||
|
@ -233,7 +234,9 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Marcin Sikoń (marphi)
|
||||
- Miquel Rodríguez Telep (mrtorrent)
|
||||
- Filippo Tessarotto
|
||||
- Mark Sonnabaum
|
||||
- Adam Harvey
|
||||
- Pierre-Yves LEBECQ (pylebecq)
|
||||
- Laurent Bachelier (laurentb)
|
||||
- Fabian Lange (codingfabian)
|
||||
- Yoshio HANAWA
|
||||
|
@ -255,6 +258,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- alexpods
|
||||
- Erik Trapman (eriktrapman)
|
||||
- De Cock Xavier (xdecock)
|
||||
- Vitaliy Zakharov (zakharovvi)
|
||||
- Matthijs van den Bos
|
||||
- Joel Wurtz
|
||||
- Nils Adermann (naderman)
|
||||
|
@ -295,7 +299,6 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Markus Bachmann (baachi)
|
||||
- aubx
|
||||
- Max Rath (drak3)
|
||||
- Ruben Gonzalez (rubenrua)
|
||||
- Sinan Eldem
|
||||
- DerManoMann
|
||||
- alquerci
|
||||
|
@ -322,12 +325,10 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- cedric lombardot (cedriclombardot)
|
||||
- John Kary (johnkary)
|
||||
- Hossein Bukhamsin
|
||||
- Pierre-Yves LEBECQ (pylebecq)
|
||||
- Fabrice Bernhard (fabriceb)
|
||||
- Oleg Zinchenko (cystbear)
|
||||
- Johannes Klauss (cloppy)
|
||||
- fzerorubigd
|
||||
- Mark Sonnabaum
|
||||
- develop
|
||||
- Atsuhiro KUBO (iteman)
|
||||
- Samy Dindane (dinduks)
|
||||
|
@ -374,7 +375,6 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Luis Cordova (cordoval)
|
||||
- Philipp Kräutli (pkraeutli)
|
||||
- Stefano Sala (stefano.sala)
|
||||
- Vitaliy Zakharov (zakharovvi)
|
||||
- frost-nzcr4
|
||||
- Abhoryo
|
||||
- Fabian Vogler (fabian)
|
||||
|
@ -430,6 +430,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- xaav
|
||||
- Mahmoud Mostafa (mahmoud)
|
||||
- Juti Noppornpitak
|
||||
- lancergr
|
||||
- Mei Gwilym
|
||||
- ttomor
|
||||
- Sander Coolen
|
||||
|
@ -479,6 +480,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- DerManoMann
|
||||
- Roland Franssen (ro0)
|
||||
- Jochen Bayer (jocl)
|
||||
- Jerome TAMARELLE
|
||||
- Jeremy Bush
|
||||
- Evan Villemez
|
||||
- Péter Buri (burci)
|
||||
|
@ -486,6 +488,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- kaiwa
|
||||
- Albert Ganiev (helios-ag)
|
||||
- Neil Katin
|
||||
- peter
|
||||
- Gustavo Adrian
|
||||
- Brooks Boyd
|
||||
- Roger Webb
|
||||
|
@ -493,6 +496,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Felicitus
|
||||
- Paul Matthews
|
||||
- Philipp Strube
|
||||
- Christian Sciberras
|
||||
- Clement Herreman (clemherreman)
|
||||
- Marco
|
||||
- Alberto Aldegheri
|
||||
|
@ -511,6 +515,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Ludek Stepan
|
||||
- Balázs Benyó (duplabe)
|
||||
- Marc Morera (mmoreram)
|
||||
- Saem Ghani
|
||||
- Sebastian Utz
|
||||
- Keri Henare (kerihenare)
|
||||
- Cédric Lahouste (rapotor)
|
||||
|
@ -524,6 +529,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Lance McNearney
|
||||
- Alberto Pirovano (geezmo)
|
||||
- Gabor Toth (tgabi333)
|
||||
- Martin Pärtel
|
||||
- Xavier Briand (xavierbriand)
|
||||
- Evan Kaufman
|
||||
- Romain Geissler
|
||||
|
@ -554,6 +560,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Benjamin Bender
|
||||
- Konrad Mohrfeldt
|
||||
- Benoit Lévêque (benoit_leveque)
|
||||
- Stelian Mocanita (stelian)
|
||||
- jskvara
|
||||
- Mephistofeles
|
||||
- Hoffmann András
|
||||
|
@ -641,6 +648,7 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- partugal
|
||||
- Robert Campbell
|
||||
- Matt Lehner
|
||||
- Aleksey Podskrebyshev
|
||||
- cyrillej
|
||||
- Alex Pods
|
||||
- timaschew
|
||||
|
@ -686,15 +694,18 @@ Symfony2 is the result of the work of many people who made the code better
|
|||
- Nicolas A. Bérard-Nault
|
||||
- Gladhon
|
||||
- Saem Ghani
|
||||
- Stefan Oderbolz
|
||||
- Alexey Popkov
|
||||
- Piotr Błasiak
|
||||
- Arnaud Buathier (arnapou)
|
||||
- chesteroni (chesteroni)
|
||||
- Daniele Cesarini (ijanki)
|
||||
- Simon CONSTANS (kosssi)
|
||||
- Mauricio Lopez (sanctuary29)
|
||||
- Wotre
|
||||
- goohib
|
||||
- Xavier HAUSHERR
|
||||
- ghazy ben ahmed
|
||||
- Myke79
|
||||
- Brian Debuire
|
||||
- Lars Vierbergen
|
||||
|
|
|
@ -55,7 +55,7 @@ class ExceptionController
|
|||
if (!$this->twig->getLoader()->exists($template)) {
|
||||
$handler = new ExceptionHandler();
|
||||
|
||||
return new Response($handler->getContent($exception));
|
||||
return new Response($handler->getContent($exception), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
$code = $exception->getStatusCode();
|
||||
|
@ -69,7 +69,7 @@ class ExceptionController
|
|||
'logger' => null,
|
||||
'currentContent' => '',
|
||||
)
|
||||
));
|
||||
), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -96,7 +96,7 @@ class ExceptionController
|
|||
return new Response($handler->getStylesheet($exception));
|
||||
}
|
||||
|
||||
return new Response($this->twig->render('@WebProfiler/Collector/exception.css.twig'));
|
||||
return new Response($this->twig->render('@WebProfiler/Collector/exception.css.twig'), 200, 'text/css');
|
||||
}
|
||||
|
||||
protected function getTemplate()
|
||||
|
|
|
@ -65,7 +65,7 @@ class ProfilerController
|
|||
|
||||
$this->profiler->disable();
|
||||
|
||||
return new RedirectResponse($this->generator->generate('_profiler_search_results', array('token' => 'empty', 'limit' => 10)));
|
||||
return new RedirectResponse($this->generator->generate('_profiler_search_results', array('token' => 'empty', 'limit' => 10)), 302, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -90,7 +90,7 @@ class ProfilerController
|
|||
$page = $request->query->get('page', 'home');
|
||||
|
||||
if (!$profile = $this->profiler->loadProfile($token)) {
|
||||
return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array('about' => 'no_token', 'token' => $token)));
|
||||
return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array('about' => 'no_token', 'token' => $token)), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
if (!$profile->hasCollector($panel)) {
|
||||
|
@ -106,7 +106,7 @@ class ProfilerController
|
|||
'request' => $request,
|
||||
'templates' => $this->getTemplateManager()->getTemplates($profile),
|
||||
'is_ajax' => $request->isXmlHttpRequest(),
|
||||
)));
|
||||
)), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -150,7 +150,7 @@ class ProfilerController
|
|||
$this->profiler->disable();
|
||||
$this->profiler->purge();
|
||||
|
||||
return new RedirectResponse($this->generator->generate('_profiler_info', array('about' => 'purge')));
|
||||
return new RedirectResponse($this->generator->generate('_profiler_info', array('about' => 'purge')), 302, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -171,14 +171,14 @@ class ProfilerController
|
|||
$file = $request->files->get('file');
|
||||
|
||||
if (empty($file) || !$file->isValid()) {
|
||||
return new RedirectResponse($this->generator->generate('_profiler_info', array('about' => 'upload_error')));
|
||||
return new RedirectResponse($this->generator->generate('_profiler_info', array('about' => 'upload_error')), 302, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
if (!$profile = $this->profiler->import(file_get_contents($file->getPathname()))) {
|
||||
return new RedirectResponse($this->generator->generate('_profiler_info', array('about' => 'already_exists')));
|
||||
return new RedirectResponse($this->generator->generate('_profiler_info', array('about' => 'already_exists')), 302, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
return new RedirectResponse($this->generator->generate('_profiler', array('token' => $profile->getToken())));
|
||||
return new RedirectResponse($this->generator->generate('_profiler', array('token' => $profile->getToken())), 302, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -198,7 +198,7 @@ class ProfilerController
|
|||
|
||||
return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array(
|
||||
'about' => $about
|
||||
)));
|
||||
)), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -223,13 +223,13 @@ class ProfilerController
|
|||
}
|
||||
|
||||
if (null === $token) {
|
||||
return new Response();
|
||||
return new Response('', 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
$this->profiler->disable();
|
||||
|
||||
if (!$profile = $this->profiler->loadProfile($token)) {
|
||||
return new Response();
|
||||
return new Response('', 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
// the toolbar position (top, bottom, normal, or null -- use the configuration)
|
||||
|
@ -250,7 +250,7 @@ class ProfilerController
|
|||
'templates' => $this->getTemplateManager()->getTemplates($profile),
|
||||
'profiler_url' => $url,
|
||||
'token' => $token,
|
||||
)));
|
||||
)), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -294,7 +294,7 @@ class ProfilerController
|
|||
'start' => $start,
|
||||
'end' => $end,
|
||||
'limit' => $limit,
|
||||
)));
|
||||
)), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -333,7 +333,7 @@ class ProfilerController
|
|||
'end' => $end,
|
||||
'limit' => $limit,
|
||||
'panel' => null,
|
||||
)));
|
||||
)), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -370,7 +370,7 @@ class ProfilerController
|
|||
}
|
||||
|
||||
if (!empty($token)) {
|
||||
return new RedirectResponse($this->generator->generate('_profiler', array('token' => $token)));
|
||||
return new RedirectResponse($this->generator->generate('_profiler', array('token' => $token)), 302, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
$tokens = $this->profiler->find($ip, $url, $limit, $method, $start, $end);
|
||||
|
@ -383,7 +383,7 @@ class ProfilerController
|
|||
'start' => $start,
|
||||
'end' => $end,
|
||||
'limit' => $limit,
|
||||
)));
|
||||
)), 302, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -403,7 +403,7 @@ class ProfilerController
|
|||
phpinfo();
|
||||
$phpinfo = ob_get_clean();
|
||||
|
||||
return new Response($phpinfo);
|
||||
return new Response($phpinfo, 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -58,7 +58,7 @@ class RouterController
|
|||
$this->profiler->disable();
|
||||
|
||||
if (null === $this->matcher || null === $this->routes) {
|
||||
return new Response('The Router is not enabled.');
|
||||
return new Response('The Router is not enabled.', 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
|
||||
$profile = $this->profiler->loadProfile($token);
|
||||
|
@ -73,6 +73,6 @@ class RouterController
|
|||
'request' => $request,
|
||||
'router' => $profile->getCollector('router'),
|
||||
'traces' => $matcher->getTraces($request->getPathInfo()),
|
||||
)));
|
||||
)), 200, array('Content-Type' => 'text/html'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,10 @@ class Crawler extends \SplObjectStorage
|
|||
/**
|
||||
* Adds HTML/XML content.
|
||||
*
|
||||
* If the charset is not set via the content type, it is assumed
|
||||
* to be ISO-8859-1, which is the default charset defined by the
|
||||
* HTTP 1.1 specification.
|
||||
*
|
||||
* @param string $content A string to parse as HTML/XML
|
||||
* @param null|string $type The content type of the string
|
||||
*
|
||||
|
|
|
@ -128,7 +128,7 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
|
|||
throw new TransformationFailedException($formatter->getErrorMessage());
|
||||
}
|
||||
|
||||
if ($result >= INF || $result <= -INF) {
|
||||
if ($result >= PHP_INT_MAX || $result <= -PHP_INT_MAX) {
|
||||
throw new TransformationFailedException('I don\'t have a clear idea what infinity looks like');
|
||||
}
|
||||
|
||||
|
|
|
@ -207,7 +207,15 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
$this->metadataBag->stampNew();
|
||||
}
|
||||
|
||||
return session_regenerate_id($destroy);
|
||||
$ret = session_regenerate_id($destroy);
|
||||
|
||||
// workaround for https://bugs.php.net/bug.php?id=61470 as suggested by David Grudl
|
||||
session_write_close();
|
||||
$backup = $_SESSION;
|
||||
session_start();
|
||||
$_SESSION = $backup;
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -286,15 +286,17 @@ class Process
|
|||
$w = $writePipes;
|
||||
$e = null;
|
||||
|
||||
$n = @stream_select($r, $w, $e, 0, ceil(static::TIMEOUT_PRECISION * 1E6));
|
||||
|
||||
if (false === $n) {
|
||||
if (false === $n = @stream_select($r, $w, $e, 0, ceil(static::TIMEOUT_PRECISION * 1E6))) {
|
||||
// if a system call has been interrupted, forget about it, let's try again
|
||||
if ($this->hasSystemCallBeenInterrupted()) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ($n === 0) {
|
||||
proc_terminate($this->process);
|
||||
|
||||
throw new RuntimeException('The process timed out.');
|
||||
// nothing has changed, let's wait until the process is ready
|
||||
if (0 === $n) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($w) {
|
||||
|
@ -384,10 +386,9 @@ class Process
|
|||
|
||||
// let's have a look if something changed in streams
|
||||
if (false === $n = @stream_select($r, $w, $e, 0, ceil(static::TIMEOUT_PRECISION * 1E6))) {
|
||||
$lastError = error_get_last();
|
||||
|
||||
// stream_select returns false when the `select` system call is interrupted by an incoming signal
|
||||
if (isset($lastError['message']) && false === stripos($lastError['message'], 'interrupted system call')) {
|
||||
// if a system call has been interrupted, forget about it, let's try again
|
||||
// otherwise, an error occured, let's reset pipes
|
||||
if (!$this->hasSystemCallBeenInterrupted()) {
|
||||
$this->pipes = array();
|
||||
}
|
||||
|
||||
|
@ -1239,4 +1240,17 @@ class Process
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if a system call has been interrupted.
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
private function hasSystemCallBeenInterrupted()
|
||||
{
|
||||
$lastError = error_get_last();
|
||||
|
||||
// stream_select returns false when the `select` system call is interrupted by an incoming signal
|
||||
return isset($lastError['message']) && false !== stripos($lastError['message'], 'interrupted system call');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt
|
|||
}
|
||||
|
||||
/**
|
||||
* @throws MissingMandatoryParametersException When some parameters are missing that mandatory for the route
|
||||
* @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route
|
||||
* @throws InvalidParameterException When a parameter value for a placeholder is not correct because
|
||||
* it does not match the requirement
|
||||
*/
|
||||
|
|
Reference in New Issue