Merge branch '2.8' into 3.2

* 2.8:
  Allow Upper Case property names
  fix some risky tests
  bumped Symfony version to 2.7.27
  updated VERSION for 2.7.26
  update CONTRIBUTORS for 2.7.26
  updated CHANGELOG for 2.7.26
This commit is contained in:
Fabien Potencier 2017-04-04 08:30:56 -07:00
commit ff286d6da9
28 changed files with 267 additions and 143 deletions

View File

@ -23,25 +23,26 @@ Symfony is the result of the work of many people who made the code better
- Pascal Borreli (pborreli) - Pascal Borreli (pborreli)
- Wouter De Jong (wouterj) - Wouter De Jong (wouterj)
- Romain Neutron (romain) - Romain Neutron (romain)
- Grégoire Pineau (lyrixx)
- Joseph Bielawski (stloyd) - Joseph Bielawski (stloyd)
- Karma Dordrak (drak) - Karma Dordrak (drak)
- Lukas Kahwe Smith (lsmith) - Lukas Kahwe Smith (lsmith)
- Grégoire Pineau (lyrixx)
- Martin Hasoň (hason) - Martin Hasoň (hason)
- Jeremy Mikola (jmikola) - Robin Chalas (chalas_r)
- Maxime Steinhausser (ogizanagi) - Maxime Steinhausser (ogizanagi)
- Jeremy Mikola (jmikola)
- Jean-François Simon (jfsimon) - Jean-François Simon (jfsimon)
- Benjamin Eberlei (beberlei) - Benjamin Eberlei (beberlei)
- Igor Wiedler (igorw) - Igor Wiedler (igorw)
- Robin Chalas (chalas_r)
- Eriksen Costa (eriksencosta) - Eriksen Costa (eriksencosta)
- Jules Pietri (heah) - Jules Pietri (heah)
- Sarah Khalil (saro0h) - Sarah Khalil (saro0h)
- Jonathan Wage (jwage) - Jonathan Wage (jwage)
- Guilhem Niot (energetick)
- Diego Saint Esteben (dosten) - Diego Saint Esteben (dosten)
- Roland Franssen (ro0)
- 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)
@ -50,20 +51,20 @@ Symfony is the result of the work of many people who made the code better
- Peter Rehm (rpet) - Peter Rehm (rpet)
- Saša Stamenković (umpirsky) - Saša Stamenković (umpirsky)
- Henrik Bjørnskov (henrikbjorn) - Henrik Bjørnskov (henrikbjorn)
- Roland Franssen (ro0)
- Miha Vrhovnik - Miha Vrhovnik
- Roland Franssen (ro0) - Roland Franssen (ro0)
- Diego Saint Esteben (dii3g0) - Diego Saint Esteben (dii3g0)
- Konstantin Kudryashov (everzet) - Konstantin Kudryashov (everzet)
- Bilal Amarni (bamarni) - Bilal Amarni (bamarni)
- Florin Patan (florinpatan) - Florin Patan (florinpatan)
- Matthias Pigulla (mpdude)
- Kevin Bond (kbond) - Kevin Bond (kbond)
- Andrej Hudec (pulzarraider) - Andrej Hudec (pulzarraider)
- Gábor Egyed (1ed) - Gábor Egyed (1ed)
- Michel Weimerskirch (mweimerskirch) - Michel Weimerskirch (mweimerskirch)
- Eric Clemmons (ericclemmons) - Eric Clemmons (ericclemmons)
- Charles Sarrazin (csarrazi) - Charles Sarrazin (csarrazi)
- Matthias Pigulla (mpdude) - Pierre du Plessis (pierredup)
- Christian Raue - Christian Raue
- Arnout Boks (aboks) - Arnout Boks (aboks)
- Deni - Deni
@ -71,39 +72,38 @@ Symfony is the result of the work of many people who made the code better
- Dariusz Górecki (canni) - Dariusz Górecki (canni)
- Titouan Galopin (tgalopin) - Titouan Galopin (tgalopin)
- Douglas Greenshields (shieldo) - 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)
- Jáchym Toušek (enumag)
- Graham Campbell (graham) - Graham Campbell (graham)
- Daniel Holmes (dholmes) - Daniel Holmes (dholmes)
- Toni Uebernickel (havvg) - Toni Uebernickel (havvg)
- Bart van den Burg (burgov) - Bart van den Burg (burgov)
- Jordan Alliot (jalliot) - Jordan Alliot (jalliot)
- Jérémy DERUSSÉ (jderusse)
- John Wards (johnwards) - John Wards (johnwards)
- Fran Moreno (franmomu) - Fran Moreno (franmomu)
- Jáchym Toušek (enumag)
- Antoine Hérault (herzult) - Antoine Hérault (herzult)
- Paráda József (paradajozsef) - Paráda József (paradajozsef)
- Dariusz Ruminski - Dariusz Ruminski
- Arnaud Le Blanc (arnaud-lb) - Arnaud Le Blanc (arnaud-lb)
- Jérôme Tamarelle (gromnan) - Jérôme Tamarelle (gromnan)
- Maxime STEINHAUSSER
- Michal Piotrowski (eventhorizon) - Michal Piotrowski (eventhorizon)
- Tim Nagel (merk) - Tim Nagel (merk)
- Maxime STEINHAUSSER
- Issei Murasawa (issei_m) - Issei Murasawa (issei_m)
- Brice BERNARD (brikou) - Brice BERNARD (brikou)
- Alexander M. Turek (derrabus) - Alexander M. Turek (derrabus)
- Baptiste Clavié (talus)
- marc.weistroff - marc.weistroff
- lenar - lenar
- Włodzimierz Gajda (gajdaw) - Włodzimierz Gajda (gajdaw)
- Baptiste Clavié (talus)
- Vladimir Reznichenko (kalessil) - Vladimir Reznichenko (kalessil)
- Alexander Schwenn (xelaris) - Alexander Schwenn (xelaris)
- Florian Voutzinos (florianv) - Florian Voutzinos (florianv)
- Colin Frei - Colin Frei
- Jérémy DERUSSÉ (jderusse)
- Adrien Brault (adrienbrault) - Adrien Brault (adrienbrault)
- Joshua Thijssen - Joshua Thijssen
- Peter Kokot (maastermedia) - Peter Kokot (maastermedia)
@ -148,6 +148,7 @@ Symfony is the result of the work of many people who made the code better
- Teoh Han Hui (teohhanhui) - Teoh Han Hui (teohhanhui)
- Clemens Tolboom - Clemens Tolboom
- Helmer Aaviksoo - Helmer Aaviksoo
- Grégoire Paris (greg0ire)
- Hiromi Hishida (77web) - Hiromi Hishida (77web)
- Richard van Laak (rvanlaak) - Richard van Laak (rvanlaak)
- Matthieu Ouellette-Vachon (maoueh) - Matthieu Ouellette-Vachon (maoueh)
@ -160,7 +161,7 @@ Symfony is the result of the work of many people who made the code better
- Warnar Boekkooi (boekkooi) - Warnar Boekkooi (boekkooi)
- Dmitrii Chekaliuk (lazyhammer) - Dmitrii Chekaliuk (lazyhammer)
- Clément JOBEILI (dator) - Clément JOBEILI (dator)
- Grégoire Paris (greg0ire) - Dawid Nowak
- Possum - Possum
- Dorian Villet (gnutix) - Dorian Villet (gnutix)
- Richard Miller (mr_r_miller) - Richard Miller (mr_r_miller)
@ -169,6 +170,7 @@ Symfony is the result of the work of many people who made the code better
- Benjamin Dulau (dbenjamin) - Benjamin Dulau (dbenjamin)
- James Halsall (jaitsu) - James Halsall (jaitsu)
- Mathieu Lemoine (lemoinem) - Mathieu Lemoine (lemoinem)
- Chris Wilkinson (thewilkybarkid)
- Andreas Hucks (meandmymonkey) - Andreas Hucks (meandmymonkey)
- Noel Guilbert (noel) - Noel Guilbert (noel)
- Lars Strojny (lstrojny) - Lars Strojny (lstrojny)
@ -192,16 +194,15 @@ Symfony is the result of the work of many people who made the code better
- John Kary (johnkary) - John Kary (johnkary)
- Justin Hileman (bobthecow) - Justin Hileman (bobthecow)
- Blanchon Vincent (blanchonvincent) - Blanchon Vincent (blanchonvincent)
- Chris Wilkinson (thewilkybarkid)
- Christian Schmidt - 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)
- SpacePossum - SpacePossum
- Dawid Nowak
- Eugene Wissner - Eugene Wissner
- Julien Brochet (mewt) - Julien Brochet (mewt)
- Julien Falque (julienfalque)
- Tristan Darricau (nicofuma) - Tristan Darricau (nicofuma)
- Grégoire Paris (greg0ire) - Grégoire Paris (greg0ire)
- Sergey Linnik (linniksa) - Sergey Linnik (linniksa)
@ -213,6 +214,7 @@ Symfony is the result of the work of many people who made the code better
- julien pauli (jpauli) - julien pauli (jpauli)
- Lorenz Schori - Lorenz Schori
- Sébastien Lavoie (lavoiesl) - Sébastien Lavoie (lavoiesl)
- David Maicher (dmaicher)
- Francois Zaninotto - Francois Zaninotto
- Alexander Kotynia (olden) - Alexander Kotynia (olden)
- Daniel Tschinder - Daniel Tschinder
@ -237,7 +239,6 @@ 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
@ -259,7 +260,6 @@ 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)
- David Maicher (dmaicher)
- Roumen Damianoff (roumen) - Roumen Damianoff (roumen)
- Antonio J. García Lagar (ajgarlag) - Antonio J. García Lagar (ajgarlag)
- Kim Hemsø Rasmussen (kimhemsoe) - Kim Hemsø Rasmussen (kimhemsoe)
@ -397,6 +397,7 @@ Symfony is the result of the work of many people who made the code better
- EdgarPE - EdgarPE
- Florian Pfitzer (marmelatze) - Florian Pfitzer (marmelatze)
- Asier Illarramendi (doup) - Asier Illarramendi (doup)
- Andreas Braun
- Chris Sedlmayr (catchamonkey) - Chris Sedlmayr (catchamonkey)
- Seb Koelen - Seb Koelen
- Dany Maillard (maidmaid) - Dany Maillard (maidmaid)
@ -416,6 +417,7 @@ Symfony is the result of the work of many people who made the code better
- Gintautas Miselis - Gintautas Miselis
- Rob Bast - Rob Bast
- David Badura (davidbadura) - David Badura (davidbadura)
- Jordan Samouh (jordansamouh)
- Zander Baldwin - Zander Baldwin
- Adam Harvey - Adam Harvey
- Alex Bakhturin - Alex Bakhturin
@ -460,11 +462,13 @@ Symfony is the result of the work of many people who made the code better
- Jakub Škvára (jskvara) - Jakub Škvára (jskvara)
- Andrew Udvare (audvare) - Andrew Udvare (audvare)
- alexpods - alexpods
- Nikolay Labinskiy (e-moe)
- Arjen van der Meijden - Arjen van der Meijden
- Michele Locati - Michele Locati
- Dariusz Ruminski - Dariusz Ruminski
- Erik Trapman (eriktrapman) - Erik Trapman (eriktrapman)
- De Cock Xavier (xdecock) - De Cock Xavier (xdecock)
- Arthur de Moulins (4rthem)
- Almog Baku (almogbaku) - Almog Baku (almogbaku)
- Scott Arciszewski - Scott Arciszewski
- Norbert Orzechowicz (norzechowicz) - Norbert Orzechowicz (norzechowicz)
@ -511,8 +515,10 @@ Symfony is the result of the work of many people who made the code better
- Disquedur - Disquedur
- Michiel Boeckaert (milio) - Michiel Boeckaert (milio)
- Geoffrey Tran (geoff) - Geoffrey Tran (geoff)
- Romain Pierre (romain-pierre)
- Jan Behrens - Jan Behrens
- Mantas Var (mvar) - Mantas Var (mvar)
- Frank de Jonge (frenkynet)
- Sebastian Krebs - Sebastian Krebs
- Jean-Christophe Cuvelier [Artack] - Jean-Christophe Cuvelier [Artack]
- Christopher Davis (chrisguitarguy) - Christopher Davis (chrisguitarguy)
@ -540,8 +546,8 @@ Symfony is the result of the work of many people who made the code better
- Maxime Douailin - Maxime Douailin
- Jean Pasdeloup (pasdeloup) - Jean Pasdeloup (pasdeloup)
- Benjamin Cremer (bcremer) - Benjamin Cremer (bcremer)
- Thierry Thuon (lepiaf)
- Javier López (loalf) - Javier López (loalf)
- Andreas Braun
- Reinier Kip - Reinier Kip
- Geoffrey Brier (geoffrey-brier) - Geoffrey Brier (geoffrey-brier)
- Dustin Dobervich (dustin10) - Dustin Dobervich (dustin10)
@ -554,6 +560,7 @@ Symfony is the result of the work of many people who made the code better
- Kamil Kokot (pamil) - Kamil Kokot (pamil)
- Aurimas Niekis (gcds) - Aurimas Niekis (gcds)
- Max Grigorian (maxakawizard) - Max Grigorian (maxakawizard)
- mcfedr (mcfedr)
- Rostyslav Kinash - Rostyslav Kinash
- Maciej Malarz (malarzm) - Maciej Malarz (malarzm)
- Daisuke Ohata - Daisuke Ohata
@ -571,6 +578,7 @@ Symfony is the result of the work of many people who made the code better
- Denis Brumann (dbrumann) - Denis Brumann (dbrumann)
- Quentin de Longraye (quentinus95) - Quentin de Longraye (quentinus95)
- Chris Heng (gigablah) - Chris Heng (gigablah)
- Richard Bradley
- Ulumuddin Yunus (joenoez) - Ulumuddin Yunus (joenoez)
- Luc Vieillescazes (iamluc) - Luc Vieillescazes (iamluc)
- Johann Saunier (prophet777) - Johann Saunier (prophet777)
@ -630,6 +638,7 @@ Symfony is the result of the work of many people who made the code better
- Besnik Br - Besnik Br
- Dariusz Ruminski - Dariusz Ruminski
- Joshua Nye - Joshua Nye
- Claudio Zizza
- Dave Marshall (davedevelopment) - Dave Marshall (davedevelopment)
- avorobiev - avorobiev
- Venu - Venu
@ -648,6 +657,7 @@ Symfony is the result of the work of many people who made the code better
- John Bohn (jbohn) - John Bohn (jbohn)
- Marc Morera (mmoreram) - Marc Morera (mmoreram)
- Andrew Hilobok (hilobok) - Andrew Hilobok (hilobok)
- Noah Heck (myesain)
- Christian Soronellas (theunic) - Christian Soronellas (theunic)
- Yosmany Garcia (yosmanyga) - Yosmany Garcia (yosmanyga)
- Wouter de Wild - Wouter de Wild
@ -655,17 +665,18 @@ Symfony is the result of the work of many people who made the code better
- Degory Valentine - Degory Valentine
- Benoit Lévêque (benoit_leveque) - Benoit Lévêque (benoit_leveque)
- Jeroen Fiege (fieg) - Jeroen Fiege (fieg)
- Arthur de Moulins (4rthem)
- Krzysiek Łabuś - Krzysiek Łabuś
- Xavier Lacot (xavier) - Xavier Lacot (xavier)
- possum - possum
- Denis Zunke (donalberto) - Denis Zunke (donalberto)
- Ahmed TAILOULOUTE (ahmedtai)
- Olivier Maisonneuve (olineuve) - Olivier Maisonneuve (olineuve)
- Masterklavi - Masterklavi
- Francis Turmel (fturmel) - Francis Turmel (fturmel)
- Nikita Nefedov (nikita2206) - Nikita Nefedov (nikita2206)
- cgonzalez - cgonzalez
- Ben - Ben
- Vincent Composieux (eko)
- Jayson Xu (superjavason) - Jayson Xu (superjavason)
- Jaik Dean (jaikdean) - Jaik Dean (jaikdean)
- fago - fago
@ -676,6 +687,7 @@ Symfony is the result of the work of many people who made the code better
- James Michael DuPont - James Michael DuPont
- Tom Klingenberg - Tom Klingenberg
- Christopher Hall (mythmakr) - Christopher Hall (mythmakr)
- Patrick Dawkins (pjcdawkins)
- Paul Kamer (pkamer) - Paul Kamer (pkamer)
- Rafał Wrzeszcz (rafalwrzeszcz) - Rafał Wrzeszcz (rafalwrzeszcz)
- Reen Lokum - Reen Lokum
@ -721,6 +733,7 @@ Symfony is the result of the work of many people who made the code better
- corphi - corphi
- grizlik - grizlik
- Derek ROTH - Derek ROTH
- Dmytro Boiko (eagle)
- Shin Ohno (ganchiku) - Shin Ohno (ganchiku)
- Geert De Deckere (geertdd) - Geert De Deckere (geertdd)
- Jan Kramer (jankramer) - Jan Kramer (jankramer)
@ -783,7 +796,6 @@ 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
@ -809,7 +821,6 @@ Symfony is the result of the work of many people who made the code better
- Zachary Tong (polyfractal) - Zachary Tong (polyfractal)
- Hryhorii Hrebiniuk - Hryhorii Hrebiniuk
- Dennis Fridrich (dfridrich) - Dennis Fridrich (dfridrich)
- mcfedr (mcfedr)
- hamza - hamza
- dantleech - dantleech
- Bastien DURAND (deamon) - Bastien DURAND (deamon)
@ -842,6 +853,7 @@ Symfony is the result of the work of many people who made the code better
- Troy McCabe - Troy McCabe
- Ville Mattila - Ville Mattila
- ilyes kooli - ilyes kooli
- gr1ev0us
- Boris Vujicic (boris.vujicic) - Boris Vujicic (boris.vujicic)
- Max Beutel - Max Beutel
- Antanas Arvasevicius - Antanas Arvasevicius
@ -865,10 +877,12 @@ Symfony is the result of the work of many people who made the code better
- Martynas Narbutas - Martynas Narbutas
- Bailey Parker - Bailey Parker
- Eddie Jaoude - Eddie Jaoude
- Antanas Arvasevicius
- Haritz Iturbe (hizai) - Haritz Iturbe (hizai)
- Nerijus Arlauskas (nercury) - Nerijus Arlauskas (nercury)
- SPolischook - SPolischook
- Diego Sapriza - Diego Sapriza
- Anton A. Sumin
- Joan Cruz - Joan Cruz
- inspiran - inspiran
- Cristobal Dabed - Cristobal Dabed
@ -965,6 +979,7 @@ Symfony is the result of the work of many people who made the code better
- Aharon Perkel - Aharon Perkel
- matze - matze
- Abdul.Mohsen B. A. A - Abdul.Mohsen B. A. A
- Martin Auswöger
- Benoît Burnichon - Benoît Burnichon
- pthompson - pthompson
- Malaney J. Hill - Malaney J. Hill
@ -1010,7 +1025,9 @@ Symfony is the result of the work of many people who made the code better
- Klaas Cuvelier (kcuvelier) - Klaas Cuvelier (kcuvelier)
- markusu49 - markusu49
- Steve Frécinaux - Steve Frécinaux
- Jules Lamur
- ShiraNai7 - ShiraNai7
- Markus Fasselt (digilist)
- Vašek Purchart (vasek-purchart) - Vašek Purchart (vasek-purchart)
- Janusz Jabłoński (yanoosh) - Janusz Jabłoński (yanoosh)
- Sandro Hopf - Sandro Hopf
@ -1035,17 +1052,16 @@ Symfony is the result of the work of many people who made the code better
- Luis Galeas - Luis Galeas
- Martin Pärtel - Martin Pärtel
- George Mponos (gmponos) - George Mponos (gmponos)
- Noah Heck (myesain)
- Patrick Daley (padrig) - Patrick Daley (padrig)
- Xavier Briand (xavierbriand) - Xavier Briand (xavierbriand)
- Max Summe - Max Summe
- WedgeSama - WedgeSama
- Felds Liscia - Felds Liscia
- Ahmed TAILOULOUTE (ahmedtai)
- Maxime Veber (nek-) - Maxime Veber (nek-)
- Sullivan SENECHAL - Sullivan SENECHAL
- Tadcka - Tadcka
- Beth Binkovitz - Beth Binkovitz
- Gonzalo Míguez
- Romain Geissler - Romain Geissler
- Adrien Moiruad - Adrien Moiruad
- Tomaz Ahlin - Tomaz Ahlin
@ -1105,7 +1121,6 @@ Symfony is the result of the work of many people who made the code better
- Konrad Mohrfeldt - Konrad Mohrfeldt
- Lance Chen - Lance Chen
- Andrew (drew) - Andrew (drew)
- Nikolay Labinskiy (e-moe)
- kor3k kor3k (kor3k) - kor3k kor3k (kor3k)
- Stelian Mocanita (stelian) - Stelian Mocanita (stelian)
- Flavian (2much) - Flavian (2much)
@ -1144,11 +1159,9 @@ Symfony is the result of the work of many people who made the code better
- victoria - victoria
- Francisco Facioni (fran6co) - Francisco Facioni (fran6co)
- Iwan van Staveren (istaveren) - Iwan van Staveren (istaveren)
- Thierry Thuon (lepiaf)
- Povilas S. (povilas) - Povilas S. (povilas)
- pborreli - pborreli
- Eric Caron - Eric Caron
- Richard Bradley
- 2manypeople - 2manypeople
- Wing - Wing
- Thomas Bibb - Thomas Bibb
@ -1172,6 +1185,7 @@ Symfony is the result of the work of many people who made the code better
- Michal Gebauer - Michal Gebauer
- Gleb Sidora - Gleb Sidora
- David Stone - David Stone
- Niels Keurentjes (curry684)
- Jovan Perovic (jperovic) - Jovan Perovic (jperovic)
- Pablo Maria Martelletti (pmartelletti) - Pablo Maria Martelletti (pmartelletti)
- Yassine Guedidi (yguedidi) - Yassine Guedidi (yguedidi)
@ -1229,6 +1243,7 @@ Symfony is the result of the work of many people who made the code better
- Brian Graham (incognito) - Brian Graham (incognito)
- Kevin Vergauwen (innocenzo) - Kevin Vergauwen (innocenzo)
- Alessio Baglio (ioalessio) - Alessio Baglio (ioalessio)
- Johannes Müller (johmue)
- Jordi Llonch (jordillonch) - Jordi Llonch (jordillonch)
- Cédric Dugat (ph3nol) - Cédric Dugat (ph3nol)
- Philip Dahlstrøm (phidah) - Philip Dahlstrøm (phidah)
@ -1290,6 +1305,7 @@ Symfony is the result of the work of many people who made the code better
- Jérémy M (th3mouk) - Jérémy M (th3mouk)
- Vincent LEFORT (vlefort) - Vincent LEFORT (vlefort)
- Sadicov Vladimir (xtech) - Sadicov Vladimir (xtech)
- Kevin EMO (zarcox)
- Alexander Zogheb - Alexander Zogheb
- Rémi Blaise - Rémi Blaise
- Joel Marcey - Joel Marcey
@ -1302,7 +1318,6 @@ Symfony is the result of the work of many people who made the code better
- adenkejawen - adenkejawen
- Ari Pringle (apringle) - Ari Pringle (apringle)
- Dan Ordille (dordille) - Dan Ordille (dordille)
- Dmytro Boiko (eagle)
- Jan Eichhorn (exeu) - Jan Eichhorn (exeu)
- Grégory Pelletier (ip512) - Grégory Pelletier (ip512)
- John Nickell (jrnickell) - John Nickell (jrnickell)
@ -1351,7 +1366,6 @@ Symfony is the result of the work of many people who made the code better
- ddebree - ddebree
- Tomas Liubinas - Tomas Liubinas
- Alex - Alex
- Patrick Dawkins
- Klaas Naaijkens - Klaas Naaijkens
- Daniel González Cerviño - Daniel González Cerviño
- Rafał - Rafał
@ -1364,7 +1378,6 @@ Symfony is the result of the work of many people who made the code better
- David Joos (djoos) - David Joos (djoos)
- Denis Klementjev (dklementjev) - Denis Klementjev (dklementjev)
- Tomáš Polívka (draczris) - Tomáš Polívka (draczris)
- Vincent Composieux (eko)
- Franz Liedke (franzliedke) - Franz Liedke (franzliedke)
- Christophe BECKER (goabonga) - Christophe BECKER (goabonga)
- gondo (gondo) - gondo (gondo)
@ -1400,6 +1413,7 @@ Symfony is the result of the work of many people who made the code better
- Curtis - Curtis
- Gabriel Moreira - Gabriel Moreira
- Alexey Popkov - Alexey Popkov
- ChS
- Joseph Deray - Joseph Deray
- Damian Sromek - Damian Sromek
- Ben - Ben
@ -1438,6 +1452,7 @@ Symfony is the result of the work of many people who made the code better
- znerol - znerol
- Christian Eikermann - Christian Eikermann
- Antonio Angelino - Antonio Angelino
- Matt Fields
- Shawn Iwinski - Shawn Iwinski
- Niklas Keller - Niklas Keller
- Vladimir Sazhin - Vladimir Sazhin
@ -1563,6 +1578,7 @@ Symfony is the result of the work of many people who made the code better
- ibasaw (ibasaw) - ibasaw (ibasaw)
- Vladislav Krupenkin (ideea) - Vladislav Krupenkin (ideea)
- Imangazaliev Muhammad (imangazaliev) - Imangazaliev Muhammad (imangazaliev)
- j0k (j0k)
- joris de wit (jdewit) - joris de wit (jdewit)
- Jérémy CROMBEZ (jeremy) - Jérémy CROMBEZ (jeremy)
- Jose Manuel Gonzalez (jgonzalez) - Jose Manuel Gonzalez (jgonzalez)

