Merge branch '2.7' into 2.8

* 2.7:
  property constraints can be added in child classes
  added test for staticClassLoader in LazyLoadingMetadatafactory
  spelling fixes
  make sure that null can be the invalid value
  bumped Symfony version to 2.7.25
  updated VERSION for 2.7.24
  update CONTRIBUTORS for 2.7.24
  updated CHANGELOG for 2.7.24
  [FrameworkBundle] Simplify createPackageDefinition
  fix directory resource considers same timestamp not fresh
  return false early from directory resource
This commit is contained in:
Nicolas Grekas 2017-02-14 17:24:56 +01:00
commit 03194300ed
17 changed files with 248 additions and 72 deletions

View File

@ -7,6 +7,22 @@ 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.24 (2017-02-06)
* bug #21063 [Form] Fixed DateType format option for single text widget (HeahDude)
* bug #21430 Casting TableCell value to string. (jaydiablo)
* bug #21359 [FrameworkBundle] fixed custom domain for translations in php templates (robinlehrmann)
* bug #21485 [Process] Non ASCII characters disappearing during the escapeshellarg (GuillaumeVerdon)
* bug #21462 [BrowserKit] ignore invalid cookies expires date format (xabbuh)
* bug #21438 [Console] Fix TableCell issues with decoration (ogizanagi)
* bug #21431 [DoctrineBridge] always check for all fields to be mapped (xabbuh)
* bug #21360 [PropertyAccess] Handle interfaces in the invalid argument exception (fancyweb)
* bug #21401 [Debug] Workaround "null" $context (nicolas-grekas)
* bug #21333 [HttpKernel] Fix ArgumentValueResolver for arguments default null (chalasr)
* bug #20871 [HttpKernel] Give higher priority to adding request formats (akeeman)
* bug #21285 [TwigBundle] do not lose already set method calls (xabbuh)
* bug #21279 #20411 fix Yaml parsing for very long quoted strings (RichardBradley)
* 2.7.23 (2017-01-12) * 2.7.23 (2017-01-12)
* bug #21218 [Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only (magnetik) * bug #21218 [Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only (magnetik)

View File

