Merge branch '2.7' into 2.8

* 2.7:
  respect the umask argument in dumpFile()
  dumpFile(), preserve existing file permissions
  Add validate method to mockec validator in form TypeTestCase
  bumped Symfony version to 2.7.26
  updated VERSION for 2.7.25
  update CONTRIBUTORS for 2.7.25
  updated CHANGELOG for 2.7.25
  [HttpKernel] fixed Kernel name when stored in a directory starting with a number
  context listener: hardening user provider handling
This commit is contained in:
Fabien Potencier 2017-03-06 11:26:34 -08:00
commit 2a7e385dac
10 changed files with 252 additions and 31 deletions

View File

@ -7,6 +7,34 @@ in 2.7 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.7.0...v2.7.1 To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.7.0...v2.7.1
* 2.7.25 (2017-03-06)
* bug #21671 [Serializer] Xml encoder throws exception for valid data (gr1ev0us)
* bug #21805 Provide less state in getRequestFormat (dawehner)
* bug #21832 [Routing] Ignore hidden directories when loading routes from annotations (jakzal)
* bug #21769 [Form] Improve rounding precision (foaly-nr1)
* bug #21267 [Form] Fix ChoiceType to ensure submitted data is not nested unnecessarily (issei-m)
* bug #21731 Fix emacs link (rubenrua)
* bug #21800 Fix issues reported by static analyze (romainneutron)
* bug #21798 Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)" (xabbuh)
* bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)
* bug #21756 [Yaml] Stop replacing NULLs when merging (gadelat)
* bug #21722 [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported (maidmaid)
* bug #21679 [SecurityBundle] fix priority ordering of security voters (xabbuh)
* bug #21115 [Validator] do not guess getter method names (xabbuh)
* bug #21661 Fix Composer constraints (fabpot)
* bug #21582 [HttpCache] purge both http and https from http cache (dbu)
* bug #21637 [FrameworkBundle] remove translation data collector when not usable (xabbuh)
* bug #21634 [VarDumper] Added missing persistent stream cast (lyrixx)
* bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)
* bug #21400 [Serializer] fix upper camel case conversion (see #21399) (markusu49)
* bug #21599 [Console][Table] fixed render when using multiple rowspans. (aitboudad)
* bug #21613 [Process] Permit empty suffix on Windows (Bilge)
* bug #21057 [DI] Auto register extension configuration classes as a resource (ro0NL)
* bug #21592 [Validator] property constraints can be added in child classes (angelk, xabbuh)
* bug #21458 [Config] Early return for DirectoryResource (robfrawley)
* bug #21562 [DoctrineBridge] make sure that null can be the invalid value (xabbuh)
* 2.7.24 (2017-02-06) * 2.7.24 (2017-02-06)
* bug #21063 [Form] Fixed DateType format option for single text widget (HeahDude) * bug #21063 [Form] Fixed DateType format option for single text widget (HeahDude)

View File