View File

@ -145,13 +145,16 @@ class ArrayNodeDefinitionTest extends TestCase
public function testNestedPrototypedArrayNodes() public function testNestedPrototypedArrayNodes()
{ {
$node = new ArrayNodeDefinition('root'); $nodeDefinition = new ArrayNodeDefinition('root');
$node $nodeDefinition
->addDefaultChildrenIfNoneSet() ->addDefaultChildrenIfNoneSet()
->prototype('array') ->prototype('array')
->prototype('array') ->prototype('array')
; ;
$node->getNode(); $node = $nodeDefinition->getNode();
$this->assertInstanceOf('Symfony\Component\Config\Definition\PrototypedArrayNode', $node);
$this->assertInstanceOf('Symfony\Component\Config\Definition\PrototypedArrayNode', $node->getPrototype());
} }
public function testEnabledNodeDefaults() public function testEnabledNodeDefaults()

View File

@ -71,6 +71,8 @@ class TreeBuilderTest extends TestCase
$root = $builder->root('override', 'array', new CustomNodeBuilder()); $root = $builder->root('override', 'array', new CustomNodeBuilder());
$root->prototype('bar')->end(); $root->prototype('bar')->end();
$this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\BarNode', $root->getNode(true)->getPrototype());
} }
public function testAnExtendedNodeBuilderGetsPropagatedToTheChildren() public function testAnExtendedNodeBuilderGetsPropagatedToTheChildren()
@ -79,7 +81,7 @@ class TreeBuilderTest extends TestCase
$builder->root('propagation') $builder->root('propagation')
->children() ->children()
->setNodeClass('extended', 'Symfony\Component\Config\Tests\Definition\Builder\VariableNodeDefinition') ->setNodeClass('extended', 'Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition')
->node('foo', 'extended')->end() ->node('foo', 'extended')->end()
->arrayNode('child') ->arrayNode('child')
->children() ->children()
@ -88,6 +90,15 @@ class TreeBuilderTest extends TestCase
->end() ->end()
->end() ->end()
->end(); ->end();
$node = $builder->buildTree();
$children = $node->getChildren();
$this->assertInstanceOf('Symfony\Component\Config\Definition\BooleanNode', $children['foo']);
$childChildren = $children['child']->getChildren();
$this->assertInstanceOf('Symfony\Component\Config\Definition\BooleanNode', $childChildren['foo']);
} }
public function testDefinitionInfoGetsTransferredToNode() public function testDefinitionInfoGetsTransferredToNode()

