From 6d2135b65c2e70870d0f7bf2856f8208e3c83dbd Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Wed, 15 May 2013 18:33:29 +0200 Subject: [PATCH 01/11] force the Content-Type to html in the web profiler controllers --- .../Controller/ExceptionController.php | 6 ++-- .../Controller/ProfilerController.php | 32 +++++++++---------- .../Controller/RouterController.php | 4 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php index 64108d58ad..6d10ab641b 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php @@ -50,7 +50,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(); @@ -64,7 +64,7 @@ class ExceptionController 'logger' => null, 'currentContent' => '', ) - )); + ), 200, array('Content-Type' => 'text/html')); } /** @@ -87,7 +87,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() diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 1b2d8ded1f..4b0ba07ce9 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -61,7 +61,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')); } /** @@ -82,7 +82,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)) { @@ -98,7 +98,7 @@ class ProfilerController 'request' => $request, 'templates' => $this->getTemplateManager()->getTemplates($profile), 'is_ajax' => $request->isXmlHttpRequest(), - ))); + )), 200, array('Content-Type' => 'text/html')); } /** @@ -134,7 +134,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')); } /** @@ -151,14 +151,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')); } /** @@ -174,7 +174,7 @@ class ProfilerController return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array( 'about' => $about - ))); + )), 200, array('Content-Type' => 'text/html')); } /** @@ -195,13 +195,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) @@ -222,7 +222,7 @@ class ProfilerController 'templates' => $this->getTemplateManager()->getTemplates($profile), 'profiler_url' => $url, 'token' => $token, - ))); + )), 200, array('Content-Type' => 'text/html')); } /** @@ -262,7 +262,7 @@ class ProfilerController 'start' => $start, 'end' => $end, 'limit' => $limit, - ))); + )), 200, array('Content-Type' => 'text/html')); } /** @@ -297,7 +297,7 @@ class ProfilerController 'end' => $end, 'limit' => $limit, 'panel' => null, - ))); + )), 200, array('Content-Type' => 'text/html')); } /** @@ -330,7 +330,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); @@ -343,7 +343,7 @@ class ProfilerController 'start' => $start, 'end' => $end, 'limit' => $limit, - ))); + )), 302, array('Content-Type' => 'text/html')); } /** @@ -359,7 +359,7 @@ class ProfilerController phpinfo(); $phpinfo = ob_get_clean(); - return new Response($phpinfo); + return new Response($phpinfo, 200, array('Content-Type' => 'text/html')); } /** diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php index 430b387388..1ff9961679 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php @@ -53,7 +53,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); @@ -68,6 +68,6 @@ class RouterController 'request' => $request, 'router' => $profile->getCollector('router'), 'traces' => $matcher->getTraces($request->getPathInfo()), - ))); + )), 200, array('Content-Type' => 'text/html')); } } From 0c0a3e90e79b63215707ae7e92193f511cc0ec77 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 11 Jun 2013 09:34:22 +0200 Subject: [PATCH 02/11] [Console] fixed regression when calling a command foo:bar if there is another one like foo:bar:baz (closes #8245) --- src/Symfony/Component/Console/Application.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index d4ad03a02f..9b2a9b63c8 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -573,6 +573,10 @@ class Application return $this->get($abbrevs[$searchName][0]); } + if (isset($abbrevs[$searchName]) && in_array($searchName, $abbrevs[$searchName])) { + return $this->get($searchName); + } + if (isset($abbrevs[$searchName]) && count($abbrevs[$searchName]) > 1) { $suggestions = $this->getAbbreviationSuggestions($abbrevs[$searchName]); From ed3bcb047ae0e3b205e2e6ed7876efc21d830ebf Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 13 Jun 2013 13:40:37 +0200 Subject: [PATCH 03/11] [DomCrawler] added a note about the default charset --- src/Symfony/Component/DomCrawler/Crawler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index c56ba2afe2..f39c5d333d 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -78,6 +78,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 * From 77f2aa8ec878667219464b3998e5f40a5fa7f9f3 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 13 Jun 2013 14:48:01 +0200 Subject: [PATCH 04/11] [HttpFoundation] fixed issue with session_regenerate_id (closes #7380) --- .../Session/Storage/NativeSessionStorage.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index 4b9be5e9b2..d168f3891f 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -205,7 +205,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; } /** From c0da3ae445d0da2cd5eb30728fc28983289cacda Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 13 Jun 2013 15:45:36 +0200 Subject: [PATCH 05/11] [Process] Disable exception on stream_select timeout --- src/Symfony/Component/Process/Process.php | 34 ++++++++++++++++------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index ed4cccff3c..deabdacfe6 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -306,15 +306,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) { @@ -404,10 +406,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(); } @@ -1140,4 +1141,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'); + } } From bf881db902c6bedce69c20801fddd4f0bbd263a0 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 19 Jun 2013 14:09:01 +0200 Subject: [PATCH 06/11] updated CHANGELOG for 2.2.3 --- CHANGELOG-2.2.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG-2.2.md b/CHANGELOG-2.2.md index 7c7001f03c..4b5eccd9db 100644 --- a/CHANGELOG-2.2.md +++ b/CHANGELOG-2.2.md @@ -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) From 8c353ddde6bcd6f1ab7c664e6800dbaf17f4d649 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 19 Jun 2013 14:09:22 +0200 Subject: [PATCH 07/11] update CONTRIBUTORS for 2.2.3 --- CONTRIBUTORS.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4cc61bf785..5d9190350e 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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 From 74a033d95b809f67ea4ccad9f07fad8422448319 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 19 Jun 2013 14:09:49 +0200 Subject: [PATCH 08/11] updated VERSION for 2.2.3 --- 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 265c8fee84..febe26e79f 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -62,12 +62,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $classes; protected $errorReportingLevel; - const VERSION = '2.2.3-DEV'; + const VERSION = '2.2.3'; const VERSION_ID = '20203'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '2'; const RELEASE_VERSION = '3'; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; /** * Constructor. From 5b14665964b6f17412aa8343f7f39dc2a5616e21 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 19 Jun 2013 15:03:30 +0200 Subject: [PATCH 09/11] bumped Symfony version to 2.2.4 --- 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 febe26e79f..8d99a7938d 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -62,12 +62,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $classes; protected $errorReportingLevel; - const VERSION = '2.2.3'; - const VERSION_ID = '20203'; + const VERSION = '2.2.4-DEV'; + const VERSION_ID = '20204'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '2'; - const RELEASE_VERSION = '3'; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = '4'; + const EXTRA_VERSION = 'DEV'; /** * Constructor. From a2e440a52c1e24093cc27b153f4ff716ec4138ce Mon Sep 17 00:00:00 2001 From: Michael Squires Date: Sat, 22 Jun 2013 22:16:37 -0600 Subject: [PATCH 10/11] Fix grammar --- src/Symfony/Component/Routing/Generator/UrlGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Routing/Generator/UrlGenerator.php b/src/Symfony/Component/Routing/Generator/UrlGenerator.php index 9dac1c1f4c..5ab5dd2558 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGenerator.php +++ b/src/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -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 */ From c875d0aae19629e63046f74c0d951466646c2a6c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 23 Jun 2013 09:35:41 +0200 Subject: [PATCH 11/11] [Form] fixed INF usage which does not work on Solaris (closes #8246) --- .../Core/DataTransformer/NumberToLocalizedStringTransformer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php index 689c74a94a..b0c59b3ede 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php @@ -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'); }