diff --git a/CHANGELOG-2.3.md b/CHANGELOG-2.3.md
index f36a265ebc..24e7c937f5 100644
--- a/CHANGELOG-2.3.md
+++ b/CHANGELOG-2.3.md
@@ -7,6 +7,23 @@ in 2.3 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.3.0...v2.3.1
+* 2.3.29 (2015-05-26)
+
+ * security #14759 CVE-2015-4050 [HttpKernel] Do not call the FragmentListener if _controller is already defined (jakzal)
+ * bug #14715 [Form] Check instance of FormBuilderInterface instead of FormBuilder (dosten)
+ * bug #14678 [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts (MacDada)
+ * bug #14635 [HttpKernel] Handle an array vary header in the http cache store (jakzal)
+ * bug #14513 [console][formater] allow format toString object. (aitboudad)
+ * bug #14335 [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo (danez)
+ * bug #14593 [Security][Firewall] Avoid redirection to XHR URIs (asiragusa)
+ * bug #14618 [DomCrawler] Throw an exception if a form field path is incomplete (jakzal)
+ * bug #14698 Fix HTML escaping of to-source links (nicolas-grekas)
+ * bug #14690 [HttpFoundation] IpUtils::checkIp4() should allow `/0` networks (zerkms)
+ * bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad)
+ * bug #13633 [ServerBag] Handled bearer authorization header in REDIRECT_ form (Lance0312)
+ * bug #13637 [CSS] WebProfiler break words (nicovak)
+ * bug #14633 [EventDispatcher] make listeners removable from an executed listener (xabbuh)
+
* 2.3.28 (2015-05-10)
* bug #14266 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed (hason)
diff --git a/CHANGELOG-2.6.md b/CHANGELOG-2.6.md
index 83878a245c..3f9639d225 100644
--- a/CHANGELOG-2.6.md
+++ b/CHANGELOG-2.6.md
@@ -7,6 +7,33 @@ in 2.6 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.6.0...v2.6.1
+* 2.6.8 (2015-05-27)
+
+ * security #14759 CVE-2015-4050 [HttpKernel] Do not call the FragmentListener if _controller is already defined (jakzal)
+ * bug #14743 [DebugBundle] Fix config XSD (nicolas-grekas)
+ * bug #14726 [Translation] fixed JSON loader on PHP 7 when file is empty (fabpot)
+ * bug #14715 [Form] Check instance of FormBuilderInterface instead of FormBuilder (dosten)
+ * bug #14678 [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts (MacDada)
+ * bug #14635 [HttpKernel] Handle an array vary header in the http cache store (jakzal)
+ * bug #14513 [console][formater] allow format toString object. (aitboudad)
+ * bug #14335 [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo (danez)
+ * bug #14593 [Security][Firewall] Avoid redirection to XHR URIs (asiragusa)
+ * bug #14618 [DomCrawler] Throw an exception if a form field path is incomplete (jakzal)
+ * bug #14699 Fix HTML escaping of to-source links (amenk, nicolas-grekas)
+ * bug #14698 Fix HTML escaping of to-source links (nicolas-grekas)
+ * bug #14690 [HttpFoundation] IpUtils::checkIp4() should allow `/0` networks (zerkms)
+ * bug #14696 Fix the rendering of deprecation log messages (stof)
+ * bug #14683 Fixed the indentation in the compiled template for the DumpNode (stof)
+ * bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad)
+ * bug #13633 [ServerBag] Handled bearer authorization header in REDIRECT_ form (Lance0312)
+ * bug #13637 [CSS] WebProfiler break words (nicovak)
+ * bug #14217 [WebProfilerBundle] Fix regexp (romqin)
+ * bug #14644 [Bridge\Twig] Adding a space between the icon and the error message (zmikael, nicolas-grekas)
+ * bug #14640 [DebugBundle] Allow alternative destination for dumps (nicolas-grekas)
+ * bug #14633 [EventDispatcher] make listeners removable from an executed listener (xabbuh)
+ * bug #14609 [DebugBundle] Remove inlined dumps on XHR (nicolas-grekas)
+ * bug #14605 [PropertyAccess] Fix setting public property on a class having a magic getter (lolautruche)
+
* 2.6.7 (2015-05-11)
* bug #14266 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed (hason)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 3a0525ba46..f3397b53ec 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -6,10 +6,10 @@ Symfony is the result of the work of many people who made the code better
- Fabien Potencier (fabpot)
- Bernhard Schussek (bschussek)
- - Victor Berchet (victor)
- - Tobias Schultze (tobion)
- - Jordi Boggiano (seldaek)
- Nicolas Grekas (nicolas-grekas)
+ - Tobias Schultze (tobion)
+ - Victor Berchet (victor)
+ - Jordi Boggiano (seldaek)
- Johannes S (johannes)
- Kris Wallsmith (kriswallsmith)
- Christophe Coevoet (stof)
@@ -19,17 +19,17 @@ Symfony is the result of the work of many people who made the code better
- Joseph Bielawski (stloyd)
- Karma Dordrak (drak)
- Ryan Weaver (weaverryan)
+ - Christian Flothmann (xabbuh)
- Lukas Kahwe Smith (lsmith)
- Romain Neutron (romain)
- - Christian Flothmann (xabbuh)
- Jeremy Mikola (jmikola)
- Jean-François Simon (jfsimon)
- Benjamin Eberlei (beberlei)
- Igor Wiedler (igorw)
- Martin Hasoň (hason)
- Eriksen Costa (eriksencosta)
- - Grégoire Pineau (lyrixx)
- Abdellatif Ait boudad (aitboudad)
+ - Grégoire Pineau (lyrixx)
- Wouter De Jong (wouterj)
- Jonathan Wage (jwage)
- Alexandre Salomé (alexandresalome)
@@ -37,9 +37,9 @@ Symfony is the result of the work of many people who made the code better
- ornicar
- stealth35 (stealth35)
- Alexander Mols (asm89)
+ - Kévin Dunglas (dunglas)
- Bulat Shakirzyanov (avalanche123)
- Francis Besset (francisbesset)
- - Kévin Dunglas (dunglas)
- Saša Stamenković (umpirsky)
- Henrik Bjørnskov (henrikbjorn)
- Miha Vrhovnik
@@ -55,6 +55,7 @@ Symfony is the result of the work of many people who made the code better
- Arnout Boks (aboks)
- Christian Raue
- Michel Weimerskirch (mweimerskirch)
+ - Diego Saint Esteben (dii3g0)
- Lee McDermott
- Brandon Turner
- Luis Cordova (cordoval)
@@ -75,23 +76,23 @@ Symfony is the result of the work of many people who made the code better
- lenar
- Graham Campbell (graham)
- Włodzimierz Gajda (gajdaw)
+ - Jérôme Tamarelle (gromnan)
- Florian Voutzinos (florianv)
- Colin Frei
- - Jérôme Tamarelle (gromnan)
- Adrien Brault (adrienbrault)
- excelwebzone
- Jacob Dreesen (jdreesen)
- - Fabien Pennequin (fabienpennequin)
- Matthias Pigulla (mpdude)
+ - Fabien Pennequin (fabienpennequin)
- Peter Kokot (maastermedia)
- Peter Rehm (rpet)
- - Diego Saint Esteben (dii3g0)
- Michal Piotrowski (eventhorizon)
- Stefano Sala (stefano.sala)
- Javier Eguiluz (javier.eguiluz)
- Gordon Franke (gimler)
- Robert Schönthal (digitalkaoz)
- Juti Noppornpitak (shiroyuki)
+ - Dariusz Ruminski
- Sebastian Hörl (blogsh)
- Daniel Gomes (danielcsgomes)
- Hidenori Goto (hidenorigoto)
@@ -102,8 +103,8 @@ Symfony is the result of the work of many people who made the code better
- Eric GELOEN (gelo)
- Jérémie Augustin (jaugustin)
- Rafael Dohms (rdohms)
- - Dariusz Ruminski
- Tigran Azatyan (tigranazatyan)
+ - Alexander Schwenn (xelaris)
- Arnaud Kleinpeter (nanocom)
- Richard Shank (iampersistent)
- Clemens Tolboom
@@ -126,7 +127,6 @@ Symfony is the result of the work of many people who made the code better
- Mario A. Alvarez Garcia (nomack84)
- Dennis Benkert (denderello)
- Benjamin Dulau (dbenjamin)
- - Alexander Schwenn (xelaris)
- Andreas Hucks (meandmymonkey)
- Noel Guilbert (noel)
- Joel Wurtz (brouznouf)
@@ -136,6 +136,7 @@ Symfony is the result of the work of many people who made the code better
- Larry Garfield (crell)
- Martin Schuhfuß (usefulthink)
- Thomas Rabaix (rande)
+ - Javier Spagnoletti (phansys)
- Matthieu Bontemps (mbontemps)
- Pierre Minnieur (pminnieur)
- fivestar
@@ -145,6 +146,7 @@ Symfony is the result of the work of many people who made the code better
- François Zaninotto (fzaninotto)
- Dustin Whittle (dustinwhittle)
- jeff
+ - Maxime Steinhausser (ogizanagi)
- Joshua Thijssen
- Justin Hileman (bobthecow)
- Sven Paulus (subsven)
@@ -156,7 +158,6 @@ Symfony is the result of the work of many people who made the code better
- Tugdual Saunier (tucksaun)
- Sergey Linnik (linniksa)
- Marcel Beerta (mazen)
- - Javier Spagnoletti (phansys)
- julien pauli (jpauli)
- Francois Zaninotto
- Alexander Kotynia (olden)
@@ -186,10 +187,10 @@ Symfony is the result of the work of many people who made the code better
- Jeremy Livingston (jeremylivingston)
- Nikita Konstantinov
- Wodor Wodorski
+ - Vincent AUBERT (vincent)
- Matthieu Auger (matthieuauger)
- Beau Simensen (simensen)
- Robert Kiss (kepten)
- - Maxime Steinhausser (ogizanagi)
- John Kary (johnkary)
- Ruben Gonzalez (rubenrua)
- Kim Hemsø Rasmussen (kimhemsoe)
@@ -234,11 +235,14 @@ Symfony is the result of the work of many people who made the code better
- Vitaliy Zakharov (zakharovvi)
- Tobias Sjösten (tobiassjosten)
- Gyula Sallai (salla)
+ - Alexander M. Turek (derrabus)
+ - Konstantin Myakshin (koc)
- Inal DJAFAR (inalgnu)
- Christian Gärtner (dagardner)
- Felix Labrecque
- Yaroslav Kiliba
- Sébastien Lavoie (lavoiesl)
+ - Stepan Anchugov (kix)
- Terje Bråten
- Kristen Gilden (kgilden)
- Robbert Klarenbeek (robbertkl)
@@ -275,6 +279,7 @@ Symfony is the result of the work of many people who made the code better
- Alessandro Desantis
- hubert lecorche (hlecorche)
- Marc Morales Valldepérez (kuert)
+ - Vadim Kharitonov (virtuozzz)
- Oscar Cubo Medina (ocubom)
- Karel Souffriau
- Christophe L. (christophelau)
@@ -295,10 +300,8 @@ Symfony is the result of the work of many people who made the code better
- Antonio J. García Lagar (ajgarlag)
- Olivier Dolbeau (odolbeau)
- Roumen Damianoff (roumen)
- - Konstantin Myakshin (koc)
- vagrant
- Asier Illarramendi (doup)
- - Alexander M. Turek (derrabus)
- Chris Sedlmayr (catchamonkey)
- Seb Koelen
- Daniel Wehner
@@ -306,7 +309,6 @@ Symfony is the result of the work of many people who made the code better
- Vitaliy Tverdokhlib (vitaliytv)
- Ariel Ferrandini (aferrandini)
- Dirk Pahl (dirkaholic)
- - Stepan Anchugov (kix)
- cedric lombardot (cedriclombardot)
- Jonas Flodén (flojon)
- Christian Schmidt
@@ -318,7 +320,6 @@ Symfony is the result of the work of many people who made the code better
- boombatower
- Fabrice Bernhard (fabriceb)
- Jérôme Macias (jeromemacias)
- - Vincent AUBERT (vincent)
- Fabian Lange (codingfabian)
- Yoshio HANAWA
- Tomasz Kowalczyk (thunderer)
@@ -336,6 +337,7 @@ Symfony is the result of the work of many people who made the code better
- Jerzy Zawadzki (jzawadzki)
- Evan S Kaufman (evanskaufman)
- mcben
+ - Jérôme Vieilledent (lolautruche)
- Maks Slesarenko
- mmoreram
- Markus Lanthaler (lanthaler)
@@ -371,13 +373,13 @@ Symfony is the result of the work of many people who made the code better
- Massimiliano Arione (garak)
- Ivan Rey (ivanrey)
- Marcin Chyłek (songoq)
- - Vadim Kharitonov (virtuozzz)
- Ned Schwartz
- Ziumin
- Lenar Lõhmus
- Zach Badgett (zachbadgett)
- Aurélien Fredouelle
- Pavel Campr (pcampr)
+ - Johnny Robeson (johnny)
- Disquedur
- Geoffrey Tran (geoff)
- Jan Behrens
@@ -405,6 +407,7 @@ Symfony is the result of the work of many people who made the code better
- Wang Jingyu
- Åsmund Garfors
- Maxime Douailin
+ - Gregor Harlan
- Javier López (loalf)
- Reinier Kip
- Dustin Dobervich (dustin10)
@@ -458,6 +461,7 @@ Symfony is the result of the work of many people who made the code better
- Alexander Volochnev (exelenz)
- Michael Piecko
- yclian
+ - Sebastian Grodzicki (sgrodzicki)
- Pascal Helfenstein
- Baldur Rensch (brensch)
- Alex Xandra Albert Sim
@@ -482,11 +486,11 @@ Symfony is the result of the work of many people who made the code better
- Andrew Hilobok (hilobok)
- Christian Soronellas (theunic)
- Yosmany Garcia (yosmanyga)
- - Jérôme Vieilledent (lolautruche)
- Degory Valentine
- Benoit Lévêque (benoit_leveque)
- Jeroen Fiege (fieg)
- Krzysiek Łabuś
+ - Nicolas Dewez (nicolas_dewez)
- Xavier Lacot (xavier)
- Olivier Maisonneuve (olineuve)
- Francis Turmel (fturmel)
@@ -494,6 +498,7 @@ Symfony is the result of the work of many people who made the code better
- Ben
- Jayson Xu (superjavason)
- Jaik Dean (jaikdean)
+ - fago
- Harm van Tilborg
- Jan Prieser
- Damien Alexandre (damienalexandre)
@@ -502,6 +507,7 @@ Symfony is the result of the work of many people who made the code better
- Christopher Hall (mythmakr)
- Paul Kamer (pkamer)
- Rafał Wrzeszcz (rafalwrzeszcz)
+ - Berny Cantos (xphere81)
- Reen Lokum
- Martin Parsiegla (spea)
- Quentin Schuler
@@ -531,6 +537,7 @@ Symfony is the result of the work of many people who made the code better
- corphi
- grizlik
- Derek ROTH
+ - Alain Hippolyte (aloneh)
- Shin Ohno (ganchiku)
- Geert De Deckere (geertdd)
- Jan Kramer (jankramer)
@@ -559,7 +566,6 @@ Symfony is the result of the work of many people who made the code better
- Maks
- Gábor Tóth
- Daniel Cestari
- - Johnny Robeson (johnny)
- Brunet Laurent (lbrunet)
- Magnus Nordlander (magnusnordlander)
- Mikhail Yurasov (mym)
@@ -572,6 +578,7 @@ Symfony is the result of the work of many people who made the code better
- Raul Fraile (raulfraile)
- sensio
- Patrick Kaufmann
+ - stefan.r
- Matthieu Napoli (mnapoli)
- Ben Ramsey (ramsey)
- Christian Jul Jensen
@@ -613,6 +620,7 @@ Symfony is the result of the work of many people who made the code better
- chispita
- Wojciech Sznapka
- Máximo Cuadros (mcuadros)
+ - Stefan Gehrig (sgehrig)
- Alex Bogomazov
- tamirvs
- julien.galenski
@@ -684,7 +692,6 @@ Symfony is the result of the work of many people who made the code better
- Gustavo Adrian
- Yannick
- Eduardo García Sanz (coma)
- - Sebastian Grodzicki (sgrodzicki)
- James Gilliland
- Michael Lee (zerustech)
- Roy Van Ginneken
@@ -725,7 +732,6 @@ Symfony is the result of the work of many people who made the code better
- Jeroen van den Enden (stoefke)
- origaminal
- Quique Porta (quiqueporta)
- - Gregor Harlan
- Tomasz Szymczyk (karion)
- ConneXNL
- Aharon Perkel
@@ -983,11 +989,13 @@ Symfony is the result of the work of many people who made the code better
- Mark de Haan (markdehaan)
- Dan Patrick (mdpatrick)
- Rares Vlaseanu (raresvla)
+ - Artur Melo (restless)
- Sofiane HADDAG (sofhad)
- tante kinast (tante)
- Vincent LEFORT (vlefort)
- Sadicov Vladimir (xtech)
- Alexander Zogheb
+ - Rémi Blaise
- Joel Marcey
- David Christmann
- root
@@ -1013,7 +1021,6 @@ Symfony is the result of the work of many people who made the code better
- Hein Zaw Htet™
- Ruben Kruiswijk
- Michael J
- - Berny Cantos
- Joseph Maarek
- Alex Pods
- timaschew
@@ -1024,6 +1031,7 @@ Symfony is the result of the work of many people who made the code better
- Filipe Guerra
- Gerben Wijnja
- Rowan Manning
+ - Per Modin
- David Windell
- Gabriel Birke
- Steffen Roßkamp
@@ -1176,6 +1184,7 @@ Symfony is the result of the work of many people who made the code better
- TeLiXj
- Oncle Tom
- Christian Stocker
+ - Dawid Nowak
- Karolis Daužickas
- tirnanog06
- phc
@@ -1189,10 +1198,10 @@ Symfony is the result of the work of many people who made the code better
- Andreas Forsblom (aforsblo)
- Alaattin Kahramanlar (alaattin)
- Alex Olmos (alexolmos)
- - Alain Hippolyte (aloneh)
- Antonio Mansilla (amansilla)
- Juan Ases García (ases)
- Daniel Basten (axhm3a)
+ - DUPUCH (bdupuch)
- Bill Hance (billhance)
- Bernd Matzner (bmatzner)
- Choong Wei Tjeng (choonge)
@@ -1231,6 +1240,7 @@ Symfony is the result of the work of many people who made the code better
- Ala Eddine Khefifi (nayzo)
- emilienbouard (neime)
- ollie harridge (ollietb)
+ - Paul Andrieux (paulandrieux)
- Paweł Szczepanek (pauluz)
- Christian López Espínola (penyaskito)
- Petr Jaroš (petajaros)
@@ -1250,6 +1260,7 @@ Symfony is the result of the work of many people who made the code better
- Julien Sanchez (sumbobyboys)
- Guillermo Gisinger (t3chn0r)
- Markus Tacker (tacker)
+ - Tomáš Votruba (tomas_votruba)
- Tyler Stroud (tystr)
- Moritz Kraft (userfriendly)
- Víctor Mateo (victormateo)
diff --git a/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd b/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd
index 0530a880e4..a582ff8b2b 100644
--- a/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd
+++ b/src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd
@@ -9,5 +9,6 @@
+
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php
index bf5e183caa..584e56b99a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php
@@ -56,7 +56,7 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
$command->setContainer($this->getContainer());
$application->add($command);
- return new CommandTester($application->find('router:debug'));
+ return new CommandTester($application->find('debug:router'));
}
private function getContainer()
@@ -65,11 +65,15 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
$routeCollection->add('foo', new Route('foo'));
$router = $this->getMock('Symfony\Component\Routing\RouterInterface');
$router
- ->expects($this->atLeastOnce())
+ ->expects($this->any())
->method('getRouteCollection')
->will($this->returnValue($routeCollection))
;
+ $loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader')
+ ->disableOriginalConstructor()
+ ->getMock();
+
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
$container
->expects($this->once())
@@ -77,12 +81,13 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
->with('router')
->will($this->returnValue(true))
;
+
$container
- ->expects($this->atLeastOnce())
->method('get')
- ->with('router')
- ->will($this->returnValue($router))
- ;
+ ->will($this->returnValueMap(array(
+ array('router', 1, $router),
+ array('controller_name_converter', 1, $loader),
+ )));
return $container;
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php
index 918ba02f6d..a1a661926c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php
@@ -74,19 +74,22 @@ class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue($requestContext))
;
+ $loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader')
+ ->disableOriginalConstructor()
+ ->getMock();
+
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
$container
->expects($this->once())
->method('has')
->with('router')
- ->will($this->returnValue(true))
- ;
- $container
- ->expects($this->atLeastOnce())
- ->method('get')
- ->with('router')
- ->will($this->returnValue($router))
- ;
+ ->will($this->returnValue(true));
+ $container->method('get')
+ ->will($this->returnValueMap(array(
+ array('router', 1, $router),
+ array('controller_name_converter', 1, $loader),
+
+ )));
return $container;
}
diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php
index 26c637cdf4..8b28042bd4 100644
--- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php
+++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php
@@ -12,7 +12,6 @@
namespace Symfony\Bundle\TwigBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
-use Symfony\Component\Config\Resource\DirectoryResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
@@ -75,26 +74,22 @@ class TwigExtension extends Extension
} else {
$twigFilesystemLoaderDefinition->addMethodCall('addPath', array($path, $namespace));
}
- $container->addResource(new DirectoryResource($path));
}
// register bundles as Twig namespaces
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/'.$bundle.'/views')) {
$this->addTwigPath($twigFilesystemLoaderDefinition, $dir, $bundle);
- $container->addResource(new DirectoryResource($dir));
}
$reflection = new \ReflectionClass($class);
if (is_dir($dir = dirname($reflection->getFilename()).'/Resources/views')) {
$this->addTwigPath($twigFilesystemLoaderDefinition, $dir, $bundle);
- $container->addResource(new DirectoryResource($dir));
}
}
if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/views')) {
$twigFilesystemLoaderDefinition->addMethodCall('addPath', array($dir));
- $container->addResource(new DirectoryResource($dir));
}
if (!empty($config['globals'])) {
diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php
index 8de10b4716..494cded85e 100644
--- a/src/Symfony/Component/Console/Output/StreamOutput.php
+++ b/src/Symfony/Component/Console/Output/StreamOutput.php
@@ -94,7 +94,7 @@ class StreamOutput extends Output
*/
protected function hasColorSupport()
{
- if (DIRECTORY_SEPARATOR == '\\') {
+ if (DIRECTORY_SEPARATOR === '\\') {
return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
}
diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php
index 918cbb98db..f0db5de6bc 100644
--- a/src/Symfony/Component/DependencyInjection/Container.php
+++ b/src/Symfony/Component/DependencyInjection/Container.php
@@ -76,6 +76,8 @@ class Container implements IntrospectableContainerInterface
protected $scopeStacks = array();
protected $loading = array();
+ private $underscoreMap = array('_' => '', '.' => '_', '\\' => '_');
+
/**
* Constructor.
*
@@ -211,7 +213,7 @@ class Container implements IntrospectableContainerInterface
$this->services[$id] = $service;
- if (method_exists($this, $method = 'synchronize'.strtr($id, array('_' => '', '.' => '_', '\\' => '_')).'Service')) {
+ if (method_exists($this, $method = 'synchronize'.strtr($id, $this->underscoreMap).'Service')) {
$this->$method();
}
@@ -235,17 +237,20 @@ class Container implements IntrospectableContainerInterface
*/
public function has($id)
{
- $id = strtolower($id);
-
- if ('service_container' === $id) {
- return true;
+ for ($i = 2;;) {
+ if ('service_container' === $id
+ || isset($this->aliases[$id])
+ || isset($this->services[$id])
+ || array_key_exists($id, $this->services)
+ ) {
+ return true;
+ }
+ if (--$i && $id !== $lcId = strtolower($id)) {
+ $id = $lcId;
+ } else {
+ return method_exists($this, 'get'.strtr($id, $this->underscoreMap).'Service');
+ }
}
-
- return isset($this->services[$id])
- || array_key_exists($id, $this->services)
- || isset($this->aliases[$id])
- || method_exists($this, 'get'.strtr($id, array('_' => '', '.' => '_', '\\' => '_')).'Service')
- ;
}
/**
@@ -273,10 +278,7 @@ class Container implements IntrospectableContainerInterface
// available services. Service IDs are case insensitive, however since
// this method can be called thousands of times during a request, avoid
// calling strtolower() unless necessary.
- foreach (array(false, true) as $strtolower) {
- if ($strtolower) {
- $id = strtolower($id);
- }
+ for ($i = 2;;) {
if ('service_container' === $id) {
return $this;
}
@@ -287,57 +289,60 @@ class Container implements IntrospectableContainerInterface
if (isset($this->services[$id]) || array_key_exists($id, $this->services)) {
return $this->services[$id];
}
- }
- if (isset($this->loading[$id])) {
- throw new ServiceCircularReferenceException($id, array_keys($this->loading));
- }
+ if (isset($this->loading[$id])) {
+ throw new ServiceCircularReferenceException($id, array_keys($this->loading));
+ }
- if (isset($this->methodMap[$id])) {
- $method = $this->methodMap[$id];
- } elseif (method_exists($this, $method = 'get'.strtr($id, array('_' => '', '.' => '_', '\\' => '_')).'Service')) {
- // $method is set to the right value, proceed
- } else {
- if (self::EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior) {
- if (!$id) {
- throw new ServiceNotFoundException($id);
- }
-
- $alternatives = array();
- foreach ($this->services as $key => $associatedService) {
- $lev = levenshtein($id, $key);
- if ($lev <= strlen($id) / 3 || false !== strpos($key, $id)) {
- $alternatives[] = $key;
+ if (isset($this->methodMap[$id])) {
+ $method = $this->methodMap[$id];
+ } elseif (--$i && $id !== $lcId = strtolower($id)) {
+ $id = $lcId;
+ continue;
+ } elseif (method_exists($this, $method = 'get'.strtr($id, $this->underscoreMap).'Service')) {
+ // $method is set to the right value, proceed
+ } else {
+ if (self::EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior) {
+ if (!$id) {
+ throw new ServiceNotFoundException($id);
}
+
+ $alternatives = array();
+ foreach ($this->services as $key => $associatedService) {
+ $lev = levenshtein($id, $key);
+ if ($lev <= strlen($id) / 3 || false !== strpos($key, $id)) {
+ $alternatives[] = $key;
+ }
+ }
+
+ throw new ServiceNotFoundException($id, null, null, $alternatives);
}
- throw new ServiceNotFoundException($id, null, null, $alternatives);
- }
-
- return;
- }
-
- $this->loading[$id] = true;
-
- try {
- $service = $this->$method();
- } catch (\Exception $e) {
- unset($this->loading[$id]);
-
- if (array_key_exists($id, $this->services)) {
- unset($this->services[$id]);
- }
-
- if ($e instanceof InactiveScopeException && self::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) {
return;
}
- throw $e;
+ $this->loading[$id] = true;
+
+ try {
+ $service = $this->$method();
+ } catch (\Exception $e) {
+ unset($this->loading[$id]);
+
+ if (array_key_exists($id, $this->services)) {
+ unset($this->services[$id]);
+ }
+
+ if ($e instanceof InactiveScopeException && self::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) {
+ return;
+ }
+
+ throw $e;
+ }
+
+ unset($this->loading[$id]);
+
+ return $service;
}
-
- unset($this->loading[$id]);
-
- return $service;
}
/**
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
index 2ce50ee5f9..dd8358e929 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
@@ -322,7 +322,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
$container->enterScope('foo');
$scoped2 = $container->get('scoped');
- $scoped3 = $container->get('scoped');
+ $scoped3 = $container->get('SCOPED');
$scopedFoo2 = $container->get('scoped_foo');
$container->leaveScope('foo');
diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php
index 93048c408b..c58f0f03b7 100644
--- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php
+++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php
@@ -76,6 +76,10 @@ abstract class Bundle extends ContainerAware implements BundleInterface
if (class_exists($class)) {
$extension = new $class();
+ if (!$extension instanceof ExtensionInterface) {
+ throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', $class));
+ }
+
// check naming convention
$basename = preg_replace('/Bundle$/', '', $this->getName());
$expectedAlias = Container::underscore($basename);
diff --git a/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php b/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php
index 3309c2bef9..3ff01ee1a3 100644
--- a/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php
+++ b/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php
@@ -57,7 +57,7 @@ class FragmentListener implements EventSubscriberInterface
{
$request = $event->getRequest();
- if ($this->fragmentPath !== rawurldecode($request->getPathInfo())) {
+ if ($request->attributes->has('_controller') || $this->fragmentPath !== rawurldecode($request->getPathInfo())) {
return;
}
diff --git a/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php b/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php
index 1a1b30097c..c9059a74a1 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php
@@ -11,6 +11,7 @@
namespace Symfony\Component\HttpKernel\Tests\Bundle;
+use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionNotValidBundle\ExtensionNotValidBundle;
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle;
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle;
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand;
@@ -30,4 +31,14 @@ class BundleTest extends \PHPUnit_Framework_TestCase
$this->assertNull($bundle2->registerCommands($app));
}
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface
+ */
+ public function testGetContainerExtensionWithInvalidClass()
+ {
+ $bundle = new ExtensionNotValidBundle();
+ $bundle->getContainerExtension();
+ }
}
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php
index 7ddb2fbbf2..18edee6123 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php
@@ -34,6 +34,22 @@ class FragmentListenerTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($request->query->has('_path'));
}
+
+ public function testOnlyTriggeredIfControllerWasNotDefinedYet()
+ {
+ $request = Request::create('http://example.com/_fragment?_path=foo%3Dbar%26_controller%3Dfoo');
+ $request->attributes->set('_controller', 'bar');
+
+ $listener = new FragmentListener(new UriSigner('foo'));
+ $event = $this->createGetResponseEvent($request, HttpKernelInterface::SUB_REQUEST);
+
+ $expected = $request->attributes->all();
+
+ $listener->onKernelRequest($event);
+
+ $this->assertEquals($expected, $request->attributes->all());
+ }
+
/**
* @expectedException \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
*/
@@ -74,8 +90,8 @@ class FragmentListenerTest extends \PHPUnit_Framework_TestCase
$this->assertFalse($request->query->has('_path'));
}
- private function createGetResponseEvent(Request $request)
+ private function createGetResponseEvent(Request $request, $requestType = HttpKernelInterface::MASTER_REQUEST)
{
- return new GetResponseEvent($this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $request, HttpKernelInterface::MASTER_REQUEST);
+ return new GetResponseEvent($this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $request, $requestType);
}
}
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection/ExtensionNotValidExtension.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection/ExtensionNotValidExtension.php
new file mode 100644
index 0000000000..0fd64316fb
--- /dev/null
+++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection/ExtensionNotValidExtension.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionNotValidBundle\DependencyInjection;
+
+class ExtensionNotValidExtension
+{
+ public function getAlias()
+ {
+ return 'extension_not_valid';
+ }
+}
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/ExtensionNotValidBundle.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/ExtensionNotValidBundle.php
new file mode 100644
index 0000000000..34e2920392
--- /dev/null
+++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionNotValidBundle/ExtensionNotValidBundle.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionNotValidBundle;
+
+use Symfony\Component\HttpKernel\Bundle\Bundle;
+
+class ExtensionNotValidBundle extends Bundle
+{
+}
diff --git a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
index 4253d3dd0e..c8e83d1f79 100644
--- a/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
+++ b/src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
@@ -59,7 +59,7 @@ class PropertyNormalizer extends AbstractNormalizer
}
// Override visibility
- if (! $property->isPublic()) {
+ if (!$property->isPublic()) {
$property->setAccessible(true);
}
@@ -111,7 +111,7 @@ class PropertyNormalizer extends AbstractNormalizer
$property = $reflectionClass->getProperty($propertyName);
// Override visibility
- if (! $property->isPublic()) {
+ if (!$property->isPublic()) {
$property->setAccessible(true);
}
@@ -151,7 +151,7 @@ class PropertyNormalizer extends AbstractNormalizer
// We look for at least one non-static property
foreach ($class->getProperties() as $property) {
- if (! $property->isStatic()) {
+ if (!$property->isStatic()) {
return true;
}
}
diff --git a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php
index 99761e7f24..d2b5407f82 100644
--- a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php
+++ b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php
@@ -148,7 +148,7 @@ class XliffFileLoader implements LoaderInterface
$source = str_replace('http://www.w3.org/2001/xml.xsd', $location, $source);
if (!@$dom->schemaValidateSource($source)) {
- throw new InvalidResourceException(implode("\n", $this->getXmlErrors($internalErrors)));
+ throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $file, implode("\n", $this->getXmlErrors($internalErrors))));
}
$dom->normalizeDocument();
diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf
index b448c2e31f..4950e0ccd1 100644
--- a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf
+++ b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf
@@ -278,6 +278,38 @@
This value should not be identical to {{ compared_value_type }} {{ compared_value }}.القيمة يجب ان لا تطابق {{ compared_value_type }} {{ compared_value }}.
+
+ The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.
+ نسبة العرض على الارتفاع للصورة كبيرة جدا ({{ ratio }}). الحد الأقصى للنسبة المسموح به هو {{ max_ratio }}.
+
+
+ The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.
+ نسبة العرض على الارتفاع للصورة صغيرة جدا ({{ ratio }}). الحد الأدنى للنسبة المسموح به هو {{ max_ratio }}.
+
+
+ The image is square ({{ width }}x{{ height }}px). Square images are not allowed.
+ الصورة مربعة ({{ width }}x{{ height }}px). الصور المربعة غير مسموح بها.
+
+
+ The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.
+ الصورة في وضع أفقي ({{ width }}x{{ height }}px). الصور في وضع أفقي غير مسموح بها.
+
+
+ The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.
+ الصورة في وضع عمودي ({{ width }}x{{ height }}px). الصور في وضع عمودي غير مسموح بها.
+
+
+ An empty file is not allowed.
+ ملف فارغ غير مسموح به.
+
+
+ The host could not be resolved.
+ يتعذر الإتصال بالنطاق.
+
+
+ This value does not match the expected {{ charset }} charset.
+ هذه القيمة غير متطابقة مع صيغة التحويل {{ charset }}.
+