View File

@ -0,0 +1,18 @@
<?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\Config\Tests\Fixtures;
use Symfony\Component\Config\Definition\ArrayNode;
class BarNode extends ArrayNode
{
}

View File

@ -12,10 +12,12 @@
namespace Symfony\Component\Config\Tests\Definition\Builder; namespace Symfony\Component\Config\Tests\Definition\Builder;
use Symfony\Component\Config\Definition\Builder\NodeDefinition; use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\Config\Tests\Fixtures\BarNode;
class BarNodeDefinition extends NodeDefinition class BarNodeDefinition extends NodeDefinition
{ {
protected function createNode() protected function createNode()
{ {
return new BarNode($this->name);
} }
} }

View File

@ -299,6 +299,8 @@ class CompoundFormTest extends AbstractFormTest
public function testRemoveIgnoresUnknownName() public function testRemoveIgnoresUnknownName()
{ {
$this->form->remove('notexisting'); $this->form->remove('notexisting');
$this->assertCount(0, $this->form);
} }
public function testArrayAccess() public function testArrayAccess()

View File

@ -102,7 +102,9 @@ class ChoiceTypeTest extends BaseTypeTest
public function testChoiceListAndChoicesCanBeEmpty() public function testChoiceListAndChoicesCanBeEmpty()
{ {
$this->factory->create(static::TESTED_TYPE); $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $this->factory->create(static::TESTED_TYPE, null, array(
'choices_as_values' => true,
)));
} }
public function testExpandedChoicesOptionsTurnIntoChildren() public function testExpandedChoicesOptionsTurnIntoChildren()
@ -1705,9 +1707,9 @@ class ChoiceTypeTest extends BaseTypeTest
// https://github.com/symfony/symfony/issues/3298 // https://github.com/symfony/symfony/issues/3298
public function testInitializeWithEmptyChoices() public function testInitializeWithEmptyChoices()
{ {
$this->factory->createNamed('name', static::TESTED_TYPE, null, array( $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $this->factory->createNamed('name', static::TESTED_TYPE, null, array(
'choices' => array(), 'choices' => array(),
)); )));
} }
public function testInitializeWithDefaultObjectChoice() public function testInitializeWithDefaultObjectChoice()