@ -29,34 +29,34 @@ Symfony is the result of the work of many people who made the code better
- Grégoire Pineau (lyrixx) - Grégoire Pineau (lyrixx)
- Martin Hasoň (hason) - Martin Hasoň (hason)
- Jeremy Mikola (jmikola) - Jeremy Mikola (jmikola)
- Maxime Steinhausser (ogizanagi)
- Jean-François Simon (jfsimon) - Jean-François Simon (jfsimon)
- Benjamin Eberlei (beberlei) - Benjamin Eberlei (beberlei)
- Igor Wiedler (igorw) - Igor Wiedler (igorw)
- Maxime Steinhausser (ogizanagi)
- Eriksen Costa (eriksencosta)
- Robin Chalas (chalas_r) - Robin Chalas (chalas_r)
- Eriksen Costa (eriksencosta)
- Jules Pietri (heah) - Jules Pietri (heah)
- Sarah Khalil (saro0h) - Sarah Khalil (saro0h)
- Jonathan Wage (jwage) - Jonathan Wage (jwage)
- Diego Saint Esteben (dosten) - Diego Saint Esteben (dosten)
- Alexandre Salomé (alexandresalome) - Alexandre Salomé (alexandresalome)
- William Durand (couac) - William Durand (couac)
- Guilhem Niot (energetick)
- ornicar - ornicar
- Francis Besset (francisbesset) - Francis Besset (francisbesset)
- stealth35 (stealth35) - stealth35 (stealth35)
- Alexander Mols (asm89) - Alexander Mols (asm89)
- Bulat Shakirzyanov (avalanche123) - Bulat Shakirzyanov (avalanche123)
- Ener-Getick (energetick) - Peter Rehm (rpet)
- Saša Stamenković (umpirsky) - Saša Stamenković (umpirsky)
- Henrik Bjørnskov (henrikbjorn) - Henrik Bjørnskov (henrikbjorn)
- Miha Vrhovnik
- Diego Saint Esteben (dii3g0)
- Roland Franssen (ro0) - Roland Franssen (ro0)
- Konstantin Kudryashov (everzet) - Miha Vrhovnik
- Iltar van der Berg (kjarli) - Iltar van der Berg (kjarli)
- Diego Saint Esteben (dii3g0)
- Konstantin Kudryashov (everzet)
- Bilal Amarni (bamarni) - Bilal Amarni (bamarni)
- Florin Patan (florinpatan) - Florin Patan (florinpatan)
- Peter Rehm (rpet)
- Kevin Bond (kbond) - Kevin Bond (kbond)
- Andrej Hudec (pulzarraider) - Andrej Hudec (pulzarraider)
- Gábor Egyed (1ed) - Gábor Egyed (1ed)
@ -69,15 +69,15 @@ Symfony is the result of the work of many people who made the code better
- Deni - Deni
- Henrik Westphal (snc) - Henrik Westphal (snc)
- Dariusz Górecki (canni) - Dariusz Górecki (canni)
- Douglas Greenshields (shieldo)
- Titouan Galopin (tgalopin) - Titouan Galopin (tgalopin)
- Douglas Greenshields (shieldo)
- Pierre du Plessis (pierredup)
- Konstantin Myakshin (koc) - Konstantin Myakshin (koc)
- Lee McDermott - Lee McDermott
- Brandon Turner - Brandon Turner
- Luis Cordova (cordoval) - Luis Cordova (cordoval)
- Graham Campbell (graham) - Graham Campbell (graham)
- Daniel Holmes (dholmes) - Daniel Holmes (dholmes)
- Pierre du Plessis (pierredup)
- Toni Uebernickel (havvg) - Toni Uebernickel (havvg)
- Bart van den Burg (burgov) - Bart van den Burg (burgov)
- Jordan Alliot (jalliot) - Jordan Alliot (jalliot)
@ -91,14 +91,15 @@ Symfony is the result of the work of many people who made the code better
- Jérôme Tamarelle (gromnan) - Jérôme Tamarelle (gromnan)
- Michal Piotrowski (eventhorizon) - Michal Piotrowski (eventhorizon)
- Tim Nagel (merk) - Tim Nagel (merk)
- Maxime STEINHAUSSER
- Issei Murasawa (issei_m)
- Brice BERNARD (brikou) - Brice BERNARD (brikou)
- Alexander M. Turek (derrabus) - Alexander M. Turek (derrabus)
- marc.weistroff - marc.weistroff
- Issei Murasawa (issei_m)
- lenar - lenar
- Włodzimierz Gajda (gajdaw) - Włodzimierz Gajda (gajdaw)
- Baptiste Clavié (talus) - Baptiste Clavié (talus)
- Maxime STEINHAUSSER - Vladimir Reznichenko (kalessil)
- Alexander Schwenn (xelaris) - Alexander Schwenn (xelaris)
- Florian Voutzinos (florianv) - Florian Voutzinos (florianv)
- Colin Frei - Colin Frei
@ -106,20 +107,21 @@ Symfony is the result of the work of many people who made the code better
- Adrien Brault (adrienbrault) - Adrien Brault (adrienbrault)
- Joshua Thijssen - Joshua Thijssen
- Peter Kokot (maastermedia) - Peter Kokot (maastermedia)
- David Buchmann (dbu)
- excelwebzone - excelwebzone
- Jacob Dreesen (jdreesen) - Jacob Dreesen (jdreesen)
- Vladimir Reznichenko (kalessil) - Tobias Nyholm (tobias)
- Tomáš Votruba (tomas_votruba) - Tomáš Votruba (tomas_votruba)
- David Buchmann (dbu)
- Fabien Pennequin (fabienpennequin) - Fabien Pennequin (fabienpennequin)
- Gordon Franke (gimler) - Gordon Franke (gimler)
- Tobias Nyholm (tobias)
- Eric GELOEN (gelo) - Eric GELOEN (gelo)
- Daniel Wehner (dawehner)
- Tugdual Saunier (tucksaun) - Tugdual Saunier (tucksaun)
- Théo FIDRY (theofidry) - Théo FIDRY (theofidry)
- Robert Schönthal (digitalkaoz) - Robert Schönthal (digitalkaoz)
- Florian Lonqueu-Brochard (florianlb) - Florian Lonqueu-Brochard (florianlb)
- Stefano Sala (stefano.sala) - Stefano Sala (stefano.sala)
- Yonel Ceruto González (yonelceruto)
- Evgeniy (ewgraf) - Evgeniy (ewgraf)
- Juti Noppornpitak (shiroyuki) - Juti Noppornpitak (shiroyuki)
- Tigran Azatyan (tigranazatyan) - Tigran Azatyan (tigranazatyan)
@ -127,7 +129,6 @@ Symfony is the result of the work of many people who made the code better
- Daniel Gomes (danielcsgomes) - Daniel Gomes (danielcsgomes)
- Hidenori Goto (hidenorigoto) - Hidenori Goto (hidenorigoto)
- Sebastiaan Stok (sstok) - Sebastiaan Stok (sstok)
- Yonel Ceruto González (yonelceruto)
- Guilherme Blanco (guilhermeblanco) - Guilherme Blanco (guilhermeblanco)
- Pablo Godel (pgodel) - Pablo Godel (pgodel)
- Jérémie Augustin (jaugustin) - Jérémie Augustin (jaugustin)
@ -155,10 +156,11 @@ Symfony is the result of the work of many people who made the code better
- Jonathan Ingram (jonathaningram) - Jonathan Ingram (jonathaningram)
- Artur Kotyrba - Artur Kotyrba
- jeremyFreeAgent (Jérémy Romey) (jeremyfreeagent) - jeremyFreeAgent (Jérémy Romey) (jeremyfreeagent)
- James Halsall (jaitsu)
- Warnar Boekkooi (boekkooi) - Warnar Boekkooi (boekkooi)
- Dmitrii Chekaliuk (lazyhammer) - Dmitrii Chekaliuk (lazyhammer)
- Clément JOBEILI (dator) - Clément JOBEILI (dator)
- Daniel Wehner - Grégoire Paris (greg0ire)
- Possum - Possum
- Dorian Villet (gnutix) - Dorian Villet (gnutix)
- Richard Miller (mr_r_miller) - Richard Miller (mr_r_miller)
@ -171,6 +173,7 @@ Symfony is the result of the work of many people who made the code better
- Lars Strojny (lstrojny) - Lars Strojny (lstrojny)
- Stepan Anchugov (kix) - Stepan Anchugov (kix)
- bronze1man - bronze1man
- Daniel Espendiller
- sun (sun) - sun (sun)
- Larry Garfield (crell) - Larry Garfield (crell)
- Martin Schuhfuß (usefulthink) - Martin Schuhfuß (usefulthink)
@ -186,15 +189,14 @@ Symfony is the result of the work of many people who made the code better
- Dustin Whittle (dustinwhittle) - Dustin Whittle (dustinwhittle)
- jeff - jeff
- John Kary (johnkary) - John Kary (johnkary)
- James Halsall (jaitsu)
- Justin Hileman (bobthecow) - Justin Hileman (bobthecow)
- Blanchon Vincent (blanchonvincent) - Blanchon Vincent (blanchonvincent)
- Chris Wilkinson (thewilkybarkid) - Chris Wilkinson (thewilkybarkid)
- Christian Schmidt
- Michele Orselli (orso) - Michele Orselli (orso)
- Tom Van Looy (tvlooy) - Tom Van Looy (tvlooy)
- Sven Paulus (subsven) - Sven Paulus (subsven)
- Rui Marinho (ruimarinho) - Rui Marinho (ruimarinho)
- Daniel Espendiller
- SpacePossum - SpacePossum
- Dawid Nowak - Dawid Nowak
- Eugene Wissner - Eugene Wissner
@ -217,8 +219,9 @@ Symfony is the result of the work of many people who made the code better
- Manuel Reinhard (sprain) - Manuel Reinhard (sprain)
- Danny Berger (dpb587) - Danny Berger (dpb587)
- Jérôme Vasseur - Jérôme Vasseur
- Ruben Gonzalez (rubenrua)
- Adam Prager (padam87)
- Roman Marintšenko (inori) - Roman Marintšenko (inori)
- Christian Schmidt
- Xavier Montaña Carreras (xmontana) - Xavier Montaña Carreras (xmontana)
- Mickaël Andrieu (mickaelandrieu) - Mickaël Andrieu (mickaelandrieu)
- Xavier Perez - Xavier Perez
@ -233,12 +236,12 @@ Symfony is the result of the work of many people who made the code better
- Uwe Jäger (uwej711) - Uwe Jäger (uwej711)
- Eugene Leonovich (rybakit) - Eugene Leonovich (rybakit)
- Filippo Tessarotto - Filippo Tessarotto
- Julien Falque (julienfalque)
- Joseph Rouff (rouffj) - Joseph Rouff (rouffj)
- Félix Labrecque (woodspire) - Félix Labrecque (woodspire)
- GordonsLondon - GordonsLondon
- Jan Sorgalla (jsor) - Jan Sorgalla (jsor)
- Ray - Ray
- Grégoire Paris (greg0ire)
- Leo Feyer - Leo Feyer
- Chekote - Chekote
- Thomas Adam - Thomas Adam
@ -255,22 +258,20 @@ Symfony is the result of the work of many people who made the code better
- Beau Simensen (simensen) - Beau Simensen (simensen)
- Michael Hirschler (mvhirsch) - Michael Hirschler (mvhirsch)
- Robert Kiss (kepten) - Robert Kiss (kepten)
- Ruben Gonzalez (rubenrua) - David Maicher (dmaicher)
- Roumen Damianoff (roumen) - Roumen Damianoff (roumen)
- Adam Prager (padam87)
- Antonio J. García Lagar (ajgarlag) - Antonio J. García Lagar (ajgarlag)
- Kim Hemsø Rasmussen (kimhemsoe) - Kim Hemsø Rasmussen (kimhemsoe)
- Wouter Van Hecke - Wouter Van Hecke
- Peter Kruithof (pkruithof) - Peter Kruithof (pkruithof)
- Michael Holm (hollo) - Michael Holm (hollo)
- Marc Weistroff (futurecat) - Marc Weistroff (futurecat)
- Christian Schmidt
- Hidde Wieringa (hiddewie) - Hidde Wieringa (hiddewie)
- Chris Smith (cs278) - Chris Smith (cs278)
- Florian Klein (docteurklein) - Florian Klein (docteurklein)
- Julien Falque (julienfalque)
- Oleg Voronkovich - Oleg Voronkovich
- Manuel Kiessling (manuelkiessling) - Manuel Kiessling (manuelkiessling)
- Daniel Wehner
- Atsuhiro KUBO (iteman) - Atsuhiro KUBO (iteman)
- Andrew Moore (finewolf) - Andrew Moore (finewolf)
- Bertrand Zuchuat (garfield-fr) - Bertrand Zuchuat (garfield-fr)
@ -310,10 +311,10 @@ Symfony is the result of the work of many people who made the code better
- Magnus Nordlander (magnusnordlander) - Magnus Nordlander (magnusnordlander)
- alquerci - alquerci
- Francesco Levorato - Francesco Levorato
- Rob Frawley 2nd (robfrawley)
- Vitaliy Zakharov (zakharovvi) - Vitaliy Zakharov (zakharovvi)
- Tobias Sjösten (tobiassjosten) - Tobias Sjösten (tobiassjosten)
- Gyula Sallai (salla) - Gyula Sallai (salla)
- David Maicher (dmaicher)
- Inal DJAFAR (inalgnu) - Inal DJAFAR (inalgnu)
- Christian Gärtner (dagardner) - Christian Gärtner (dagardner)
- Tomasz Kowalczyk (thunderer) - Tomasz Kowalczyk (thunderer)
@ -341,6 +342,7 @@ Symfony is the result of the work of many people who made the code better
- Vyacheslav Salakhutdinov (megazoll) - Vyacheslav Salakhutdinov (megazoll)
- Jerzy Zawadzki (jzawadzki) - Jerzy Zawadzki (jzawadzki)
- Hassan Amouhzi - Hassan Amouhzi
- gadelat (gadelat)
- Tamas Szijarto - Tamas Szijarto
- Pavel Volokitin (pvolok) - Pavel Volokitin (pvolok)
- François Pluchino (francoispluchino) - François Pluchino (francoispluchino)
@ -396,13 +398,13 @@ Symfony is the result of the work of many people who made the code better
- Asier Illarramendi (doup) - Asier Illarramendi (doup)
- Chris Sedlmayr (catchamonkey) - Chris Sedlmayr (catchamonkey)
- Seb Koelen - Seb Koelen
- Dany Maillard (maidmaid)
- Christoph Mewes (xrstf) - Christoph Mewes (xrstf)
- Vitaliy Tverdokhlib (vitaliytv) - Vitaliy Tverdokhlib (vitaliytv)
- Ariel Ferrandini (aferrandini) - Ariel Ferrandini (aferrandini)
- Dirk Pahl (dirkaholic) - Dirk Pahl (dirkaholic)
- cedric lombardot (cedriclombardot) - cedric lombardot (cedriclombardot)
- Jonas Flodén (flojon) - Jonas Flodén (flojon)
- Christian Schmidt
- Amrouche Hamza - Amrouche Hamza
- Marcin Sikoń (marphi) - Marcin Sikoń (marphi)
- Dominik Zogg (dominik.zogg) - Dominik Zogg (dominik.zogg)
@ -526,7 +528,6 @@ Symfony is the result of the work of many people who made the code better
- Konstantin S. M. Möllers (ksmmoellers) - Konstantin S. M. Möllers (ksmmoellers)
- Sinan Eldem - Sinan Eldem
- Alexandre Dupuy (satchette) - Alexandre Dupuy (satchette)
- Rob Frawley 2nd
- Andre Rømcke (andrerom) - Andre Rømcke (andrerom)
- Nahuel Cuesta (ncuesta) - Nahuel Cuesta (ncuesta)
- Chris Boden (cboden) - Chris Boden (cboden)
@ -566,6 +567,7 @@ Symfony is the result of the work of many people who made the code better
- Miquel Rodríguez Telep (mrtorrent) - Miquel Rodríguez Telep (mrtorrent)
- Sergey Kolodyazhnyy (skolodyazhnyy) - Sergey Kolodyazhnyy (skolodyazhnyy)
- umpirski - umpirski
- Denis Brumann (dbrumann)
- Quentin de Longraye (quentinus95) - Quentin de Longraye (quentinus95)
- Chris Heng (gigablah) - Chris Heng (gigablah)
- Ulumuddin Yunus (joenoez) - Ulumuddin Yunus (joenoez)
@ -684,6 +686,7 @@ Symfony is the result of the work of many people who made the code better
- Abhoryo - Abhoryo
- Fabian Vogler (fabian) - Fabian Vogler (fabian)
- Korvin Szanto - Korvin Szanto
- Arjan Keeman
- Alaattin Kahramanlar (alaattin) - Alaattin Kahramanlar (alaattin)
- Sergey Zolotov (enleur) - Sergey Zolotov (enleur)
- Maksim Kotlyar (makasim) - Maksim Kotlyar (makasim)
@ -779,6 +782,7 @@ Symfony is the result of the work of many people who made the code better
- Phan Thanh Ha (haphan) - Phan Thanh Ha (haphan)
- Chris Jones (leek) - Chris Jones (leek)
- Colin O'Dell (colinodell) - Colin O'Dell (colinodell)
- Frank de Jonge (frenkynet)
- xaav - xaav
- Mahmoud Mostafa (mahmoud) - Mahmoud Mostafa (mahmoud)
- Alessandro Lai - Alessandro Lai
@ -807,6 +811,7 @@ Symfony is the result of the work of many people who made the code better
- mcfedr (mcfedr) - mcfedr (mcfedr)
- hamza - hamza
- dantleech - dantleech
- Bastien DURAND (deamon)
- Xavier Leune - Xavier Leune
- Tero Alén (tero) - Tero Alén (tero)
- DerManoMann - DerManoMann
@ -832,7 +837,7 @@ Symfony is the result of the work of many people who made the code better
- Nicolas Macherey - Nicolas Macherey
- Lin Clark - Lin Clark
- Jeremy David (jeremy.david) - Jeremy David (jeremy.david)
- Denis Brumann (dbrumann) - Robin Lehrmann (robinlehrmann)
- Troy McCabe - Troy McCabe
- Ville Mattila - Ville Mattila
- ilyes kooli - ilyes kooli
@ -845,6 +850,7 @@ Symfony is the result of the work of many people who made the code better
- Sergey Novikov (s12v) - Sergey Novikov (s12v)
- Marcos Quesada (marcos_quesada) - Marcos Quesada (marcos_quesada)
- Matthew Vickery (mattvick) - Matthew Vickery (mattvick)
- Angel Koilov (po_taka)
- Dan Finnie - Dan Finnie
- Ken Marfilla (marfillaster) - Ken Marfilla (marfillaster)
- benatespina (benatespina) - benatespina (benatespina)
@ -936,12 +942,14 @@ Symfony is the result of the work of many people who made the code better
- Christian Sciberras - Christian Sciberras
- Clement Herreman (clemherreman) - Clement Herreman (clemherreman)
- Dan Ionut Dumitriu (danionut90) - Dan Ionut Dumitriu (danionut90)
- Vladislav Rastrusny (fractalizer)
- Nyro (nyro) - Nyro (nyro)
- Marco - Marco
- Marc Torres - Marc Torres
- Alberto Aldegheri - Alberto Aldegheri
- heccjj - heccjj
- Alexandre Melard - Alexandre Melard
- Jay Klehr
- Sergey Yuferev - Sergey Yuferev
- Tobias Stöckler - Tobias Stöckler
- Mario Young - Mario Young
@ -999,6 +1007,7 @@ Symfony is the result of the work of many people who made the code better
- Andy Raines - Andy Raines
- Anthony Ferrara - Anthony Ferrara
- Klaas Cuvelier (kcuvelier) - Klaas Cuvelier (kcuvelier)
- markusu49
- Steve Frécinaux - Steve Frécinaux
- ShiraNai7 - ShiraNai7
- Vašek Purchart (vasek-purchart) - Vašek Purchart (vasek-purchart)
@ -1024,6 +1033,7 @@ Symfony is the result of the work of many people who made the code better
- Tom Corrigan (tomcorrigan) - Tom Corrigan (tomcorrigan)
- Luis Galeas - Luis Galeas
- Martin Pärtel - Martin Pärtel
- George Mponos (gmponos)
- Noah Heck (myesain) - Noah Heck (myesain)
- Patrick Daley (padrig) - Patrick Daley (padrig)
- Xavier Briand (xavierbriand) - Xavier Briand (xavierbriand)
@ -1131,10 +1141,9 @@ Symfony is the result of the work of many people who made the code better
- Leonid Terentyev (li0n) - Leonid Terentyev (li0n)
- ryunosuke - ryunosuke
- victoria - victoria
- Arjan Keeman
- Francisco Facioni (fran6co) - Francisco Facioni (fran6co)
- Iwan van Staveren (istaveren) - Iwan van Staveren (istaveren)
- Dany Maillard (maidmaid) - Thierry Thuon (lepiaf)
- Povilas S. (povilas) - Povilas S. (povilas)
- pborreli - pborreli
- Eric Caron - Eric Caron
@ -1177,6 +1186,7 @@ Symfony is the result of the work of many people who made the code better
- Dennis Væversted - Dennis Væversted
- nuncanada - nuncanada
- flack - flack
- izzyp
- František Bereň - František Bereň
- Christoph Nissle (derstoffel) - Christoph Nissle (derstoffel)
- Ionel Scutelnicu (ionelscutelnicu) - Ionel Scutelnicu (ionelscutelnicu)
@ -1243,6 +1253,7 @@ Symfony is the result of the work of many people who made the code better
- Yannick Warnier (ywarnier) - Yannick Warnier (ywarnier)
- Kevin Decherf - Kevin Decherf
- Jason Woods - Jason Woods
- klemens
- dened - dened
- Dmitry Korotovsky - Dmitry Korotovsky
- Michael van Tricht - Michael van Tricht
@ -1296,6 +1307,7 @@ Symfony is the result of the work of many people who made the code better
- John Nickell (jrnickell) - John Nickell (jrnickell)
- Martin Mayer (martin) - Martin Mayer (martin)
- Grzegorz Łukaszewicz (newicz) - Grzegorz Łukaszewicz (newicz)
- Jonny Schmid (schmidjon)
- Götz Gottwald - Götz Gottwald
- Veres Lajos - Veres Lajos
- Michael Babker - Michael Babker
@ -1361,10 +1373,12 @@ Symfony is the result of the work of many people who made the code better
- Jelle Bekker (jbekker) - Jelle Bekker (jbekker)
- Ian Jenkins (jenkoian) - Ian Jenkins (jenkoian)
- Jorge Martin (jorgemartind) - Jorge Martin (jorgemartind)
- Joeri Verdeyen (jverdeyen)
- Kevin Herrera (kherge) - Kevin Herrera (kherge)
- Luis Ramón López López (lrlopez) - Luis Ramón López López (lrlopez)
- Muriel (metalmumu) - Muriel (metalmumu)
- Michael Pohlers (mick_the_big) - Michael Pohlers (mick_the_big)
- mlpo (mlpo)
- Cayetano Soriano Gallego (neoshadybeat) - Cayetano Soriano Gallego (neoshadybeat)
- Ondrej Machulda (ondram) - Ondrej Machulda (ondram)
- Pablo Monterde Perez (plebs) - Pablo Monterde Perez (plebs)
@ -1424,6 +1438,7 @@ Symfony is the result of the work of many people who made the code better
- Christian Eikermann - Christian Eikermann
- Antonio Angelino - Antonio Angelino
- Shawn Iwinski - Shawn Iwinski
- Niklas Keller
- Vladimir Sazhin - Vladimir Sazhin
- lol768 - lol768
- jamogon - jamogon
@ -1512,6 +1527,7 @@ Symfony is the result of the work of many people who made the code better
- Lin Lu - Lin Lu
- arduanov - arduanov
- sualko - sualko
- Bilge
- Nicolas Roudaire - Nicolas Roudaire
- Alfonso (afgar) - Alfonso (afgar)
- Andreas Forsblom (aforsblo) - Andreas Forsblom (aforsblo)
@ -1527,6 +1543,7 @@ Symfony is the result of the work of many people who made the code better
- Choong Wei Tjeng (choonge) - Choong Wei Tjeng (choonge)
- Kousuke Ebihara (co3k) - Kousuke Ebihara (co3k)
- Loïc Vernet (coil) - Loïc Vernet (coil)
- Christian Gripp (core23)
- Christoph Schaefer (cvschaefer) - Christoph Schaefer (cvschaefer)
- Damon Jones (damon__jones) - Damon Jones (damon__jones)
- Łukasz Giza (destroyer) - Łukasz Giza (destroyer)
@ -1582,6 +1599,7 @@ Symfony is the result of the work of many people who made the code better
- Bart Ruysseveldt (ruyss) - Bart Ruysseveldt (ruyss)
- Sascha Dens (saschadens) - Sascha Dens (saschadens)
- scourgen hung (scourgen) - scourgen hung (scourgen)
- Sébastien Alfaiate (seb33300)
- Sebastian Busch (sebu) - Sebastian Busch (sebu)
- André Filipe Gonçalves Neves (seven) - André Filipe Gonçalves Neves (seven)
- Bruno Ziegler (sfcoder) - Bruno Ziegler (sfcoder)

