diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md
index 2d7bfd9f74dd6..70677f3d18e3d 100644
--- a/CHANGELOG-2.7.md
+++ b/CHANGELOG-2.7.md
@@ -7,6 +7,27 @@ 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.44 (2018-04-02)
+
+ * bug #26727 [HttpCache] Unlink tmp file on error (Chansig)
+ * bug #26675 [HttpKernel] DumpDataCollector: do not flush when a dumper is provided (ogizanagi)
+ * bug #26663 [TwigBridge] Fix rendering of currency by MoneyType (ro0NL)
+ * bug #26677 Support phpdbg SAPI in Debug::enable() (hkdobrev)
+ * bug #26621 [Form] no type errors with invalid submitted data types (xabbuh)
+ * bug #26337 [Finder] Fixed leading/trailing / in filename (lyrixx)
+ * bug #26584 [TwigBridge] allow html5 compatible rendering of forms with null names (systemist)
+ * bug #24401 [Form] Change datetime to datetime-local for HTML5 datetime input (pierredup)
+ * bug #26370 [Security] added userChecker to SimpleAuthenticationProvider (i3or1s)
+ * bug #26569 [BrowserKit] Fix cookie path handling when $domain is null (dunglas)
+ * bug #26598 Fixes #26563 (open_basedir restriction in effect) (temperatur)
+ * bug #26568 [Debug] Reset previous exception handler earlier to prevent infinite loop (nicolas-grekas)
+ * bug #26567 [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore (fancyweb)
+ * bug #26356 [FrameworkBundle] HttpCache is not longer abstract (lyrixx)
+ * bug #26548 [DomCrawler] Change bad wording in ChoiceFormField::untick (dunglas)
+ * bug #26433 [DomCrawler] extract(): fix a bug when the attribute list is empty (dunglas)
+ * bug #26452 [Intl] Load locale aliases to support alias fallbacks (jakzal)
+ * bug #26450 [CssSelector] Fix CSS identifiers parsing - they can start with dash (jakubkulhan)
+
* 2.7.43 (2018-03-05)
* bug #26368 [WebProfilerBundle] Fix Debug toolbar breaks app (xkobal)
diff --git a/CHANGELOG-2.8.md b/CHANGELOG-2.8.md
index e933be2021abd..e53256bdc8327 100644
--- a/CHANGELOG-2.8.md
+++ b/CHANGELOG-2.8.md
@@ -7,6 +7,14 @@ in 2.8 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.8.0...v2.8.1
+* 2.8.38 (2018-04-06)
+
+ * bug #26788 [Security] Load the user before pre/post auth checks when needed (chalasr)
+ * bug #26774 [SecurityBundle] Add missing argument to security.authentication.provider.simple (i3or1s, chalasr)
+ * bug #26763 [Finder] Remove duplicate slashes in filenames (helhum)
+ * bug #26749 Add PHPDbg support to HTTP components (hkdobrev)
+ * bug #26609 [Console] Fix check of color support on Windows (mlocati)
+
* 2.8.37 (2018-04-02)
* bug #26727 [HttpCache] Unlink tmp file on error (Chansig)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 1034172772791..1cb4373ec2030 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -27,8 +27,8 @@ Symfony is the result of the work of many people who made the code better
- Pascal Borreli (pborreli)
- Wouter De Jong (wouterj)
- Joseph Bielawski (stloyd)
- - Karma Dordrak (drak)
- Roland Franssen (ro0)
+ - Karma Dordrak (drak)
- Lukas Kahwe Smith (lsmith)
- Martin Hasoň (hason)
- Jeremy Mikola (jmikola)
@@ -40,10 +40,10 @@ Symfony is the result of the work of many people who made the code better
- Guilhem Niot (energetick)
- Sarah Khalil (saro0h)
- Jonathan Wage (jwage)
+ - Hamza Amrouche (simperfit)
- Diego Saint Esteben (dosten)
- Alexandre Salomé (alexandresalome)
- William Durand (couac)
- - Hamza Amrouche (simperfit)
- ornicar
- Francis Besset (francisbesset)
- Iltar van der Berg (kjarli)
@@ -54,19 +54,20 @@ Symfony is the result of the work of many people who made the code better
- Peter Rehm (rpet)
- Saša Stamenković (umpirsky)
- Matthias Pigulla (mpdude)
+ - Samuel ROZE (sroze)
- Henrik Bjørnskov (henrikbjorn)
+ - Dany Maillard (maidmaid)
- Miha Vrhovnik
- - Diego Saint Esteben (dii3g0)
- Pierre du Plessis (pierredup)
- - Dany Maillard (maidmaid)
+ - Tobias Nyholm (tobias)
+ - Diego Saint Esteben (dii3g0)
- Konstantin Kudryashov (everzet)
- Kevin Bond (kbond)
- Bilal Amarni (bamarni)
- Alexander M. Turek (derrabus)
- Jérémy DERUSSÉ (jderusse)
- Florin Patan (florinpatan)
- - Samuel ROZE (sroze)
- - Tobias Nyholm (tobias)
+ - Mathieu Piot (mpiot)
- Gábor Egyed (1ed)
- Michel Weimerskirch (mweimerskirch)
- Andrej Hudec (pulzarraider)
@@ -97,9 +98,9 @@ Symfony is the result of the work of many people who made the code better
- Antoine Hérault (herzult)
- Paráda József (paradajozsef)
- David Maicher (dmaicher)
+ - Vladimir Reznichenko (kalessil)
- Arnaud Le Blanc (arnaud-lb)
- Maxime STEINHAUSSER
- - Vladimir Reznichenko (kalessil)
- Michal Piotrowski (eventhorizon)
- Tim Nagel (merk)
- Brice BERNARD (brikou)
@@ -143,22 +144,23 @@ Symfony is the result of the work of many people who made the code better
- Jérôme Vasseur (jvasseur)
- Jérémie Augustin (jaugustin)
- Andréia Bohner (andreia)
+ - Philipp Wahala (hifi)
- Julien Falque (julienfalque)
- Rafael Dohms (rdohms)
- Arnaud Kleinpeter (nanocom)
- jwdeitch
- Mikael Pajunen
- Joel Wurtz (brouznouf)
+ - Valentin Udaltsov (vudaltsov)
- Chris Wilkinson (thewilkybarkid)
- Oleg Voronkovich
- - Philipp Wahala (hifi)
- Vyacheslav Pavlov
- Richard van Laak (rvanlaak)
- Richard Shank (iampersistent)
- Thomas Rabaix (rande)
+ - gadelat (gadelat)
- Rouven Weßling (realityking)
- Teoh Han Hui (teohhanhui)
- - Valentin Udaltsov (vudaltsov)
- Clemens Tolboom
- Helmer Aaviksoo
- Hiromi Hishida (77web)
@@ -171,6 +173,7 @@ Symfony is the result of the work of many people who made the code better
- GDIBass
- jeremyFreeAgent (Jérémy Romey) (jeremyfreeagent)
- James Halsall (jaitsu)
+ - Matthieu Napoli (mnapoli)
- Gabriel Caruso
- Warnar Boekkooi (boekkooi)
- Dmitrii Chekaliuk (lazyhammer)
@@ -180,10 +183,10 @@ Symfony is the result of the work of many people who made the code better
- Dorian Villet (gnutix)
- Sergey Linnik (linniksa)
- Richard Miller (mr_r_miller)
+ - Gabriel Ostrolucký
- Mario A. Alvarez Garcia (nomack84)
- Dennis Benkert (denderello)
- SpacePossum
- - Matthieu Napoli (mnapoli)
- Benjamin Dulau (dbenjamin)
- Mathieu Lemoine (lemoinem)
- Christian Schmidt
@@ -194,7 +197,6 @@ Symfony is the result of the work of many people who made the code better
- bronze1man
- sun (sun)
- Larry Garfield (crell)
- - Gabriel Ostrolucký
- Martin Schuhfuß (usefulthink)
- apetitpa
- Matthieu Bontemps (mbontemps)
@@ -216,6 +218,7 @@ Symfony is the result of the work of many people who made the code better
- Michele Orselli (orso)
- Tom Van Looy (tvlooy)
- Sven Paulus (subsven)
+ - Thomas Calvet (fancyweb)
- Rui Marinho (ruimarinho)
- Niels Keurentjes (curry684)
- Eugene Wissner
@@ -223,7 +226,6 @@ Symfony is the result of the work of many people who made the code better
- Tristan Darricau (nicofuma)
- Michaël Perrin (michael.perrin)
- Marcel Beerta (mazen)
- - gadelat (gadelat)
- Loïc Faugeron
- Hidde Wieringa (hiddewie)
- Marco Pivetta (ocramius)
@@ -242,14 +244,15 @@ Symfony is the result of the work of many people who made the code better
- Danny Berger (dpb587)
- Ruben Gonzalez (rubenrua)
- Adam Prager (padam87)
+ - Benoît Burnichon (bburnichon)
- Roman Marintšenko (inori)
- Xavier Montaña Carreras (xmontana)
- Mickaël Andrieu (mickaelandrieu)
- Xavier Perez
- Arjen Brouwer (arjenjb)
- Katsuhiro OGAWA
- - Thomas Calvet (fancyweb)
- Patrick McDougle (patrick-mcdougle)
+ - Yanick Witschi (toflar)
- Alif Rachmawadi
- Alessandro Chitolina
- Kristen Gilden (kgilden)
@@ -288,7 +291,6 @@ Symfony is the result of the work of many people who made the code better
- Robert Kiss (kepten)
- Roumen Damianoff (roumen)
- Antonio J. García Lagar (ajgarlag)
- - Benoît Burnichon (bburnichon)
- Kim Hemsø Rasmussen (kimhemsoe)
- Wouter Van Hecke
- Jérôme Parmentier (lctrs)
@@ -297,7 +299,6 @@ Symfony is the result of the work of many people who made the code better
- Michael Holm (hollo)
- Marc Weistroff (futurecat)
- Christian Schmidt
- - Yanick Witschi (toflar)
- Edi Modrić (emodric)
- Chad Sikorra (chadsikorra)
- Chris Smith (cs278)
@@ -331,6 +332,7 @@ Symfony is the result of the work of many people who made the code better
- janschoenherr
- Thomas Schulz (king2500)
- Dariusz Rumiński
+ - Frank de Jonge (frenkynet)
- Berny Cantos (xphere81)
- Thierry Thuon (lepiaf)
- Ricard Clau (ricardclau)
@@ -349,6 +351,7 @@ Symfony is the result of the work of many people who made the code better
- Inal DJAFAR (inalgnu)
- Christian Gärtner (dagardner)
- Tomasz Kowalczyk (thunderer)
+ - Artur Eshenbrener
- François-Xavier de Guillebon (de-gui_f)
- Damien Alexandre (damienalexandre)
- Felix Labrecque
@@ -368,6 +371,7 @@ Symfony is the result of the work of many people who made the code better
- Philipp Kräutli (pkraeutli)
- Kirill chEbba Chebunin (chebba)
- Greg Thornton (xdissent)
+ - Florent Mata (fmata)
- Costin Bereveanu (schniper)
- Loïc Chardonnet (gnusat)
- Marek Kalnik (marekkalnik)
@@ -408,7 +412,6 @@ Symfony is the result of the work of many people who made the code better
- Emanuele Gaspari (inmarelibero)
- Sébastien Santoro (dereckson)
- Brian King
- - Frank de Jonge (frenkynet)
- Michel Salib (michelsalib)
- geoffrey
- Steffen Roßkamp
@@ -446,7 +449,6 @@ Symfony is the result of the work of many people who made the code better
- Marek Pietrzak
- Luc Vieillescazes (iamluc)
- franek (franek)
- - Artur Eshenbrener
- Christian Wahler
- Gintautas Miselis
- Rob Bast
@@ -482,7 +484,6 @@ Symfony is the result of the work of many people who made the code better
- Roy Van Ginneken (rvanginneken)
- ondrowan
- Barry vd. Heuvel (barryvdh)
- - Florent Mata
- Evan S Kaufman (evanskaufman)
- mcben
- Jérôme Vieilledent (lolautruche)
@@ -550,11 +551,13 @@ Symfony is the result of the work of many people who made the code better
- Michiel Boeckaert (milio)
- Geoffrey Tran (geoff)
- Romain Pierre (romain-pierre)
+ - David Prévot
- Jan Behrens
- Mantas Var (mvar)
- Sebastian Krebs
- Jean-Christophe Cuvelier [Artack]
- alcaeus
+ - Fred Cox
- vitaliytv
- Dalibor Karlović (dkarlovi)
- Sebastian Blum
@@ -585,6 +588,7 @@ Symfony is the result of the work of many people who made the code better
- Javier López (loalf)
- Reinier Kip
- Geoffrey Brier (geoffrey-brier)
+ - Boris Vujicic (boris.vujicic)
- Dustin Dobervich (dustin10)
- dantleech
- Anne-Sophie Bachelard (annesophie)
@@ -685,6 +689,7 @@ Symfony is the result of the work of many people who made the code better
- Joshua Nye
- Claudio Zizza
- Dave Marshall (davedevelopment)
+ - Jakub Kulhan (jakubkulhan)
- avorobiev
- Venu
- Lars Vierbergen
@@ -750,6 +755,7 @@ Symfony is the result of the work of many people who made the code better
- Sofiane HADDAG (sofhad)
- frost-nzcr4
- Bozhidar Hristov
+ - andrey1s
- Abhoryo
- Fabian Vogler (fabian)
- Korvin Szanto
@@ -848,6 +854,7 @@ Symfony is the result of the work of many people who made the code better
- Mátyás Somfai (smatyas)
- stefan.r
- Valérian Galliat
+ - d-ph
- Rikijs Murgs
- Ben Ramsey (ramsey)
- Amaury Leroux de Lens (amo__)
@@ -923,17 +930,16 @@ Symfony is the result of the work of many people who made the code better
- AKeeman (akeeman)
- Lin Clark
- Jeremy David (jeremy.david)
+ - Gocha Ossinkine (ossinkine)
- Troy McCabe
- Ville Mattila
- ilyes kooli
- gr1ev0us
- mlazovla
- - Boris Vujicic (boris.vujicic)
- Max Beutel
- Antanas Arvasevicius
- Maximilian Berghoff (electricmaxxx)
- nacho
- - Mathieu Piot
- Piotr Antosik (antek88)
- Artem Lopata
- Sergey Novikov (s12v)
@@ -980,10 +986,12 @@ Symfony is the result of the work of many people who made the code better
- Jhonny Lidfors (jhonny)
- Julien Bianchi (jubianchi)
- Robert Meijers
+ - James Sansbury
- Marcin Chwedziak
- hjkl
- Tony Cosentino (tony-co)
- Dan Wilga
+ - Andrew Tch
- Alexander Cheprasov
- Rodrigo Díez Villamuera (rodrigodiez)
- Malte Blättermann
@@ -1069,7 +1077,6 @@ Symfony is the result of the work of many people who made the code better
- Sergey Yuferev
- Tobias Stöckler
- Mario Young
- - Jakub Kulhan
- Ilia (aliance)
- Mo Di (modi)
- Pablo Schläpfer
@@ -1151,6 +1158,7 @@ Symfony is the result of the work of many people who made the code better
- Andreas Frömer
- Philip Frank
- Lance McNearney
+ - Antoine M (amakdessi)
- Gonzalo Vilaseca (gonzalovilaseca)
- Giorgio Premi
- Ian Carroll
@@ -1217,6 +1225,7 @@ Symfony is the result of the work of many people who made the code better
- Qingshan Luo
- Ergie Gonzaga
- Matthew J Mucklo
+ - AnrDaemon
- fdgdfg (psampaz)
- Stéphane Seng
- Maxwell Vandervelde
@@ -1282,6 +1291,7 @@ Symfony is the result of the work of many people who made the code better
- Przemysław Piechota (kibao)
- Leonid Terentyev (li0n)
- ryunosuke
+ - zenmate
- victoria
- Christian Schmidt
- Francisco Facioni (fran6co)
@@ -1305,6 +1315,7 @@ Symfony is the result of the work of many people who made the code better
- Vasily Khayrulin (sirian)
- Stefan Koopmanschap (skoop)
- Stefan Hüsges (tronsha)
+ - Jake Bishop (yakobeyak)
- Dan Blows
- Matt Wells
- Nicolas Appriou
@@ -1397,7 +1408,6 @@ Symfony is the result of the work of many people who made the code better
- Artem Lopata (bumz)
- Nicole Cordes
- Roman Orlov
- - andrey1s
- VolCh
- Alexey Popkov
- Gijs Kunze
@@ -1408,6 +1418,7 @@ Symfony is the result of the work of many people who made the code better
- Daan van Renterghem
- Nicole Cordes
- Martin Kirilov
+ - amcastror
- Bram Van der Sype (brammm)
- Guile (guile)
- Julien Moulin (lizjulien)
@@ -1485,6 +1496,7 @@ Symfony is the result of the work of many people who made the code better
- grifx
- Robert Campbell
- Matt Lehner
+ - Helmut Januschka
- Hein Zaw Htet™
- Ruben Kruiswijk
- Cosmin-Romeo TANASE
@@ -1495,12 +1507,15 @@ Symfony is the result of the work of many people who made the code better
- hadriengem
- timaschew
- Jochen Mandl
+ - Marin Nicolae
+ - Alessandro Loffredo
- Ian Phillips
- Haritz
- Matthieu Prat
- Ion Bazan
- Grummfy
- Filipe Guerra
+ - Jean Ragouin
- Gerben Wijnja
- Rowan Manning
- Per Modin
@@ -1615,6 +1630,7 @@ Symfony is the result of the work of many people who made the code better
- Ron Gähler
- Edwin Hageman
- Mantas Urnieža
+ - temperatur
- Cas
- Dusan Kasan
- Myke79
@@ -1646,6 +1662,7 @@ Symfony is the result of the work of many people who made the code better
- Jörg Rühl
- wesleyh
- sergey
+ - Daniel Bannert
- Karim Miladi
- Michael Genereux
- patrick-mcdougle
@@ -1670,8 +1687,10 @@ Symfony is the result of the work of many people who made the code better
- Guillaume Aveline
- Adrian Philipp
- James Michael DuPont
+ - Tim Goudriaan
- Kasperki
- Tammy D
+ - Daniel STANCU
- Ondrej Slinták
- vlechemin
- Brian Corrigan
@@ -1704,12 +1723,14 @@ Symfony is the result of the work of many people who made the code better
- Elan Ruusamäe
- Thorsten Hallwas
- Michael Squires
+ - Egor Gorbachev
- Derek Stephen McLean
- Norman Soetbeer
- zorn
- Yuriy Potemkin
- Benjamin Long
- Matt Janssen
+ - Ben Miller
- Peter Gribanov
- Ben Johnson
- kwiateusz
@@ -1858,6 +1879,7 @@ Symfony is the result of the work of many people who made the code better
- drublic
- Andreas Streichardt
- Pascal Hofmann
+ - Stefan Kruppa
- smokeybear87
- Gustavo Adrian
- Kevin Weber
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php
index 9ff906ad91ba7..533560d6d986d 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.php
@@ -116,7 +116,7 @@ private function determineEntryPoint($defaultEntryPointId, array $config)
// we have multiple entry points - we must ask them to configure one
throw new \LogicException(sprintf(
- 'Because you have multiple guard configurators, you need to set the "guard.entry_point" key to one of you configurators (%s)',
+ 'Because you have multiple guard configurators, you need to set the "guard.entry_point" key to one of your configurators (%s)',
implode(', ', $authenticatorIds)
));
}
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimplePreAuthenticationFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimplePreAuthenticationFactory.php
index 27d8c5f050ec5..c1c6e48083856 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimplePreAuthenticationFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SimplePreAuthenticationFactory.php
@@ -49,6 +49,7 @@ public function create(ContainerBuilder $container, $id, $config, $userProvider,
->replaceArgument(0, new Reference($config['authenticator']))
->replaceArgument(1, new Reference($userProvider))
->replaceArgument(2, $id)
+ ->replaceArgument(3, new Reference('security.user_checker.'.$id))
;
// listener
diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml
index 4f3515c3ac3b2..f7462045724b3 100644
--- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml
@@ -236,6 +236,7 @@
+ null
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php
index 0c4c78a1383fe..5a504dd2eaf01 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php
@@ -101,6 +101,13 @@ public function testFirewalls()
'security.authentication.listener.anonymous.with_user_checker',
'security.access_listener',
),
+ array(
+ 'security.channel_listener',
+ 'security.context_listener.2',
+ 'security.authentication.listener.simple_form.simple_auth',
+ 'security.authentication.listener.anonymous.simple_auth',
+ 'security.access_listener',
+ ),
), $listeners);
}
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php
index fc9b07c4f18b2..54ac7b20c47f5 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php
@@ -86,6 +86,11 @@
'anonymous' => true,
'http_basic' => true,
),
+ 'simple_auth' => array(
+ 'provider' => 'default',
+ 'anonymous' => true,
+ 'simple_form' => array('authenticator' => 'simple_authenticator'),
+ ),
),
'access_control' => array(
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml
index 19167551025e2..1e48c428000ec 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml
@@ -71,6 +71,11 @@
app.user_checker
+
+
+
+
+
ROLE_USERROLE_USER,ROLE_ADMIN,ROLE_ALLOWED_TO_SWITCHROLE_USER,ROLE_ADMIN
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
index e8ed61ef031b9..46dd08f8ce948 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
@@ -70,6 +70,11 @@ security:
http_basic: ~
user_checker: app.user_checker
+ simple_auth:
+ provider: default
+ anonymous: ~
+ simple_form: { authenticator: simple_authenticator }
+
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php
index 324323be2723d..37bb164ff6501 100644
--- a/src/Symfony/Component/Console/Output/StreamOutput.php
+++ b/src/Symfony/Component/Console/Output/StreamOutput.php
@@ -83,17 +83,26 @@ protected function doWrite($message, $newline)
*
* Colorization is disabled if not supported by the stream:
*
- * - Windows != 10.0.10586 without Ansicon, ConEmu or Mintty
+ * - the stream is redirected (eg php file.php >log)
+ * - Windows without VT100 support, Ansicon, ConEmu, Mintty
* - non tty consoles
*
* @return bool true if the stream supports colorization, false otherwise
*/
protected function hasColorSupport()
{
+ if (function_exists('stream_isatty') && !@stream_isatty($this->stream)) {
+ return false;
+ }
if (DIRECTORY_SEPARATOR === '\\') {
+ if (function_exists('sapi_windows_vt100_support')) {
+ $vt100Enabled = @sapi_windows_vt100_support($this->stream);
+ } else {
+ $vt100Enabled = '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD;
+ }
+
return
- function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support($this->stream)
- || '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD
+ $vt100Enabled
|| false !== getenv('ANSICON')
|| 'ON' === getenv('ConEmuANSI')
|| 'xterm' === getenv('TERM');
diff --git a/src/Symfony/Component/Debug/Debug.php b/src/Symfony/Component/Debug/Debug.php
index 558871e7c3d7c..c67a65c4066f7 100644
--- a/src/Symfony/Component/Debug/Debug.php
+++ b/src/Symfony/Component/Debug/Debug.php
@@ -45,7 +45,7 @@ public static function enable($errorReportingLevel = null, $displayErrors = true
error_reporting(-1);
}
- if (!in_array(PHP_SAPI, array('cli', 'phpdbg'))) {
+ if (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true)) {
ini_set('display_errors', 0);
ExceptionHandler::register();
} elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) {
diff --git a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
index 23849168d1b4c..1d1c3da99c4a9 100644
--- a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
+++ b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
@@ -168,7 +168,7 @@ public function testStopEventPropagation()
// be executed
// Manually set priority to enforce $this->listener to be called first
$this->dispatcher->addListener('post.foo', array($this->listener, 'postFoo'), 10);
- $this->dispatcher->addListener('post.foo', array($otherListener, 'preFoo'));
+ $this->dispatcher->addListener('post.foo', array($otherListener, 'postFoo'));
$this->dispatcher->dispatch(self::postFoo);
$this->assertTrue($this->listener->postFooInvoked);
$this->assertFalse($otherListener->postFooInvoked);
diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php
index 2cdc3f51cd738..0c039ae6666d0 100644
--- a/src/Symfony/Component/Finder/Finder.php
+++ b/src/Symfony/Component/Finder/Finder.php
@@ -650,9 +650,9 @@ public function in($dirs)
foreach ((array) $dirs as $dir) {
if (is_dir($dir)) {
- $resolvedDirs[] = $dir;
+ $resolvedDirs[] = $this->normalizeDir($dir);
} elseif ($glob = glob($dir, (defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) {
- $resolvedDirs = array_merge($resolvedDirs, $glob);
+ $resolvedDirs = array_merge($resolvedDirs, array_map(array($this, 'normalizeDir'), $glob));
} else {
throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));
}
@@ -901,4 +901,16 @@ private function initDefaultAdapters()
;
}
}
+
+ /**
+ * Normalizes given directory names by removing trailing slashes.
+ *
+ * @param string $dir
+ *
+ * @return string
+ */
+ private function normalizeDir($dir)
+ {
+ return rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
+ }
}
diff --git a/src/Symfony/Component/Finder/SplFileInfo.php b/src/Symfony/Component/Finder/SplFileInfo.php
index 2cf3a27fa9f6b..19f95e26be69a 100644
--- a/src/Symfony/Component/Finder/SplFileInfo.php
+++ b/src/Symfony/Component/Finder/SplFileInfo.php
@@ -28,7 +28,7 @@ class SplFileInfo extends \SplFileInfo
*/
public function __construct($file, $relativePath, $relativePathname)
{
- parent::__construct(realpath($file) ?: $file);
+ parent::__construct($file);
$this->relativePath = $relativePath;
$this->relativePathname = $relativePathname;
}
diff --git a/src/Symfony/Component/Finder/Tests/BsdFinderTest.php b/src/Symfony/Component/Finder/Tests/BsdFinderTest.php
index a7d800616625f..9b8244810be4b 100644
--- a/src/Symfony/Component/Finder/Tests/BsdFinderTest.php
+++ b/src/Symfony/Component/Finder/Tests/BsdFinderTest.php
@@ -19,6 +19,16 @@
*/
class BsdFinderTest extends FinderTest
{
+ public function testSymlinksNotResolved()
+ {
+ $this->markTestSkipped('Symlinks are always resolved using the BsdFinderAdapter.');
+ }
+
+ public function testBackPathNotNormalized()
+ {
+ $this->markTestSkipped('Paths are always normalized using the BsdFinderAdapter.');
+ }
+
protected function buildFinder()
{
$adapter = new BsdFindAdapter();
diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php
index da259fbf830da..2f20af02cfcca 100644
--- a/src/Symfony/Component/Finder/Tests/FinderTest.php
+++ b/src/Symfony/Component/Finder/Tests/FinderTest.php
@@ -50,15 +50,40 @@ public function testFiles()
public function testRemoveTrailingSlash()
{
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $this->markTestSkipped('This test cannot be run on Windows.');
+ $finder = $this->buildFinder();
+
+ $expected = $this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar'));
+ $in = self::$tmpDir.'//';
+
+ $this->assertIterator($expected, $finder->in($in)->files()->getIterator());
+ }
+
+ public function testSymlinksNotResolved()
+ {
+ if ('\\' === DIRECTORY_SEPARATOR) {
+ $this->markTestSkipped('symlinks are not supported on Windows');
}
$finder = $this->buildFinder();
- $expected = $this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar'));
- $in = '//'.realpath(self::$tmpDir).'//';
+ symlink($this->toAbsolute('foo'), $this->toAbsolute('baz'));
+ $expected = $this->toAbsolute(array('baz/bar.tmp'));
+ $in = self::$tmpDir.'/baz/';
+ try {
+ $this->assertIterator($expected, $finder->in($in)->files()->getIterator());
+ unlink($this->toAbsolute('baz'));
+ } catch (\Exception $e) {
+ unlink($this->toAbsolute('baz'));
+ throw $e;
+ }
+ }
+
+ public function testBackPathNotNormalized()
+ {
+ $finder = $this->buildFinder();
+ $expected = $this->toAbsolute(array('foo/../foo/bar.tmp'));
+ $in = self::$tmpDir.'/foo/../foo/';
$this->assertIterator($expected, $finder->in($in)->files()->getIterator());
}
@@ -280,7 +305,7 @@ public function testInWithNonExistentDirectory()
public function testInWithGlob()
{
$finder = $this->buildFinder();
- $finder->in(array(__DIR__.'/Fixtures/*/B/C', __DIR__.'/Fixtures/*/*/B/C'))->getIterator();
+ $finder->in(array(__DIR__.'/Fixtures/*/B/C/', __DIR__.'/Fixtures/*/*/B/C/'))->getIterator();
$this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder);
}
@@ -519,8 +544,8 @@ public function testMultipleLocationsWithSubDirectories()
$finder->in($locations)->depth('< 10')->name('*.neon');
$expected = array(
- __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'one'.DIRECTORY_SEPARATOR.'b'.DIRECTORY_SEPARATOR.'c.neon',
- __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'one'.DIRECTORY_SEPARATOR.'b'.DIRECTORY_SEPARATOR.'d.neon',
+ __DIR__.'/Fixtures/one'.DIRECTORY_SEPARATOR.'b'.DIRECTORY_SEPARATOR.'c.neon',
+ __DIR__.'/Fixtures/one'.DIRECTORY_SEPARATOR.'b'.DIRECTORY_SEPARATOR.'d.neon',
);
$this->assertIterator($expected, $finder);
diff --git a/src/Symfony/Component/Finder/Tests/GnuFinderTest.php b/src/Symfony/Component/Finder/Tests/GnuFinderTest.php
index 81b14d3021a53..3a3b9b170989a 100644
--- a/src/Symfony/Component/Finder/Tests/GnuFinderTest.php
+++ b/src/Symfony/Component/Finder/Tests/GnuFinderTest.php
@@ -19,6 +19,16 @@
*/
class GnuFinderTest extends FinderTest
{
+ public function testSymlinksNotResolved()
+ {
+ $this->markTestSkipped('Symlinks are always resolved using the GnuFinderAdapter.');
+ }
+
+ public function testBackPathNotNormalized()
+ {
+ $this->markTestSkipped('Paths are always normalized using the GnuFinderAdapter.');
+ }
+
protected function buildFinder()
{
$adapter = new GnuFindAdapter();
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php
index 9d1e1de93ee4a..ab52ccee36c69 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php
@@ -34,7 +34,7 @@ public function testSubPath($baseDir, array $paths, array $subPaths, array $subP
public function getSubPathData()
{
- $tmpDir = sys_get_temp_dir().DIRECTORY_SEPARATOR.'symfony_finder';
+ $tmpDir = sys_get_temp_dir().'/symfony_finder';
return array(
array(
diff --git a/src/Symfony/Component/Form/Resources/translations/validators.da.xlf b/src/Symfony/Component/Form/Resources/translations/validators.da.xlf
index c2dd4601f9089..f52f4e0a30db9 100644
--- a/src/Symfony/Component/Form/Resources/translations/validators.da.xlf
+++ b/src/Symfony/Component/Form/Resources/translations/validators.da.xlf
@@ -8,11 +8,11 @@
The uploaded file was too large. Please try to upload a smaller file.
- Den oploadede fil var for stor. Opload venligst en mindre fil.
+ Den uploadede fil var for stor. Upload venligst en mindre fil.The CSRF token is invalid. Please try to resubmit the form.
- CSRF nøglen er ugyldig.
+ CSRF-token er ugyldig.