View File

@ -43,11 +43,13 @@ class CountryTypeTest extends BaseTypeTest
$choices = $this->factory->create(static::TESTED_TYPE, 'country') $choices = $this->factory->create(static::TESTED_TYPE, 'country')
->createView()->vars['choices']; ->createView()->vars['choices'];
$countryCodes = array();
foreach ($choices as $choice) { foreach ($choices as $choice) {
if ('ZZ' === $choice->value) { $countryCodes[] = $choice->value;
$this->fail('Should not contain choice "ZZ"');
}
} }
$this->assertNotContains('ZZ', $countryCodes);
} }
public function testSubmitNull($expected = null, $norm = null, $view = null) public function testSubmitNull($expected = null, $norm = null, $view = null)

View File

@ -273,7 +273,7 @@ class DateTimeTypeTest extends BaseTypeTest
{ {
// Throws an exception if "data_class" option is not explicitly set // Throws an exception if "data_class" option is not explicitly set
// to null in the type // to null in the type
$this->factory->create(static::TESTED_TYPE, new \DateTime()); $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $this->factory->create(static::TESTED_TYPE, new \DateTime()));
} }
public function testSingleTextWidgetShouldUseTheRightInputType() public function testSingleTextWidgetShouldUseTheRightInputType()

View File

@ -711,7 +711,7 @@ class DateTypeTest extends BaseTypeTest
{ {
// Throws an exception if "data_class" option is not explicitly set // Throws an exception if "data_class" option is not explicitly set
// to null in the type // to null in the type
$this->factory->create(static::TESTED_TYPE, new \DateTime()); $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $this->factory->create(static::TESTED_TYPE, new \DateTime()));
} }
public function testSingleTextWidgetShouldUseTheRightInputType() public function testSingleTextWidgetShouldUseTheRightInputType()