View File

@ -568,7 +568,10 @@ class Filesystem
} }
$this->chmod($tmpFile, $mode); $this->chmod($tmpFile, $mode);
} elseif (file_exists($filename)) {
@chmod($tmpFile, fileperms($filename));
} }
$this->rename($tmpFile, $filename, true); $this->rename($tmpFile, $filename, true);
} }

View File

@ -1180,6 +1180,19 @@ class FilesystemTest extends FilesystemTestCase
$this->assertSame('bar', file_get_contents($filename)); $this->assertSame('bar', file_get_contents($filename));
} }
public function testDumpKeepsExistingPermissionsWhenOverwritingAnExistingFile()
{
$this->markAsSkippedIfChmodIsMissing();
$filename = $this->workspace.DIRECTORY_SEPARATOR.'foo.txt';
file_put_contents($filename, 'FOO BAR');
chmod($filename, 0745);
$this->filesystem->dumpFile($filename, 'bar', null);
$this->assertFilePermissions(745, $filename);
}
public function testCopyShouldKeepExecutionPermission() public function testCopyShouldKeepExecutionPermission()
{ {
$this->markAsSkippedIfChmodIsMissing(); $this->markAsSkippedIfChmodIsMissing();

View File

@ -23,6 +23,7 @@ abstract class TypeTestCase extends BaseTypeTestCase
$this->validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock(); $this->validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock();
$metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); $metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock();
$this->validator->expects($this->once())->method('getMetadataFor')->will($this->returnValue($metadata)); $this->validator->expects($this->once())->method('getMetadataFor')->will($this->returnValue($metadata));
$this->validator->expects($this->any())->method('validate')->will($this->returnValue(array()));
parent::setUp(); parent::setUp();
} }