@ -15,8 +15,8 @@ Symfony is the result of the work of many people who made the code better
- Johannes S (johannes) - Johannes S (johannes)
- Kris Wallsmith (kriswallsmith) - Kris Wallsmith (kriswallsmith)
- Jakub Zalas (jakubzalas) - Jakub Zalas (jakubzalas)
- Ryan Weaver (weaverryan)
- Kévin Dunglas (dunglas) - Kévin Dunglas (dunglas)
- Ryan Weaver (weaverryan)
- Javier Eguiluz (javier.eguiluz) - Javier Eguiluz (javier.eguiluz)
- Hugo Hamon (hhamon) - Hugo Hamon (hhamon)
- Abdellatif Ait boudad (aitboudad) - Abdellatif Ait boudad (aitboudad)
@ -26,16 +26,16 @@ Symfony is the result of the work of many people who made the code better
- Joseph Bielawski (stloyd) - Joseph Bielawski (stloyd)
- Karma Dordrak (drak) - Karma Dordrak (drak)
- Lukas Kahwe Smith (lsmith) - Lukas Kahwe Smith (lsmith)
- Martin Hasoň (hason)
- Grégoire Pineau (lyrixx) - Grégoire Pineau (lyrixx)
- Martin Hasoň (hason)
- Jeremy Mikola (jmikola) - 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)
- Eriksen Costa (eriksencosta)
- Maxime Steinhausser (ogizanagi) - Maxime Steinhausser (ogizanagi)
- Jules Pietri (heah) - Eriksen Costa (eriksencosta)
- Robin Chalas (chalas_r) - Robin Chalas (chalas_r)
- Jules Pietri (heah)
- Sarah Khalil (saro0h) - Sarah Khalil (saro0h)
- Jonathan Wage (jwage) - Jonathan Wage (jwage)
- Diego Saint Esteben (dosten) - Diego Saint Esteben (dosten)
@ -46,14 +46,14 @@ Symfony is the result of the work of many people who made the code better
- stealth35 (stealth35) - stealth35 (stealth35)
- Alexander Mols (asm89) - Alexander Mols (asm89)
- Bulat Shakirzyanov (avalanche123) - Bulat Shakirzyanov (avalanche123)
- Ener-Getick (energetick)
- Saša Stamenković (umpirsky) - Saša Stamenković (umpirsky)
- Henrik Bjørnskov (henrikbjorn) - Henrik Bjørnskov (henrikbjorn)
- Miha Vrhovnik - Miha Vrhovnik
- Ener-Getick (energetick)
- Diego Saint Esteben (dii3g0) - Diego Saint Esteben (dii3g0)
- Roland Franssen (ro0)
- Konstantin Kudryashov (everzet) - Konstantin Kudryashov (everzet)
- Iltar van der Berg (kjarli) - Iltar van der Berg (kjarli)
- Roland Franssen (ro0)
- Bilal Amarni (bamarni) - Bilal Amarni (bamarni)
- Florin Patan (florinpatan) - Florin Patan (florinpatan)
- Peter Rehm (rpet) - Peter Rehm (rpet)
@ -102,18 +102,19 @@ Symfony is the result of the work of many people who made the code better
- 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)
- excelwebzone - excelwebzone
- Jacob Dreesen (jdreesen) - Jacob Dreesen (jdreesen)
- Jérémy DERUSSÉ (jderusse)
- Vladimir Reznichenko (kalessil) - Vladimir Reznichenko (kalessil)
- 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)
- David Buchmann (dbu)
- Tugdual Saunier (tucksaun) - Tugdual Saunier (tucksaun)
- Théo FIDRY (theofidry) - Théo FIDRY (theofidry)
- Robert Schönthal (digitalkaoz) - Robert Schönthal (digitalkaoz)
@ -121,20 +122,20 @@ Symfony is the result of the work of many people who made the code better
- Stefano Sala (stefano.sala) - Stefano Sala (stefano.sala)
- Evgeniy (ewgraf) - Evgeniy (ewgraf)
- Juti Noppornpitak (shiroyuki) - Juti Noppornpitak (shiroyuki)
- Tobias Nyholm (tobias)
- Tigran Azatyan (tigranazatyan) - Tigran Azatyan (tigranazatyan)
- Sebastian Hörl (blogsh) - Sebastian Hörl (blogsh)
- 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)
- Andréia Bohner (andreia) - Andréia Bohner (andreia)
- Yonel Ceruto González (yonelceruto)
- Rafael Dohms (rdohms) - Rafael Dohms (rdohms)
- Arnaud Kleinpeter (nanocom) - Arnaud Kleinpeter (nanocom)
- jwdeitch - jwdeitch
- Mikael Pajunen
- Joel Wurtz (brouznouf) - Joel Wurtz (brouznouf)
- Philipp Wahala (hifi) - Philipp Wahala (hifi)
- Vyacheslav Pavlov - Vyacheslav Pavlov
@ -144,7 +145,6 @@ Symfony is the result of the work of many people who made the code better
- Vincent AUBERT (vincent) - Vincent AUBERT (vincent)
- Rouven Weßling (realityking) - Rouven Weßling (realityking)
- Teoh Han Hui (teohhanhui) - Teoh Han Hui (teohhanhui)
- Mikael Pajunen
- Clemens Tolboom - Clemens Tolboom
- Helmer Aaviksoo - Helmer Aaviksoo
- Hiromi Hishida (77web) - Hiromi Hishida (77web)
@ -186,6 +186,7 @@ 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)
@ -194,6 +195,7 @@ Symfony is the result of the work of many people who made the code better
- Sven Paulus (subsven) - Sven Paulus (subsven)
- Rui Marinho (ruimarinho) - Rui Marinho (ruimarinho)
- Daniel Espendiller - Daniel Espendiller
- SpacePossum
- Dawid Nowak - Dawid Nowak
- Eugene Wissner - Eugene Wissner
- Julien Brochet (mewt) - Julien Brochet (mewt)
@ -223,13 +225,12 @@ Symfony is the result of the work of many people who made the code better
- Arjen Brouwer (arjenjb) - Arjen Brouwer (arjenjb)
- Katsuhiro OGAWA - Katsuhiro OGAWA
- Patrick McDougle (patrick-mcdougle) - Patrick McDougle (patrick-mcdougle)
- James Halsall (jaitsu)
- Alif Rachmawadi - Alif Rachmawadi
- Kristen Gilden (kgilden) - Kristen Gilden (kgilden)
- SpacePossum
- Pierre-Yves LEBECQ (pylebecq) - Pierre-Yves LEBECQ (pylebecq)
- Alex Pott - Alex Pott
- Jakub Kucharovic (jkucharovic) - Jakub Kucharovic (jkucharovic)
- Uwe Jäger (uwej711)
- Eugene Leonovich (rybakit) - Eugene Leonovich (rybakit)
- Filippo Tessarotto - Filippo Tessarotto
- Joseph Rouff (rouffj) - Joseph Rouff (rouffj)
@ -245,6 +246,7 @@ Symfony is the result of the work of many people who made the code better
- Jhonny Lidfors (jhonne) - Jhonny Lidfors (jhonne)
- Diego Agulló (aeoris) - Diego Agulló (aeoris)
- jdhoek - jdhoek
- Pavel Batanov (scaytrase)
- Nikita Konstantinov - Nikita Konstantinov
- Wodor Wodorski - Wodor Wodorski
- Thomas Lallement (raziel057) - Thomas Lallement (raziel057)
@ -255,6 +257,7 @@ Symfony is the result of the work of many people who made the code better
- Robert Kiss (kepten) - Robert Kiss (kepten)
- Ruben Gonzalez (rubenrua) - Ruben Gonzalez (rubenrua)
- 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
@ -277,7 +280,7 @@ Symfony is the result of the work of many people who made the code better
- Andrey Esaulov (andremaha) - Andrey Esaulov (andremaha)
- Grégoire Passault (gregwar) - Grégoire Passault (gregwar)
- Ismael Ambrosi (iambrosi) - Ismael Ambrosi (iambrosi)
- Uwe Jäger (uwej711) - Baptiste Lafontaine
- Aurelijus Valeiša (aurelijus) - Aurelijus Valeiša (aurelijus)
- Victor Bocharsky (bocharsky_bw) - Victor Bocharsky (bocharsky_bw)
- Jan Decavele (jandc) - Jan Decavele (jandc)
@ -286,7 +289,6 @@ Symfony is the result of the work of many people who made the code better
- Tiago Ribeiro (fixe) - Tiago Ribeiro (fixe)
- Hidde Boomsma (hboomsma) - Hidde Boomsma (hboomsma)
- John Bafford (jbafford) - John Bafford (jbafford)
- Pavel Batanov (scaytrase)
- Bob den Otter (bopp) - Bob den Otter (bopp)
- Adrian Rudnik (kreischweide) - Adrian Rudnik (kreischweide)
- Francesc Rosàs (frosas) - Francesc Rosàs (frosas)
@ -307,11 +309,11 @@ Symfony is the result of the work of many people who made the code better
- Matthew Lewinski (lewinski) - Matthew Lewinski (lewinski)
- Magnus Nordlander (magnusnordlander) - Magnus Nordlander (magnusnordlander)
- alquerci - alquerci
- Adam Prager (padam87)
- Francesco Levorato - Francesco Levorato
- 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)
@ -347,7 +349,7 @@ Symfony is the result of the work of many people who made the code better
- Tobias Naumann (tna) - Tobias Naumann (tna)
- Daniel Beyer - Daniel Beyer
- Shein Alexey - Shein Alexey
- Baptiste Lafontaine - Romain Gautier (mykiwi)
- Joe Lencioni - Joe Lencioni
- Daniel Tschinder - Daniel Tschinder
- Kai - Kai
@ -386,6 +388,8 @@ Symfony is the result of the work of many people who made the code better
- Mihai Stancu - Mihai Stancu
- Olivier Dolbeau (odolbeau) - Olivier Dolbeau (odolbeau)
- Jan Rosier (rosier) - Jan Rosier (rosier)
- Thomas Royer (cydonia7)
- Josip Kruslin
- vagrant - vagrant
- EdgarPE - EdgarPE
- Florian Pfitzer (marmelatze) - Florian Pfitzer (marmelatze)
@ -397,9 +401,9 @@ Symfony is the result of the work of many people who made the code better
- Ariel Ferrandini (aferrandini) - Ariel Ferrandini (aferrandini)
- Dirk Pahl (dirkaholic) - Dirk Pahl (dirkaholic)
- cedric lombardot (cedriclombardot) - cedric lombardot (cedriclombardot)
- David Maicher (dmaicher)
- Jonas Flodén (flojon) - Jonas Flodén (flojon)
- Christian Schmidt - Christian Schmidt
- Amrouche Hamza
- Marcin Sikoń (marphi) - Marcin Sikoń (marphi)
- Dominik Zogg (dominik.zogg) - Dominik Zogg (dominik.zogg)
- Marek Pietrzak - Marek Pietrzak
@ -417,6 +421,7 @@ Symfony is the result of the work of many people who made the code better
- Fabrice Bernhard (fabriceb) - Fabrice Bernhard (fabriceb)
- Jérôme Macias (jeromemacias) - Jérôme Macias (jeromemacias)
- Andrey Astakhov (aast) - Andrey Astakhov (aast)
- Thomas Calvet
- Fabian Lange (codingfabian) - Fabian Lange (codingfabian)
- Frank Neff (fneff) - Frank Neff (fneff)
- Roman Lapin (memphys) - Roman Lapin (memphys)
@ -437,6 +442,7 @@ Symfony is the result of the work of many people who made the code better
- Roy Van Ginneken (rvanginneken) - Roy Van Ginneken (rvanginneken)
- ondrowan - ondrowan
- Barry vd. Heuvel (barryvdh) - Barry vd. Heuvel (barryvdh)
- Wouter J
- Evan S Kaufman (evanskaufman) - Evan S Kaufman (evanskaufman)
- mcben - mcben
- Jérôme Vieilledent (lolautruche) - Jérôme Vieilledent (lolautruche)
@ -451,7 +457,9 @@ 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
- Arjen van der Meijden
- Michele Locati - Michele Locati
- Dariusz Ruminski
- Erik Trapman (eriktrapman) - Erik Trapman (eriktrapman)
- De Cock Xavier (xdecock) - De Cock Xavier (xdecock)
- Almog Baku (almogbaku) - Almog Baku (almogbaku)
@ -494,6 +502,7 @@ Symfony is the result of the work of many people who made the code better
- Benjamin Laugueux (yzalis) - Benjamin Laugueux (yzalis)
- Zach Badgett (zachbadgett) - Zach Badgett (zachbadgett)
- Aurélien Fredouelle - Aurélien Fredouelle
- Jérôme Parmentier (lctrs)
- Pavel Campr (pcampr) - Pavel Campr (pcampr)
- Johnny Robeson (johnny) - Johnny Robeson (johnny)
- Disquedur - Disquedur
@ -518,11 +527,11 @@ Symfony is the result of the work of many people who made the code better
- Sinan Eldem - Sinan Eldem
- Alexandre Dupuy (satchette) - Alexandre Dupuy (satchette)
- Rob Frawley 2nd - Rob Frawley 2nd
- Andre Rømcke (andrerom)
- Nahuel Cuesta (ncuesta) - Nahuel Cuesta (ncuesta)
- Chris Boden (cboden) - Chris Boden (cboden)
- Asmir Mustafic (goetas) - Asmir Mustafic (goetas)
- Stefan Gehrig (sgehrig) - Stefan Gehrig (sgehrig)
- Josip Kruslin
- Hany el-Kerdany - Hany el-Kerdany
- Wang Jingyu - Wang Jingyu
- Åsmund Garfors - Åsmund Garfors
@ -551,11 +560,13 @@ Symfony is the result of the work of many people who made the code better
- maxime.steinhausser - maxime.steinhausser
- Stefan Warman - Stefan Warman
- Tristan Maindron (tmaindron) - Tristan Maindron (tmaindron)
- Wesley Lancel
- Ke WANG (yktd26) - Ke WANG (yktd26)
- Strate - Strate
- Miquel Rodríguez Telep (mrtorrent) - Miquel Rodríguez Telep (mrtorrent)
- Sergey Kolodyazhnyy (skolodyazhnyy) - Sergey Kolodyazhnyy (skolodyazhnyy)
- umpirski - umpirski
- Quentin de Longraye (quentinus95)
- Chris Heng (gigablah) - Chris Heng (gigablah)
- Ulumuddin Yunus (joenoez) - Ulumuddin Yunus (joenoez)
- Luc Vieillescazes (iamluc) - Luc Vieillescazes (iamluc)
@ -580,6 +591,7 @@ Symfony is the result of the work of many people who made the code better
- Disparity - Disparity
- origaminal - origaminal
- Matteo Beccati (matteobeccati) - Matteo Beccati (matteobeccati)
- Kevin (oxfouzer)
- Paweł Wacławczyk (pwc) - Paweł Wacławczyk (pwc)
- Oleg Zinchenko (cystbear) - Oleg Zinchenko (cystbear)
- Johannes Klauss (cloppy) - Johannes Klauss (cloppy)
@ -592,7 +604,6 @@ Symfony is the result of the work of many people who made the code better
- develop - develop
- ReenExe - ReenExe
- Mark Sonnabaum - Mark Sonnabaum
- Thomas Royer (cydonia7)
- Richard Quadling - Richard Quadling
- jochenvdv - jochenvdv
- Arturas Smorgun (asarturas) - Arturas Smorgun (asarturas)
@ -608,7 +619,6 @@ Symfony is the result of the work of many people who made the code better
- Martin Hujer (martinhujer) - Martin Hujer (martinhujer)
- Pascal Helfenstein - Pascal Helfenstein
- Baldur Rensch (brensch) - Baldur Rensch (brensch)
- Thomas Calvet
- Vladyslav Petrovych - Vladyslav Petrovych
- Alex Xandra Albert Sim - Alex Xandra Albert Sim
- Carson Full - Carson Full
@ -636,9 +646,7 @@ Symfony is the result of the work of many people who made the code better
- Marc Morera (mmoreram) - Marc Morera (mmoreram)
- Andrew Hilobok (hilobok) - Andrew Hilobok (hilobok)
- Christian Soronellas (theunic) - Christian Soronellas (theunic)
- Romain Gautier (mykiwi)
- Yosmany Garcia (yosmanyga) - Yosmany Garcia (yosmanyga)
- Wouter J
- Wouter de Wild - Wouter de Wild
- Miroslav Sustek - Miroslav Sustek
- Degory Valentine - Degory Valentine
@ -673,7 +681,6 @@ Symfony is the result of the work of many people who made the code better
- Pierre Vanliefland (pvanliefland) - Pierre Vanliefland (pvanliefland)
- Sofiane HADDAG (sofhad) - Sofiane HADDAG (sofhad)
- frost-nzcr4 - frost-nzcr4
- Arjen van der Meijden
- Abhoryo - Abhoryo
- Fabian Vogler (fabian) - Fabian Vogler (fabian)
- Korvin Szanto - Korvin Szanto
@ -718,7 +725,6 @@ Symfony is the result of the work of many people who made the code better
- Simone Di Maulo (toretto460) - Simone Di Maulo (toretto460)
- Christian Morgan - Christian Morgan
- Alexander Miehe (engerim) - Alexander Miehe (engerim)
- Jérôme Parmentier (lctrs)
- Morgan Auchede (mauchede) - Morgan Auchede (mauchede)
- Don Pinkster - Don Pinkster
- Maksim Muruev - Maksim Muruev
@ -779,8 +785,8 @@ Symfony is the result of the work of many people who made the code better
- Pieter - Pieter
- Michael Tibben - Michael Tibben
- Sander Marechal - Sander Marechal
- Andre Rømcke (andrerom)
- Radosław Benkel - Radosław Benkel
- jean pasqualini (darkilliant)
- ttomor - ttomor
- Mei Gwilym (meigwilym) - Mei Gwilym (meigwilym)
- Michael H. Arieli (excelwebzone) - Michael H. Arieli (excelwebzone)
@ -790,12 +796,12 @@ Symfony is the result of the work of many people who made the code better
- Sander Coolen (scoolen) - Sander Coolen (scoolen)
- Nicolas Le Goff (nlegoff) - Nicolas Le Goff (nlegoff)
- Ben Oman - Ben Oman
- Andreas Kleemann
- Manuele Menozzi - Manuele Menozzi
- Anton Babenko (antonbabenko) - Anton Babenko (antonbabenko)
- Irmantas Šiupšinskas (irmantas) - Irmantas Šiupšinskas (irmantas)
- Danilo Silva - Danilo Silva
- Zachary Tong (polyfractal) - Zachary Tong (polyfractal)
- Amrouche Hamza
- Hryhorii Hrebiniuk - Hryhorii Hrebiniuk
- Dennis Fridrich (dfridrich) - Dennis Fridrich (dfridrich)
- mcfedr (mcfedr) - mcfedr (mcfedr)
@ -809,6 +815,7 @@ Symfony is the result of the work of many people who made the code better
- boite - boite
- MGDSoft - MGDSoft
- Vadim Tyukov (vatson) - Vadim Tyukov (vatson)
- David Wolter (davewww)
- Sortex - Sortex
- chispita - chispita
- Wojciech Sznapka - Wojciech Sznapka
@ -817,6 +824,7 @@ Symfony is the result of the work of many people who made the code better
- Máximo Cuadros (mcuadros) - Máximo Cuadros (mcuadros)
- tamirvs - tamirvs
- julien.galenski - julien.galenski
- Bob van de Vijver
- Christian Neff - Christian Neff
- Per Sandström (per) - Per Sandström (per)
- Goran Juric - Goran Juric
@ -946,6 +954,7 @@ Symfony is the result of the work of many people who made the code better
- Xavier Coureau - Xavier Coureau
- ConneXNL - ConneXNL
- Aharon Perkel - Aharon Perkel
- matze
- Abdul.Mohsen B. A. A - Abdul.Mohsen B. A. A
- Benoît Burnichon - Benoît Burnichon
- pthompson - pthompson
@ -1024,7 +1033,6 @@ Symfony is the result of the work of many people who made the code better
- Ahmed TAILOULOUTE (ahmedtai) - Ahmed TAILOULOUTE (ahmedtai)
- Maxime Veber (nek-) - Maxime Veber (nek-)
- Sullivan SENECHAL - Sullivan SENECHAL
- Dariusz Ruminski
- Tadcka - Tadcka
- Beth Binkovitz - Beth Binkovitz
- Romain Geissler - Romain Geissler
@ -1046,6 +1054,7 @@ Symfony is the result of the work of many people who made the code better
- Rafał Muszyński (rafmus90) - Rafał Muszyński (rafmus90)
- Timothy Anido (xanido) - Timothy Anido (xanido)
- Rick Prent - Rick Prent
- skalpa
- Martin Eckhardt - Martin Eckhardt
- Pieter Jordaan - Pieter Jordaan
- Damien Tournoud - Damien Tournoud
@ -1094,7 +1103,6 @@ Symfony is the result of the work of many people who made the code better
- Mephistofeles - Mephistofeles
- Hoffmann András - Hoffmann András
- Olivier - Olivier
- Wesley Lancel
- pscheit - pscheit
- Zdeněk Drahoš - Zdeněk Drahoš
- Dan Harper - Dan Harper
@ -1123,12 +1131,14 @@ 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) - Dany Maillard (maidmaid)
- Povilas S. (povilas) - Povilas S. (povilas)
- pborreli - pborreli
- Eric Caron - Eric Caron
- Richard Bradley
- 2manypeople - 2manypeople
- Wing - Wing
- Thomas Bibb - Thomas Bibb
@ -1187,6 +1197,7 @@ Symfony is the result of the work of many people who made the code better
- Andy Stanberry - Andy Stanberry
- Luiz “Felds” Liscia - Luiz “Felds” Liscia
- Thomas Rothe - Thomas Rothe
- nietonfir
- alefranz - alefranz
- avi123 - avi123
- alsar - alsar
@ -1247,6 +1258,7 @@ Symfony is the result of the work of many people who made the code better
- Andrey Chernykh - Andrey Chernykh
- Edvinas Klovas - Edvinas Klovas
- Drew Butler - Drew Butler
- Peter Breuls
- Tischoi - Tischoi
- J Bruni - J Bruni
- Alexey Prilipko - Alexey Prilipko
@ -1312,6 +1324,7 @@ Symfony is the result of the work of many people who made the code better
- Alan Chen - Alan Chen
- Maerlyn - Maerlyn
- Even André Fiskvik - Even André Fiskvik
- Arjan Keeman
- Erik van Wingerden - Erik van Wingerden
- Dane Powell - Dane Powell
- Gerrit Drost - Gerrit Drost
@ -1359,6 +1372,7 @@ Symfony is the result of the work of many people who made the code better
- Marcin Szepczynski (szepczynski) - Marcin Szepczynski (szepczynski)
- Cyrille Jouineau (tuxosaurus) - Cyrille Jouineau (tuxosaurus)
- Yorkie Chadwick (yorkie76) - Yorkie Chadwick (yorkie76)
- GuillaumeVerdon
- Yanick Witschi - Yanick Witschi
- Ondrej Mirtes - Ondrej Mirtes
- akimsko - akimsko
@ -1594,6 +1608,7 @@ Symfony is the result of the work of many people who made the code better
- simpson - simpson
- drublic - drublic
- Andreas Streichardt - Andreas Streichardt
- Pascal Hofmann
- smokeybear87 - smokeybear87
- Gustavo Adrian - Gustavo Adrian
- Kevin Weber - Kevin Weber
@ -1616,7 +1631,6 @@ Symfony is the result of the work of many people who made the code better
- Muharrem Demirci (mdemirci) - Muharrem Demirci (mdemirci)
- Evgeny Z (meze) - Evgeny Z (meze)
- Nicolas de Marqué (nicola) - Nicolas de Marqué (nicola)
- Kevin (oxfouzer)
- Pierre Geyer (ptheg) - Pierre Geyer (ptheg)
- Sam Fleming (sam_fleming) - Sam Fleming (sam_fleming)
- Thomas BERTRAND (sevrahk) - Thomas BERTRAND (sevrahk)