View File

@ -141,23 +141,23 @@ class FormTypeTest extends BaseTypeTest
public function testDataClassMayBeNull() public function testDataClassMayBeNull()
{ {
$this->factory->createBuilder(static::TESTED_TYPE, null, array( $this->assertInstanceOf('Symfony\Component\Form\FormBuilderInterface', $this->factory->createBuilder(static::TESTED_TYPE, null, array(
'data_class' => null, 'data_class' => null,
)); )));
} }
public function testDataClassMayBeAbstractClass() public function testDataClassMayBeAbstractClass()
{ {
$this->factory->createBuilder(static::TESTED_TYPE, null, array( $this->assertInstanceOf('Symfony\Component\Form\FormBuilderInterface', $this->factory->createBuilder(static::TESTED_TYPE, null, array(
'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AbstractAuthor', 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AbstractAuthor',
)); )));
} }
public function testDataClassMayBeInterface() public function testDataClassMayBeInterface()
{ {
$this->factory->createBuilder(static::TESTED_TYPE, null, array( $this->assertInstanceOf('Symfony\Component\Form\FormBuilderInterface', $this->factory->createBuilder(static::TESTED_TYPE, null, array(
'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AuthorInterface', 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AuthorInterface',
)); )));
} }
/** /**

View File

@ -488,7 +488,7 @@ class TimeTypeTest extends BaseTypeTest
{ {
// Throws an exception if "data_class" option is not explicitly set // Throws an exception if "data_class" option is not explicitly set
// to null in the type // to null in the type
$this->factory->create(static::TESTED_TYPE, new \DateTime()); $this->assertInstanceOf('Symfony\Component\Form\FormInterface', $this->factory->create(static::TESTED_TYPE, new \DateTime()));
} }
public function testSingleTextWidgetShouldUseTheRightInputType() public function testSingleTextWidgetShouldUseTheRightInputType()

View File

@ -62,21 +62,21 @@ class DependencyInjectionExtensionTest extends TestCase
*/ */
public function testThrowExceptionForInvalidExtendedType() public function testThrowExceptionForInvalidExtendedType()
{ {
$container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); $formTypeExtension = $this->createFormTypeExtensionMock('unmatched');
$typeExtension = $this->getMockBuilder('Symfony\Component\Form\FormTypeExtensionInterface')->getMock(); $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
$typeExtension->expects($this->any())
->method('getExtendedType')
->willReturn('unmatched');
$container->expects($this->any()) $container->expects($this->any())
->method('get') ->method('get')
->with('extension') ->with('extension')
->willReturn($typeExtension); ->willReturn($formTypeExtension);
$extension = new DependencyInjectionExtension($container, array(), array('test' => array('extension')), array()); $extension = new DependencyInjectionExtension($container, array(), array('test' => array('extension')), array());
$extension->getTypeExtensions('test'); $extensions = $extension->getTypeExtensions('test');
$this->assertCount(1, $extensions);
$this->assertSame($formTypeExtension, $extensions[0]);
} }
public function testGetTypeGuesser() public function testGetTypeGuesser()

View File

@ -161,6 +161,8 @@ class FormBuilderTest extends TestCase
{ {
$this->builder->add(new ButtonBuilder('reset')); $this->builder->add(new ButtonBuilder('reset'));
$this->builder->add(new SubmitButtonBuilder('submit')); $this->builder->add(new SubmitButtonBuilder('submit'));
$this->assertCount(2, $this->builder->all());
} }
public function testGetUnknown() public function testGetUnknown()

View File