View File

@ -303,6 +303,9 @@ abstract class Kernel implements KernelInterface, TerminableInterface
{ {
if (null === $this->name) { if (null === $this->name) {
$this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir)); $this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir));
if (ctype_digit($this->name[0])) {
$this->name = '_'.$this->name;
}
} }
return $this->name; return $this->name;

View File

@ -0,0 +1,37 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Tests\Fixtures\_123;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class Kernel123 extends Kernel
{
public function registerBundles()
{
return array();
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
}
public function getCacheDir()
{
return sys_get_temp_dir().'/'.Kernel::VERSION.'/kernel123/cache/'.$this->environment;
}
public function getLogDir()
{
return sys_get_temp_dir().'/'.Kernel::VERSION.'/kernel123/logs';
}
}

View File

@ -762,6 +762,14 @@ EOF;
$kernel->terminate(Request::create('/'), new Response()); $kernel->terminate(Request::create('/'), new Response());
} }
public function testKernelRootDirNameStartingWithANumber()
{
$dir = __DIR__.'/Fixtures/123';
require_once $dir.'/Kernel123.php';
$kernel = new \Symfony\Component\HttpKernel\Tests\Fixtures\_123\Kernel123('dev', true);
$this->assertEquals('_123', $kernel->getName());
}
/** /**
* Returns a mock for the BundleInterface. * Returns a mock for the BundleInterface.
* *

View File

@ -150,6 +150,8 @@ class ContextListener implements ListenerInterface
return $token; return $token;
} }
$userNotFoundByProvider = false;
foreach ($this->userProviders as $provider) { foreach ($this->userProviders as $provider) {
try { try {
$refreshedUser = $provider->refreshUser($user); $refreshedUser = $provider->refreshUser($user);
@ -167,10 +169,14 @@ class ContextListener implements ListenerInterface
$this->logger->warning('Username could not be found in the selected user provider.', array('username' => $e->getUsername(), 'provider' => get_class($provider))); $this->logger->warning('Username could not be found in the selected user provider.', array('username' => $e->getUsername(), 'provider' => get_class($provider)));
} }
return; $userNotFoundByProvider = true;
} }
} }
if ($userNotFoundByProvider) {
return;
}
throw new \RuntimeException(sprintf('There is no user provider for user "%s".', get_class($user))); throw new \RuntimeException(sprintf('There is no user provider for user "%s".', get_class($user)));
} }
} }

View File

@ -17,10 +17,17 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\User\User;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Http\Firewall\ContextListener; use Symfony\Component\Security\Http\Firewall\ContextListener;
use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcher;
@ -238,6 +245,40 @@ class ContextListenerTest extends TestCase
$listener->handle($event); $listener->handle($event);
} }
public function testTryAllUserProvidersUntilASupportingUserProviderIsFound()
{
$tokenStorage = new TokenStorage();
$refreshedUser = new User('foobar', 'baz');
$this->handleEventWithPreviousSession($tokenStorage, array(new NotSupportingUserProvider(), new SupportingUserProvider($refreshedUser)));
$this->assertSame($refreshedUser, $tokenStorage->getToken()->getUser());
}
public function testNextSupportingUserProviderIsTriedIfPreviousSupportingUserProviderDidNotLoadTheUser()
{
$tokenStorage = new TokenStorage();
$refreshedUser = new User('foobar', 'baz');
$this->handleEventWithPreviousSession($tokenStorage, array(new SupportingUserProvider(), new SupportingUserProvider($refreshedUser)));
$this->assertSame($refreshedUser, $tokenStorage->getToken()->getUser());
}
public function testTokenIsSetToNullIfNoUserWasLoadedByTheRegisteredUserProviders()
{
$tokenStorage = new TokenStorage();
$this->handleEventWithPreviousSession($tokenStorage, array(new NotSupportingUserProvider(), new SupportingUserProvider()));
$this->assertNull($tokenStorage->getToken());
}
/**
* @expectedException \RuntimeException
*/
public function testRuntimeExceptionIsThrownIfNoSupportingUserProviderWasRegistered()
{
$this->handleEventWithPreviousSession(new TokenStorage(), array(new NotSupportingUserProvider(), new NotSupportingUserProvider()));
}
protected function runSessionOnKernelResponse($newToken, $original = null) protected function runSessionOnKernelResponse($newToken, $original = null)
{ {
$session = new Session(new MockArraySessionStorage()); $session = new Session(new MockArraySessionStorage());
@ -265,4 +306,67 @@ class ContextListenerTest extends TestCase
return $session; return $session;
} }
private function handleEventWithPreviousSession(TokenStorageInterface $tokenStorage, array $userProviders)
{
$session = new Session(new MockArraySessionStorage());
$session->set('_security_context_key', serialize(new UsernamePasswordToken(new User('foo', 'bar'), '', 'context_key')));
$request = new Request();
$request->setSession($session);
$request->cookies->set('MOCKSESSID', true);
$listener = new ContextListener($tokenStorage, $userProviders, 'context_key');
$listener->handle(new GetResponseEvent($this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(), $request, HttpKernelInterface::MASTER_REQUEST));
}
}
class NotSupportingUserProvider implements UserProviderInterface
{
public function loadUserByUsername($username)
{
throw new UsernameNotFoundException();
}
public function refreshUser(UserInterface $user)
{
throw new UnsupportedUserException();
}
public function supportsClass($class)
{
return false;
}
}
class SupportingUserProvider implements UserProviderInterface
{
private $refreshedUser;
public function __construct(User $refreshedUser = null)
{
$this->refreshedUser = $refreshedUser;
}
public function loadUserByUsername($username)
{
}
public function refreshUser(UserInterface $user)
{
if (!$user instanceof User) {
throw new UnsupportedUserException();
}
if (null === $this->refreshedUser) {
throw new UsernameNotFoundException();
}
return $this->refreshedUser;
}
public function supportsClass($class)
{
return 'Symfony\Component\Security\Core\User\User' === $class;
}
} }