View File

@ -0,0 +1,36 @@
<?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\Bridge\Doctrine\Tests\Fixtures;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
/** @Entity */
class DoubleNullableNameEntity
{
/** @Id @Column(type="integer") */
protected $id;
/** @Column(type="string", nullable=true) */
public $name;
/** @Column(type="string", nullable=true) */
public $name2;
public function __construct($id, $name, $name2)
{
$this->id = $id;
$this->name = $name;
$this->name2 = $name2;
}
}

View File

@ -18,6 +18,7 @@ use Doctrine\Common\Persistence\ObjectRepository;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNameEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNameEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNullableNameEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator;
@ -132,6 +133,7 @@ class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
$schemaTool->createSchema(array( $schemaTool->createSchema(array(
$em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity'), $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity'),
$em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNameEntity'), $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNameEntity'),
$em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNullableNameEntity'),
$em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity'), $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIntIdEntity'),
$em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity'), $em->getClassMetadata('Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity'),
)); ));
@ -215,7 +217,7 @@ class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
$this->assertNoViolation(); $this->assertNoViolation();
} }
public function testValidateUniquenessWithIgnoreNull() public function testValidateUniquenessWithIgnoreNullDisabled()
{ {
$constraint = new UniqueEntity(array( $constraint = new UniqueEntity(array(
'message' => 'myMessage', 'message' => 'myMessage',
@ -264,6 +266,34 @@ class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
$this->validator->validate($entity1, $constraint); $this->validator->validate($entity1, $constraint);
} }
public function testNoValidationIfFirstFieldIsNullAndNullValuesAreIgnored()
{
$constraint = new UniqueEntity(array(
'message' => 'myMessage',
'fields' => array('name', 'name2'),
'em' => self::EM_NAME,
'ignoreNull' => true,
));
$entity1 = new DoubleNullableNameEntity(1, null, 'Foo');
$entity2 = new DoubleNullableNameEntity(2, null, 'Foo');
$this->validator->validate($entity1, $constraint);
$this->assertNoViolation();
$this->em->persist($entity1);
$this->em->flush();
$this->validator->validate($entity1, $constraint);
$this->assertNoViolation();
$this->validator->validate($entity2, $constraint);
$this->assertNoViolation();
}
public function testValidateUniquenessWithValidCustomErrorPath() public function testValidateUniquenessWithValidCustomErrorPath()
{ {
$constraint = new UniqueEntity(array( $constraint = new UniqueEntity(array(

View File

@ -80,6 +80,8 @@ class UniqueEntityValidator extends ConstraintValidator
/* @var $class \Doctrine\Common\Persistence\Mapping\ClassMetadata */ /* @var $class \Doctrine\Common\Persistence\Mapping\ClassMetadata */
$criteria = array(); $criteria = array();
$hasNullValue = false;
foreach ($fields as $fieldName) { foreach ($fields as $fieldName) {
if (!$class->hasField($fieldName) && !$class->hasAssociation($fieldName)) { if (!$class->hasField($fieldName) && !$class->hasAssociation($fieldName)) {
throw new ConstraintDefinitionException(sprintf('The field "%s" is not mapped by Doctrine, so it cannot be validated for uniqueness.', $fieldName)); throw new ConstraintDefinitionException(sprintf('The field "%s" is not mapped by Doctrine, so it cannot be validated for uniqueness.', $fieldName));
@ -87,6 +89,10 @@ class UniqueEntityValidator extends ConstraintValidator
$fieldValue = $class->reflFields[$fieldName]->getValue($entity); $fieldValue = $class->reflFields[$fieldName]->getValue($entity);
if (null === $fieldValue) {
$hasNullValue = true;
}
if ($constraint->ignoreNull && null === $fieldValue) { if ($constraint->ignoreNull && null === $fieldValue) {
continue; continue;
} }
@ -102,6 +108,11 @@ class UniqueEntityValidator extends ConstraintValidator
} }
} }
// validation doesn't fail if one of the fields is null and if null values should be ignored
if ($hasNullValue && $constraint->ignoreNull) {
return;
}
// skip validation if there are no criteria (this can happen when the // skip validation if there are no criteria (this can happen when the
// "ignoreNull" option is enabled and fields to be checked are null // "ignoreNull" option is enabled and fields to be checked are null
if (empty($criteria)) { if (empty($criteria)) {

View File

@ -623,23 +623,14 @@ class FrameworkExtension extends Extension
throw new \LogicException('An asset package cannot have base URLs and base paths.'); throw new \LogicException('An asset package cannot have base URLs and base paths.');
} }
if (!$baseUrls) { $package = new DefinitionDecorator($baseUrls ? 'assets.url_package' : 'assets.path_package');
$package = new DefinitionDecorator('assets.path_package'); $package
return $package
->setPublic(false) ->setPublic(false)
->replaceArgument(0, $basePath) ->replaceArgument(0, $baseUrls ?: $basePath)
->replaceArgument(1, $version) ->replaceArgument(1, $version)
; ;
}
$package = new DefinitionDecorator('assets.url_package'); return $package;
return $package
->setPublic(false)
->replaceArgument(0, $baseUrls)
->replaceArgument(1, $version)
;
} }
private function createVersion(ContainerBuilder $container, $version, $format, $name) private function createVersion(ContainerBuilder $container, $version, $format, $name)

View File

@ -68,7 +68,10 @@ class DirectoryResource implements SelfCheckingResourceInterface, \Serializable
return false; return false;
} }
$newestMTime = filemtime($this->resource); if ($timestamp < filemtime($this->resource)) {
return false;
}
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveIteratorIterator::SELF_FIRST) as $file) { foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveIteratorIterator::SELF_FIRST) as $file) {
// if regex filtering is enabled only check matching files // if regex filtering is enabled only check matching files
if ($this->pattern && $file->isFile() && !preg_match($this->pattern, $file->getBasename())) { if ($this->pattern && $file->isFile() && !preg_match($this->pattern, $file->getBasename())) {
@ -81,10 +84,13 @@ class DirectoryResource implements SelfCheckingResourceInterface, \Serializable
continue; continue;
} }
$newestMTime = max($file->getMTime(), $newestMTime); // early return if a file's mtime exceeds the passed timestamp
if ($timestamp < $file->getMTime()) {
return false;
}
} }
return $newestMTime < $timestamp; return true;
} }
public function serialize() public function serialize()

