Merge branch '2.6' into 2.7

* 2.6:
  bumped Symfony version to 2.6.4
  updated VERSION for 2.6.3
  updated CHANGELOG for 2.6.3
  bumped Symfony version to 2.6.3
  updated VERSION for 2.6.2
  updated CHANGELOG for 2.6.2
  bumped Symfony version to 2.5.10
  updated VERSION for 2.5.9
  updated CHANGELOG for 2.5.9
  [FrameworkBundle] Use security.token_storage service in Controller::getUser()
  bumped Symfony version to 2.3.25
  updated VERSION for 2.3.24
  update CONTRIBUTORS for 2.3.24
  Removed unneeded version requirements
  updated CHANGELOG for 2.3.24
  fixed tests
  [Security] Don't destroy the session on buggy php releases.
  [Process] Fix input reset in WindowsPipes
  add back model_timezone and view_timezone options

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
This commit is contained in:
Fabien Potencier 2015-01-07 16:58:19 +01:00
commit 0577065abd
14 changed files with 413 additions and 68 deletions

View File

@ -7,6 +7,30 @@ 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 between two versions, go to https://github.com/symfony/symfony/compare/v2.3.0...v2.3.1
* 2.3.24 (2015-01-07)
* bug #13286 [Security] Don't destroy the session on buggy php releases. (derrabus)
* bug #12417 [HttpFoundation] Fix an issue caused by php's Bug #66606. (wusuopu)
* bug #13200 Don't add Accept-Range header on unsafe HTTP requests (jaytaph)
* bug #12491 [Security] Don't send remember cookie for sub request (blanchonvincent)
* bug #12574 [HttpKernel] Fix UriSigner::check when _hash is not at the end of the uri (nyroDev)
* bug #13185 Fixes Issue #13184 - incremental output getters now return empty strings (Bailey Parker)
* bug #13145 [DomCrawler] Fix behaviour with <base> tag (dkop, WouterJ)
* bug #13141 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment (fabpot)
* bug #13114 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head... (fabpot)
* bug #12572 [HttpFoundation] fix checkip6 (Neime)
* bug #13075 [Config] fix error handler restoration in test (nicolas-grekas)
* bug #13081 [FrameworkBundle] forward error reporting level to insulated Client (nicolas-grekas)
* bug #13053 [FrameworkBundle] Fixed Translation loader and update translation command. (saro0h)
* bug #13048 [Security] Delete old session on auth strategy migrate (xelaris)
* bug #12999 [FrameworkBundle] fix cache:clear command (nicolas-grekas)
* bug #13004 add a limit and a test to FlattenExceptionTest. (Daniel Wehner)
* bug #12961 fix session restart on PHP 5.3 (Tobion)
* bug #12761 [Filesystem] symlink use RealPath instead LinkTarget (aitboudad)
* bug #12855 [DependencyInjection] Perf php dumper (nicolas-grekas)
* bug #12894 [FrameworkBundle][Template name] avoid error message for the shortcut n... (aitboudad)
* bug #12858 [ClassLoader] Fix undefined index in ClassCollectionLoader (szicsu)
* 2.3.23 (2014-12-03)
* bug #12811 Configure firewall's kernel exception listener with configured entry point or a default entry point (rjkip)

View File

@ -7,6 +7,38 @@ in 2.5 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.5.0...v2.5.1
* 2.5.9 (2015-01-07)
* bug #13286 [Security] Don't destroy the session on buggy php releases. (derrabus)
* bug #12417 [HttpFoundation] Fix an issue caused by php's Bug #66606. (wusuopu)
* bug #13200 Don't add Accept-Range header on unsafe HTTP requests (jaytaph)
* bug #12491 [Security] Don't send remember cookie for sub request (blanchonvincent)
* bug #12574 [HttpKernel] Fix UriSigner::check when _hash is not at the end of the uri (nyroDev)
* bug #13185 Fixes Issue #13184 - incremental output getters now return empty strings (Bailey Parker)
* bug #13173 [Debug] fixes ClassNotFoundFatalErrorHandler to correctly handle class not found errors with Symfony ClassLoader component autoloaders. (hhamon)
* bug #13145 [DomCrawler] Fix behaviour with <base> tag (dkop, WouterJ)
* bug #13027 fix #10054 - form data collector with dynamic fields (zulus)
* bug #13141 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment (fabpot)
* bug #13114 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head... (fabpot)
* bug #12572 [HttpFoundation] fix checkip6 (Neime)
* bug #13093 [TwigBundle] added missing absolute URL in Twig exceptions (fabpot)
* bug #12975 [FrameworkBundle] Allow custom services for validator mapping cache. (jakzal)
* bug #13075 [Config] fix error handler restoration in test (nicolas-grekas)
* bug #13085 [FrameworkBundle] Fix dependency on ExtensionInterface over implementation (xphere)
* bug #13081 [FrameworkBundle] forward error reporting level to insulated Client (nicolas-grekas)
* bug #13053 [FrameworkBundle] Fixed Translation loader and update translation command. (saro0h)
* bug #13048 [Security] Delete old session on auth strategy migrate (xelaris)
* bug #12999 [FrameworkBundle] fix cache:clear command (nicolas-grekas)
* bug #13004 add a limit and a test to FlattenExceptionTest. (Daniel Wehner)
* bug #12961 fix session restart on PHP 5.3 (Tobion)
* bug #12548 [Form] fixed a maxlength overring on a guessing (origaminal)
* bug #12761 [Filesystem] symlink use RealPath instead LinkTarget (aitboudad)
* bug #12848 [EventDispatcher] Fixed #12845 adding a listener to an event that is currently being dispatched (Pieter Jordaan)
* bug #12855 [DependencyInjection] Perf php dumper (nicolas-grekas)
* bug #12894 [FrameworkBundle][Template name] avoid error message for the shortcut n... (aitboudad)
* bug #12806 [Console] Removed the use of $this->getHelperSet() as it is null by default (saro0h)
* bug #12858 [ClassLoader] Fix undefined index in ClassCollectionLoader (szicsu)
* 2.5.8 (2014-12-03)
* bug #12811 Configure firewall's kernel exception listener with configured entry point or a default entry point (rjkip)

