diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 216a2ba4e5625..c9c3b75340557 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,6 +1,6 @@
| Q | A
| ------------- | ---
-| Branch? | master / 2.7, 2.8, 3.1 or 3.2
+| Branch? | master / 2.7, 2.8 or 3.2
| Bug fix? | yes/no
| New feature? | yes/no
| BC breaks? | yes/no
diff --git a/.php_cs.dist b/.php_cs.dist
index bbb62c2d3cdce..140fd3265011c 100644
--- a/.php_cs.dist
+++ b/.php_cs.dist
@@ -8,31 +8,32 @@ return PhpCsFixer\Config::create()
'no_unreachable_default_argument_value' => false,
'braces' => array('allow_single_line_closure' => true),
'heredoc_to_nowdoc' => false,
+ 'phpdoc_annotation_without_dot' => false,
))
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
- ->in(__DIR__)
+ ->in(__DIR__.'/src')
->exclude(array(
// directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code
- 'src/Symfony/Component/DependencyInjection/Tests/Fixtures',
- 'src/Symfony/Component/Routing/Tests/Fixtures/dumper',
+ 'Symfony/Component/DependencyInjection/Tests/Fixtures',
+ 'Symfony/Component/Routing/Tests/Fixtures/dumper',
// fixture templates
- 'src/Symfony/Component/Templating/Tests/Fixtures/templates',
- 'src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom',
+ 'Symfony/Component/Templating/Tests/Fixtures/templates',
+ 'Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom',
// resource templates
- 'src/Symfony/Bundle/FrameworkBundle/Resources/views/Form',
+ 'Symfony/Bundle/FrameworkBundle/Resources/views/Form',
))
// file content autogenerated by `var_export`
- ->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
+ ->notPath('Symfony/Component/Translation/Tests/fixtures/resources.php')
// autogenerated xmls
- ->notPath('src/Symfony/Component/Console/Tests/Fixtures/application_1.xml')
- ->notPath('src/Symfony/Component/Console/Tests/Fixtures/application_2.xml')
+ ->notPath('Symfony/Component/Console/Tests/Fixtures/application_1.xml')
+ ->notPath('Symfony/Component/Console/Tests/Fixtures/application_2.xml')
// yml
- ->notPath('src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml')
+ ->notPath('Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml')
// test template
- ->notPath('src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
+ ->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
// explicit heredoc test
- ->notPath('src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php')
+ ->notPath('Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php')
)
;
diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md
index df5011ef69c67..776653657ee0a 100644
--- a/CHANGELOG-2.7.md
+++ b/CHANGELOG-2.7.md
@@ -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 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)
* bug #21218 [Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only (magnetik)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index f740b56abf6f9..dd5f4d1095832 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -15,8 +15,8 @@ Symfony is the result of the work of many people who made the code better
- Johannes S (johannes)
- Kris Wallsmith (kriswallsmith)
- Jakub Zalas (jakubzalas)
- - Ryan Weaver (weaverryan)
- Kévin Dunglas (dunglas)
+ - Ryan Weaver (weaverryan)
- Javier Eguiluz (javier.eguiluz)
- Hugo Hamon (hhamon)
- 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)
- Karma Dordrak (drak)
- Lukas Kahwe Smith (lsmith)
- - Martin Hasoň (hason)
- Grégoire Pineau (lyrixx)
+ - Martin Hasoň (hason)
- Jeremy Mikola (jmikola)
- Jean-François Simon (jfsimon)
- Benjamin Eberlei (beberlei)
- Igor Wiedler (igorw)
- - Eriksen Costa (eriksencosta)
- Maxime Steinhausser (ogizanagi)
- - Jules Pietri (heah)
+ - Eriksen Costa (eriksencosta)
- Robin Chalas (chalas_r)
+ - Jules Pietri (heah)
- Sarah Khalil (saro0h)
- Jonathan Wage (jwage)
- 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)
- Alexander Mols (asm89)
- Bulat Shakirzyanov (avalanche123)
+ - Ener-Getick (energetick)
- Saša Stamenković (umpirsky)
- Henrik Bjørnskov (henrikbjorn)
- Miha Vrhovnik
- - Ener-Getick (energetick)
- Diego Saint Esteben (dii3g0)
+ - Roland Franssen (ro0)
- Konstantin Kudryashov (everzet)
- Iltar van der Berg (kjarli)
- - Roland Franssen (ro0)
- Bilal Amarni (bamarni)
- Florin Patan (florinpatan)
- 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)
- Florian Voutzinos (florianv)
- Colin Frei
+ - Jérémy DERUSSÉ (jderusse)
- Adrien Brault (adrienbrault)
- Joshua Thijssen
- Peter Kokot (maastermedia)
- excelwebzone
- Jacob Dreesen (jdreesen)
- - Jérémy DERUSSÉ (jderusse)
- Vladimir Reznichenko (kalessil)
- Tomáš Votruba (tomas_votruba)
+ - David Buchmann (dbu)
- Fabien Pennequin (fabienpennequin)
- Gordon Franke (gimler)
+ - Tobias Nyholm (tobias)
- Eric GELOEN (gelo)
- - David Buchmann (dbu)
- Tugdual Saunier (tucksaun)
- Théo FIDRY (theofidry)
- 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)
- Evgeniy (ewgraf)
- Juti Noppornpitak (shiroyuki)
- - Tobias Nyholm (tobias)
- Tigran Azatyan (tigranazatyan)
- Sebastian Hörl (blogsh)
- Daniel Gomes (danielcsgomes)
- Hidenori Goto (hidenorigoto)
- Sebastiaan Stok (sstok)
+ - Yonel Ceruto González (yonelceruto)
- Guilherme Blanco (guilhermeblanco)
- Pablo Godel (pgodel)
- Jérémie Augustin (jaugustin)
- Andréia Bohner (andreia)
- - Yonel Ceruto González (yonelceruto)
- Rafael Dohms (rdohms)
- Arnaud Kleinpeter (nanocom)
- jwdeitch
+ - Mikael Pajunen
- Joel Wurtz (brouznouf)
- Philipp Wahala (hifi)
- Vyacheslav Pavlov
@@ -144,7 +145,6 @@ Symfony is the result of the work of many people who made the code better
- Vincent AUBERT (vincent)
- Rouven Weßling (realityking)
- Teoh Han Hui (teohhanhui)
- - Mikael Pajunen
- Clemens Tolboom
- Helmer Aaviksoo
- 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)
- jeff
- John Kary (johnkary)
+ - James Halsall (jaitsu)
- Justin Hileman (bobthecow)
- Blanchon Vincent (blanchonvincent)
- 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)
- Rui Marinho (ruimarinho)
- Daniel Espendiller
+ - SpacePossum
- Dawid Nowak
- Eugene Wissner
- 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)
- Katsuhiro OGAWA
- Patrick McDougle (patrick-mcdougle)
- - James Halsall (jaitsu)
- Alif Rachmawadi
- Kristen Gilden (kgilden)
- - SpacePossum
- Pierre-Yves LEBECQ (pylebecq)
- Alex Pott
- Jakub Kucharovic (jkucharovic)
+ - Uwe Jäger (uwej711)
- Eugene Leonovich (rybakit)
- Filippo Tessarotto
- 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)
- Diego Agulló (aeoris)
- jdhoek
+ - Pavel Batanov (scaytrase)
- Nikita Konstantinov
- Wodor Wodorski
- 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)
- Ruben Gonzalez (rubenrua)
- Roumen Damianoff (roumen)
+ - Adam Prager (padam87)
- Antonio J. García Lagar (ajgarlag)
- Kim Hemsø Rasmussen (kimhemsoe)
- 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)
- Grégoire Passault (gregwar)
- Ismael Ambrosi (iambrosi)
- - Uwe Jäger (uwej711)
+ - Baptiste Lafontaine
- Aurelijus Valeiša (aurelijus)
- Victor Bocharsky (bocharsky_bw)
- 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)
- Hidde Boomsma (hboomsma)
- John Bafford (jbafford)
- - Pavel Batanov (scaytrase)
- Bob den Otter (bopp)
- Adrian Rudnik (kreischweide)
- 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)
- Magnus Nordlander (magnusnordlander)
- alquerci
- - Adam Prager (padam87)
- Francesco Levorato
- Vitaliy Zakharov (zakharovvi)
- Tobias Sjösten (tobiassjosten)
- Gyula Sallai (salla)
+ - David Maicher (dmaicher)
- Inal DJAFAR (inalgnu)
- Christian Gärtner (dagardner)
- 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)
- Daniel Beyer
- Shein Alexey
- - Baptiste Lafontaine
+ - Romain Gautier (mykiwi)
- Joe Lencioni
- Daniel Tschinder
- Kai
@@ -386,6 +388,8 @@ Symfony is the result of the work of many people who made the code better
- Mihai Stancu
- Olivier Dolbeau (odolbeau)
- Jan Rosier (rosier)
+ - Thomas Royer (cydonia7)
+ - Josip Kruslin
- vagrant
- EdgarPE
- 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)
- Dirk Pahl (dirkaholic)
- cedric lombardot (cedriclombardot)
- - David Maicher (dmaicher)
- Jonas Flodén (flojon)
- Christian Schmidt
+ - Amrouche Hamza
- Marcin Sikoń (marphi)
- Dominik Zogg (dominik.zogg)
- Marek Pietrzak
@@ -417,6 +421,7 @@ Symfony is the result of the work of many people who made the code better
- Fabrice Bernhard (fabriceb)
- Jérôme Macias (jeromemacias)
- Andrey Astakhov (aast)
+ - Thomas Calvet
- Fabian Lange (codingfabian)
- Frank Neff (fneff)
- 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)
- ondrowan
- Barry vd. Heuvel (barryvdh)
+ - Wouter J
- Evan S Kaufman (evanskaufman)
- mcben
- 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)
- Andrew Udvare (audvare)
- alexpods
+ - Arjen van der Meijden
- Michele Locati
+ - Dariusz Ruminski
- Erik Trapman (eriktrapman)
- De Cock Xavier (xdecock)
- 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)
- Zach Badgett (zachbadgett)
- Aurélien Fredouelle
+ - Jérôme Parmentier (lctrs)
- Pavel Campr (pcampr)
- Johnny Robeson (johnny)
- Disquedur
@@ -518,11 +527,11 @@ Symfony is the result of the work of many people who made the code better
- Sinan Eldem
- Alexandre Dupuy (satchette)
- Rob Frawley 2nd
+ - Andre Rømcke (andrerom)
- Nahuel Cuesta (ncuesta)
- Chris Boden (cboden)
- Asmir Mustafic (goetas)
- Stefan Gehrig (sgehrig)
- - Josip Kruslin
- Hany el-Kerdany
- Wang Jingyu
- Åsmund Garfors
@@ -551,11 +560,13 @@ Symfony is the result of the work of many people who made the code better
- maxime.steinhausser
- Stefan Warman
- Tristan Maindron (tmaindron)
+ - Wesley Lancel
- Ke WANG (yktd26)
- Strate
- Miquel Rodríguez Telep (mrtorrent)
- Sergey Kolodyazhnyy (skolodyazhnyy)
- umpirski
+ - Quentin de Longraye (quentinus95)
- Chris Heng (gigablah)
- Ulumuddin Yunus (joenoez)
- Luc Vieillescazes (iamluc)
@@ -580,6 +591,7 @@ Symfony is the result of the work of many people who made the code better
- Disparity
- origaminal
- Matteo Beccati (matteobeccati)
+ - Kevin (oxfouzer)
- Paweł Wacławczyk (pwc)
- Oleg Zinchenko (cystbear)
- Johannes Klauss (cloppy)
@@ -592,7 +604,6 @@ Symfony is the result of the work of many people who made the code better
- develop
- ReenExe
- Mark Sonnabaum
- - Thomas Royer (cydonia7)
- Richard Quadling
- jochenvdv
- 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)
- Pascal Helfenstein
- Baldur Rensch (brensch)
- - Thomas Calvet
- Vladyslav Petrovych
- Alex Xandra Albert Sim
- Carson Full
@@ -636,9 +646,7 @@ Symfony is the result of the work of many people who made the code better
- Marc Morera (mmoreram)
- Andrew Hilobok (hilobok)
- Christian Soronellas (theunic)
- - Romain Gautier (mykiwi)
- Yosmany Garcia (yosmanyga)
- - Wouter J
- Wouter de Wild
- Miroslav Sustek
- Degory Valentine
@@ -673,7 +681,6 @@ Symfony is the result of the work of many people who made the code better
- Pierre Vanliefland (pvanliefland)
- Sofiane HADDAG (sofhad)
- frost-nzcr4
- - Arjen van der Meijden
- Abhoryo
- Fabian Vogler (fabian)
- 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)
- Christian Morgan
- Alexander Miehe (engerim)
- - Jérôme Parmentier (lctrs)
- Morgan Auchede (mauchede)
- Don Pinkster
- Maksim Muruev
@@ -779,8 +785,8 @@ Symfony is the result of the work of many people who made the code better
- Pieter
- Michael Tibben
- Sander Marechal
- - Andre Rømcke (andrerom)
- Radosław Benkel
+ - jean pasqualini (darkilliant)
- ttomor
- Mei Gwilym (meigwilym)
- 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)
- Nicolas Le Goff (nlegoff)
- Ben Oman
+ - Andreas Kleemann
- Manuele Menozzi
- Anton Babenko (antonbabenko)
- Irmantas Šiupšinskas (irmantas)
- Danilo Silva
- Zachary Tong (polyfractal)
- - Amrouche Hamza
- Hryhorii Hrebiniuk
- Dennis Fridrich (dfridrich)
- mcfedr (mcfedr)
@@ -809,6 +815,7 @@ Symfony is the result of the work of many people who made the code better
- boite
- MGDSoft
- Vadim Tyukov (vatson)
+ - David Wolter (davewww)
- Sortex
- chispita
- 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)
- tamirvs
- julien.galenski
+ - Bob van de Vijver
- Christian Neff
- Per Sandström (per)
- Goran Juric
@@ -946,6 +954,7 @@ Symfony is the result of the work of many people who made the code better
- Xavier Coureau
- ConneXNL
- Aharon Perkel
+ - matze
- Abdul.Mohsen B. A. A
- Benoît Burnichon
- pthompson
@@ -1024,7 +1033,6 @@ Symfony is the result of the work of many people who made the code better
- Ahmed TAILOULOUTE (ahmedtai)
- Maxime Veber (nek-)
- Sullivan SENECHAL
- - Dariusz Ruminski
- Tadcka
- Beth Binkovitz
- 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)
- Timothy Anido (xanido)
- Rick Prent
+ - skalpa
- Martin Eckhardt
- Pieter Jordaan
- Damien Tournoud
@@ -1094,7 +1103,6 @@ Symfony is the result of the work of many people who made the code better
- Mephistofeles
- Hoffmann András
- Olivier
- - Wesley Lancel
- pscheit
- Zdeněk Drahoš
- Dan Harper
@@ -1123,12 +1131,14 @@ Symfony is the result of the work of many people who made the code better
- Leonid Terentyev (li0n)
- ryunosuke
- victoria
+ - Arjan Keeman
- Francisco Facioni (fran6co)
- Iwan van Staveren (istaveren)
- Dany Maillard (maidmaid)
- Povilas S. (povilas)
- pborreli
- Eric Caron
+ - Richard Bradley
- 2manypeople
- Wing
- Thomas Bibb
@@ -1187,6 +1197,7 @@ Symfony is the result of the work of many people who made the code better
- Andy Stanberry
- Luiz “Felds” Liscia
- Thomas Rothe
+ - nietonfir
- alefranz
- avi123
- alsar
@@ -1247,6 +1258,7 @@ Symfony is the result of the work of many people who made the code better
- Andrey Chernykh
- Edvinas Klovas
- Drew Butler
+ - Peter Breuls
- Tischoi
- J Bruni
- Alexey Prilipko
@@ -1312,6 +1324,7 @@ Symfony is the result of the work of many people who made the code better
- Alan Chen
- Maerlyn
- Even André Fiskvik
+ - Arjan Keeman
- Erik van Wingerden
- Dane Powell
- Gerrit Drost
@@ -1359,6 +1372,7 @@ Symfony is the result of the work of many people who made the code better
- Marcin Szepczynski (szepczynski)
- Cyrille Jouineau (tuxosaurus)
- Yorkie Chadwick (yorkie76)
+ - GuillaumeVerdon
- Yanick Witschi
- Ondrej Mirtes
- akimsko
@@ -1594,6 +1608,7 @@ Symfony is the result of the work of many people who made the code better
- simpson
- drublic
- Andreas Streichardt
+ - Pascal Hofmann
- smokeybear87
- Gustavo Adrian
- Kevin Weber
@@ -1616,7 +1631,6 @@ Symfony is the result of the work of many people who made the code better
- Muharrem Demirci (mdemirci)
- Evgeny Z (meze)
- Nicolas de Marqué (nicola)
- - Kevin (oxfouzer)
- Pierre Geyer (ptheg)
- Sam Fleming (sam_fleming)
- Thomas BERTRAND (sevrahk)
diff --git a/UPGRADE-3.0.md b/UPGRADE-3.0.md
index 467c13e6448ca..7e48c1f98748e 100644
--- a/UPGRADE-3.0.md
+++ b/UPGRADE-3.0.md
@@ -1,6 +1,35 @@
UPGRADE FROM 2.x to 3.0
=======================
+# Table of Contents
+
+- [ClassLoader](#classloader)
+- [Config](#config)
+- [Console](#console)
+- [DependencyInjection](#dependencyinjection)
+- [DoctrineBridge](#doctrinebridge)
+- [DomCrawler](#domcrawler)
+- [EventDispatcher](#eventdispatcher)
+- [Form](#form)
+- [FrameworkBundle](#frameworkbundle)
+- [HttpFoundation](#httpfoundation)
+- [HttpKernel](#httpkernel)
+- [Locale](#locale)
+- [Monolog Bridge](#monolog-bridge)
+- [Process](#process)
+- [PropertyAccess](#propertyaccess)
+- [Routing](#routing)
+- [Security](#security)
+- [SecurityBundle](#securitybundle)
+- [Serializer](#serializer)
+- [Swiftmailer Bridge](#swiftmailer-bridge)
+- [Translator](#translator)
+- [Twig Bridge](#twig-bridge)
+- [TwigBundle](#twigbundle)
+- [Validator](#validator)
+- [WebProfiler](#webprofiler)
+- [Yaml](#yaml)
+
### ClassLoader
* The `UniversalClassLoader` class has been removed in favor of
@@ -1131,3 +1160,10 @@ UPGRADE FROM 2.x to 3.0
* `Process::setStdin()` and `Process::getStdin()` have been removed. Use
`Process::setInput()` and `Process::getInput()` that works the same way.
* `Process::setInput()` and `ProcessBuilder::setInput()` do not accept non-scalar types.
+
+### Monolog Bridge
+
+ * `Symfony\Bridge\Monolog\Logger::emerg()` was removed. Use `emergency()` which is PSR-3 compatible.
+ * `Symfony\Bridge\Monolog\Logger::crit()` was removed. Use `critical()` which is PSR-3 compatible.
+ * `Symfony\Bridge\Monolog\Logger::err()` was removed. Use `error()` which is PSR-3 compatible.
+ * `Symfony\Bridge\Monolog\Logger::warn()` was removed. Use `warning()` which is PSR-3 compatible.
diff --git a/composer.json b/composer.json
index 34dfa896e3b45..c88ca4563c73e 100644
--- a/composer.json
+++ b/composer.json
@@ -79,7 +79,8 @@
"ircmaxell/password-compat": "~1.0",
"ocramius/proxy-manager": "~0.4|~1.0|~2.0",
"symfony/phpunit-bridge": "~3.2",
- "egulias/email-validator": "~1.2,>=1.2.1"
+ "egulias/email-validator": "~1.2,>=1.2.1",
+ "sensio/framework-extra-bundle": "^3.0.2"
},
"autoload": {
"psr-4": {
@@ -100,6 +101,9 @@
"**/Tests/"
]
},
+ "autoload-dev": {
+ "files": [ "src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
+ },
"minimum-stability": "dev",
"extra": {
"branch-alias": {
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
index 348b46ddaa75e..39a251c33d7bb 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
@@ -244,6 +244,23 @@ public function testValidateUniquenessWithIgnoreNull()
->assertRaised();
}
+ /**
+ * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
+ */
+ public function testAllConfiguredFieldsAreCheckedOfBeingMappedByDoctrineWithIgnoreNullEnabled()
+ {
+ $constraint = new UniqueEntity(array(
+ 'message' => 'myMessage',
+ 'fields' => array('name', 'name2'),
+ 'em' => self::EM_NAME,
+ 'ignoreNull' => true,
+ ));
+
+ $entity1 = new SingleIntIdEntity(1, null);
+
+ $this->validator->validate($entity1, $constraint);
+ }
+
public function testValidateUniquenessWithValidCustomErrorPath()
{
$constraint = new UniqueEntity(array(
diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
index f4c8671abae9a..61aef64ed8059 100644
--- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
+++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
@@ -85,12 +85,14 @@ public function validate($entity, Constraint $constraint)
throw new ConstraintDefinitionException(sprintf('The field "%s" is not mapped by Doctrine, so it cannot be validated for uniqueness.', $fieldName));
}
- $criteria[$fieldName] = $class->reflFields[$fieldName]->getValue($entity);
+ $fieldValue = $class->reflFields[$fieldName]->getValue($entity);
- if ($constraint->ignoreNull && null === $criteria[$fieldName]) {
- return;
+ if ($constraint->ignoreNull && null === $fieldValue) {
+ continue;
}
+ $criteria[$fieldName] = $fieldValue;
+
if (null !== $criteria[$fieldName] && $class->hasAssociation($fieldName)) {
/* Ensure the Proxy is initialized before using reflection to
* read its identifiers. This is necessary because the wrapped
@@ -100,6 +102,12 @@ public function validate($entity, Constraint $constraint)
}
}
+ // skip validation if there are no criteria (this can happen when the
+ // "ignoreNull" option is enabled and fields to be checked are null
+ if (empty($criteria)) {
+ return;
+ }
+
$repository = $em->getRepository(get_class($entity));
$result = $repository->{$constraint->repositoryMethod}($criteria);
diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
index 575eaa2e213b2..04abda4b9fa59 100644
--- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
+++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
@@ -109,7 +109,7 @@ public static function register($mode = false)
return "\x1B[{$color}m{$str}\x1B[0m";
};
} else {
- $colorize = function ($str) {return $str;};
+ $colorize = function ($str) { return $str; };
}
register_shutdown_function(function () use ($getMode, &$deprecations, $deprecationHandler, $colorize) {
$mode = $getMode();
@@ -117,7 +117,7 @@ public static function register($mode = false)
restore_error_handler();
if ('weak' === $mode) {
- $colorize = function ($str) {return $str;};
+ $colorize = function ($str) { return $str; };
}
if ($currErrorHandler !== $deprecationHandler) {
echo "\n", $colorize('THE ERROR HANDLER HAS CHANGED!', true), "\n";
diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php
index fd58c19d818db..8971f655f4e3a 100644
--- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php
+++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php
@@ -125,9 +125,6 @@ public function __unset($name)
unset($this->valueHolder5157dd96e88c0->$name);
}
- /**
- *
- */
public function __clone()
{
$this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__clone', array());
@@ -135,9 +132,6 @@ public function __clone()
$this->valueHolder5157dd96e88c0 = clone $this->valueHolder5157dd96e88c0;
}
- /**
- *
- */
public function __sleep()
{
$this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__sleep', array());
@@ -145,9 +139,6 @@ public function __sleep()
return array('valueHolder5157dd96e88c0');
}
- /**
- *
- */
public function __wakeup()
{
}
diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_with_hints.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_with_hints.php
index f57c4c6360ba3..06432127750fd 100644
--- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_with_hints.php
+++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_with_hints.php
@@ -120,9 +120,6 @@ public function __unset($name)
unset($this->valueHolder5157dd96e88c0->$name);
}
- /**
- *
- */
public function __clone()
{
$this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__clone', array());
@@ -130,9 +127,6 @@ public function __clone()
$this->valueHolder5157dd96e88c0 = clone $this->valueHolder5157dd96e88c0;
}
- /**
- *
- */
public function __sleep()
{
$this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__sleep', array());
@@ -140,9 +134,6 @@ public function __sleep()
return array('valueHolder5157dd96e88c0');
}
- /**
- *
- */
public function __wakeup()
{
}
@@ -166,7 +157,7 @@ public function getProxyInitializer()
/**
* {@inheritdoc}
*/
- public function initializeProxy() : bool
+ public function initializeProxy(): bool
{
return $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, 'initializeProxy', array());
}
@@ -174,7 +165,7 @@ public function initializeProxy() : bool
/**
* {@inheritdoc}
*/
- public function isProxyInitialized() : bool
+ public function isProxyInitialized(): bool
{
return null !== $this->valueHolder5157dd96e88c0;
}
diff --git a/src/Symfony/Bridge/Twig/Command/DebugCommand.php b/src/Symfony/Bridge/Twig/Command/DebugCommand.php
index 39b910d6b4f61..349a8b81b83c1 100644
--- a/src/Symfony/Bridge/Twig/Command/DebugCommand.php
+++ b/src/Symfony/Bridge/Twig/Command/DebugCommand.php
@@ -141,7 +141,7 @@ private function getMetadata($type, $entity)
}
if ($type === 'functions' || $type === 'filters') {
$cb = $entity->getCallable();
- if (is_null($cb)) {
+ if (null === $cb) {
return;
}
if (is_array($cb)) {
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php
index 0800ba8ea2608..604b0caaecc8b 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php
@@ -32,7 +32,7 @@ public function testDumpTag($template, $debug, $expectedOutput, $expectedDumped)
$dumped = null;
$exception = null;
- $prevDumper = VarDumper::setHandler(function ($var) use (&$dumped) {$dumped = $var;});
+ $prevDumper = VarDumper::setHandler(function ($var) use (&$dumped) { $dumped = $var; });
try {
$this->assertEquals($expectedOutput, $twig->render('template'));
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
index 8f1227e7e997a..2cefe9f03a2ac 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
@@ -233,7 +233,7 @@ protected function describeContainerDefinition(Definition $definition, array $op
}
}
- $this->write(isset($options['id']) ? sprintf("%s\n%s\n\n%s\n", $options['id'], str_repeat('~', strlen($options['id'])), $output) : $output);
+ $this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output);
}
/**
@@ -244,7 +244,7 @@ protected function describeContainerAlias(Alias $alias, array $options = array()
$output = '- Service: `'.$alias.'`'
."\n".'- Public: '.($alias->isPublic() ? 'yes' : 'no');
- $this->write(isset($options['id']) ? sprintf("%s\n%s\n\n%s\n", $options['id'], str_repeat('~', strlen($options['id'])), $output) : $output);
+ $this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output);
}
/**
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
index b9116d39a3602..bc1eac93e6dac 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
@@ -318,6 +318,10 @@ public function testAnnotations()
public function testFileLinkFormat()
{
+ if (ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
+ $this->markTestSkipped('A custom file_link_format is defined.');
+ }
+
$container = $this->createContainerFromFile('full');
$this->assertEquals('file%link%format', $container->getParameter('templating.helper.code.file_link_format'));
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json
index 047f4e8c16a48..5c2038df42c91 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.json
@@ -11,9 +11,7 @@
"file": null,
"factory_class": "Full\\Qualified\\FactoryClass",
"factory_method": "get",
- "tags": [
-
- ]
+ "tags": []
}
},
"aliases": {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md
index 1c3b958bd92ca..96fe55184014a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md
@@ -4,8 +4,7 @@ Public services
Definitions
-----------
-definition_1
-~~~~~~~~~~~~
+### definition_1
- Class: `Full\Qualified\Class1`
- Scope: `container`
@@ -21,14 +20,12 @@ definition_1
Aliases
-------
-alias_1
-~~~~~~~
+### alias_1
- Service: `service_1`
- Public: yes
-alias_2
-~~~~~~~
+### alias_2
- Service: `service_2`
- Public: no
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json
index 3397fd67acd6e..6dc56b3e2335b 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.json
@@ -11,9 +11,7 @@
"file": null,
"factory_class": "Full\\Qualified\\FactoryClass",
"factory_method": "get",
- "tags": [
-
- ]
+ "tags": []
},
"definition_2": {
"class": "Full\\Qualified\\Class2",
@@ -42,9 +40,7 @@
},
{
"name": "tag2",
- "parameters": [
-
- ]
+ "parameters": []
}
]
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md
index b3018b80b7f3b..12938a6e0e123 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md
@@ -4,8 +4,7 @@ Public and private services
Definitions
-----------
-definition_1
-~~~~~~~~~~~~
+### definition_1
- Class: `Full\Qualified\Class1`
- Scope: `container`
@@ -17,8 +16,7 @@ definition_1
- Factory Class: `Full\Qualified\FactoryClass`
- Factory Method: `get`
-definition_2
-~~~~~~~~~~~~
+### definition_2
- Class: `Full\Qualified\Class2`
- Scope: `container`
@@ -41,14 +39,12 @@ definition_2
Aliases
-------
-alias_1
-~~~~~~~
+### alias_1
- Service: `service_1`
- Public: yes
-alias_2
-~~~~~~~
+### alias_2
- Service: `service_2`
- Public: no
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json
index 53bf114e81e04..af2c1044d0ed0 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.json
@@ -27,17 +27,11 @@
},
{
"name": "tag2",
- "parameters": [
-
- ]
+ "parameters": []
}
]
}
},
- "aliases": [
-
- ],
- "services": [
-
- ]
+ "aliases": [],
+ "services": []
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md
index 56a2c390779aa..0b90618a476a2 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.md
@@ -4,8 +4,7 @@ Public and private services with tag `tag1`
Definitions
-----------
-definition_2
-~~~~~~~~~~~~
+### definition_2
- Class: `Full\Qualified\Class2`
- Scope: `container`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md
index 6577037f9c00f..1a3ed9ca85302 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.md
@@ -4,8 +4,7 @@ Container tags
tag1
----
-definition_2
-~~~~~~~~~~~~
+### definition_2
- Class: `Full\Qualified\Class2`
- Scope: `container`
@@ -22,8 +21,7 @@ definition_2
tag2
----
-definition_2
-~~~~~~~~~~~~
+### definition_2
- Class: `Full\Qualified\Class2`
- Scope: `container`
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json
index 8de781dfc45a5..c15b4a6d29060 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.json
@@ -9,7 +9,5 @@
"file": null,
"factory_class": "Full\\Qualified\\FactoryClass",
"factory_method": "get",
- "tags": [
-
- ]
+ "tags": []
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json
index 9d58434c17e1b..62bcac9031f60 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.json
@@ -25,9 +25,7 @@
},
{
"name": "tag2",
- "parameters": [
-
- ]
+ "parameters": []
}
]
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.json
index d34b3a77aec6e..58caf26d537e7 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.json
@@ -6,9 +6,7 @@
"scheme": "http|https",
"method": "PUT|POST",
"class": "Symfony\\Component\\Routing\\Route",
- "defaults": [
-
- ],
+ "defaults": [],
"requirements": "NO CUSTOM",
"options": {
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler",
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json
index 7170953f5fee7..350bffdb3a9c7 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json
@@ -27,9 +27,7 @@
"scheme": "http|https",
"method": "PUT|POST",
"class": "Symfony\\Component\\Routing\\Route",
- "defaults": [
-
- ],
+ "defaults": [],
"requirements": "NO CUSTOM",
"options": {
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler",
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php
index c0ae6ec5c6604..cb3c763f8f3c8 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php
@@ -31,3 +31,19 @@
10,
array('%count%' => 10)
) ?>
+
+trans('other-domain-test-no-params-short-array', [], 'not_messages'); ?>
+
+trans('other-domain-test-no-params-long-array', array(), 'not_messages'); ?>
+
+trans('other-domain-test-params-short-array', ['foo' => 'bar'], 'not_messages'); ?>
+
+trans('other-domain-test-params-long-array', array('foo' => 'bar'), 'not_messages'); ?>
+
+transChoice('other-domain-test-trans-choice-short-array-%count%', 10, ['%count%' => 10], 'not_messages'); ?>
+
+transChoice('other-domain-test-trans-choice-long-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?>
+
+trans('typecast', ['a' => (int) '123'], 'not_messages'); ?>
+transChoice('msg1', 10 + 1, [], 'not_messages'); ?>
+transChoice('msg2', intval(4.5), [], 'not_messages'); ?>
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php
new file mode 100644
index 0000000000000..2fdbef8839496
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php
@@ -0,0 +1,39 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
+
+class AnnotatedControllerTest extends WebTestCase
+{
+ /**
+ * @dataProvider getRoutes
+ */
+ public function testAnnotatedController($path, $expectedValue)
+ {
+ $client = $this->createClient(array('test_case' => 'AnnotatedController', 'root_config' => 'config.yml'));
+ $client->request('GET', '/annotated'.$path);
+
+ $this->assertSame(200, $client->getResponse()->getStatusCode());
+ $this->assertSame($expectedValue, $client->getResponse()->getContent());
+ }
+
+ public function getRoutes()
+ {
+ return array(
+ array('/null_request', 'Symfony\Component\HttpFoundation\Request'),
+ array('/null_argument', ''),
+ array('/null_argument_with_route_param', ''),
+ array('/null_argument_with_route_param/value', 'value'),
+ array('/argument_with_route_param_and_default', 'value'),
+ array('/argument_with_route_param_and_default/custom', 'custom'),
+ );
+ }
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php
new file mode 100644
index 0000000000000..98a3ace982e33
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php
@@ -0,0 +1,51 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller;
+
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\Routing\Annotation\Route;
+
+class AnnotatedController
+{
+ /**
+ * @Route("/null_request", name="null_request")
+ */
+ public function requestDefaultNullAction(Request $request = null)
+ {
+ return new Response($request ? get_class($request) : null);
+ }
+
+ /**
+ * @Route("/null_argument", name="null_argument")
+ */
+ public function argumentDefaultNullWithoutRouteParamAction($value = null)
+ {
+ return new Response($value);
+ }
+
+ /**
+ * @Route("/null_argument_with_route_param/{value}", name="null_argument_with_route_param")
+ */
+ public function argumentDefaultNullWithRouteParamAction($value = null)
+ {
+ return new Response($value);
+ }
+
+ /**
+ * @Route("/argument_with_route_param_and_default/{value}", defaults={"value": "value"}, name="argument_with_route_param_and_default")
+ */
+ public function argumentWithoutDefaultWithRouteParamAndDefaultAction($value)
+ {
+ return new Response($value);
+ }
+}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/bundles.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/bundles.php
new file mode 100644
index 0000000000000..f3290d7728541
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/bundles.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle;
+use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
+use Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle;
+
+return array(
+ new FrameworkBundle(),
+ new TestBundle(),
+ new SensioFrameworkExtraBundle(),
+);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/config.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/config.yml
new file mode 100644
index 0000000000000..377d3e7852064
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/config.yml
@@ -0,0 +1,2 @@
+imports:
+ - { resource: ../config/default.yml }
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/routing.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/routing.yml
new file mode 100644
index 0000000000000..ebd18a0a4c282
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AnnotatedController/routing.yml
@@ -0,0 +1,4 @@
+annotated_controller:
+ prefix: /annotated
+ resource: "@TestBundle/Controller/AnnotatedController.php"
+ type: annotation
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/PhpExtractorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/PhpExtractorTest.php
index 420d2f2d71dd3..e8c56ee4d5e52 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/PhpExtractorTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/PhpExtractorTest.php
@@ -39,18 +39,31 @@ public function testExtraction($resource)
nowdoc key with whitespace and nonescaped \$\n sequences
EOF;
// Assert
- $expectedCatalogue = array('messages' => array(
- 'single-quoted key' => 'prefixsingle-quoted key',
- 'double-quoted key' => 'prefixdouble-quoted key',
- 'heredoc key' => 'prefixheredoc key',
- 'nowdoc key' => 'prefixnowdoc key',
- "double-quoted key with whitespace and escaped \$\n\" sequences" => "prefixdouble-quoted key with whitespace and escaped \$\n\" sequences",
- 'single-quoted key with whitespace and nonescaped \$\n\' sequences' => 'prefixsingle-quoted key with whitespace and nonescaped \$\n\' sequences',
- 'single-quoted key with "quote mark at the end"' => 'prefixsingle-quoted key with "quote mark at the end"',
- $expectedHeredoc => 'prefix'.$expectedHeredoc,
- $expectedNowdoc => 'prefix'.$expectedNowdoc,
- '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples' => 'prefix{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
- ));
+ $expectedCatalogue = array(
+ 'messages' => array(
+ 'single-quoted key' => 'prefixsingle-quoted key',
+ 'double-quoted key' => 'prefixdouble-quoted key',
+ 'heredoc key' => 'prefixheredoc key',
+ 'nowdoc key' => 'prefixnowdoc key',
+ "double-quoted key with whitespace and escaped \$\n\" sequences" => "prefixdouble-quoted key with whitespace and escaped \$\n\" sequences",
+ 'single-quoted key with whitespace and nonescaped \$\n\' sequences' => 'prefixsingle-quoted key with whitespace and nonescaped \$\n\' sequences',
+ 'single-quoted key with "quote mark at the end"' => 'prefixsingle-quoted key with "quote mark at the end"',
+ $expectedHeredoc => 'prefix'.$expectedHeredoc,
+ $expectedNowdoc => 'prefix'.$expectedNowdoc,
+ '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples' => 'prefix{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
+ ),
+ 'not_messages' => array(
+ 'other-domain-test-no-params-short-array' => 'prefixother-domain-test-no-params-short-array',
+ 'other-domain-test-no-params-long-array' => 'prefixother-domain-test-no-params-long-array',
+ 'other-domain-test-params-short-array' => 'prefixother-domain-test-params-short-array',
+ 'other-domain-test-params-long-array' => 'prefixother-domain-test-params-long-array',
+ 'other-domain-test-trans-choice-short-array-%count%' => 'prefixother-domain-test-trans-choice-short-array-%count%',
+ 'other-domain-test-trans-choice-long-array-%count%' => 'prefixother-domain-test-trans-choice-long-array-%count%',
+ 'typecast' => 'prefixtypecast',
+ 'msg1' => 'prefixmsg1',
+ 'msg2' => 'prefixmsg2',
+ ),
+ );
$actualCatalogue = $catalogue->all();
$this->assertEquals($expectedCatalogue, $actualCatalogue);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php
index cf7f3c5769bf2..97c94fdd14bf9 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php
@@ -24,6 +24,8 @@
class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface
{
const MESSAGE_TOKEN = 300;
+ const METHOD_ARGUMENTS_TOKEN = 1000;
+ const DOMAIN_TOKEN = 1001;
/**
* Prefix for new found message.
@@ -38,6 +40,28 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface
* @var array
*/
protected $sequences = array(
+ array(
+ '->',
+ 'trans',
+ '(',
+ self::MESSAGE_TOKEN,
+ ',',
+ self::METHOD_ARGUMENTS_TOKEN,
+ ',',
+ self::DOMAIN_TOKEN,
+ ),
+ array(
+ '->',
+ 'transChoice',
+ '(',
+ self::MESSAGE_TOKEN,
+ ',',
+ self::METHOD_ARGUMENTS_TOKEN,
+ ',',
+ self::METHOD_ARGUMENTS_TOKEN,
+ ',',
+ self::DOMAIN_TOKEN,
+ ),
array(
'->',
'trans',
@@ -105,11 +129,32 @@ private function seekToNextRelevantToken(\Iterator $tokenIterator)
}
}
+ private function skipMethodArgument(\Iterator $tokenIterator)
+ {
+ $openBraces = 0;
+
+ for (; $tokenIterator->valid(); $tokenIterator->next()) {
+ $t = $tokenIterator->current();
+
+ if ('[' === $t[0] || '(' === $t[0]) {
+ ++$openBraces;
+ }
+
+ if (']' === $t[0] || ')' === $t[0]) {
+ --$openBraces;
+ }
+
+ if ((0 === $openBraces && ',' === $t[0]) || (-1 === $openBraces && ')' === $t[0])) {
+ break;
+ }
+ }
+ }
+
/**
* Extracts the message from the iterator while the tokens
* match allowed message tokens.
*/
- private function getMessage(\Iterator $tokenIterator)
+ private function getValue(\Iterator $tokenIterator)
{
$message = '';
$docToken = '';
@@ -155,16 +200,26 @@ protected function parseTokens($tokens, MessageCatalogue $catalog)
for ($key = 0; $key < $tokenIterator->count(); ++$key) {
foreach ($this->sequences as $sequence) {
$message = '';
+ $domain = 'messages';
$tokenIterator->seek($key);
- foreach ($sequence as $item) {
+ foreach ($sequence as $sequenceKey => $item) {
$this->seekToNextRelevantToken($tokenIterator);
- if ($this->normalizeToken($tokenIterator->current()) == $item) {
+ if ($this->normalizeToken($tokenIterator->current()) === $item) {
$tokenIterator->next();
continue;
- } elseif (self::MESSAGE_TOKEN == $item) {
- $message = $this->getMessage($tokenIterator);
+ } elseif (self::MESSAGE_TOKEN === $item) {
+ $message = $this->getValue($tokenIterator);
+
+ if (count($sequence) === ($sequenceKey + 1)) {
+ break;
+ }
+ } elseif (self::METHOD_ARGUMENTS_TOKEN === $item) {
+ $this->skipMethodArgument($tokenIterator);
+ } elseif (self::DOMAIN_TOKEN === $item) {
+ $domain = $this->getValue($tokenIterator);
+
break;
} else {
break;
@@ -172,7 +227,7 @@ protected function parseTokens($tokens, MessageCatalogue $catalog)
}
if ($message) {
- $catalog->set($message, $this->prefix.$message);
+ $catalog->set($message, $this->prefix.$message, $domain);
break;
}
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json
index 63c43e003506b..5f0c6ce2e1462 100644
--- a/src/Symfony/Bundle/FrameworkBundle/composer.json
+++ b/src/Symfony/Bundle/FrameworkBundle/composer.json
@@ -25,7 +25,7 @@
"symfony/http-foundation": "~2.7",
"symfony/http-kernel": "~2.7.23|~2.8.16",
"symfony/filesystem": "~2.3",
- "symfony/routing": "~2.6,>2.6.4",
+ "symfony/routing": "~2.7.24|~2.8.17",
"symfony/security-core": "~2.6.13|~2.7.9|~2.8",
"symfony/security-csrf": "~2.6",
"symfony/stopwatch": "~2.3",
@@ -45,7 +45,8 @@
"symfony/expression-language": "~2.6",
"symfony/process": "~2.0,>=2.0.5",
"symfony/validator": "~2.5",
- "symfony/yaml": "~2.0,>=2.0.5"
+ "symfony/yaml": "~2.0,>=2.0.5",
+ "sensio/framework-extra-bundle": "^3.0.2"
},
"suggest": {
"symfony/console": "For using the console commands",
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
index a3e5e233f9d71..df6380224cd20 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
@@ -390,11 +390,11 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode)
$providerNodeBuilder
->validate()
- ->ifTrue(function ($v) {return count($v) > 1;})
+ ->ifTrue(function ($v) { return count($v) > 1; })
->thenInvalid('You cannot set multiple provider types for the same provider')
->end()
->validate()
- ->ifTrue(function ($v) {return count($v) === 0;})
+ ->ifTrue(function ($v) { return count($v) === 0; })
->thenInvalid('You must set a provider definition for the provider.')
->end()
;
diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php
index 36cea3d0fed1a..ab9479e46166a 100644
--- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php
+++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php
@@ -91,7 +91,7 @@ public function process(ContainerBuilder $container)
$twigLoader = $container->getDefinition('twig.loader.native_filesystem');
if ($container->has('templating')) {
$loader = $container->getDefinition('twig.loader.filesystem');
- $loader->setMethodCalls($twigLoader->getMethodCalls());
+ $loader->setMethodCalls(array_merge($twigLoader->getMethodCalls(), $loader->getMethodCalls()));
$twigLoader->clearTag('twig.loader');
} else {
diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/ExtensionPassTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/ExtensionPassTest.php
new file mode 100644
index 0000000000000..587801d8db622
--- /dev/null
+++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/ExtensionPassTest.php
@@ -0,0 +1,41 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection\Compiler;
+
+use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\ExtensionPass;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+
+class ExtensionPassTest extends \PHPUnit_Framework_TestCase
+{
+ public function testProcessDoesNotDropExistingFileLoaderMethodCalls()
+ {
+ $container = new ContainerBuilder();
+ $container->setParameter('kernel.debug', false);
+
+ $container->register('twig.app_variable', '\Symfony\Bridge\Twig\AppVariable');
+ $container->register('templating', '\Symfony\Bundle\TwigBundle\TwigEngine');
+
+ $nativeTwigLoader = new Definition('\Twig_Loader_Filesystem');
+ $nativeTwigLoader->addMethodCall('addPath', array());
+ $container->setDefinition('twig.loader.native_filesystem', $nativeTwigLoader);
+
+ $filesystemLoader = new Definition('\Symfony\Bundle\TwigBundle\Loader\FilesystemLoader');
+ $filesystemLoader->addMethodCall('addPath', array());
+ $container->setDefinition('twig.loader.filesystem', $filesystemLoader);
+
+ $extensionPass = new ExtensionPass();
+ $extensionPass->process($container);
+
+ $this->assertCount(2, $filesystemLoader->getMethodCalls());
+ }
+}
diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php
index b51e619a9d285..5c4126cfe7233 100644
--- a/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php
+++ b/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php
@@ -17,7 +17,7 @@
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;
-class NewCacheWamingTest extends \PHPUnit_Framework_TestCase
+class CacheWarmingTest extends \PHPUnit_Framework_TestCase
{
public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable()
{
diff --git a/src/Symfony/Component/BrowserKit/Cookie.php b/src/Symfony/Component/BrowserKit/Cookie.php
index 7e855bf351dad..42f184d532e02 100644
--- a/src/Symfony/Component/BrowserKit/Cookie.php
+++ b/src/Symfony/Component/BrowserKit/Cookie.php
@@ -213,8 +213,6 @@ private static function parseDate($dateValue)
if (false !== $date = date_create($dateValue, new \DateTimeZone('GMT'))) {
return $date->format('U');
}
-
- throw new \InvalidArgumentException(sprintf('Could not parse date "%s".', $dateValue));
}
/**
diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php
index 5a724333d350f..4722de6d7b04c 100644
--- a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php
@@ -88,10 +88,11 @@ public function testFromStringThrowsAnExceptionIfCookieIsNotValid()
Cookie::fromString('foo');
}
- public function testFromStringThrowsAnExceptionIfCookieDateIsNotValid()
+ public function testFromStringIgnoresInvalidExpiresDate()
{
- $this->setExpectedException('InvalidArgumentException');
- Cookie::fromString('foo=bar; expires=Flursday July 31st 2020, 08:49:37 GMT');
+ $cookie = Cookie::fromString('foo=bar; expires=Flursday July 31st 2020, 08:49:37 GMT');
+
+ $this->assertFalse($cookie->isExpired());
}
public function testFromStringThrowsAnExceptionIfUrlIsNotValid()
diff --git a/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithStrictTypes.php b/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithStrictTypes.php
index 3c7870592b3cb..846611e38bbc4 100644
--- a/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithStrictTypes.php
+++ b/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithStrictTypes.php
@@ -4,7 +4,7 @@
* foo
*/
-declare (strict_types = 1);
+declare(strict_types=1);
namespace Namespaced;
diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php
index 904c04b6822a7..289d1a11da457 100644
--- a/src/Symfony/Component/Console/Helper/Table.php
+++ b/src/Symfony/Component/Console/Helper/Table.php
@@ -518,7 +518,7 @@ private function getColumnWidth($column)
foreach ($row as $i => $cell) {
if ($cell instanceof TableCell) {
- $textLength = strlen($cell);
+ $textLength = Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell);
if ($textLength > 0) {
$contentColumns = str_split($cell, ceil($textLength / $cell->getColspan()));
foreach ($contentColumns as $position => $content) {
diff --git a/src/Symfony/Component/Console/Helper/TableCell.php b/src/Symfony/Component/Console/Helper/TableCell.php
index aa0d3180799ff..1b34774f26516 100644
--- a/src/Symfony/Component/Console/Helper/TableCell.php
+++ b/src/Symfony/Component/Console/Helper/TableCell.php
@@ -35,6 +35,10 @@ class TableCell
*/
public function __construct($value = '', array $options = array())
{
+ if (is_numeric($value) && !is_string($value)) {
+ $value = (string) $value;
+ }
+
$this->value = $value;
// check option names
diff --git a/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php
index 1dcddf8badd49..b0d7f9c2f6f4c 100644
--- a/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php
@@ -16,6 +16,7 @@
use Symfony\Component\Console\Output\StreamOutput;
use Symfony\Component\Console\Helper\ProcessHelper;
use Symfony\Component\Process\Process;
+use Symfony\Component\Process\ProcessBuilder;
class ProcessHelperTest extends \PHPUnit_Framework_TestCase
{
@@ -83,9 +84,9 @@ public function provideCommandsAndOutput()
EOT;
$errorMessage = 'An error occurred';
- if ('\\' === DIRECTORY_SEPARATOR) {
- $successOutputProcessDebug = str_replace("'", '"', $successOutputProcessDebug);
- }
+ $args = new ProcessBuilder(array('php', '-r', 'echo 42;'));
+ $args = $args->getProcess()->getCommandLine();
+ $successOutputProcessDebug = str_replace("'php' '-r' 'echo 42;'", $args, $successOutputProcessDebug);
return array(
array('', 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERBOSE, null),
diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php
index a691405c6b30f..9d6fb6f163c36 100644
--- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php
@@ -35,9 +35,9 @@ protected function tearDown()
/**
* @dataProvider testRenderProvider
*/
- public function testRender($headers, $rows, $style, $expected)
+ public function testRender($headers, $rows, $style, $expected, $decorated = false)
{
- $table = new Table($output = $this->getOutputStream());
+ $table = new Table($output = $this->getOutputStream($decorated));
$table
->setHeaders($headers)
->setRows($rows)
@@ -51,9 +51,9 @@ public function testRender($headers, $rows, $style, $expected)
/**
* @dataProvider testRenderProvider
*/
- public function testRenderAddRows($headers, $rows, $style, $expected)
+ public function testRenderAddRows($headers, $rows, $style, $expected, $decorated = false)
{
- $table = new Table($output = $this->getOutputStream());
+ $table = new Table($output = $this->getOutputStream($decorated));
$table
->setHeaders($headers)
->addRows($rows)
@@ -67,9 +67,9 @@ public function testRenderAddRows($headers, $rows, $style, $expected)
/**
* @dataProvider testRenderProvider
*/
- public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected)
+ public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected, $decorated = false)
{
- $table = new Table($output = $this->getOutputStream());
+ $table = new Table($output = $this->getOutputStream($decorated));
$table
->setHeaders($headers)
->setStyle($style)
@@ -485,6 +485,35 @@ public function testRenderProvider()
TABLE
),
+ 'Coslpan and table cells with comment style' => array(
+ array(
+ new TableCell('