diff --git a/CHANGELOG-2.0.md b/CHANGELOG-2.0.md index e6642d20ca75..7c8c0e8a04c4 100644 --- a/CHANGELOG-2.0.md +++ b/CHANGELOG-2.0.md @@ -7,6 +7,32 @@ in 2.0 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.0.0...v2.0.1 +* 2.0.12 (2012-03-19) + + * 54b2413: Webprofiler ipv6 search fix + * 8642473: Changed instances of \DateTimeZone::UTC to 'UTC' as the constant is not valid a produces this error when DateTimeZone is instantiated: DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (1024) + * fbed9ff: Update src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php + * 1b395f5: Revert "Throw exception when "date_widget" option is not equal to "time_widget"" + * ed218bb: Fixed an "Array to string conversion" warning when using PHP 5.4. Also affects Symfony2 master. + * 50cb486: Fixed proxy generation in the DoctrineBundle when using Doctrine >= 2.2.0 + * 93cc9ef: [Validator] Remove a race condition in the ClassMetaDataFactory (fix #3217) + * 878c239: Fixed autoloader leakage in tests + * 17c3482: fixed timezone bug in DateTimeToTimestampTransformer + * 705e460: provided unmerged definition for correct help generation + * 45bbb5b: added getNativeDefinition() to allow specifying an alternate InputDefinition for help generation + * aa53b88: Sets _format attribute only if it wasn't set previously by the user + * a827375: [CssSelector] fixed CssSelector::toXPath() when the CSS selector is an empty string + * ad07a95: [BrowserKit] Fixed Client->back/forward/reload() not keeping all request attributes + * eee5065: [TwigBundle] Workaround a flaw in the design of the configuration (normalization) + * 7aad478: [Locale] Prevent empty bundle + * a894431: [DependencyInjection] Allow parsing of parameters near escaped percent signs + * f758884: [FrameworkBundle] ContainerAwareEventDispatcher::removeListener() (closes #3115) + * 8fe6ee3: [Console] fixed help command when used from the shell (closes #3480) + * caa44ae: Only work with the cli sapi + * e2fc3cd: [Process] PHP_BINARY return the current process + * dc2d5a0: [HttpFoundation][Session] Fix bug in PDO Session Storage with SQLSRV making assumptions about parameters with length being OUTPUT not INPUT parameters. + * e8281cf: SqliteProfilerStorage fix + * 2.0.11 (2012-02-24) * 3e64d36: [Serializer] Fix XML decoding attack vector through external entities diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 3690261533b6..8da402ac2cff 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -7,70 +7,74 @@ Symfony2 is the result of the work of many people who made the code better - Fabien Potencier (fabpot) - Bernhard Schussek (bschussek) - Johannes (schmittjoh) - - Kris Wallsmith (kriswallsmith) - Victor Berchet (vicb) + - Kris Wallsmith (kriswallsmith) - Jordi Boggiano (Seldaek) - Christophe Coevoet (stof) - Ryan Weaver (weaverryan) - Pascal Borreli (pborreli) - Lukas Kahwe Smith (lsmith77) - Benjamin Eberlei (beberlei) + - Jeremy Mikola (jmikola) - Igor Wiedler (igorw) - Joseph Bielawski (stloyd) - - Jeremy Mikola (jmikola) + - Drak (drak) - Hugo Hamon (hhamon) - Jonathan H. Wage (jwage) - Thibault Duplessis (ornicar) - Alexandre Salomé (alexandresalome) - - Bulat Shakirzyanov (avalanche123) - Eriksen Costa (eriksencosta) - - Francis Besset (francisbesset) + - Bulat Shakirzyanov (avalanche123) - stealth35 (stealth35) + - Francis Besset (francisbesset) - Miha Vrhovnik (mvrhov) - Henrik Bjørnskov (henrikbjorn) - Martin Hasoň (hason) + - Henrik Westphal (snc) - Eric Clemmons (ericclemmons) - Konstantin Kudryashov (everzet) - Dariusz Górecki (canni) - Arnout Boks (aboks) + - William DURAND (willdurand) + - Deni (yethee) - Brandon Turner (blt04) - Hidenori Goto (hidenorigoto) - - Henrik Westphal (snc) - John Wards (johnwards) - - Drak (drak) - - yethee (yethee) - Lenar Lõhmus (lenar) + - Marc Weistroff (marcw) - Brikou CARRE (brikou) - Daniel Holmes (danielholmes) - Antoine Hérault (Herzult) - Fabien Pennequin (FabienPennequin) - - Marc Weistroff (marcw) + - Andrej Hudec (pulzarraider) + - Sebastian Hörl (blogsh) - Jacob Dreesen (jdreesen) - Richard Shank (IamPersistent) - - William DURAND (willdurand) + - Kevin Bond (kbond) - Jordan Alliot (jalliot) - Excel Web Zone (excelwebzone) - Katsuhiro OGAWA (fivestar) + - Jeremy Mikola - Tobias Schultze (Tobion) - blue-eyes (blue-eyes) - Robert Schönthal (digitalkaoz) - Tim Nagel (merk) - Michel Weimerskirch (mweimerskirch) - Tigran Azatyan (tigranazatyan) + - Pierre Minnieur (pminnieur) - Christian Raue (craue) + - umpirsky (umpirsky) - Helmer Aaviksoo (helmer) - Jakub Zalas (jakzal) - Javier Eguiluz (javiereguiluz) - Matthieu Vachon (maoueh) - Amal Raghav (kertz) - Artur Kotyrba (udat) - - Kevin Bond (kbond) - - umpirsky (umpirsky) + - Daniel Gomes (danielcsgomes) - Clément JOBEILI (dator) - Bart van den Burg (Burgov) - Benjamin Dulau (benjamindulau) - Noel GUILBERT (noelg) - - Andrej Hudec (pulzarraider) - Martin Schuhfuss (usefulthink) - Thomas (rande) - Dennis Benkert (denderello) @@ -80,33 +84,36 @@ Symfony2 is the result of the work of many people who made the code better - Justin Hileman (bobthecow) - Sven Paulus (subsven) - Xavier Perez (DuoSRX) - - Brouznouf (Brouznouf) + - Joel Wurtz (Brouznouf) + - Alexander (asm89) + - Jonathan Ingram (jonathaningram) - Pablo Godel (pgodel) - Francois Zaninotto - Leszek Prabucki (l3l0) - Francois Zaninotto (fzaninotto) - - Xavier Montaña (xmontana) + - Xavier Montaña Carreras (xmontana) - Arjen Brouwer (arjenjb) - Alif Rachmawadi (subosito) + - Florin Patan (dlsniper) - Boussekeyt Jules (gordonslondon) - Jan Sorgalla (jsor) + - Marcel Beerta (mazen) - Lee McDermott (lmcd) + - Toni Uebernickel (havvg) - Richard Miller (richardmiller) - Jeroen Hoek (jdhoek) + - Rafael Dohms (rdohms) - geoffrey - - Matthew Lewinski (lewinski) - Wotre (Wotre) - - Pierre Minnieur (pminnieur) - - Daniel Gomes (danielcsgomes) + - Gyula Sallai (thesalla) + - Grégoire Pineau (lyrixx) - Danny Berger (dpb587) - - dlsniper (dlsniper) - Jérémie Augustin (jaugustin) - - Sebastian Hörl (blogsh) - Joseph Rouff (rouffj) - Manuel Kiessling (ManuelKiessling) - dbu - - asm89 (asm89) - Julien Brochet (aerialls) + - Douglas Greenshields (shieldo) - Aurelijus Valeiša (aurelijus) - Gustavo Piltcher - Ray (rrehbeindoi) @@ -114,21 +121,25 @@ Symfony2 is the result of the work of many people who made the code better - Adrian Rudnik (kreischweide) - Gábor Egyed (1ed) - Andréia Bohner (andreia) + - Andreas Hucks (meandmymonkey) + - Drak + - Jérémy Romey (jeremyFreeAgent) - Yuen-Chi Lian (yclian) - Greg Thornton (xdissent) - Lars Strojny (lstrojny) + - Arnaud Le Blanc (arnaud-lb) - Costin Bereveanu (schniper) - - Douglas Greenshields (shieldo) - Konstantin Leboev (realmfoo) + - Tobias Naumann (tna) - Donald Tyler (Chekote) + - Matthew Lewinski - Kai - - Gyula Sallai (thesalla) - Sergey Linnik (Partugal) - Laszlo Korte (laszlokorte) - - Toni Uebernickel (havvg) - Hubert LECORCHE (hlecorche) - Michael Ridgway (mridgway) - Stepan Tanasiychuk (stfalcon) + - Pavel Campr (pcampr) - Bertrand Zuchuat (Garfield-fr) - brki (brki) - Michel Salib (michelsalib) @@ -152,25 +163,24 @@ Symfony2 is the result of the work of many people who made the code better - Manuel Reinhard (sprain) - Thomas Adam (tecbot) - Nils Adermann (naderman) - - Tobias Naumann (tna) - Shein Alexey (conf) - - Jonathan Ingram (jonathaningram) - Steven Surowiec (steves) - Marcin Chylek (SongoQ) - - arnaud-lb (arnaud-lb) - Ivan Rey (ivanrey) - Ryan Rogers (timewasted) - Ned Schwartz (theinterned) - Aurélien Fredouelle (AurelC2G) - flevour (flevour) + - stealth35 - Oscar Cubo Medina (ocubom) + - IP_FIX (eversonfix) - Geoffrey Tran (geoffreytran) - Christian Schaefer (caefer) - Elliot Anderson (elliot) - Olivier Dolbeau (odolbeau) - José Nahuel Cuesta Luengo (ncuesta) - Dustin Dobervich (dustin10) - - erheme318 (erheme318) + - Erkhembayar Gantulga (erheme318) - Michael Holm (hollodk) - Rostyslav Kinash - yktd26 (yktd26) @@ -178,13 +188,13 @@ Symfony2 is the result of the work of many people who made the code better - Hossein Bukhamsin (husinluck) - Fabrice Bernhard (fabriceb) - develop - - 77web (77web) + - Hiromi Hishida (77web) - Joshua Nye (zerosanity) - andrewtch (andrewtch) - markchalloner (markchalloner) - Michael Williams (mtotheikle) - - Casper Valdemar Poulsen - - franmomu (franmomu) + - Casper Valdemar Poulsen (cvaldemar) + - Fran Moreno (franmomu) - Degory Valentine - Krzysiek Łabuś (Crozin) - superjavason (superjavason) @@ -194,31 +204,41 @@ Symfony2 is the result of the work of many people who made the code better - Peter Kruithof (pkruithof) - Albert Jessurum (ajessu) - frost-nzcr4 (frost-nzcr4) - - Abhoryo (Abhoryo) + - Petit Yoann (Abhoryo) - Fabian Vogler (fabian) - - Maksim Kotlyar (makasim) + - Maksim Kotlyar - Grégoire Passault (Gregwar) - Manuel de Ruiter (ManuelAC) - Cyril Quintin (cyqui) - Gerard van Helden (drm) + - Johnny Peck (johnnypeck) - kazusuke sasezaki (sasezaki) + - Benjamin Lévêque (benji07) - Matt Robinson (inanimatt) + - root - Chris Smith (cs278) - Derek ROTH (DerekRoth) - mwsaz + - Sergey Skopin (grizlik) - Emil Einarsson (Einarsson) + - Yanick Witschi (Toflar) - Don Pinkster + - Saem Ghani (saem) - Michael Roterman (wtfzdotnet) - Arno Geurts - Marek Kalnik (marekkalnik) - Daniel Cestari (dcestari) + - Jérémy CROMBEZ (jcrombez) - Magnus Nordlander (magnusnordlander) - Adam Monsen (meonkeys) + - Michał Pipa (michal-pipa) - Robert Gruendler (pulse00) + - Sebastian Busch (sbusch) - Benoît Merlet (trompette) - Jan Behrens (deegital) - sensio - Théophile Helleboid - chtitux (chtitux) + - Matthew Lewinski (lewinski) - xaav - Anton Babenko (antonbabenko) - irmantas (irmantas) @@ -239,11 +259,14 @@ Symfony2 is the result of the work of many people who made the code better - Neil Katin - Gustavo Adrian - Nicolas Fabre (nfabre) + - Clément Herreman (clemherreman) - heccjj (heccjj) - Sebastian Utz (seut) - Cédric Lahouste (RapotOR) - George Giannoulopoulos (dotoree) - Alberto Pirovano (geezmo) + - Xavier Briand (xavierbriand) + - Markus Lanthaler (lanthaler) - Klein Florian (docteurklein) - JerikVenture (JerikVenture) - Evan Kaufman (EvanK) @@ -252,7 +275,7 @@ Symfony2 is the result of the work of many people who made the code better - Sebastian Ionescu - Dirk Pahl (dirkaholic) - Nicolas Badey (Nico-B) - - pscheit (pscheit) + - Philipp Scheit (pscheit) - Bouke Haarsma (Bouke) - Lars Strojny - Yrwein (Yrwein) @@ -260,14 +283,15 @@ Symfony2 is the result of the work of many people who made the code better - Thomas Bibb (thomasbibb) - Ivan Kurnosov - stloyd + - Martin Parsiegla - Christoph Nißle (DerStoffel) - Luis Muñoz + - Thomas Chmielowiec (chmielot) - Oleg Zinchenko (cystbear) - Grégoire Paris (greg0ire) - Guilherme Blanco (guilhermeblanco) - Stefano Sala (stewe) - Romain Dorgueil - - Benjamin Lévêque (benji07) - Benjamin Zikarsky (bzikarsky) - alefranz (alefranz) - Andy Stanberry (cranberyxl) @@ -276,7 +300,8 @@ Symfony2 is the result of the work of many people who made the code better - Philip Dahlstrøm (phidah) - Gustavo Falco - gnat42 (gnat42) - - patashnik (patashnik) + - Alexey Popkov (patashnik) + - Alexander Miehe (Engerim) - devel - HIROKI (hirocaster) - jpauli (jpauli) @@ -297,14 +322,17 @@ Symfony2 is the result of the work of many people who made the code better - Juan M Martínez - Alex - agilemedialab (agilemedialab) + - Alan Chen (alan0101c) - Masao Maeda (brtriver) - - Gustavo Adrian (comfortablynumb) + - Gustavo Falco (comfortablynumb) - Denis Klementjev (dklementjev) - Kévin Dunglas (dunglas) - Gabriel Birke (gbirke) + - Ismael Ambrosi (iambrosi) - Osman Üngür (import) - Robert Campbell (jayrulez) - - Maerlyn (maerlyn) + - John Bohn (jjbohn) + - Gábor Fási (maerlyn) - Matthew Davis (mdavis1982) - Matt Lehner (mlehner) - Matthias (mpdude) @@ -317,18 +345,20 @@ Symfony2 is the result of the work of many people who made the code better - Beau Simensen (simensen) - Tom Van Looy (tvlooy) - Juan Ases García (Ases) - - FabienD (FabienD) + - Eugene Babushkin (EugeneBabushkin) + - Fabien D. (FabienD) - Jörg Rühl (LennyLinux) - Matt Drollette (MDrollette) - - Skorney (Skorney) + - Kornienko Alexander (Skorney) - Vincent (Vincent-P) - Drew Butler - Pierre-Louis LAUNAY - Sébastien HOUZE - Sergiy Sokolenko + - Adrien Brault (adrienbrault) - Bernd Matzner (bmatzner) - Vladimir Sazhin (cannie) - - catchamonkey (catchamonkey) + - Chris Sedlmayr (catchamonkey) - Christian Stocker (chregu) - chx (chx) - Luis Cordova (cordoval) @@ -337,10 +367,10 @@ Symfony2 is the result of the work of many people who made the code better - ds (dantleech) - Djama Suemenich (djama) - Daniel Londero (dlondero) - - dorkitude (dorkitude) + - Kyle W (dorkitude) - David Soria Parra (dsp) - Kousuke Ebihara (ebihara) - - Vladislav (ideea) + - ideea (ideea) - John Carr (Jc2k) - jdewit (jdewit) - Justin Rainbow (justinrainbow) @@ -349,29 +379,29 @@ Symfony2 is the result of the work of many people who made the code better - kwiateusz (kwiateusz) - Samuel Laulhau (lalop) - Javier López (loalf) + - Matt Fitzgerald (matthewfitz) - Penny Leach (mjollnir) - Michael Schneider (mschneid) - Oncle Tom (oncletom) - ouardisoft (ouardisoft) - - Pavel Campr (pcampr) + - patrick-mcdougle (patrick-mcdougle) - Petr Jaroš (petajaros) - pzwosta (pzwosta) - - Rafael Dohms (rdohms) - Ruud Kamphuis (ruudk) - Markus Tacker (tacker) - - Matt Fitzgerald (tirnanog06) - Tyler Stroud (tystr) - Vyacheslav Slinko (vslinko) - Josiah (web-dev) + - xanido (xanido) - Xavier HAUSHERR (xkobal) + - drublic - Gustavo Adrian - max - - Hans (drublic) + - Craig Marvelley (craigmarvelley) - m0ppers (m0ppers) - - Marcel Beerta (mazen) - Muharrem Demirci (mdemirci) - meze (meze) - - Michael (mshtukin) + - Michael Shtukin (mshtukin) - Nicolas de Marqué Fromentin (nicodmf) - Florent Cailhol (ooflorent) - Pierre (ptheg) diff --git a/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php b/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php index 5ba96b5574f9..bd21047421d1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php +++ b/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php @@ -153,6 +153,7 @@ public function render($controller, array $options = array()) $options['attributes']['_route'] = '_internal'; $subRequest = $request->duplicate($options['query'], null, $options['attributes']); + $subRequest->setMethod('GET'); } $level = ob_get_level(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hr.xliff b/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hr.xliff new file mode 100644 index 000000000000..83d188fa4075 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.hr.xliff @@ -0,0 +1,171 @@ + + + + + + This value should be false + Ova vrijednost treba biti netočna + + + This value should be true + Ova vrijednost treba biti točna + + + This value should be of type {{ type }} + Ova vrijednost treba biti tipa {{ type }} + + + This value should be blank + Ova vrijednost treba biti prazna + + + The value you selected is not a valid choice + Ova vrijednost treba biti jedna od ponuđenih + + + You must select at least {{ limit }} choices + Izaberite barem {{ limit }} mogućnosti + + + You must select at most {{ limit }} choices + Izaberite najviše {{ limit }} mogućnosti + + + One or more of the given values is invalid + Jedna ili više danih vrijednosti nije ispravna + + + The fields {{ fields }} were not expected + Polja {{ fields }} nisu bila očekivana + + + The fields {{ fields }} are missing + Polja {{ fields }} nedostaju + + + This value is not a valid date + Ova vrijednost nije ispravan datum + + + This value is not a valid datetime + Ova vrijednost nije ispravan datum-vrijeme + + + This value is not a valid email address + Ova vrijednost nije ispravna e-mail adresa + + + The file could not be found + Datoteka ne može biti pronađena + + + The file is not readable + Datoteka nije čitljiva + + + The file is too large ({{ size }}). Allowed maximum size is {{ limit }} + Datoteka je prevelika ({{ size }}). Najveća dozvoljena veličina je {{ limit }} + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }} + Mime tip datoteke nije ispravan ({{ type }}). Dozvoljeni mime tipovi su {{ types }} + + + This value should be {{ limit }} or less + Ova vrijednost treba biti {{ limit }} ili manje + + + This value is too long. It should have {{ limit }} characters or less + Ova vrijednost je predugačka. Treba imati {{ limit }} znakova ili manje + + + This value should be {{ limit }} or more + Ova vrijednost treba biti {{ limit }} ili više + + + This value is too short. It should have {{ limit }} characters or more + Ova vrijednost je prekratka. Treba imati {{ limit }} znakova ili više + + + This value should not be blank + Ova vrijednost ne smije biti prazna + + + This value should not be null + Ova vrijednost ne smije biti null + + + This value should be null + Ova vrijednost treba biti null + + + This value is not valid + Ova vrijednost nije ispravna + + + This value is not a valid time + Ova vrijednost nije ispravno vrijeme + + + This value is not a valid URL + Ova vrijednost nije ispravan URL + + + This form should not contain extra fields + Ovaj obrazac ne smije sadržavati dodatna polja + + + The uploaded file was too large. Please try to upload a smaller file + Prenesena datoteka je prevelika. Molim pokušajte prenijeti manju datoteku + + + The CSRF token is invalid + CSRF vrijednost nije ispravna + + + The two values should be equal + Obje vrijednosti trebaju biti jednake + + + The file is too large. Allowed maximum size is {{ limit }} + Ova datoteka je prevelika. Najveća dozvoljena veličina je {{ limit }} + + + The file is too large + Ova datoteka je prevelika + + + The file could not be uploaded + Ova datoteka ne može biti prenesena + + + This value should be a valid number + Ova vrijednost treba biti ispravan broj + + + This file is not a valid image + Ova datoteka nije ispravna slika + + + This is not a valid IP address + Ovo nije ispravna IP adresa + + + This value is not a valid language + Ova vrijednost nije ispravan jezik + + + This value is not a valid locale + Ova vrijednost nije ispravana regionalna oznaka + + + This value is not a valid country + Ova vrijednost nije ispravna zemlja + + + This value is already used + Ova vrijednost je već iskorištena + + + + \ No newline at end of file diff --git a/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php b/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php index e4ca988f5149..d676f820861c 100644 --- a/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php +++ b/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php @@ -61,13 +61,15 @@ public function showAction(FlattenException $exception, DebugLoggerInterface $lo protected function getAndCleanOutputBuffering() { - // the count variable avoids an infinite loop on - // some Windows configurations where ob_get_level() - // never reaches 0 - $count = 100; + // ob_get_level() never returns 0 on some Windows configurations, so if + // the level is the same two times in a row, the loop should be stopped. + $previousObLevel = null; $startObLevel = $this->container->get('request')->headers->get('X-Php-Ob-Level', -1); + $currentContent = ''; - while (ob_get_level() > $startObLevel && --$count) { + + while (($obLevel = ob_get_level()) > $startObLevel && $obLevel !== $previousObLevel) { + $previousObLevel = $obLevel; $currentContent .= ob_get_clean(); } diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php index e7a7e04535e5..7c258a6a4ea7 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -36,7 +36,21 @@ public function load(array $configs, ContainerBuilder $container) $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('twig.xml'); + foreach ($configs as &$config) { + if (isset($config['globals'])) { + foreach ($config['globals'] as $name => $value) { + if (is_array($value) && isset($value['key'])) { + $config['globals'][$name] = array( + 'key' => $name, + 'value' => $config['globals'][$name] + ); + } + } + } + } + $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfiguration($configuration, $configs); $container->setParameter('twig.exception_listener.controller', $config['exception_controller']); diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php index 5ebfc0141ef5..7733f17b9fa8 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php @@ -9,6 +9,7 @@ 'globals' => array( 'foo' => '@bar', 'pi' => 3.14, + 'bad' => array('key' => 'foo'), ), 'auto_reload' => true, 'autoescape' => true, diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/full.yml b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/full.yml index ecad2a9f440e..baf76619977a 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/full.yml +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/yml/full.yml @@ -3,8 +3,9 @@ twig: resources: - MyBundle::form.html.twig globals: - foo: @bar + foo: "@bar" pi: 3.14 + bad: {key: foo} auto_reload: true autoescape: true base_template_class: stdClass diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php index 1456cbb46347..88e2399b3f02 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php @@ -64,6 +64,12 @@ public function testLoadFullConfiguration($format) $this->assertEquals('pi', $calls[1][1][0], '->load() registers variables as Twig globals'); $this->assertEquals(3.14, $calls[1][1][1], '->load() registers variables as Twig globals'); + // Yaml and Php specific configs + if (in_array($format, array('yml', 'php'))) { + $this->assertEquals('bad', $calls[2][1][0], '->load() registers variables as Twig globals'); + $this->assertEquals(array('key' => 'foo'), $calls[2][1][1], '->load() registers variables as Twig globals'); + } + // Twig options $options = $container->getParameter('twig.options'); $this->assertTrue($options['auto_reload'], '->load() sets the auto_reload option'); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index f88b5025c788..e203165af83c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -263,7 +263,7 @@ public function searchAction() $request = $this->container->get('request'); - $ip = preg_replace('/[^\d\.]/', '', $request->query->get('ip')); + $ip = preg_replace('/[^:\d\.]/', '', $request->query->get('ip')); $method = $request->query->get('method'); $url = $request->query->get('url'); $limit = $request->query->get('limit'); diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php index c477aa39e293..e686b362dcf9 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php @@ -57,7 +57,7 @@ public function buildForm(FormBuilder $builder, array $options) \Locale::getDefault(), $format, \IntlDateFormatter::NONE, - \DateTimeZone::UTC, + 'UTC', \IntlDateFormatter::GREGORIAN, $pattern ); diff --git a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php b/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php index 0577dcfd038e..c7a90e4ef81a 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php @@ -76,6 +76,7 @@ public function onKernelException(GetResponseForExceptionEvent $event) ); $request = $request->duplicate(null, null, $attributes); + $request->setMethod('GET'); try { $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, true); diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index e0a3d12f3c27..ce3e005d920e 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -516,7 +516,8 @@ protected function lock(Request $request, Response $entry) // wait for the lock to be released $wait = 0; while (is_file($lock) && $wait < 5000000) { - usleep($wait += 50000); + usleep(50000); + $wait += 50000; } if ($wait < 2000000) {