View File

@ -7,6 +7,61 @@ in 2.6 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.6.0...v2.6.1
* 2.6.3 (2015-01-07)
* bug #13286 [Security] Don't destroy the session on buggy php releases. (derrabus)
* 2.6.2 (2015-01-07)
* feature #13241 [Form] add back model_timezone and view_timezone options (xabbuh)
* bug #13297 [Process] Fix input reset in WindowsPipes (mpajunen)
* bug #12417 [HttpFoundation] Fix an issue caused by php's Bug #66606. (wusuopu)
* bug #13200 Don't add Accept-Range header on unsafe HTTP requests (jaytaph)
* bug #12491 [Security] Don't send remember cookie for sub request (blanchonvincent)
* bug #12574 [HttpKernel] Fix UriSigner::check when _hash is not at the end of the uri (nyroDev)
* bug #13185 Fixes Issue #13184 - incremental output getters now return empty strings (Bailey Parker)
* bug #13153 [TwigBridge] bootstrap_3_layout.html.twig inline form rendering button problem fix #13150 (edvinasme)
* bug #13183 [DependencyInjection] force ExpressionLanguage version >= 2.6 (xabbuh)
* bug #13173 [Debug] fixes ClassNotFoundFatalErrorHandler to correctly handle class not found errors with Symfony ClassLoader component autoloaders. (hhamon)
* bug #13166 Fix a web profiler form issue with fields added to the form after the form was built (jakzal)
* bug #12911 Fix wrong DateTransformer timezone param for non-UTC configuration (Soullivaneuh)
* bug #13145 [DomCrawler] Fix behaviour with <base> tag (dkop, WouterJ)
* bug #13027 fix #10054 - form data collector with dynamic fields (zulus)
* bug #13141 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment (fabpot)
* bug #13114 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head... (fabpot)
* bug #12572 [HttpFoundation] fix checkip6 (Neime)
* bug #13109 [Filesystem] restore ability to create broken symlinks (nicolas-grekas)
* bug #13093 [TwigBundle] added missing absolute URL in Twig exceptions (fabpot)
* bug #13087 [DependencyInjection] use/fix newest Definition::setFactory (nicolas-grekas)
* bug #12975 [FrameworkBundle] Allow custom services for validator mapping cache. (jakzal)
* bug #13068 Add LegacyPdoSessionHandler class (jeremylivingston)
* bug #13075 [Config] fix error handler restoration in test (nicolas-grekas)
* bug #13073 [VarDumper] fix and test PdoCaster (nicolas-grekas)
* bug #13085 [FrameworkBundle] Fix dependency on ExtensionInterface over implementation (xphere)
* bug #13081 [FrameworkBundle] forward error reporting level to insulated Client (nicolas-grekas)
* bug #13053 [FrameworkBundle] Fixed Translation loader and update translation command. (saro0h)
* bug #12900 [WebProfilerBundle] Fixed IE8 support (korotovsky)
* bug #13047 [FrameworkBundle][Logging Translator] skip if param "translator.logging" doesn't exist. (aitboudad)
* bug #13048 [Security] Delete old session on auth strategy migrate (xelaris)
* bug #13035 Added the function providers as container resources (stof)
* bug #13021 [FrameworkBundle] skip compiler pass if interface doesn't exist (xabbuh)
* bug #12999 [FrameworkBundle] fix cache:clear command (nicolas-grekas)
* bug #13004 add a limit and a test to FlattenExceptionTest. (Daniel Wehner)
* bug #13013 Unify the way to provide expression functions for the DI container (stof)
* bug #13009 [DebugBundle] fix link format handling with disabled templating (xabbuh)
* bug #12996 [WebProfilerBundle] Fix placeholder date format (mvar)
* bug #12961 fix session restart on PHP 5.3 (Tobion)
* bug #12548 [Form] fixed a maxlength overring on a guessing (origaminal)
* bug #12761 [Filesystem] symlink use RealPath instead LinkTarget (aitboudad)
* bug #12848 [EventDispatcher] Fixed #12845 adding a listener to an event that is currently being dispatched (Pieter Jordaan)
* bug #12935 [Security] Fixed ExpressionVoter - addExpressionLanguageProvider (Luca Genuzio)
* bug #12855 [DependencyInjection] Perf php dumper (nicolas-grekas)
* bug #12899 [WebProfiler] Tweaked ajax requests toolbar css reset (1ed)
* bug #12913 Fix missing space in label_attr (garak)
* bug #12894 [FrameworkBundle][Template name] avoid error message for the shortcut n... (aitboudad)
* bug #12806 [Console] Removed the use of $this->getHelperSet() as it is null by default (saro0h)
* bug #12858 [ClassLoader] Fix undefined index in ClassCollectionLoader (szicsu)
* 2.6.1 (2014-12-03)
* bug #12823 [DependencyInjection] fix PhpDumper (nicolas-grekas)

View File