@ -12,9 +12,7 @@
namespace Symfony\Component\Form\Tests; namespace Symfony\Component\Form\Tests;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormConfigBuilder;
use Symfony\Component\Form\Exception\InvalidArgumentException;
/** /**
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
@ -24,72 +22,65 @@ class FormConfigTest extends TestCase
public function getHtml4Ids() public function getHtml4Ids()
{ {
return array( return array(
array('z0', true), array('z0'),
array('A0', true), array('A0'),
array('A9', true), array('A9'),
array('Z0', true), array('Z0'),
array('#', false), array('#', 'Symfony\Component\Form\Exception\InvalidArgumentException'),
array('a#', false), array('a#', 'Symfony\Component\Form\Exception\InvalidArgumentException'),
array('a$', false), array('a$', 'Symfony\Component\Form\Exception\InvalidArgumentException'),
array('a%', false), array('a%', 'Symfony\Component\Form\Exception\InvalidArgumentException'),
array('a ', false), array('a ', 'Symfony\Component\Form\Exception\InvalidArgumentException'),
array("a\t", false), array("a\t", 'Symfony\Component\Form\Exception\InvalidArgumentException'),
array("a\n", false), array("a\n", 'Symfony\Component\Form\Exception\InvalidArgumentException'),
array('a-', true), array('a-'),
array('a_', true), array('a_'),
array('a:', true), array('a:'),
// Periods are allowed by the HTML4 spec, but disallowed by us // Periods are allowed by the HTML4 spec, but disallowed by us
// because they break the generated property paths // because they break the generated property paths
array('a.', false), array('a.', 'Symfony\Component\Form\Exception\InvalidArgumentException'),
// Contrary to the HTML4 spec, we allow names starting with a // Contrary to the HTML4 spec, we allow names starting with a
// number, otherwise naming fields by collection indices is not // number, otherwise naming fields by collection indices is not
// possible. // possible.
// For root forms, leading digits will be stripped from the // For root forms, leading digits will be stripped from the
// "id" attribute to produce valid HTML4. // "id" attribute to produce valid HTML4.
array('0', true), array('0'),
array('9', true), array('9'),
// Contrary to the HTML4 spec, we allow names starting with an // Contrary to the HTML4 spec, we allow names starting with an
// underscore, since this is already a widely used practice in // underscore, since this is already a widely used practice in
// Symfony. // Symfony.
// For root forms, leading underscores will be stripped from the // For root forms, leading underscores will be stripped from the
// "id" attribute to produce valid HTML4. // "id" attribute to produce valid HTML4.
array('_', true), array('_'),
// Integers are allowed // Integers are allowed
array(0, true), array(0),
array(123, true), array(123),
// NULL is allowed // NULL is allowed
array(null, true), array(null),
// Other types are not // Other types are not
array(1.23, false), array(1.23, 'Symfony\Component\Form\Exception\UnexpectedTypeException'),
array(5., false), array(5., 'Symfony\Component\Form\Exception\UnexpectedTypeException'),
array(true, false), array(true, 'Symfony\Component\Form\Exception\UnexpectedTypeException'),
array(new \stdClass(), false), array(new \stdClass(), 'Symfony\Component\Form\Exception\UnexpectedTypeException'),
); );
} }
/** /**
* @dataProvider getHtml4Ids * @dataProvider getHtml4Ids
*/ */
public function testNameAcceptsOnlyNamesValidAsIdsInHtml4($name, $accepted) public function testNameAcceptsOnlyNamesValidAsIdsInHtml4($name, $expectedException = null)
{ {
$dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock();
try { if (null !== $expectedException && method_exists($this, 'expectException')) {
new FormConfigBuilder($name, null, $dispatcher); $this->expectException($expectedException);
if (!$accepted) { } elseif (null !== $expectedException) {
$this->fail(sprintf('The value "%s" should not be accepted', $name)); $this->setExpectedException($expectedException);
}
} catch (UnexpectedTypeException $e) {
// if the value was not accepted, but should be, rethrow exception
if ($accepted) {
throw $e;
}
} catch (InvalidArgumentException $e) {
// if the value was not accepted, but should be, rethrow exception
if ($accepted) {
throw $e;
}
} }
$formConfigBuilder = new FormConfigBuilder($name, null, $dispatcher);
$this->assertSame((string) $name, $formConfigBuilder->getName());
} }
public function testGetRequestHandlerCreatesNativeRequestHandlerIfNotSet() public function testGetRequestHandlerCreatesNativeRequestHandlerIfNotSet()
@ -109,27 +100,42 @@ class FormConfigTest extends TestCase
public function testSetMethodAllowsGet() public function testSetMethodAllowsGet()
{ {
$this->getConfigBuilder()->setMethod('GET'); $formConfigBuilder = $this->getConfigBuilder();
$formConfigBuilder->setMethod('GET');
self::assertSame('GET', $formConfigBuilder->getMethod());
} }
public function testSetMethodAllowsPost() public function testSetMethodAllowsPost()
{ {
$this->getConfigBuilder()->setMethod('POST'); $formConfigBuilder = $this->getConfigBuilder();
$formConfigBuilder->setMethod('POST');
self::assertSame('POST', $formConfigBuilder->getMethod());
} }
public function testSetMethodAllowsPut() public function testSetMethodAllowsPut()
{ {
$this->getConfigBuilder()->setMethod('PUT'); $formConfigBuilder = $this->getConfigBuilder();
$formConfigBuilder->setMethod('PUT');
self::assertSame('PUT', $formConfigBuilder->getMethod());
} }
public function testSetMethodAllowsDelete() public function testSetMethodAllowsDelete()
{ {
$this->getConfigBuilder()->setMethod('DELETE'); $formConfigBuilder = $this->getConfigBuilder();
$formConfigBuilder->setMethod('DELETE');
self::assertSame('DELETE', $formConfigBuilder->getMethod());
} }
public function testSetMethodAllowsPatch() public function testSetMethodAllowsPatch()
{ {
$this->getConfigBuilder()->setMethod('PATCH'); $formConfigBuilder = $this->getConfigBuilder();
$formConfigBuilder->setMethod('PATCH');
self::assertSame('PATCH', $formConfigBuilder->getMethod());
} }
/** /**

View File

@ -912,10 +912,11 @@ class SimpleFormTest extends AbstractFormTest
public function testSubmittingWrongDataIsIgnored() public function testSubmittingWrongDataIsIgnored()
{ {
$called = 0;
$child = $this->getBuilder('child', $this->dispatcher); $child = $this->getBuilder('child', $this->dispatcher);
$child->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { $child->addEventListener(FormEvents::PRE_SUBMIT, function () use (&$called) {
// child form doesn't receive the wrong data that is submitted on parent ++$called;
$this->assertNull($event->getData());
}); });
$parent = $this->getBuilder('parent', new EventDispatcher()) $parent = $this->getBuilder('parent', new EventDispatcher())
@ -925,6 +926,8 @@ class SimpleFormTest extends AbstractFormTest
->getForm(); ->getForm();
$parent->submit('not-an-array'); $parent->submit('not-an-array');
$this->assertSame(0, $called, 'PRE_SUBMIT event listeners are not called for wrong data');
} }
public function testHandleRequestForwardsToRequestHandler() public function testHandleRequestForwardsToRequestHandler()
@ -1027,14 +1030,17 @@ class SimpleFormTest extends AbstractFormTest
public function testSubmitIsNeverFiredIfInheritData() public function testSubmitIsNeverFiredIfInheritData()
{ {
$called = 0;
$form = $this->getBuilder() $form = $this->getBuilder()
->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) { ->addEventListener(FormEvents::SUBMIT, function () use (&$called) {
$this->fail('The SUBMIT event should not be fired'); ++$called;
}) })
->setInheritData(true) ->setInheritData(true)
->getForm(); ->getForm();
$form->submit('foo'); $form->submit('foo');
$this->assertSame(0, $called, 'The SUBMIT event is not fired when data are inherited from the parent form');
} }
public function testInitializeSetsDefaultData() public function testInitializeSetsDefaultData()

View File

@ -114,8 +114,11 @@ class OrderedHashMapTest extends TestCase
public function testUnsetNonExistingSucceeds() public function testUnsetNonExistingSucceeds()
{ {
$map = new OrderedHashMap(); $map = new OrderedHashMap();
$map['second'] = 2;
unset($map['first']); unset($map['first']);
$this->assertSame(array('second' => 2), iterator_to_array($map));
} }
public function testEmptyIteration() public function testEmptyIteration()

View File

@ -17,14 +17,14 @@ use Symfony\Component\HttpFoundation\IpUtils;
class IpUtilsTest extends TestCase class IpUtilsTest extends TestCase
{ {
/** /**
* @dataProvider testIpv4Provider * @dataProvider getIpv4Data
*/ */
public function testIpv4($matches, $remoteAddr, $cidr) public function testIpv4($matches, $remoteAddr, $cidr)
{ {
$this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr)); $this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr));
} }
public function testIpv4Provider() public function getIpv4Data()
{ {
return array( return array(
array(true, '192.168.1.1', '192.168.1.1'), array(true, '192.168.1.1', '192.168.1.1'),
@ -43,7 +43,7 @@ class IpUtilsTest extends TestCase
} }
/** /**
* @dataProvider testIpv6Provider * @dataProvider getIpv6Data
*/ */
public function testIpv6($matches, $remoteAddr, $cidr) public function testIpv6($matches, $remoteAddr, $cidr)
{ {
@ -54,7 +54,7 @@ class IpUtilsTest extends TestCase
$this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr)); $this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr));
} }
public function testIpv6Provider() public function getIpv6Data()
{ {
return array( return array(
array(true, '2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'), array(true, '2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'),

View File

@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Request;
class RequestMatcherTest extends TestCase class RequestMatcherTest extends TestCase
{ {
/** /**
* @dataProvider testMethodFixtures * @dataProvider getMethodData
*/ */
public function testMethod($requestMethod, $matcherMethod, $isMatch) public function testMethod($requestMethod, $matcherMethod, $isMatch)
{ {
@ -32,7 +32,7 @@ class RequestMatcherTest extends TestCase
$this->assertSame($isMatch, $matcher->matches($request)); $this->assertSame($isMatch, $matcher->matches($request));
} }
public function testMethodFixtures() public function getMethodData()
{ {
return array( return array(
array('get', 'get', true), array('get', 'get', true),
@ -64,7 +64,7 @@ class RequestMatcherTest extends TestCase
} }
/** /**
* @dataProvider testHostFixture * @dataProvider getHostData
*/ */
public function testHost($pattern, $isMatch) public function testHost($pattern, $isMatch)
{ {
@ -78,7 +78,7 @@ class RequestMatcherTest extends TestCase
$this->assertSame($isMatch, $matcher->matches($request)); $this->assertSame($isMatch, $matcher->matches($request));
} }
public function testHostFixture() public function getHostData()
{ {
return array( return array(
array('.*\.example\.com', true), array('.*\.example\.com', true),

View File

@ -306,6 +306,10 @@ class RequestTest extends TestCase
$request->setFormat($format, $mimeTypes); $request->setFormat($format, $mimeTypes);
foreach ($mimeTypes as $mime) { foreach ($mimeTypes as $mime) {
$this->assertEquals($format, $request->getFormat($mime)); $this->assertEquals($format, $request->getFormat($mime));
if (null !== $format) {
$this->assertEquals($mimeTypes[0], $request->getMimeType($format));
}
} }
} }
@ -838,7 +842,7 @@ class RequestTest extends TestCase
} }
/** /**
* @dataProvider testGetClientIpsProvider * @dataProvider getClientIpsProvider
*/ */
public function testGetClientIp($expected, $remoteAddr, $httpForwardedFor, $trustedProxies) public function testGetClientIp($expected, $remoteAddr, $httpForwardedFor, $trustedProxies)
{ {
@ -850,7 +854,7 @@ class RequestTest extends TestCase
} }
/** /**
* @dataProvider testGetClientIpsProvider * @dataProvider getClientIpsProvider
*/ */
public function testGetClientIps($expected, $remoteAddr, $httpForwardedFor, $trustedProxies) public function testGetClientIps($expected, $remoteAddr, $httpForwardedFor, $trustedProxies)
{ {
@ -862,7 +866,7 @@ class RequestTest extends TestCase
} }
/** /**
* @dataProvider testGetClientIpsForwardedProvider * @dataProvider getClientIpsForwardedProvider
*/ */
public function testGetClientIpsForwarded($expected, $remoteAddr, $httpForwarded, $trustedProxies) public function testGetClientIpsForwarded($expected, $remoteAddr, $httpForwarded, $trustedProxies)
{ {
@ -873,7 +877,7 @@ class RequestTest extends TestCase
Request::setTrustedProxies(array()); Request::setTrustedProxies(array());
} }
public function testGetClientIpsForwardedProvider() public function getClientIpsForwardedProvider()
{ {
// $expected $remoteAddr $httpForwarded $trustedProxies // $expected $remoteAddr $httpForwarded $trustedProxies
return array( return array(
@ -886,7 +890,7 @@ class RequestTest extends TestCase
); );
} }
public function testGetClientIpsProvider() public function getClientIpsProvider()
{ {
// $expected $remoteAddr $httpForwardedFor $trustedProxies // $expected $remoteAddr $httpForwardedFor $trustedProxies
return array( return array(
@ -943,7 +947,7 @@ class RequestTest extends TestCase
/** /**
* @expectedException \Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException * @expectedException \Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException
* @dataProvider testGetClientIpsWithConflictingHeadersProvider * @dataProvider getClientIpsWithConflictingHeadersProvider
*/ */
public function testGetClientIpsWithConflictingHeaders($httpForwarded, $httpXForwardedFor) public function testGetClientIpsWithConflictingHeaders($httpForwarded, $httpXForwardedFor)
{ {
@ -962,7 +966,7 @@ class RequestTest extends TestCase
$request->getClientIps(); $request->getClientIps();
} }
public function testGetClientIpsWithConflictingHeadersProvider() public function getClientIpsWithConflictingHeadersProvider()
{ {
// $httpForwarded $httpXForwardedFor // $httpForwarded $httpXForwardedFor
return array( return array(
@ -975,9 +979,9 @@ class RequestTest extends TestCase
} }
/** /**
* @dataProvider testGetClientIpsWithAgreeingHeadersProvider * @dataProvider getClientIpsWithAgreeingHeadersProvider
*/ */
public function testGetClientIpsWithAgreeingHeaders($httpForwarded, $httpXForwardedFor) public function testGetClientIpsWithAgreeingHeaders($httpForwarded, $httpXForwardedFor, $expectedIps)
{ {
$request = new Request(); $request = new Request();
@ -991,21 +995,23 @@ class RequestTest extends TestCase
$request->initialize(array(), array(), array(), array(), array(), $server); $request->initialize(array(), array(), array(), array(), array(), $server);
$request->getClientIps(); $clientIps = $request->getClientIps();
Request::setTrustedProxies(array()); Request::setTrustedProxies(array());
$this->assertSame($expectedIps, $clientIps);
} }
public function testGetClientIpsWithAgreeingHeadersProvider() public function getClientIpsWithAgreeingHeadersProvider()
{ {
// $httpForwarded $httpXForwardedFor // $httpForwarded $httpXForwardedFor
return array( return array(
array('for="192.0.2.60"', '192.0.2.60'), array('for="192.0.2.60"', '192.0.2.60', array('192.0.2.60')),
array('for=192.0.2.60, for=87.65.43.21', '192.0.2.60,87.65.43.21'), array('for=192.0.2.60, for=87.65.43.21', '192.0.2.60,87.65.43.21', array('87.65.43.21', '192.0.2.60')),
array('for="[::face]", for=192.0.2.60', '::face,192.0.2.60'), array('for="[::face]", for=192.0.2.60', '::face,192.0.2.60', array('192.0.2.60', '::face')),
array('for="192.0.2.60:80"', '192.0.2.60'), array('for="192.0.2.60:80"', '192.0.2.60', array('192.0.2.60')),
array('for=192.0.2.60;proto=http;by=203.0.113.43', '192.0.2.60'), array('for=192.0.2.60;proto=http;by=203.0.113.43', '192.0.2.60', array('192.0.2.60')),
array('for="[2001:db8:cafe::17]:4711"', '2001:db8:cafe::17'), array('for="[2001:db8:cafe::17]:4711"', '2001:db8:cafe::17', array('2001:db8:cafe::17')),
); );
} }

View File

@ -177,6 +177,8 @@ class SessionTest extends TestCase
{ {
$this->session->start(); $this->session->start();
$this->session->save(); $this->session->save();
$this->assertFalse($this->session->isStarted());
} }
public function testGetId() public function testGetId()

View File

@ -103,6 +103,9 @@ class MetadataBagTest extends TestCase
public function testClear() public function testClear()
{ {
$this->bag->clear(); $this->bag->clear();
// the clear method has no side effects, we just want to ensure it doesn't trigger any exceptions
$this->addToAssertionCount(1);
} }
public function testSkipLastUsedUpdate() public function testSkipLastUsedUpdate()

View File

@ -51,10 +51,12 @@ class StreamedResponseTest extends TestCase
public function testPrepareWithHeadRequest() public function testPrepareWithHeadRequest()
{ {
$response = new StreamedResponse(function () { echo 'foo'; }); $response = new StreamedResponse(function () { echo 'foo'; }, 200, array('Content-Length' => '123'));
$request = Request::create('/', 'HEAD'); $request = Request::create('/', 'HEAD');
$response->prepare($request); $response->prepare($request);
$this->assertSame('123', $response->headers->get('Content-Length'));
} }
public function testPrepareWithCacheHeaders() public function testPrepareWithCacheHeaders()

View File

@ -81,7 +81,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
if (!$propertyName || isset($properties[$propertyName])) { if (!$propertyName || isset($properties[$propertyName])) {
continue; continue;
} }
if (!preg_match('/^[A-Z]{2,}/', $propertyName)) { if (!$reflectionClass->hasProperty($propertyName) && !preg_match('/^[A-Z]{2,}/', $propertyName)) {
$propertyName = lcfirst($propertyName); $propertyName = lcfirst($propertyName);
} }
$properties[$propertyName] = true; $properties[$propertyName] = true;

View File

@ -39,6 +39,7 @@ class ReflectionExtractorTest extends TestCase
'parent', 'parent',
'collection', 'collection',
'B', 'B',
'Guid',
'g', 'g',
'foo', 'foo',
'foo2', 'foo2',
@ -48,6 +49,7 @@ class ReflectionExtractorTest extends TestCase
'files', 'files',
'a', 'a',
'DOB', 'DOB',
'Id',
'c', 'c',
'd', 'd',
'e', 'e',
@ -130,6 +132,10 @@ class ReflectionExtractorTest extends TestCase
$this->assertTrue($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'd', array())); $this->assertTrue($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'd', array()));
$this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'e', array())); $this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'e', array()));
$this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'f', array())); $this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'f', array()));
$this->assertTrue($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'Id', array()));
$this->assertTrue($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'id', array()));
$this->assertTrue($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'Guid', array()));
$this->assertFalse($this->extractor->isReadable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'guid', array()));
} }
public function testIsWritable() public function testIsWritable()
@ -143,6 +149,9 @@ class ReflectionExtractorTest extends TestCase
$this->assertFalse($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'd', array())); $this->assertFalse($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'd', array()));
$this->assertTrue($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'e', array())); $this->assertTrue($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'e', array()));
$this->assertTrue($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'f', array())); $this->assertTrue($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'f', array()));
$this->assertFalse($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'Id', array()));
$this->assertTrue($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'Guid', array()));
$this->assertFalse($this->extractor->isWritable('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', 'guid', array()));
} }
public function testSingularize() public function testSingularize()