View File

@ -96,8 +96,10 @@ class DirectoryResourceTest extends \PHPUnit_Framework_TestCase
public function testIsFreshDeleteFile() public function testIsFreshDeleteFile()
{ {
$resource = new DirectoryResource($this->directory); $resource = new DirectoryResource($this->directory);
$time = time();
sleep(1);
unlink($this->directory.'/tmp.xml'); unlink($this->directory.'/tmp.xml');
$this->assertFalse($resource->isFresh(time()), '->isFresh() returns false if an existing file is removed'); $this->assertFalse($resource->isFresh($time), '->isFresh() returns false if an existing file is removed');
} }
public function testIsFreshDeleteDirectory() public function testIsFreshDeleteDirectory()

View File

@ -4,7 +4,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
//Ensure has proper line ending before outputing a text block like with SymfonyStyle::listing() or SymfonyStyle::text() //Ensure has proper line ending before outputting a text block like with SymfonyStyle::listing() or SymfonyStyle::text()
return function (InputInterface $input, OutputInterface $output) { return function (InputInterface $input, OutputInterface $output) {
$output = new SymfonyStyleWithForcedLineLength($input, $output); $output = new SymfonyStyleWithForcedLineLength($input, $output);

View File

@ -51,7 +51,7 @@ class ReplaceAliasByActualDefinitionPass implements CompilerPassInterface
if (isset($replacements[$targetId])) { if (isset($replacements[$targetId])) {
$container->setAlias($definitionId, $replacements[$targetId]); $container->setAlias($definitionId, $replacements[$targetId]);
} }
// No neeed to process the same target twice // No need to process the same target twice
if (isset($seenAliasTargets[$targetId])) { if (isset($seenAliasTargets[$targetId])) {
continue; continue;
} }

View File

@ -137,7 +137,7 @@ class MoFileLoader extends FileLoader
} }
/** /**
* Reads an unsigned long from stream respecting endianess. * Reads an unsigned long from stream respecting endianness.
* *
* @param resource $stream * @param resource $stream
* @param bool $isBigEndian * @param bool $isBigEndian

View File

@ -346,10 +346,6 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface
} }
foreach ($source->getConstrainedProperties() as $property) { foreach ($source->getConstrainedProperties() as $property) {
if ($this->hasPropertyMetadata($property)) {
continue;
}
foreach ($source->getPropertyMetadata($property) as $member) { foreach ($source->getPropertyMetadata($property) as $member) {
$member = clone $member; $member = clone $member;

View File

@ -0,0 +1,23 @@
<?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\Validator\Tests\Fixtures;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Constraints\Length;
class EntityStaticCar extends EntityStaticVehicle
{
public static function loadValidatorMetadata(ClassMetadata $metadata)
{
$metadata->addPropertyConstraint('wheels', new Length(array('max' => 99)));
}
}

View File

@ -0,0 +1,23 @@
<?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\Validator\Tests\Fixtures;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Constraints\Length;
class EntityStaticCarTurbo extends EntityStaticCar
{
public static function loadValidatorMetadata(ClassMetadata $metadata)
{
$metadata->addPropertyConstraint('wheels', new Length(array('max' => 99)));
}
}

View File

@ -0,0 +1,25 @@
<?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\Validator\Tests\Fixtures;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Constraints\Length;
class EntityStaticVehicle
{
public $wheels;
public static function loadValidatorMetadata(ClassMetadata $metadata)
{
$metadata->addPropertyConstraint('wheels', new Length(array('max' => 99)));
}
}

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\Validator\Tests\Mapping; namespace Symfony\Component\Validator\Tests\Mapping;
use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\GreaterThan;
use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\Constraints\Valid;
use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; use Symfony\Component\Validator\Tests\Fixtures\ConstraintA;
@ -304,21 +303,6 @@ class ClassMetadataTest extends \PHPUnit_Framework_TestCase
{ {
$this->assertCount(0, $this->metadata->getPropertyMetadata('foo'), '->getPropertyMetadata() returns an empty collection if no metadata is configured for the given property'); $this->assertCount(0, $this->metadata->getPropertyMetadata('foo'), '->getPropertyMetadata() returns an empty collection if no metadata is configured for the given property');
} }
public function testMergeDoesOverrideConstraintsFromParentClassIfPropertyIsOverriddenInChildClass()
{
$parentMetadata = new ClassMetadata('\Symfony\Component\Validator\Tests\Mapping\ParentClass');
$parentMetadata->addPropertyConstraint('example', new GreaterThan(0));
$childMetadata = new ClassMetadata('\Symfony\Component\Validator\Tests\Mapping\ChildClass');
$childMetadata->addPropertyConstraint('example', new GreaterThan(1));
$childMetadata->mergeConstraints($parentMetadata);
$expectedMetadata = new ClassMetadata('\Symfony\Component\Validator\Tests\Mapping\ChildClass');
$expectedMetadata->addPropertyConstraint('example', new GreaterThan(1));
$this->assertEquals($expectedMetadata, $childMetadata);
}
} }
class ParentClass class ParentClass

View File

@ -168,6 +168,25 @@ class LazyLoadingMetadataFactoryTest extends \PHPUnit_Framework_TestCase
$metadata = $factory->getMetadataFor(self::CLASS_NAME); $metadata = $factory->getMetadataFor(self::CLASS_NAME);
} }
public function testGroupsFromParent()
{
$reader = new \Symfony\Component\Validator\Mapping\Loader\StaticMethodLoader();
$factory = new LazyLoadingMetadataFactory($reader);
$metadata = $factory->getMetadataFor('Symfony\Component\Validator\Tests\Fixtures\EntityStaticCarTurbo');
$groups = array();
foreach ($metadata->getPropertyMetadata('wheels') as $propertyMetadata) {
$constraints = $propertyMetadata->getConstraints();
$groups = array_replace($groups, $constraints[0]->groups);
}
$this->assertCount(4, $groups);
$this->assertContains('Default', $groups);
$this->assertContains('EntityStaticCarTurbo', $groups);
$this->assertContains('EntityStaticCar', $groups);
$this->assertContains('EntityStaticVehicle', $groups);
}
} }
class TestLoader implements LoaderInterface class TestLoader implements LoaderInterface