@ -12,10 +12,12 @@ Symfony is the result of the work of many people who made the code better
- Johannes S (johannes)
- Kris Wallsmith (kriswallsmith)
- Christophe Coevoet (stof)
- Nicolas Grekas (nicolas-grekas)
- Pascal Borreli (pborreli)
- Jakub Zalas (jakubzalas)
- Karma Dordrak (drak)
- Joseph Bielawski (stloyd)
- Hugo Hamon (hhamon)
- Ryan Weaver (weaverryan)
- Lukas Kahwe Smith (lsmith)
- Romain Neutron (romain)
@ -23,11 +25,9 @@ Symfony is the result of the work of many people who made the code better
- Jean-François Simon (jfsimon)
- Benjamin Eberlei (beberlei)
- Igor Wiedler (igorw)
- Hugo Hamon (hhamon)
- Nicolas Grekas (nicolas-grekas)
- Christian Flothmann (xabbuh)
- Martin Hasoň (hason)
- Eriksen Costa (eriksencosta)
- Christian Flothmann (xabbuh)
- Jonathan Wage (jwage)
- Grégoire Pineau (lyrixx)
- Alexandre Salomé (alexandresalome)
@ -35,12 +35,12 @@ Symfony is the result of the work of many people who made the code better
- ornicar
- stealth35 (stealth35)
- Alexander Mols (asm89)
- Wouter De Jong (wouterj)
- Bulat Shakirzyanov (avalanche123)
- Francis Besset (francisbesset)
- Saša Stamenković (umpirsky)
- Wouter De Jong (wouterj)
- Miha Vrhovnik
- Henrik Bjørnskov (henrikbjorn)
- Miha Vrhovnik
- Konstantin Kudryashov (everzet)
- Bilal Amarni (bamarni)
- Florin Patan (florinpatan)
@ -49,8 +49,10 @@ Symfony is the result of the work of many people who made the code better
- Deni
- Henrik Westphal (snc)
- Dariusz Górecki (canni)
- Christian Raue
- Arnout Boks (aboks)
- Christian Raue
- Sarah Khalil (saro0h)
- Ait Boudad Abdellatif (aitboudad)
- Michel Weimerskirch (mweimerskirch)
- Lee McDermott
- Brandon Turner
@ -62,7 +64,6 @@ Symfony is the result of the work of many people who made the code better
- Fran Moreno (franmomu)
- Antoine Hérault (herzult)
- Toni Uebernickel (havvg)
- Ait Boudad Abdellatif (aitboudad)
- Luis Cordova (cordoval)
- Arnaud Le Blanc (arnaud-lb)
- Kevin Bond (kbond)
@ -70,15 +71,17 @@ Symfony is the result of the work of many people who made the code better
- Brice BERNARD (brikou)
- marc.weistroff
- lenar
- Graham Campbell (graham)
- Włodzimierz Gajda (gajdaw)
- Colin Frei
- Gábor Egyed (1ed)
- excelwebzone
- Jacob Dreesen (jdreesen)
- Florian Voutzinos (florianv)
- Jérôme Tamarelle (gromnan)
- Adrien Brault (adrienbrault)
- Gábor Egyed (1ed)
- Fabien Pennequin (fabienpennequin)
- Kévin Dunglas (dunglas)
- Michal Piotrowski (eventhorizon)
- Gordon Franke (gimler)
- Robert Schönthal (digitalkaoz)
@ -93,11 +96,10 @@ Symfony is the result of the work of many people who made the code better
- Jérémie Augustin (jaugustin)
- Rafael Dohms (rdohms)
- Jérémy DERUSSÉ (jderusse)
- Stefano Sala (stefano.sala)
- Tigran Azatyan (tigranazatyan)
- Javier Eguiluz (javier.eguiluz)
- Richard Shank (iampersistent)
- Kévin Dunglas (dunglas)
- Stefano Sala (stefano.sala)
- Clemens Tolboom
- Helmer Aaviksoo
- Sebastiaan Stok (sstok)
@ -111,9 +113,11 @@ Symfony is the result of the work of many people who made the code better
- Rouven Weßling (realityking)
- Dmitrii Chekaliuk (lazyhammer)
- Clément JOBEILI (dator)
- Peter Rehm (rpet)
- Dorian Villet (gnutix)
- Richard Miller (mr_r_miller)
- Arnaud Kleinpeter (nanocom)
- hacfi (hifi)
- Mario A. Alvarez Garcia (nomack84)
- Dennis Benkert (denderello)
- Benjamin Dulau (dbenjamin)
@ -121,7 +125,7 @@ Symfony is the result of the work of many people who made the code better
- Andreas Hucks (meandmymonkey)
- Andréia Bohner (andreia)
- Noel Guilbert (noel)
- Peter Rehm (rpet)
- Joel Wurtz (brouznouf)
- Charles Sarrazin (csarrazi)
- bronze1man
- sun (sun)
@ -139,14 +143,12 @@ Symfony is the result of the work of many people who made the code better
- Justin Hileman (bobthecow)
- Sven Paulus (subsven)
- Lars Strojny (lstrojny)
- Joel Wurtz (brouznouf)
- Rui Marinho (ruimarinho)
- Julien Brochet (mewt)
- Tugdual Saunier (tucksaun)
- Graham Campbell (graham)
- Sergey Linnik (linniksa)
- Marcel Beerta (mazen)
- hacfi (hifi)
- Iltar van der Berg
- Francois Zaninotto
- Alexander Kotynia (olden)
- Daniel Tschinder
@ -172,9 +174,9 @@ Symfony is the result of the work of many people who made the code better
- Thomas Adam
- Albert Casademont (acasademont)
- jdhoek
- Jeremy Livingston (jeremylivingston)
- Nikita Konstantinov
- Wodor Wodorski
- Iltar van der Berg
- julien pauli (jpauli)
- Beau Simensen (simensen)
- Robert Kiss (kepten)
@ -193,6 +195,7 @@ Symfony is the result of the work of many people who made the code better
- Bertrand Zuchuat (garfield-fr)
- Gabor Toth (tgabi333)
- realmfoo
- Chris Wilkinson (thewilkybarkid)
- Thomas Tourlourat (armetiz)
- Andrey Esaulov (andremaha)
- Grégoire Passault (gregwar)
@ -216,6 +219,7 @@ Symfony is the result of the work of many people who made the code better
- alquerci
- Francesco Levorato
- Vitaliy Zakharov (zakharovvi)
- Florian Lonqueu-Brochard (florianlb)
- Gyula Sallai (salla)
- Inal DJAFAR (inalgnu)
- Christian Gärtner (dagardner)
@ -223,8 +227,10 @@ Symfony is the result of the work of many people who made the code better
- Yaroslav Kiliba
- Sébastien Lavoie (lavoiesl)
- Terje Bråten
- Joshua Thijssen
- Kristen Gilden (kgilden)
- Robbert Klarenbeek (robbertkl)
- Blanchon Vincent (blanchonvincent)
- hossein zolfi (ocean)
- Clément Gautier (clementgautier)
- Eduardo Gulias (egulias)
@ -234,13 +240,13 @@ Symfony is the result of the work of many people who made the code better
- Kirill chEbba Chebunin (chebba)
- Greg Thornton (xdissent)
- Grégoire Paris (greg0ire)
- Chris Wilkinson (thewilkybarkid)
- Costin Bereveanu (schniper)
- Loïc Chardonnet (gnusat)
- Marek Kalnik (marekkalnik)
- Vyacheslav Salakhutdinov (megazoll)
- Alex Pott
- Tamas Szijarto
- Mikael Pajunen
- Pavel Volokitin (pvolok)
- Endre Fejes
- Tobias Naumann (tna)
@ -248,6 +254,7 @@ Symfony is the result of the work of many people who made the code better
- Shein Alexey
- Joe Lencioni
- Kai
- Maximilian Reichel (phramz)
- Karoly Negyesi (chx)
- Xavier HAUSHERR
- Albert Jessurum (ajessu)
@ -255,6 +262,7 @@ Symfony is the result of the work of many people who made the code better
- Miha Vrhovnik
- Alessandro Desantis
- hubert lecorche (hlecorche)
- Marc Morales Valldepérez (kuert)
- Oscar Cubo Medina (ocubom)
- Karel Souffriau
- Christophe L. (christophelau)
@ -262,6 +270,7 @@ Symfony is the result of the work of many people who made the code better
- Jáchym Toušek
- Jannik Zschiesche (apfelbox)
- Emanuele Gaspari (inmarelibero)
- Dariusz Rumiński
- Brian King
- Michel Salib (michelsalib)
- geoffrey
@ -275,6 +284,7 @@ Symfony is the result of the work of many people who made the code better
- Olivier Dolbeau (odolbeau)
- Roumen Damianoff (roumen)
- Tobias Sjösten (tobiassjosten)
- Konstantin Myakshin (koc)
- vagrant
- Asier Illarramendi (doup)
- Chris Sedlmayr (catchamonkey)
@ -307,6 +317,7 @@ Symfony is the result of the work of many people who made the code better
- Iker Ibarguren (ikerib)
- Ricardo Oliveira (ricardolotr)
- ondrowan
- Jerzy Zawadzki (jzawadzki)
- Evan S Kaufman (evanskaufman)
- mcben
- Maks Slesarenko
@ -316,7 +327,6 @@ Symfony is the result of the work of many people who made the code better
- Ioan Negulescu
- Jakub Škvára (jskvara)
- Andrew Udvare (audvare)
- Sarah Khalil (saro0h)
- alexpods
- Erik Trapman (eriktrapman)
- De Cock Xavier (xdecock)
@ -327,8 +337,8 @@ Symfony is the result of the work of many people who made the code better
- Nils Adermann (naderman)
- Gábor Fási
- Benjamin Leveque (benji07)
- Maximilian Reichel (phramz)
- sasezaki
- Dawid Pakuła (zulusx)
- Florian Rey (nervo)
- Rodrigo Borrego Bernabé (rodrigobb)
- Denis Gorbachev (starfall)
@ -346,8 +356,8 @@ Symfony is the result of the work of many people who made the code better
- Zach Badgett (zachbadgett)
- Aurélien Fredouelle
- Pavel Campr (pcampr)
- Alexander Schwenn (xelaris)
- Disquedur
- Marc Morales Valldepérez (kuert)
- Geoffrey Tran (geoff)
- Jan Behrens
- Sebastian Krebs
@ -364,7 +374,6 @@ Symfony is the result of the work of many people who made the code better
- Max Rath (drak3)
- Stéphane Escandell (sescandell)
- Sinan Eldem
- Konstantin Myakshin (koc)
- Nahuel Cuesta (ncuesta)
- Chris Boden (cboden)
- Asmir Mustafic (goetas)
@ -383,7 +392,6 @@ Symfony is the result of the work of many people who made the code better
- Erkhembayar Gantulga (erheme318)
- David Fuhr
- Kamil Kokot (pamil)
- Florian Lonqueu-Brochard (florianlb)
- Rostyslav Kinash
- Daisuke Ohata
- Vincent Simonin
@ -433,7 +441,6 @@ Symfony is the result of the work of many people who made the code better
- Alex Xandra Albert Sim
- Yuen-Chi Lian
- Besnik Br
- Jerzy Zawadzki (jzawadzki)
- Joshua Nye
- avorobiev
- Venu
@ -445,9 +452,11 @@ Symfony is the result of the work of many people who made the code better
- 1emming
- Leevi Graham (leevigraham)
- Casper Valdemar Poulsen
- Daniel Wehner
- Josiah (josiah)
- Marek Štípek (maryo)
- John Bohn (jbohn)
- Marc Morera (mmoreram)
- Andrew Hilobok (hilobok)
- Christian Soronellas (theunic)
- Yosmany Garcia (yosmanyga)
@ -459,7 +468,6 @@ Symfony is the result of the work of many people who made the code better
- Krzysiek Łabuś
- Xavier Lacot (xavier)
- Olivier Maisonneuve (olineuve)
- Blanchon Vincent (blanchonvincent)
- Francis Turmel (fturmel)
- Loick Piera (pyrech)
- cgonzalez
@ -482,6 +490,7 @@ Symfony is the result of the work of many people who made the code better
- frost-nzcr4
- Abhoryo
- Fabian Vogler (fabian)
- Javier Spagnoletti (phansys)
- Korvin Szanto
- Maksim Kotlyar (makasim)
- Neil Ferreira
@ -529,6 +538,7 @@ Symfony is the result of the work of many people who made the code better
- Maks
- Gábor Tóth
- Daniel Cestari
- Massimiliano Arione (garak)
- Brunet Laurent (lbrunet)
- Magnus Nordlander (magnusnordlander)
- Mikhail Yurasov (mym)
@ -601,12 +611,14 @@ Symfony is the result of the work of many people who made the code better
- Dan Finnie
- Ken Marfilla (marfillaster)
- benatespina (benatespina)
- Denis Kop
- jfcixmedia
- Martijn Evers
- Benjamin Paap (benjaminpaap)
- Christian
- Sergii Smertin (nfx)
- Artur Eshenbrener
- Bailey Parker
- Eddie Jaoude
- Haritz Iturbe (hizai)
- Nerijus Arlauskas (nercury)
@ -638,6 +650,7 @@ Symfony is the result of the work of many people who made the code better
- Albert Ganiev (helios-ag)
- Neil Katin
- David Otton
- Will Donohoe
- peter
- Jérémy Jourdin (jjk801)
- Artem Kolesnikov (tyomo4ka)
@ -645,6 +658,7 @@ Symfony is the result of the work of many people who made the code better
- Yannick
- Luc Vieillescazes (iamluc)
- Eduardo García Sanz (coma)
- Szijarto Tamas
- Roy Van Ginneken
- David de Boer (ddeboer)
- Gilles Doge (gido)
@ -666,6 +680,7 @@ Symfony is the result of the work of many people who made the code better
- Philipp Strube
- Christian Sciberras
- Clement Herreman (clemherreman)
- Nyro (nyro)
- Trent Steel (trsteel88)
- Marco
- Marc Torres
@ -678,6 +693,7 @@ Symfony is the result of the work of many people who made the code better
- Jakub Kulhan
- Mo Di (modi)
- Jeroen van den Enden (stoefke)
- origaminal
- Quique Porta (quiqueporta)
- Tomasz Szymczyk (karion)
- ConneXNL
@ -685,6 +701,7 @@ Symfony is the result of the work of many people who made the code better
- Abdul.Mohsen B. A. A
- Benoît Burnichon
- Malaney J. Hill
- Christian Flach (cmfcmf)
- Cédric Girard (enk_)
- Oriol Mangas Abellan (oriolman)
- Sebastian Göttschkes (sgoettschkes)
@ -697,7 +714,6 @@ Symfony is the result of the work of many people who made the code better
- Erika Heidi Reinaldo (erikaheidi)
- Pierre Tachoire (krichprollsch)
- Marc J. Schmidt (marcjs)
- Marc Morera (mmoreram)
- Marco Jantke
- Saem Ghani
- Sebastian Utz
@ -708,6 +724,7 @@ Symfony is the result of the work of many people who made the code better
- steveYeah
- Samy Dindane (dinduks)
- Keri Henare (kerihenare)
- Mickaël Andrieu (mickaelandrieu)
- Cédric Lahouste (rapotor)
- Samuel Vogel (samuelvogel)
- Berat Doğan
@ -736,6 +753,7 @@ Symfony is the result of the work of many people who made the code better
- Felds Liscia
- James Halsall (jaitsu)
- Maxime Veber (nek-)
- Sullivan SENECHAL
- Tadcka
- Beth Binkovitz
- Romain Geissler
@ -754,6 +772,7 @@ Symfony is the result of the work of many people who made the code better
- Timothy Anido (xanido)
- Rick Prent
- Martin Eckhardt
- Pieter Jordaan
- Damien Tournoud
- Jon Gotlin (jongotlin)
- Michael Dowling (mtdowling)
@ -777,7 +796,6 @@ Symfony is the result of the work of many people who made the code better
- Simon Neidhold
- Kevin Dew
- James Cowgill
- Jeremy Livingston (jeremylivingston)
- Nicolas Schwartz (nicoschwartz)
- Patrik Gmitter (patie)
- Jonathan Gough
@ -798,12 +816,14 @@ Symfony is the result of the work of many people who made the code better
- César Suárez (csuarez)
- Nicolas Badey (nico-b)
- Shane Preece (shane)
- wusuopu
- povilas
- Diego Agulló
- Alexander Obuhovich
- Alessandro Tagliapietra (alex88)
- Gunnar Lium (gunnarlium)
- Tiago Garcia (tiagojsag)
- Artiom
- Bouke Haarsma
- Martin Eckhardt
- Denis Zunke
@ -836,7 +856,6 @@ Symfony is the result of the work of many people who made the code better
- Michal Gebauer
- Gleb Sidora
- David Stone
- Javier Spagnoletti (phansys)
- Pablo Maria Martelletti (pmartelletti)
- Yassine Guedidi (yguedidi)
- Luis Muñoz
@ -852,6 +871,7 @@ Symfony is the result of the work of many people who made the code better
- Ionel Scutelnicu (ionelscutelnicu)
- Johnny Peck (johnnypeck)
- Nicolas Tallefourtané (nicolab)
- Botond Dani (picur)
- Thierry Marianne (thierrymarianne)
- Nick Stemerdink
- jjanvier
@ -871,7 +891,6 @@ Symfony is the result of the work of many people who made the code better
- Mike Meier
- Warwick
- Chris
- Daniel Wehner
- efeen
- Michał Dąbrowski (defrag)
- Dominik Zogg (dominik.zogg)
@ -897,6 +916,7 @@ Symfony is the result of the work of many people who made the code better
- Kevin Decherf
- Jason Woods
- dened
- Dmitry Korotovsky
- Sam Ward
- Walther Lalk
- Adam
@ -905,16 +925,19 @@ Symfony is the result of the work of many people who made the code better
- gedrox
- dropfen
- Andrey Chernykh
- Edvinas Klovas
- Drew Butler
- J Bruni
- Alexey Prilipko
- bertillon
- Luca Genuzio (genuzio)
- Hans Nilsson (hansnilsson)
- Ioana Hazsda (ioana-hazsda)
- Jan Marek (janmarek)
- Mark de Haan (markdehaan)
- Dan Patrick (mdpatrick)
- Rares Vlaseanu (raresvla)
- Sofiane HADDAG (sofhad)
- tante kinast (tante)
- Vincent LEFORT (vlefort)
- Alexander Zogheb
@ -941,6 +964,7 @@ Symfony is the result of the work of many people who made the code better
- Hein Zaw Htet™
- Ruben Kruiswijk
- Michael J
- Berny Cantos
- Alex Pods
- timaschew
- Ian Phillips
@ -964,10 +988,12 @@ Symfony is the result of the work of many people who made the code better
- ddebree
- Alex
- Klaas Naaijkens
- Daniel González Cerviño
- Rafał
- Adria Lopez (adlpz)
- Rosio (ben-rosio)
- Simon Paarlberg (blamh)
- Jeroen Thora (bolle)
- Masao Maeda (brtriver)
- Darius Leskauskas (darles)
- Dave Hulbert (dave1010)
@ -989,6 +1015,7 @@ Symfony is the result of the work of many people who made the code better
- Muriel (metalmumu)
- Michaël Perrin (michael.perrin)
- Michael Pohlers (mick_the_big)
- Mantas Var (mvar)
- Cayetano Soriano Gallego (neoshadybeat)
- Pablo Monterde Perez (plebs)
- Jimmy Leger (redpanda)
@ -1093,6 +1120,7 @@ Symfony is the result of the work of many people who made the code better
- tirnanog06
- phc
- ilyes kooli
- Matthias Althaus
- Michaël VEROUX
- sualko
- Nicolas Roudaire
@ -1117,7 +1145,6 @@ Symfony is the result of the work of many people who made the code better
- Fabien D. (fabd)
- Sorin Gitlan (forapathy)
- Yohan Giarelli (frequence-web)
- Massimiliano Arione (garak)
- Gerry Vandermaesen (gerryvdm)
- Ghazy Ben Ahmed (ghazy)
- Arash Tabriziyan (ghost098)
@ -1141,6 +1168,7 @@ Symfony is the result of the work of many people who made the code better
- Matt Drollette (mdrollette)
- Adam Monsen (meonkeys)
- Ala Eddine Khefifi (nayzo)
- emilienbouard (neime)
- ollie harridge (ollietb)
- Paweł Szczepanek (pauluz)
- Christian López Espínola (penyaskito)
@ -1153,7 +1181,9 @@ Symfony is the result of the work of many people who made the code better
- scourgen hung (scourgen)
- Sebastian Busch (sebu)
- André Filipe Gonçalves Neves (seven)
- Bruno Ziegler (sfcoder)
- Andrea Giuliano (shark)
- Schuyler Jager (sjager)
- Volker (skydiablo)
- Julien Sanchez (sumbobyboys)
- Guillermo Gisinger (t3chn0r)
@ -1163,8 +1193,6 @@ Symfony is the result of the work of many people who made the code better
- Vincent (vincent1870)
- Eugene Babushkin (warl)
- Xavier Amado (xamado)
- Alexander Schwenn (xelaris)
- Dawid Pakuła (zulusx)
- Florent Cailhol
- szymek
- craigmarvelley
@ -1181,6 +1209,7 @@ Symfony is the result of the work of many people who made the code better
- Philipp Scheit
- max
- Mohamed Karnichi (amiral)
- Daniel Kolvik (dkvk)
- Jeroen De Dauw (jeroendedauw)
- Muharrem Demirci (mdemirci)
- Evgeny Z (meze)