View File

@ -51,6 +51,16 @@ class Dummy extends ParentDummy
*/ */
public $B; public $B;
/**
* @var int
*/
protected $Id;
/**
* @var string
*/
public $Guid;
/** /**
* Nullable array. * Nullable array.
* *
@ -99,4 +109,11 @@ class Dummy extends ParentDummy
public function getDOB() public function getDOB()
{ {
} }
/**
* @return int
*/
public function getId()
{
}
} }

View File

@ -39,11 +39,20 @@ class BCryptPasswordEncoderTest extends TestCase
new BCryptPasswordEncoder(32); new BCryptPasswordEncoder(32);
} }
public function testCostInRange() /**
* @dataProvider validRangeData
*/
public function testCostInRange($cost)
{ {
for ($cost = 4; $cost <= 31; ++$cost) { $this->assertInstanceOf('Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder', new BCryptPasswordEncoder($cost));
new BCryptPasswordEncoder($cost); }
}
public function validRangeData()
{
$costs = range(4, 31);
array_walk($costs, function (&$cost) { $cost = array($cost); });
return $costs;
} }
public function testResultLength() public function testResultLength()

View File

@ -100,6 +100,9 @@ class DigestDataTest extends TestCase
$this->assertEquals('"u\\ser"', $digestAuth->getUsername()); $this->assertEquals('"u\\ser"', $digestAuth->getUsername());
} }
/**
* @group time-sensitive
*/
public function testValidateAndDecode() public function testValidateAndDecode()
{ {
$time = microtime(true); $time = microtime(true);
@ -112,11 +115,11 @@ class DigestDataTest extends TestCase
'response="b52938fc9e6d7c01be7702ece9031b42"' 'response="b52938fc9e6d7c01be7702ece9031b42"'
); );
try { $digestAuth->validateAndDecode($key, 'Welcome, robot!');
$digestAuth->validateAndDecode($key, 'Welcome, robot!');
} catch (\Exception $e) { sleep(1);
$this->fail(sprintf('testValidateAndDecode fail with message: %s', $e->getMessage()));
} $this->assertTrue($digestAuth->isNonceExpired());
} }
public function testCalculateServerDigest() public function testCalculateServerDigest()