View File

@ -295,7 +295,7 @@ class Controller extends ContainerAware
}
/**
* Get a user from the Security Context.
* Get a user from the Security Token Storage.
*
* @return mixed
*
@ -305,15 +305,16 @@ class Controller extends ContainerAware
*/
public function getUser()
{
if (!$this->container->has('security.context')) {
if (!$this->container->has('security.token_storage')) {
throw new \LogicException('The SecurityBundle is not registered in your application.');
}
if (null === $token = $this->container->get('security.context')->getToken()) {
if (null === $token = $this->container->get('security.token_storage')->getToken()) {
return;
}
if (!is_object($user = $token->getUser())) {
// e.g. anonymous authentication
return;
}

View File

@ -13,9 +13,13 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\User\User;
class ControllerTest extends TestCase
{
@ -37,10 +41,99 @@ class ControllerTest extends TestCase
$container->expects($this->at(0))->method('get')->will($this->returnValue($requestStack));
$container->expects($this->at(1))->method('get')->will($this->returnValue($kernel));
$controller = new Controller();
$controller = new TestController();
$controller->setContainer($container);
$response = $controller->forward('a_controller');
$this->assertEquals('xml--fr', $response->getContent());
}
public function testGetUser()
{
$user = new User('user', 'pass');
$token = new UsernamePasswordToken($user, 'pass', 'default', array('ROLE_USER'));
$controller = new TestController();
$controller->setContainer($this->getContainerWithTokenStorage($token));
$this->assertSame($controller->getUser(), $user);
}
public function testGetUserAnonymousUserConvertedToNull()
{
$token = new AnonymousToken('default', 'anon.');
$controller = new TestController();
$controller->setContainer($this->getContainerWithTokenStorage($token));
$this->assertNull($controller->getUser());
}
public function testGetUserWithEmptyTokenStorage()
{
$controller = new TestController();
$controller->setContainer($this->getContainerWithTokenStorage(null));
$this->assertNull($controller->getUser());
}
/**
* @expectedException \LogicException
* @expectedExceptionMessage The SecurityBundle is not registered in your application.
*/
public function testGetUserWithEmptyContainer()
{
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
$container
->expects($this->once())
->method('has')
->with('security.token_storage')
->will($this->returnValue(false));
$controller = new TestController();
$controller->setContainer($container);
$controller->getUser();
}
/**
* @param $token
* @return ContainerInterface
*/
private function getContainerWithTokenStorage($token = null)
{
$tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage');
$tokenStorage
->expects($this->once())
->method('getToken')
->will($this->returnValue($token));
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
$container
->expects($this->once())
->method('has')
->with('security.token_storage')
->will($this->returnValue(true));
$container
->expects($this->once())
->method('get')
->with('security.token_storage')
->will($this->returnValue($tokenStorage));
return $container;
}
}
class TestController extends Controller
{
public function forward($controller, array $path = array(), array $query = array())
{
return parent::forward($controller, $path, $query);
}
public function getUser()
{
return parent::getUser();
}
}

View File

@ -1,13 +1,20 @@
CHANGELOG
=========
2.6.2
-----
* Added back the `model_timezone` and `view_timezone` options for `TimeType`, `DateType`
and `BirthdayType`
2.6.0
-----
* added "html5" option to Date, Time and DateTimeFormType to be able to
enable/disable HTML5 input date when widget option is "single_text"
* added "label_format" option with possible placeholders "%name%" and "%id%"
* [BC BREAK] drop support for model_timezone and view_timezone options in TimeType, DateType and BirthdayType
* [BC BREAK] drop support for model_timezone and view_timezone options in TimeType, DateType and BirthdayType,
update to 2.6.2 to get back support for these options
2.5.0
------

View File

@ -197,6 +197,8 @@ class TimeType extends AbstractType
'input' => 'datetime',
'with_minutes' => true,
'with_seconds' => false,
'model_timezone' => null,
'view_timezone' => null,
'empty_value' => $emptyValue, // deprecated
'placeholder' => $placeholder,
'html5' => true,

View File

@ -60,6 +60,8 @@ class DateTypeTest extends TestCase
public function testSubmitFromSingleTextDateTimeWithDefaultFormat()
{
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'single_text',
'input' => 'datetime',
));
@ -74,6 +76,8 @@ class DateTypeTest extends TestCase
{
$form = $this->factory->create('date', null, array(
'format' => \IntlDateFormatter::MEDIUM,
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'single_text',
'input' => 'datetime',
));
@ -88,6 +92,8 @@ class DateTypeTest extends TestCase
{
$form = $this->factory->create('date', null, array(
'format' => \IntlDateFormatter::MEDIUM,
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'single_text',
'input' => 'string',
));
@ -102,6 +108,8 @@ class DateTypeTest extends TestCase
{
$form = $this->factory->create('date', null, array(
'format' => \IntlDateFormatter::MEDIUM,
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'single_text',
'input' => 'timestamp',
));
@ -118,6 +126,8 @@ class DateTypeTest extends TestCase
{
$form = $this->factory->create('date', null, array(
'format' => \IntlDateFormatter::MEDIUM,
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'single_text',
'input' => 'array',
));
@ -137,6 +147,8 @@ class DateTypeTest extends TestCase
public function testSubmitFromText()
{
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'text',
));
@ -157,6 +169,8 @@ class DateTypeTest extends TestCase
public function testSubmitFromChoice()
{
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'choice',
));
@ -177,6 +191,8 @@ class DateTypeTest extends TestCase
public function testSubmitFromChoiceEmpty()
{
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'choice',
'required' => false,
));
@ -196,6 +212,8 @@ class DateTypeTest extends TestCase
public function testSubmitFromInputDateTimeDifferentPattern()
{
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'format' => 'MM*yyyy*dd',
'widget' => 'single_text',
'input' => 'datetime',
@ -210,6 +228,8 @@ class DateTypeTest extends TestCase
public function testSubmitFromInputStringDifferentPattern()
{
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'format' => 'MM*yyyy*dd',
'widget' => 'single_text',
'input' => 'string',
@ -224,6 +244,8 @@ class DateTypeTest extends TestCase
public function testSubmitFromInputTimestampDifferentPattern()
{
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'format' => 'MM*yyyy*dd',
'widget' => 'single_text',
'input' => 'timestamp',
@ -240,6 +262,8 @@ class DateTypeTest extends TestCase
public function testSubmitFromInputRawDifferentPattern()
{
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'format' => 'MM*yyyy*dd',
'widget' => 'single_text',
'input' => 'array',
@ -358,10 +382,25 @@ class DateTypeTest extends TestCase
public function testSetDataWithDifferentNegativeUTCTimezoneDateTime()
{
date_default_timezone_set('Pacific/Tahiti');
$form = $this->factory->create('date', null, array(
'format' => \IntlDateFormatter::MEDIUM,
'model_timezone' => 'America/New_York',
'view_timezone' => 'Pacific/Tahiti',
'input' => 'string',
'widget' => 'single_text',
));
$form->setData('2010-06-02');
$this->assertEquals('01.06.2010', $form->getViewData());
}
public function testSetDataWithDifferentTimezonesDateTime()
{
$form = $this->factory->create('date', null, array(
'format' => \IntlDateFormatter::MEDIUM,
'model_timezone' => 'America/New_York',
'view_timezone' => 'Pacific/Tahiti',
'input' => 'datetime',
'widget' => 'single_text',
));
@ -371,7 +410,7 @@ class DateTypeTest extends TestCase
$form->setData($dateTime);
$this->assertDateTimeEquals($dateTime, $form->getData());
$this->assertEquals('02.06.2010', $form->getViewData());
$this->assertEquals('01.06.2010', $form->getViewData());
}
public function testSetDataWithDifferentPositiveUTCTimezoneDateTime()
@ -520,6 +559,8 @@ class DateTypeTest extends TestCase
$this->markTestIncomplete('Needs to be reimplemented using validators');
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'single_text',
));
@ -533,6 +574,8 @@ class DateTypeTest extends TestCase
$this->markTestIncomplete('Needs to be reimplemented using validators');
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'choice',
));
@ -550,6 +593,8 @@ class DateTypeTest extends TestCase
$this->markTestIncomplete('Needs to be reimplemented using validators');
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'choice',
));
@ -567,6 +612,8 @@ class DateTypeTest extends TestCase
$this->markTestIncomplete('Needs to be reimplemented using validators');
$form = $this->factory->create('date', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'widget' => 'choice',
));

View File

@ -18,25 +18,18 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
class TimeTypeTest extends TestCase
{
private $defaultTimezone;
protected function setUp()
{
IntlTestHelper::requireIntl($this);
parent::setUp();
$this->defaultTimezone = date_default_timezone_get();
}
protected function tearDown()
{
date_default_timezone_set($this->defaultTimezone);
}
public function testSubmitDateTime()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'datetime',
));
@ -56,6 +49,8 @@ class TimeTypeTest extends TestCase
public function testSubmitString()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'string',
));
@ -73,6 +68,8 @@ class TimeTypeTest extends TestCase
public function testSubmitTimestamp()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'timestamp',
));
@ -92,6 +89,8 @@ class TimeTypeTest extends TestCase
public function testSubmitArray()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'array',
));
@ -109,6 +108,8 @@ class TimeTypeTest extends TestCase
public function testSubmitDatetimeSingleText()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'datetime',
'widget' => 'single_text',
));
@ -122,6 +123,8 @@ class TimeTypeTest extends TestCase
public function testSubmitDatetimeSingleTextWithoutMinutes()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'datetime',
'widget' => 'single_text',
'with_minutes' => false,
@ -136,6 +139,8 @@ class TimeTypeTest extends TestCase
public function testSubmitArraySingleText()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'array',
'widget' => 'single_text',
));
@ -154,6 +159,8 @@ class TimeTypeTest extends TestCase
public function testSubmitArraySingleTextWithoutMinutes()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'array',
'widget' => 'single_text',
'with_minutes' => false,
@ -172,6 +179,8 @@ class TimeTypeTest extends TestCase
public function testSubmitArraySingleTextWithSeconds()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'array',
'widget' => 'single_text',
'with_seconds' => true,
@ -192,6 +201,8 @@ class TimeTypeTest extends TestCase
public function testSubmitStringSingleText()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'string',
'widget' => 'single_text',
));
@ -205,6 +216,8 @@ class TimeTypeTest extends TestCase
public function testSubmitStringSingleTextWithoutMinutes()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'string',
'widget' => 'single_text',
'with_minutes' => false,
@ -219,6 +232,8 @@ class TimeTypeTest extends TestCase
public function testSetDataWithoutMinutes()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'datetime',
'with_minutes' => false,
));
@ -231,6 +246,8 @@ class TimeTypeTest extends TestCase
public function testSetDataWithSeconds()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'UTC',
'view_timezone' => 'UTC',
'input' => 'datetime',
'with_seconds' => true,
));
@ -240,23 +257,53 @@ class TimeTypeTest extends TestCase
$this->assertEquals(array('hour' => 3, 'minute' => 4, 'second' => 5), $form->getViewData());
}
public function testSetDataWithTimezoneDateTime()
public function testSetDataDifferentTimezones()
{
date_default_timezone_set('Asia/Hong_Kong');
$form = $this->factory->create('time', null, array(
'model_timezone' => 'America/New_York',
'view_timezone' => 'Asia/Hong_Kong',
'input' => 'string',
'with_seconds' => true,
));
$dateTime = new \DateTime('2013-01-01 12:04:05');
$dateTime->setTimezone(new \DateTimeZone('America/New_York'));
$form->setData($dateTime->format('H:i:s'));
$outputTime = clone $dateTime;
$outputTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong'));
$displayedData = array(
'hour' => (int) $outputTime->format('H'),
'minute' => (int) $outputTime->format('i'),
'second' => (int) $outputTime->format('s'),
);
$this->assertEquals($displayedData, $form->getViewData());
}
public function testSetDataDifferentTimezonesDateTime()
{
$form = $this->factory->create('time', null, array(
'model_timezone' => 'America/New_York',
'view_timezone' => 'Asia/Hong_Kong',
'input' => 'datetime',
'with_seconds' => true,
));
$dateTime = new \DateTime('12:04:05', new \DateTimeZone('America/New_York'));
$dateTime = new \DateTime('12:04:05');
$dateTime->setTimezone(new \DateTimeZone('America/New_York'));
$form->setData($dateTime);
$outputTime = clone $dateTime;
$outputTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong'));
$displayedData = array(
'hour' => 12,
'minute' => 4,
'second' => 5,
'hour' => (int) $outputTime->format('H'),
'minute' => (int) $outputTime->format('i'),
'second' => (int) $outputTime->format('s'),
);
$this->assertDateTimeEquals($dateTime, $form->getData());

View File

@ -100,10 +100,6 @@ class ResolvedFormTypeTest extends \PHPUnit_Framework_TestCase
public function testCreateBuilder()
{
if (version_compare(\PHPUnit_Runner_Version::id(), '3.7', '<')) {
$this->markTestSkipped('This test requires PHPUnit 3.7.');
}
$givenOptions = array('a' => 'a_custom', 'c' => 'c_custom');
$resolvedOptions = array('a' => 'a_custom', 'b' => 'b_default', 'c' => 'c_custom', 'd' => 'd_default');
$optionsResolver = $this->getMock('Symfony\Component\OptionsResolver\OptionsResolverInterface');
@ -132,10 +128,6 @@ class ResolvedFormTypeTest extends \PHPUnit_Framework_TestCase
public function testCreateBuilderWithDataClassOption()
{
if (version_compare(\PHPUnit_Runner_Version::id(), '3.7', '<')) {
$this->markTestSkipped('This test requires PHPUnit 3.7.');
}
$givenOptions = array('data_class' => 'Foo');
$resolvedOptions = array('data_class' => '\stdClass');
$optionsResolver = $this->getMock('Symfony\Component\OptionsResolver\OptionsResolverInterface');
@ -164,10 +156,6 @@ class ResolvedFormTypeTest extends \PHPUnit_Framework_TestCase
public function testBuildForm()
{
if (version_compare(\PHPUnit_Runner_Version::id(), '3.7', '<')) {
$this->markTestSkipped('This test requires PHPUnit 3.7.');
}
$test = $this;
$i = 0;

View File

@ -230,7 +230,7 @@ class WindowsPipes extends AbstractPipes
if (false === $data || (true === $close && feof($r['input']) && '' === $data)) {
// no more data to read on input resource
// use an empty buffer in the next reads
unset($this->input);
$this->input = null;
}
}

View File

@ -47,7 +47,10 @@ class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInte
return;
case self::MIGRATE:
$request->getSession()->migrate(true);
// Destroying the old session is broken in php 5.4.0 - 5.4.10
// See php bug #63379
$destroy = PHP_VERSION_ID < 50400 || PHP_VERSION_ID >= 50411;
$request->getSession()->migrate($destroy);
return;

View File

@ -39,6 +39,10 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase
public function testSessionIsMigrated()
{
if (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50411) {
$this->markTestSkipped('We cannot destroy the old session on PHP 5.4.0 - 5.4.10.');
}
$session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');
$session->expects($this->once())->method('migrate')->with($this->equalTo(true));
@ -46,6 +50,19 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase
$strategy->onAuthentication($this->getRequest($session), $this->getToken());
}
public function testSessionIsMigratedWithPhp54Workaround()
{
if (PHP_VERSION_ID < 50400 || PHP_VERSION_ID >= 50411) {
$this->markTestSkipped('This PHP version is not affected.');
}
$session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');
$session->expects($this->once())->method('migrate')->with($this->equalTo(false));
$strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE);
$strategy->onAuthentication($this->getRequest($session), $this->getToken());
}
public function testSessionIsInvalidated()
{
$session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');