Merge branch '2.6' into 2.7
* 2.6: (21 commits) bumped Symfony version to 2.6.8 updated VERSION for 2.6.7 updated CHANGELOG for 2.6.7 bumped Symfony version to 2.3.29 updated VERSION for 2.3.28 update CONTRIBUTORS for 2.3.28 updated CHANGELOG for 2.3.28 [Debug] Fixed ClassNotFoundFatalErrorHandlerTest [SecurityBundle] use access decision constants in config [SecurityBundle] use session auth constants in config PhpDoc fix in AbstractRememberMeServices [Filesystem] Simplified an if statement [SecurityBundle] Use Enum Nodes Instead Of Scalar [Debug 2.3] Fix test for PHP7 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed [Translation] simplify getMessages. [Framework][Translation] added test for debug command. Run tests on hhvm instead of hhvm-nightly Use HTTPS in README and some other fixes add more entropy to generated classnames ... Conflicts: .travis.yml src/Symfony/Component/HttpKernel/Kernel.php
This commit is contained in:
commit
daf4a03e5d
16
.travis.yml
16
.travis.yml
|
@ -11,10 +11,10 @@ matrix:
|
||||||
- php: 5.6
|
- php: 5.6
|
||||||
env: deps=high
|
env: deps=high
|
||||||
- php: nightly
|
- php: nightly
|
||||||
- php: hhvm-nightly
|
- php: hhvm
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: nightly
|
- php: nightly
|
||||||
- php: hhvm-nightly
|
- php: hhvm
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
services: mongodb
|
services: mongodb
|
||||||
|
@ -27,12 +27,12 @@ env:
|
||||||
before_install:
|
before_install:
|
||||||
- travis_retry sudo apt-get install parallel
|
- travis_retry sudo apt-get install parallel
|
||||||
- composer self-update
|
- composer self-update
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then phpenv config-rm xdebug.ini; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then phpenv config-rm xdebug.ini; fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then (pecl install -f memcached-2.1.0 && echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini) || echo "Let's continue without memcache extension"; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then (pecl install -f memcached-2.1.0 && echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini) || echo "Let's continue without memcache extension"; fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo "extension = $(pwd)/modules/symfony_debug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini); fi;
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo "extension = $(pwd)/modules/symfony_debug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini); fi;
|
||||||
- if [[ "$TRAVIS_PHP_VERSION" != *"nightly" ]]; then php -i; fi;
|
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then php -i; fi;
|
||||||
- sudo locale-gen fr_FR.UTF-8 && sudo update-locale
|
- sudo locale-gen fr_FR.UTF-8 && sudo update-locale
|
||||||
# Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built
|
# Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built
|
||||||
- if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi;
|
- if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi;
|
||||||
|
|
|
@ -7,6 +7,25 @@ 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 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
|
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.3.0...v2.3.1
|
||||||
|
|
||||||
|
* 2.3.28 (2015-05-10)
|
||||||
|
|
||||||
|
* bug #14266 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed (hason)
|
||||||
|
* bug #14501 [ProxyBridge] Fix proxy classnames generation (xphere)
|
||||||
|
* bug #14498 [FrameworkBundle] Added missing log in server:run command (lyrixx)
|
||||||
|
* bug #14484 [SecurityBundle][WebProfiler] check authenticated user by tokenClass instead of username. (aitboudad)
|
||||||
|
* bug #14497 [HttpFoundation] Allow curly braces in trusted host patterns (sgrodzicki)
|
||||||
|
* bug #14436 Show a better error when the port is in use (dosten)
|
||||||
|
* bug #14463 [Validator] Fixed Choice when an empty array is used in the "choices" option (webmozart)
|
||||||
|
* bug #14402 [FrameworkBundle][Translation] Check for 'xlf' instead of 'xliff' (xelaris)
|
||||||
|
* bug #14272 [FrameworkBundle] Workaround php -S ignoring auto_prepend_file (nicolas-grekas)
|
||||||
|
* bug #14345 [FrameworkBundle] Fix Routing\DelegatingLoader resiliency to fatal errors (nicolas-grekas)
|
||||||
|
* bug #14325 [Routing][DependencyInjection] Support .yaml extension in YAML loaders (thunderer)
|
||||||
|
* bug #14344 [Translation][fixed test] refresh cache when resources are no longer fresh. (aitboudad)
|
||||||
|
* bug #14268 [Translator] Cache does not take fallback locales into consideration (sf2.3) (mpdude)
|
||||||
|
* bug #14192 [HttpKernel] Embed the original exception as previous to bounced exceptions (nicolas-grekas)
|
||||||
|
* bug #14102 [Enhancement] netbeans - force interactive shell when limited detection (cordoval)
|
||||||
|
* bug #14191 [StringUtil] Fixed singularification of 'movies' (GerbenWijnja)
|
||||||
|
|
||||||
* 2.3.27 (2015-04-01)
|
* 2.3.27 (2015-04-01)
|
||||||
|
|
||||||
* security #14167 CVE-2015-2308 (nicolas-grekas)
|
* security #14167 CVE-2015-2308 (nicolas-grekas)
|
||||||
|
|
|
@ -7,6 +7,49 @@ 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 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
|
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.6.0...v2.6.1
|
||||||
|
|
||||||
|
* 2.6.7 (2015-05-11)
|
||||||
|
|
||||||
|
* bug #14266 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed (hason)
|
||||||
|
* bug #14478 [DebugBundle] Fix dump() output in API / No-Toolbar context (nicolas-grekas)
|
||||||
|
* bug #14501 [ProxyBridge] Fix proxy classnames generation (xphere)
|
||||||
|
* bug #14527 Fix getOrigin (WouterJ)
|
||||||
|
* bug #14498 [FrameworkBundle] Added missing log in server:run command (lyrixx)
|
||||||
|
* bug #14503 [Finder] Only use GLOB_BRACE when available (dosten)
|
||||||
|
* bug #14484 [SecurityBundle][WebProfiler] check authenticated user by tokenClass instead of username. (aitboudad)
|
||||||
|
* bug #14497 [HttpFoundation] Allow curly braces in trusted host patterns (sgrodzicki)
|
||||||
|
* bug #14480 [TwigBundle] Fix deprecated use of FlattenException (alOneh)
|
||||||
|
* bug #14469 [Debug] BaseException compatibility for PHP7 (nicolas-grekas)
|
||||||
|
* bug #14466 [WebProfiler] fix html syntax for input types (Tobion)
|
||||||
|
* bug #14436 Show a better error when the port is in use (dosten)
|
||||||
|
* bug #14463 [Validator] Fixed Choice when an empty array is used in the "choices" option (webmozart)
|
||||||
|
* bug #14446 [DependencyInjection] resolve circular reference (xabbuh)
|
||||||
|
* bug #14448 [Validator] Fixed Choice when an empty array is used in the "choices" option (webmozart)
|
||||||
|
* bug #14451 [Debug] Fix ClassNotFoundFatalErrorHandler candidates lookups (nicolas-grekas)
|
||||||
|
* bug #14355 [EventDispatcher] make listeners removable from an executed listener (xabbuh)
|
||||||
|
* bug #14402 [FrameworkBundle][Translation] Check for 'xlf' instead of 'xliff' (xelaris)
|
||||||
|
* bug #14272 [FrameworkBundle] Workaround php -S ignoring auto_prepend_file (nicolas-grekas)
|
||||||
|
* bug #14362 [Debug] Scream as LogLevel::DEBUG (but for fatal errors / uncaught exceptions) (nicolas-grekas)
|
||||||
|
* bug #14345 [FrameworkBundle] Fix Routing\DelegatingLoader resiliency to fatal errors (nicolas-grekas)
|
||||||
|
* bug #14381 [FrameworkBundle] Initialize translator with the default locale. (aitboudad)
|
||||||
|
* bug #14325 [Routing][DependencyInjection] Support .yaml extension in YAML loaders (thunderer)
|
||||||
|
* bug #14344 [Translation][fixed test] refresh cache when resources are no longer fresh. (aitboudad)
|
||||||
|
* bug #14346 [WebProfilerBundle] Fix resiliency to exceptions thrown by the url generator (nicolas-grekas)
|
||||||
|
* bug #14338 [FrameworkBundle] improve usage of Table helper (xabbuh)
|
||||||
|
* bug #14129 [FrameworkBundle] Fixed server:start --router relative path issue #14124 (abulford)
|
||||||
|
* bug #14271 [VarDumper] Fix call site detection (nicolas-grekas)
|
||||||
|
* bug #14277 [Translator] Cache does not take fallback locales into consideration (mpdude)
|
||||||
|
* bug #14268 [Translator] Cache does not take fallback locales into consideration (sf2.3) (mpdude)
|
||||||
|
* bug #14256 [Form] Fixed DateType/TimeType (webmozart)
|
||||||
|
* bug #14226 [Profiler][Logger] fixed cycle odd/even. (aitboudad)
|
||||||
|
* bug #14204 [VarDumper] Towards PHP7 support (nicolas-grekas)
|
||||||
|
* bug #14205 Fix currently broken tests (mpdude)
|
||||||
|
* bug #14192 [HttpKernel] Embed the original exception as previous to bounced exceptions (nicolas-grekas)
|
||||||
|
* bug #14102 [Enhancement] netbeans - force interactive shell when limited detection (cordoval)
|
||||||
|
* bug #14191 [StringUtil] Fixed singularification of 'movies' (GerbenWijnja)
|
||||||
|
* bug #14182 [FrameworkBundle] fixes displaying of deprecation notices. (hhamon)
|
||||||
|
* feature #14186 [Debug] Renamed "context" key to "scope_vars" to avoid any ambiguity (lyrixx)
|
||||||
|
* bug #14170 Fix the AJAX profiling (stof)
|
||||||
|
|
||||||
* 2.6.6 (2015-04-01)
|
* 2.6.6 (2015-04-01)
|
||||||
|
|
||||||
* security #14167 CVE-2015-2308 (nicolas-grekas)
|
* security #14167 CVE-2015-2308 (nicolas-grekas)
|
||||||
|
|
|
@ -9,15 +9,15 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Victor Berchet (victor)
|
- Victor Berchet (victor)
|
||||||
- Tobias Schultze (tobion)
|
- Tobias Schultze (tobion)
|
||||||
- Jordi Boggiano (seldaek)
|
- Jordi Boggiano (seldaek)
|
||||||
|
- Nicolas Grekas (nicolas-grekas)
|
||||||
- Johannes S (johannes)
|
- Johannes S (johannes)
|
||||||
- Kris Wallsmith (kriswallsmith)
|
- Kris Wallsmith (kriswallsmith)
|
||||||
- Nicolas Grekas (nicolas-grekas)
|
|
||||||
- Christophe Coevoet (stof)
|
- Christophe Coevoet (stof)
|
||||||
- Jakub Zalas (jakubzalas)
|
- Jakub Zalas (jakubzalas)
|
||||||
- Pascal Borreli (pborreli)
|
- Pascal Borreli (pborreli)
|
||||||
- Hugo Hamon (hhamon)
|
- Hugo Hamon (hhamon)
|
||||||
- Karma Dordrak (drak)
|
|
||||||
- Joseph Bielawski (stloyd)
|
- Joseph Bielawski (stloyd)
|
||||||
|
- Karma Dordrak (drak)
|
||||||
- Ryan Weaver (weaverryan)
|
- Ryan Weaver (weaverryan)
|
||||||
- Lukas Kahwe Smith (lsmith)
|
- Lukas Kahwe Smith (lsmith)
|
||||||
- Romain Neutron (romain)
|
- Romain Neutron (romain)
|
||||||
|
@ -29,20 +29,20 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Martin Hasoň (hason)
|
- Martin Hasoň (hason)
|
||||||
- Eriksen Costa (eriksencosta)
|
- Eriksen Costa (eriksencosta)
|
||||||
- Grégoire Pineau (lyrixx)
|
- Grégoire Pineau (lyrixx)
|
||||||
- Jonathan Wage (jwage)
|
- Abdellatif Ait boudad (aitboudad)
|
||||||
- Wouter De Jong (wouterj)
|
- Wouter De Jong (wouterj)
|
||||||
|
- Jonathan Wage (jwage)
|
||||||
- Alexandre Salomé (alexandresalome)
|
- Alexandre Salomé (alexandresalome)
|
||||||
- William Durand (couac)
|
- William Durand (couac)
|
||||||
- ornicar
|
- ornicar
|
||||||
- stealth35 (stealth35)
|
- stealth35 (stealth35)
|
||||||
- Alexander Mols (asm89)
|
- Alexander Mols (asm89)
|
||||||
- Bulat Shakirzyanov (avalanche123)
|
- Bulat Shakirzyanov (avalanche123)
|
||||||
- Abdellatif Ait boudad (aitboudad)
|
|
||||||
- Francis Besset (francisbesset)
|
- Francis Besset (francisbesset)
|
||||||
|
- Kévin Dunglas (dunglas)
|
||||||
- Saša Stamenković (umpirsky)
|
- Saša Stamenković (umpirsky)
|
||||||
- Henrik Bjørnskov (henrikbjorn)
|
- Henrik Bjørnskov (henrikbjorn)
|
||||||
- Miha Vrhovnik
|
- Miha Vrhovnik
|
||||||
- Kévin Dunglas (dunglas)
|
|
||||||
- Sarah Khalil (saro0h)
|
- Sarah Khalil (saro0h)
|
||||||
- Konstantin Kudryashov (everzet)
|
- Konstantin Kudryashov (everzet)
|
||||||
- Bilal Amarni (bamarni)
|
- Bilal Amarni (bamarni)
|
||||||
|
@ -57,6 +57,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Michel Weimerskirch (mweimerskirch)
|
- Michel Weimerskirch (mweimerskirch)
|
||||||
- Lee McDermott
|
- Lee McDermott
|
||||||
- Brandon Turner
|
- Brandon Turner
|
||||||
|
- Luis Cordova (cordoval)
|
||||||
- Douglas Greenshields (shieldo)
|
- Douglas Greenshields (shieldo)
|
||||||
- Daniel Holmes (dholmes)
|
- Daniel Holmes (dholmes)
|
||||||
- Bart van den Burg (burgov)
|
- Bart van den Burg (burgov)
|
||||||
|
@ -64,11 +65,10 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Kevin Bond (kbond)
|
- Kevin Bond (kbond)
|
||||||
- John Wards (johnwards)
|
- John Wards (johnwards)
|
||||||
- Fran Moreno (franmomu)
|
- Fran Moreno (franmomu)
|
||||||
- Luis Cordova (cordoval)
|
|
||||||
- Antoine Hérault (herzult)
|
- Antoine Hérault (herzult)
|
||||||
- Toni Uebernickel (havvg)
|
- Toni Uebernickel (havvg)
|
||||||
- Arnaud Le Blanc (arnaud-lb)
|
|
||||||
- Gábor Egyed (1ed)
|
- Gábor Egyed (1ed)
|
||||||
|
- Arnaud Le Blanc (arnaud-lb)
|
||||||
- Tim Nagel (merk)
|
- Tim Nagel (merk)
|
||||||
- Brice BERNARD (brikou)
|
- Brice BERNARD (brikou)
|
||||||
- marc.weistroff
|
- marc.weistroff
|
||||||
|
@ -82,10 +82,13 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- excelwebzone
|
- excelwebzone
|
||||||
- Jacob Dreesen (jdreesen)
|
- Jacob Dreesen (jdreesen)
|
||||||
- Fabien Pennequin (fabienpennequin)
|
- Fabien Pennequin (fabienpennequin)
|
||||||
|
- Matthias Pigulla (mpdude)
|
||||||
- Peter Kokot (maastermedia)
|
- Peter Kokot (maastermedia)
|
||||||
- Peter Rehm (rpet)
|
- Peter Rehm (rpet)
|
||||||
|
- Diego Saint Esteben (dii3g0)
|
||||||
- Michal Piotrowski (eventhorizon)
|
- Michal Piotrowski (eventhorizon)
|
||||||
- Stefano Sala (stefano.sala)
|
- Stefano Sala (stefano.sala)
|
||||||
|
- Javier Eguiluz (javier.eguiluz)
|
||||||
- Gordon Franke (gimler)
|
- Gordon Franke (gimler)
|
||||||
- Robert Schönthal (digitalkaoz)
|
- Robert Schönthal (digitalkaoz)
|
||||||
- Juti Noppornpitak (shiroyuki)
|
- Juti Noppornpitak (shiroyuki)
|
||||||
|
@ -99,11 +102,10 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Eric GELOEN (gelo)
|
- Eric GELOEN (gelo)
|
||||||
- Jérémie Augustin (jaugustin)
|
- Jérémie Augustin (jaugustin)
|
||||||
- Rafael Dohms (rdohms)
|
- Rafael Dohms (rdohms)
|
||||||
|
- Dariusz Ruminski
|
||||||
- Tigran Azatyan (tigranazatyan)
|
- Tigran Azatyan (tigranazatyan)
|
||||||
- Javier Eguiluz (javier.eguiluz)
|
|
||||||
- Arnaud Kleinpeter (nanocom)
|
- Arnaud Kleinpeter (nanocom)
|
||||||
- Richard Shank (iampersistent)
|
- Richard Shank (iampersistent)
|
||||||
- Dariusz Ruminski
|
|
||||||
- Clemens Tolboom
|
- Clemens Tolboom
|
||||||
- Helmer Aaviksoo
|
- Helmer Aaviksoo
|
||||||
- Sebastiaan Stok (sstok)
|
- Sebastiaan Stok (sstok)
|
||||||
|
@ -124,7 +126,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Mario A. Alvarez Garcia (nomack84)
|
- Mario A. Alvarez Garcia (nomack84)
|
||||||
- Dennis Benkert (denderello)
|
- Dennis Benkert (denderello)
|
||||||
- Benjamin Dulau (dbenjamin)
|
- Benjamin Dulau (dbenjamin)
|
||||||
- Matthias Pigulla (mpdude)
|
- Alexander Schwenn (xelaris)
|
||||||
- Andreas Hucks (meandmymonkey)
|
- Andreas Hucks (meandmymonkey)
|
||||||
- Noel Guilbert (noel)
|
- Noel Guilbert (noel)
|
||||||
- Joel Wurtz (brouznouf)
|
- Joel Wurtz (brouznouf)
|
||||||
|
@ -143,9 +145,10 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- François Zaninotto (fzaninotto)
|
- François Zaninotto (fzaninotto)
|
||||||
- Dustin Whittle (dustinwhittle)
|
- Dustin Whittle (dustinwhittle)
|
||||||
- jeff
|
- jeff
|
||||||
|
- Joshua Thijssen
|
||||||
- Justin Hileman (bobthecow)
|
- Justin Hileman (bobthecow)
|
||||||
- Sven Paulus (subsven)
|
- Sven Paulus (subsven)
|
||||||
- Alexander Schwenn (xelaris)
|
- Vladimir Reznichenko (kalessil)
|
||||||
- Lars Strojny (lstrojny)
|
- Lars Strojny (lstrojny)
|
||||||
- Rui Marinho (ruimarinho)
|
- Rui Marinho (ruimarinho)
|
||||||
- Mikael Pajunen
|
- Mikael Pajunen
|
||||||
|
@ -154,6 +157,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Sergey Linnik (linniksa)
|
- Sergey Linnik (linniksa)
|
||||||
- Marcel Beerta (mazen)
|
- Marcel Beerta (mazen)
|
||||||
- Javier Spagnoletti (phansys)
|
- Javier Spagnoletti (phansys)
|
||||||
|
- julien pauli (jpauli)
|
||||||
- Francois Zaninotto
|
- Francois Zaninotto
|
||||||
- Alexander Kotynia (olden)
|
- Alexander Kotynia (olden)
|
||||||
- Daniel Tschinder
|
- Daniel Tschinder
|
||||||
|
@ -164,7 +168,6 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Xavier Montaña Carreras (xmontana)
|
- Xavier Montaña Carreras (xmontana)
|
||||||
- Michele Orselli (orso)
|
- Michele Orselli (orso)
|
||||||
- Chris Wilkinson (thewilkybarkid)
|
- Chris Wilkinson (thewilkybarkid)
|
||||||
- Joshua Thijssen
|
|
||||||
- Xavier Perez
|
- Xavier Perez
|
||||||
- Arjen Brouwer (arjenjb)
|
- Arjen Brouwer (arjenjb)
|
||||||
- Katsuhiro OGAWA
|
- Katsuhiro OGAWA
|
||||||
|
@ -184,9 +187,9 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Nikita Konstantinov
|
- Nikita Konstantinov
|
||||||
- Wodor Wodorski
|
- Wodor Wodorski
|
||||||
- Matthieu Auger (matthieuauger)
|
- Matthieu Auger (matthieuauger)
|
||||||
- julien pauli (jpauli)
|
|
||||||
- Beau Simensen (simensen)
|
- Beau Simensen (simensen)
|
||||||
- Robert Kiss (kepten)
|
- Robert Kiss (kepten)
|
||||||
|
- Maxime Steinhausser (ogizanagi)
|
||||||
- John Kary (johnkary)
|
- John Kary (johnkary)
|
||||||
- Ruben Gonzalez (rubenrua)
|
- Ruben Gonzalez (rubenrua)
|
||||||
- Kim Hemsø Rasmussen (kimhemsoe)
|
- Kim Hemsø Rasmussen (kimhemsoe)
|
||||||
|
@ -194,7 +197,6 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Tom Van Looy (tvlooy)
|
- Tom Van Looy (tvlooy)
|
||||||
- Wouter Van Hecke
|
- Wouter Van Hecke
|
||||||
- Peter Kruithof (pkruithof)
|
- Peter Kruithof (pkruithof)
|
||||||
- Vladimir Reznichenko (kalessil)
|
|
||||||
- Michael Holm (hollo)
|
- Michael Holm (hollo)
|
||||||
- Warnar Boekkooi (boekkooi)
|
- Warnar Boekkooi (boekkooi)
|
||||||
- Marc Weistroff (futurecat)
|
- Marc Weistroff (futurecat)
|
||||||
|
@ -311,14 +313,15 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Marcin Sikoń (marphi)
|
- Marcin Sikoń (marphi)
|
||||||
- franek (franek)
|
- franek (franek)
|
||||||
- Adam Harvey
|
- Adam Harvey
|
||||||
- Diego Saint Esteben (dii3g0)
|
|
||||||
- Alex Bakhturin
|
- Alex Bakhturin
|
||||||
- François-Xavier de Guillebon (de-gui_f)
|
- François-Xavier de Guillebon (de-gui_f)
|
||||||
- boombatower
|
- boombatower
|
||||||
- Fabrice Bernhard (fabriceb)
|
- Fabrice Bernhard (fabriceb)
|
||||||
- Jérôme Macias (jeromemacias)
|
- Jérôme Macias (jeromemacias)
|
||||||
|
- Vincent AUBERT (vincent)
|
||||||
- Fabian Lange (codingfabian)
|
- Fabian Lange (codingfabian)
|
||||||
- Yoshio HANAWA
|
- Yoshio HANAWA
|
||||||
|
- Tomasz Kowalczyk (thunderer)
|
||||||
- Sebastian Bergmann
|
- Sebastian Bergmann
|
||||||
- Pablo Díez (pablodip)
|
- Pablo Díez (pablodip)
|
||||||
- Kevin McBride
|
- Kevin McBride
|
||||||
|
@ -329,6 +332,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Iker Ibarguren (ikerib)
|
- Iker Ibarguren (ikerib)
|
||||||
- Ricardo Oliveira (ricardolotr)
|
- Ricardo Oliveira (ricardolotr)
|
||||||
- ondrowan
|
- ondrowan
|
||||||
|
- Barry vd. Heuvel (barryvdh)
|
||||||
- Jerzy Zawadzki (jzawadzki)
|
- Jerzy Zawadzki (jzawadzki)
|
||||||
- Evan S Kaufman (evanskaufman)
|
- Evan S Kaufman (evanskaufman)
|
||||||
- mcben
|
- mcben
|
||||||
|
@ -374,7 +378,6 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Zach Badgett (zachbadgett)
|
- Zach Badgett (zachbadgett)
|
||||||
- Aurélien Fredouelle
|
- Aurélien Fredouelle
|
||||||
- Pavel Campr (pcampr)
|
- Pavel Campr (pcampr)
|
||||||
- Maxime Steinhausser (ogizanagi)
|
|
||||||
- Disquedur
|
- Disquedur
|
||||||
- Geoffrey Tran (geoff)
|
- Geoffrey Tran (geoff)
|
||||||
- Jan Behrens
|
- Jan Behrens
|
||||||
|
@ -446,8 +449,6 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Tiago Brito (blackmx)
|
- Tiago Brito (blackmx)
|
||||||
- Richard van den Brand (ricbra)
|
- Richard van den Brand (ricbra)
|
||||||
- develop
|
- develop
|
||||||
- Vincent AUBERT (vincent)
|
|
||||||
- Tomasz Kowalczyk (thunderer)
|
|
||||||
- Mark Sonnabaum
|
- Mark Sonnabaum
|
||||||
- Alexander Obuhovich (aik099)
|
- Alexander Obuhovich (aik099)
|
||||||
- Mathieu Lemoine
|
- Mathieu Lemoine
|
||||||
|
@ -459,7 +460,6 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- yclian
|
- yclian
|
||||||
- Pascal Helfenstein
|
- Pascal Helfenstein
|
||||||
- Baldur Rensch (brensch)
|
- Baldur Rensch (brensch)
|
||||||
- Barry vd. Heuvel (barryvdh)
|
|
||||||
- Alex Xandra Albert Sim
|
- Alex Xandra Albert Sim
|
||||||
- Yuen-Chi Lian
|
- Yuen-Chi Lian
|
||||||
- Besnik Br
|
- Besnik Br
|
||||||
|
@ -602,6 +602,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Zachary Tong (polyfractal)
|
- Zachary Tong (polyfractal)
|
||||||
- Hryhorii Hrebiniuk
|
- Hryhorii Hrebiniuk
|
||||||
- dantleech
|
- dantleech
|
||||||
|
- Xavier Leune
|
||||||
- Tero Alén (tero)
|
- Tero Alén (tero)
|
||||||
- DerManoMann
|
- DerManoMann
|
||||||
- Guillaume Royer
|
- Guillaume Royer
|
||||||
|
@ -684,10 +685,12 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Yannick
|
- Yannick
|
||||||
- Eduardo García Sanz (coma)
|
- Eduardo García Sanz (coma)
|
||||||
- Sebastian Grodzicki (sgrodzicki)
|
- Sebastian Grodzicki (sgrodzicki)
|
||||||
|
- James Gilliland
|
||||||
- Michael Lee (zerustech)
|
- Michael Lee (zerustech)
|
||||||
- Roy Van Ginneken
|
- Roy Van Ginneken
|
||||||
- David de Boer (ddeboer)
|
- David de Boer (ddeboer)
|
||||||
- Gilles Doge (gido)
|
- Gilles Doge (gido)
|
||||||
|
- abulford
|
||||||
- Brooks Boyd
|
- Brooks Boyd
|
||||||
- Roger Webb
|
- Roger Webb
|
||||||
- Dmitriy Simushev
|
- Dmitriy Simushev
|
||||||
|
@ -722,6 +725,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Jeroen van den Enden (stoefke)
|
- Jeroen van den Enden (stoefke)
|
||||||
- origaminal
|
- origaminal
|
||||||
- Quique Porta (quiqueporta)
|
- Quique Porta (quiqueporta)
|
||||||
|
- Gregor Harlan
|
||||||
- Tomasz Szymczyk (karion)
|
- Tomasz Szymczyk (karion)
|
||||||
- ConneXNL
|
- ConneXNL
|
||||||
- Aharon Perkel
|
- Aharon Perkel
|
||||||
|
@ -752,6 +756,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Karol Sójko (karolsojko)
|
- Karol Sójko (karolsojko)
|
||||||
- sl_toto (sl_toto)
|
- sl_toto (sl_toto)
|
||||||
- Sébastien HOUZÉ
|
- Sébastien HOUZÉ
|
||||||
|
- Jingyu Wang
|
||||||
- steveYeah
|
- steveYeah
|
||||||
- Samy Dindane (dinduks)
|
- Samy Dindane (dinduks)
|
||||||
- Keri Henare (kerihenare)
|
- Keri Henare (kerihenare)
|
||||||
|
@ -881,6 +886,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- catch
|
- catch
|
||||||
- Alexandre Segura
|
- Alexandre Segura
|
||||||
- Josef Cech
|
- Josef Cech
|
||||||
|
- Possum
|
||||||
- Arnau González (arnaugm)
|
- Arnau González (arnaugm)
|
||||||
- Nate (frickenate)
|
- Nate (frickenate)
|
||||||
- Matthew Foster (mfoster)
|
- Matthew Foster (mfoster)
|
||||||
|
@ -948,6 +954,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Daan van Renterghem
|
- Daan van Renterghem
|
||||||
- Bram Van der Sype (brammm)
|
- Bram Van der Sype (brammm)
|
||||||
- Julien Moulin (lizjulien)
|
- Julien Moulin (lizjulien)
|
||||||
|
- Romain Gautier (mykiwi)
|
||||||
- Nikita Nefedov (nikita2206)
|
- Nikita Nefedov (nikita2206)
|
||||||
- Mauro Foti (skler)
|
- Mauro Foti (skler)
|
||||||
- Yannick Warnier (ywarnier)
|
- Yannick Warnier (ywarnier)
|
||||||
|
@ -1015,6 +1022,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Matthieu Prat
|
- Matthieu Prat
|
||||||
- Grummfy
|
- Grummfy
|
||||||
- Filipe Guerra
|
- Filipe Guerra
|
||||||
|
- Gerben Wijnja
|
||||||
- Rowan Manning
|
- Rowan Manning
|
||||||
- David Windell
|
- David Windell
|
||||||
- Gabriel Birke
|
- Gabriel Birke
|
||||||
|
@ -1243,6 +1251,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Guillermo Gisinger (t3chn0r)
|
- Guillermo Gisinger (t3chn0r)
|
||||||
- Markus Tacker (tacker)
|
- Markus Tacker (tacker)
|
||||||
- Tyler Stroud (tystr)
|
- Tyler Stroud (tystr)
|
||||||
|
- Moritz Kraft (userfriendly)
|
||||||
- Víctor Mateo (victormateo)
|
- Víctor Mateo (victormateo)
|
||||||
- Vincent (vincent1870)
|
- Vincent (vincent1870)
|
||||||
- Eugene Babushkin (warl)
|
- Eugene Babushkin (warl)
|
||||||
|
@ -1266,6 +1275,7 @@ Symfony is the result of the work of many people who made the code better
|
||||||
- Mohamed Karnichi (amiral)
|
- Mohamed Karnichi (amiral)
|
||||||
- Daniel Kolvik (dkvk)
|
- Daniel Kolvik (dkvk)
|
||||||
- Jeroen De Dauw (jeroendedauw)
|
- Jeroen De Dauw (jeroendedauw)
|
||||||
|
- Maxime COLIN (maximecolin)
|
||||||
- Muharrem Demirci (mdemirci)
|
- Muharrem Demirci (mdemirci)
|
||||||
- Evgeny Z (meze)
|
- Evgeny Z (meze)
|
||||||
- Michiel Boeckaert (milio)
|
- Michiel Boeckaert (milio)
|
||||||
|
|
27
README.md
27
README.md
|
@ -23,34 +23,33 @@ Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
The best way to install Symfony is to download the Symfony Standard Edition
|
The best way to install Symfony is to download the Symfony Standard Edition
|
||||||
available at [http://symfony.com/download][1].
|
available at <https://symfony.com/download>.
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
The "[Quick Tour][2]" tutorial gives you a first feeling of the framework. If,
|
The "[Quick Tour][1]" tutorial gives you a first feeling of the framework. If,
|
||||||
like us, you think that Symfony can help speed up your development and take
|
like us, you think that Symfony can help speed up your development and take
|
||||||
the quality of your work to the next level, read the official
|
the quality of your work to the next level, read the official
|
||||||
[Symfony documentation][3].
|
[Symfony documentation][2].
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Symfony is an open source, community-driven project. If you'd like to contribute,
|
Symfony is an open source, community-driven project. If you'd like to contribute,
|
||||||
please read the [Contributing Code][4] part of the documentation. If you're submitting
|
please read the [Contributing Code][3] part of the documentation. If you're submitting
|
||||||
a pull request, please follow the guidelines in the [Submitting a Patch][5] section
|
a pull request, please follow the guidelines in the [Submitting a Patch][4] section
|
||||||
and use [Pull Request Template][6].
|
and use [Pull Request Template][5].
|
||||||
|
|
||||||
Running Symfony Tests
|
Running Symfony Tests
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Information on how to run the Symfony test suite can be found in the
|
Information on how to run the Symfony test suite can be found in the
|
||||||
[Running Symfony Tests][7] section.
|
[Running Symfony Tests][6] section.
|
||||||
|
|
||||||
[1]: http://symfony.com/download
|
[1]: https://symfony.com/get_started
|
||||||
[2]: http://symfony.com/get_started
|
[2]: https://symfony.com/doc/current/
|
||||||
[3]: http://symfony.com/doc/current/
|
[3]: https://symfony.com/doc/current/contributing/code/index.html
|
||||||
[4]: http://symfony.com/doc/current/contributing/code/index.html
|
[4]: https://symfony.com/doc/current/contributing/code/patches.html#check-list
|
||||||
[5]: http://symfony.com/doc/current/contributing/code/patches.html#check-list
|
[5]: https://symfony.com/doc/current/contributing/code/patches.html#make-a-pull-request
|
||||||
[6]: http://symfony.com/doc/current/contributing/code/patches.html#make-a-pull-request
|
[6]: https://symfony.com/doc/master/contributing/code/tests.html
|
||||||
[7]: http://symfony.com/doc/master/contributing/code/tests.html
|
|
||||||
|
|
|
@ -26,6 +26,11 @@ use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
|
||||||
*/
|
*/
|
||||||
class ProxyDumper implements DumperInterface
|
class ProxyDumper implements DumperInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $salt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var LazyLoadingValueHolderGenerator
|
* @var LazyLoadingValueHolderGenerator
|
||||||
*/
|
*/
|
||||||
|
@ -38,9 +43,12 @@ class ProxyDumper implements DumperInterface
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $salt
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct($salt = '')
|
||||||
{
|
{
|
||||||
|
$this->salt = $salt;
|
||||||
$this->proxyGenerator = new LazyLoadingValueHolderGenerator();
|
$this->proxyGenerator = new LazyLoadingValueHolderGenerator();
|
||||||
$this->classGenerator = new BaseGeneratorStrategy();
|
$this->classGenerator = new BaseGeneratorStrategy();
|
||||||
}
|
}
|
||||||
|
@ -109,6 +117,6 @@ EOF;
|
||||||
*/
|
*/
|
||||||
private function getProxyClassName(Definition $definition)
|
private function getProxyClassName(Definition $definition)
|
||||||
{
|
{
|
||||||
return str_replace('\\', '', $definition->getClass()).'_'.spl_object_hash($definition);
|
return str_replace('\\', '', $definition->getClass()).'_'.spl_object_hash($definition).$this->salt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
namespace Symfony\Bundle\DebugBundle\DependencyInjection\Compiler;
|
namespace Symfony\Bundle\DebugBundle\DependencyInjection\Compiler;
|
||||||
|
|
||||||
|
use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener;
|
||||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
|
|
||||||
|
@ -35,5 +36,9 @@ class DumpDataCollectorPass implements CompilerPassInterface
|
||||||
if ($container->hasParameter('templating.helper.code.file_link_format')) {
|
if ($container->hasParameter('templating.helper.code.file_link_format')) {
|
||||||
$definition->replaceArgument(1, $container->getParameter('templating.helper.code.file_link_format'));
|
$definition->replaceArgument(1, $container->getParameter('templating.helper.code.file_link_format'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$container->hasParameter('web_profiler.debug_toolbar.mode') || WebDebugToolbarListener::DISABLED === $container->getParameter('web_profiler.debug_toolbar.mode')) {
|
||||||
|
$definition->replaceArgument(3, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<argument type="service" id="debug.stopwatch" on-invalid="ignore" />
|
<argument type="service" id="debug.stopwatch" on-invalid="ignore" />
|
||||||
<argument>null</argument><!-- %templating.helper.code.file_link_format% -->
|
<argument>null</argument><!-- %templating.helper.code.file_link_format% -->
|
||||||
<argument>%kernel.charset%</argument>
|
<argument>%kernel.charset%</argument>
|
||||||
|
<argument type="service" id="request_stack" />
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<service id="debug.dump_listener" class="Symfony\Component\HttpKernel\EventListener\DumpListener">
|
<service id="debug.dump_listener" class="Symfony\Component\HttpKernel\EventListener\DumpListener">
|
||||||
|
|
|
@ -12,8 +12,10 @@
|
||||||
namespace Symfony\Bundle\DebugBundle\Tests\DependencyInjection\Compiler;
|
namespace Symfony\Bundle\DebugBundle\Tests\DependencyInjection\Compiler;
|
||||||
|
|
||||||
use Symfony\Bundle\DebugBundle\DependencyInjection\Compiler\DumpDataCollectorPass;
|
use Symfony\Bundle\DebugBundle\DependencyInjection\Compiler\DumpDataCollectorPass;
|
||||||
|
use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\Definition;
|
use Symfony\Component\DependencyInjection\Definition;
|
||||||
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
|
|
||||||
class DumpDataCollectorPassTest extends \PHPUnit_Framework_TestCase
|
class DumpDataCollectorPassTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
@ -23,7 +25,7 @@ class DumpDataCollectorPassTest extends \PHPUnit_Framework_TestCase
|
||||||
$container->addCompilerPass(new DumpDataCollectorPass());
|
$container->addCompilerPass(new DumpDataCollectorPass());
|
||||||
$container->setParameter('templating.helper.code.file_link_format', 'file-link-format');
|
$container->setParameter('templating.helper.code.file_link_format', 'file-link-format');
|
||||||
|
|
||||||
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null));
|
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, null));
|
||||||
$container->setDefinition('data_collector.dump', $definition);
|
$container->setDefinition('data_collector.dump', $definition);
|
||||||
|
|
||||||
$container->compile();
|
$container->compile();
|
||||||
|
@ -36,11 +38,53 @@ class DumpDataCollectorPassTest extends \PHPUnit_Framework_TestCase
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$container->addCompilerPass(new DumpDataCollectorPass());
|
$container->addCompilerPass(new DumpDataCollectorPass());
|
||||||
|
|
||||||
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null));
|
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, null));
|
||||||
$container->setDefinition('data_collector.dump', $definition);
|
$container->setDefinition('data_collector.dump', $definition);
|
||||||
|
|
||||||
$container->compile();
|
$container->compile();
|
||||||
|
|
||||||
$this->assertNull($definition->getArgument(1));
|
$this->assertNull($definition->getArgument(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testProcessWithToolbarEnabled()
|
||||||
|
{
|
||||||
|
$container = new ContainerBuilder();
|
||||||
|
$container->addCompilerPass(new DumpDataCollectorPass());
|
||||||
|
$requestStack = new RequestStack();
|
||||||
|
|
||||||
|
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, $requestStack));
|
||||||
|
$container->setDefinition('data_collector.dump', $definition);
|
||||||
|
$container->setParameter('web_profiler.debug_toolbar.mode', WebDebugToolbarListener::ENABLED);
|
||||||
|
|
||||||
|
$container->compile();
|
||||||
|
|
||||||
|
$this->assertSame($requestStack, $definition->getArgument(3));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testProcessWithToolbarDisabled()
|
||||||
|
{
|
||||||
|
$container = new ContainerBuilder();
|
||||||
|
$container->addCompilerPass(new DumpDataCollectorPass());
|
||||||
|
|
||||||
|
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, new RequestStack()));
|
||||||
|
$container->setDefinition('data_collector.dump', $definition);
|
||||||
|
$container->setParameter('web_profiler.debug_toolbar.mode', WebDebugToolbarListener::DISABLED);
|
||||||
|
|
||||||
|
$container->compile();
|
||||||
|
|
||||||
|
$this->assertNull($definition->getArgument(3));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testProcessWithoutToolbar()
|
||||||
|
{
|
||||||
|
$container = new ContainerBuilder();
|
||||||
|
$container->addCompilerPass(new DumpDataCollectorPass());
|
||||||
|
|
||||||
|
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, new RequestStack()));
|
||||||
|
$container->setDefinition('data_collector.dump', $definition);
|
||||||
|
|
||||||
|
$container->compile();
|
||||||
|
|
||||||
|
$this->assertNull($definition->getArgument(3));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/phpunit-bridge": "~2.7",
|
"symfony/phpunit-bridge": "~2.7",
|
||||||
"symfony/config": "~2.3",
|
"symfony/config": "~2.3",
|
||||||
"symfony/dependency-injection": "~2.3"
|
"symfony/dependency-injection": "~2.3",
|
||||||
|
"symfony/web-profiler-bundle": "~2.3"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/config": "For service container configuration",
|
"symfony/config": "For service container configuration",
|
||||||
|
|
|
@ -0,0 +1,147 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Application;
|
||||||
|
use Symfony\Component\Console\Tester\CommandTester;
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
|
||||||
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
|
|
||||||
|
class TranslationDebugCommandTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
private $fs;
|
||||||
|
private $translationDir;
|
||||||
|
|
||||||
|
public function testDebugMissingMessages()
|
||||||
|
{
|
||||||
|
$tester = $this->createCommandTester($this->getContainer(array('foo' => 'foo')));
|
||||||
|
$tester->execute(array('locale' => 'en', 'bundle' => 'foo'));
|
||||||
|
|
||||||
|
$this->assertRegExp('/x (\s|\|)+foo/', $tester->getDisplay(), 'Display x in case of missing message');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testDebugUnusedMessages()
|
||||||
|
{
|
||||||
|
$tester = $this->createCommandTester($this->getContainer(array(), array('foo' => 'foo')));
|
||||||
|
$tester->execute(array('locale' => 'en', 'bundle' => 'foo'));
|
||||||
|
|
||||||
|
$this->assertRegExp('/o (\s|\|)+foo/', $tester->getDisplay(), 'Display o in case of unused message');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testDebugFallbackMessages()
|
||||||
|
{
|
||||||
|
$tester = $this->createCommandTester($this->getContainer(array(), array('foo' => 'foo')));
|
||||||
|
$tester->execute(array('locale' => 'fr', 'bundle' => 'foo'));
|
||||||
|
|
||||||
|
$this->assertRegExp('/= (\s|\|)+foo/', $tester->getDisplay(), 'Display = in case of fallback message');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testNoDefinedMessages()
|
||||||
|
{
|
||||||
|
$tester = $this->createCommandTester($this->getContainer());
|
||||||
|
$tester->execute(array('locale' => 'fr', 'bundle' => 'test'));
|
||||||
|
|
||||||
|
$this->assertRegExp('/^No defined or extracted messages for locale "fr"/', $tester->getDisplay());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
$this->fs = new Filesystem();
|
||||||
|
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation');
|
||||||
|
$this->fs->mkdir($this->translationDir.'/Resources/translations');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function tearDown()
|
||||||
|
{
|
||||||
|
$this->fs->remove($this->translationDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return CommandTester
|
||||||
|
*/
|
||||||
|
private function createCommandTester($container)
|
||||||
|
{
|
||||||
|
$command = new TranslationDebugCommand();
|
||||||
|
$command->setContainer($container);
|
||||||
|
|
||||||
|
$application = new Application();
|
||||||
|
$application->add($command);
|
||||||
|
|
||||||
|
return new CommandTester($application->find('debug:translation'));
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getContainer($extractedMessages = array(), $loadedMessages = array())
|
||||||
|
{
|
||||||
|
$translator = $this->getMockBuilder('Symfony\Component\Translation\Translator')
|
||||||
|
->disableOriginalConstructor()
|
||||||
|
->getMock();
|
||||||
|
|
||||||
|
$translator
|
||||||
|
->expects($this->any())
|
||||||
|
->method('getFallbackLocales')
|
||||||
|
->will($this->returnValue(array('en')));
|
||||||
|
|
||||||
|
$extractor = $this->getMock('Symfony\Component\Translation\Extractor\ExtractorInterface');
|
||||||
|
$extractor
|
||||||
|
->expects($this->any())
|
||||||
|
->method('extract')
|
||||||
|
->will(
|
||||||
|
$this->returnCallback(function ($path, $catalogue) use ($extractedMessages) {
|
||||||
|
$catalogue->add($extractedMessages);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
$loader = $this->getMock('Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader');
|
||||||
|
$loader
|
||||||
|
->expects($this->any())
|
||||||
|
->method('loadMessages')
|
||||||
|
->will(
|
||||||
|
$this->returnCallback(function ($path, $catalogue) use ($loadedMessages) {
|
||||||
|
$catalogue->add($loadedMessages);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
$kernel = $this->getMock('Symfony\Component\HttpKernel\KernelInterface');
|
||||||
|
$kernel
|
||||||
|
->expects($this->any())
|
||||||
|
->method('getBundle')
|
||||||
|
->will($this->returnValueMap(array(
|
||||||
|
array('foo', true, $this->getBundle($this->translationDir)),
|
||||||
|
array('test', true, $this->getBundle('test')),
|
||||||
|
)));
|
||||||
|
|
||||||
|
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
|
||||||
|
$container
|
||||||
|
->expects($this->any())
|
||||||
|
->method('get')
|
||||||
|
->will($this->returnValueMap(array(
|
||||||
|
array('translation.extractor', 1, $extractor),
|
||||||
|
array('translation.loader', 1, $loader),
|
||||||
|
array('translator', 1, $translator),
|
||||||
|
array('kernel', 1, $kernel),
|
||||||
|
)));
|
||||||
|
|
||||||
|
return $container;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getBundle($path)
|
||||||
|
{
|
||||||
|
$bundle = $this->getMock('Symfony\Component\HttpKernel\Bundle\BundleInterface');
|
||||||
|
$bundle
|
||||||
|
->expects($this->any())
|
||||||
|
->method('getPath')
|
||||||
|
->will($this->returnValue($path))
|
||||||
|
;
|
||||||
|
|
||||||
|
return $bundle;
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,6 +16,7 @@ use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
|
||||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||||
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
||||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||||
|
use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class contains the configuration information.
|
* This class contains the configuration information.
|
||||||
|
@ -60,14 +61,20 @@ class MainConfiguration implements ConfigurationInterface
|
||||||
$rootNode
|
$rootNode
|
||||||
->children()
|
->children()
|
||||||
->scalarNode('access_denied_url')->defaultNull()->example('/foo/error403')->end()
|
->scalarNode('access_denied_url')->defaultNull()->example('/foo/error403')->end()
|
||||||
->scalarNode('session_fixation_strategy')->cannotBeEmpty()->info('strategy can be: none, migrate, invalidate')->defaultValue('migrate')->end()
|
->enumNode('session_fixation_strategy')
|
||||||
|
->values(array(SessionAuthenticationStrategy::NONE, SessionAuthenticationStrategy::MIGRATE, SessionAuthenticationStrategy::INVALIDATE))
|
||||||
|
->defaultValue(SessionAuthenticationStrategy::MIGRATE)
|
||||||
|
->end()
|
||||||
->booleanNode('hide_user_not_found')->defaultTrue()->end()
|
->booleanNode('hide_user_not_found')->defaultTrue()->end()
|
||||||
->booleanNode('always_authenticate_before_granting')->defaultFalse()->end()
|
->booleanNode('always_authenticate_before_granting')->defaultFalse()->end()
|
||||||
->booleanNode('erase_credentials')->defaultTrue()->end()
|
->booleanNode('erase_credentials')->defaultTrue()->end()
|
||||||
->arrayNode('access_decision_manager')
|
->arrayNode('access_decision_manager')
|
||||||
->addDefaultsIfNotSet()
|
->addDefaultsIfNotSet()
|
||||||
->children()
|
->children()
|
||||||
->scalarNode('strategy')->defaultValue(AccessDecisionManager::STRATEGY_AFFIRMATIVE)->end()
|
->enumNode('strategy')
|
||||||
|
->values(array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, AccessDecisionManager::STRATEGY_CONSENSUS, AccessDecisionManager::STRATEGY_UNANIMOUS))
|
||||||
|
->defaultValue(AccessDecisionManager::STRATEGY_AFFIRMATIVE)
|
||||||
|
->end()
|
||||||
->booleanNode('allow_if_all_abstain')->defaultFalse()->end()
|
->booleanNode('allow_if_all_abstain')->defaultFalse()->end()
|
||||||
->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end()
|
->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end()
|
||||||
->end()
|
->end()
|
||||||
|
|
|
@ -181,11 +181,11 @@ class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
public function testCannotRedeclareClass()
|
public function testCannotRedeclareClass()
|
||||||
{
|
{
|
||||||
if (!file_exists(__DIR__.'/../FIXTURES/REQUIREDTWICE.PHP')) {
|
if (!file_exists(__DIR__.'/../FIXTURES2/REQUIREDTWICE.PHP')) {
|
||||||
$this->markTestSkipped('Can only be run on case insensitive filesystems');
|
$this->markTestSkipped('Can only be run on case insensitive filesystems');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once __DIR__.'/../FIXTURES/REQUIREDTWICE.PHP';
|
require_once __DIR__.'/../FIXTURES2/REQUIREDTWICE.PHP';
|
||||||
|
|
||||||
$error = array(
|
$error = array(
|
||||||
'type' => 1,
|
'type' => 1,
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Symfony\Component\Debug\Tests\Fixtures;
|
|
||||||
|
|
||||||
class RequiredTwice
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Symfony\Component\Debug\Tests\Fixtures2;
|
||||||
|
|
||||||
|
class RequiredTwice
|
||||||
|
{
|
||||||
|
}
|
|
@ -439,17 +439,13 @@ class Filesystem
|
||||||
*/
|
*/
|
||||||
public function isAbsolutePath($file)
|
public function isAbsolutePath($file)
|
||||||
{
|
{
|
||||||
if (strspn($file, '/\\', 0, 1)
|
return (strspn($file, '/\\', 0, 1)
|
||||||
|| (strlen($file) > 3 && ctype_alpha($file[0])
|
|| (strlen($file) > 3 && ctype_alpha($file[0])
|
||||||
&& substr($file, 1, 1) === ':'
|
&& substr($file, 1, 1) === ':'
|
||||||
&& (strspn($file, '/\\', 2, 1))
|
&& (strspn($file, '/\\', 2, 1))
|
||||||
)
|
)
|
||||||
|| null !== parse_url($file, PHP_URL_SCHEME)
|
|| null !== parse_url($file, PHP_URL_SCHEME)
|
||||||
) {
|
);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
namespace Symfony\Component\HttpKernel\DataCollector;
|
namespace Symfony\Component\HttpKernel\DataCollector;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Stopwatch\Stopwatch;
|
use Symfony\Component\Stopwatch\Stopwatch;
|
||||||
use Symfony\Component\VarDumper\Cloner\Data;
|
use Symfony\Component\VarDumper\Cloner\Data;
|
||||||
|
@ -33,12 +34,14 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||||
private $clonesIndex = 0;
|
private $clonesIndex = 0;
|
||||||
private $rootRefs;
|
private $rootRefs;
|
||||||
private $charset;
|
private $charset;
|
||||||
|
private $dumper;
|
||||||
|
|
||||||
public function __construct(Stopwatch $stopwatch = null, $fileLinkFormat = null, $charset = null)
|
public function __construct(Stopwatch $stopwatch = null, $fileLinkFormat = null, $charset = null, RequestStack $requestStack = null)
|
||||||
{
|
{
|
||||||
$this->stopwatch = $stopwatch;
|
$this->stopwatch = $stopwatch;
|
||||||
$this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
|
$this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
|
||||||
$this->charset = $charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8';
|
$this->charset = $charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8';
|
||||||
|
$this->requestStack = $requestStack;
|
||||||
|
|
||||||
// All clones share these properties by reference:
|
// All clones share these properties by reference:
|
||||||
$this->rootRefs = array(
|
$this->rootRefs = array(
|
||||||
|
@ -118,8 +121,12 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||||
$name = substr($name, strrpos($name, '/') + 1);
|
$name = substr($name, strrpos($name, '/') + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->data[] = compact('data', 'name', 'file', 'line', 'fileExcerpt');
|
if ($this->dumper) {
|
||||||
++$this->dataCount;
|
$this->doDump($data, $name, $file, $line);
|
||||||
|
} else {
|
||||||
|
$this->data[] = compact('data', 'name', 'file', 'line', 'fileExcerpt');
|
||||||
|
++$this->dataCount;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->stopwatch) {
|
if ($this->stopwatch) {
|
||||||
$this->stopwatch->stop('dump');
|
$this->stopwatch->stop('dump');
|
||||||
|
@ -128,6 +135,33 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||||
|
|
||||||
public function collect(Request $request, Response $response, \Exception $exception = null)
|
public function collect(Request $request, Response $response, \Exception $exception = null)
|
||||||
{
|
{
|
||||||
|
if ($this->requestStack && $this->requestStack->getMasterRequest() !== $request) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// In all conditions that remove the web debug toolbar, dumps are written on the output.
|
||||||
|
if (!$this->requestStack
|
||||||
|
|| $request->isXmlHttpRequest()
|
||||||
|
|| !$response->headers->has('X-Debug-Token')
|
||||||
|
|| $response->isRedirection()
|
||||||
|
|| ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html'))
|
||||||
|
|| 'html' !== $request->getRequestFormat()
|
||||||
|
|| false === strripos($response->getContent(), '</body>')
|
||||||
|
) {
|
||||||
|
if ($response->headers->has('Content-Type') && false !== strpos($response->headers->get('Content-Type'), 'html')) {
|
||||||
|
$this->dumper = new HtmlDumper('php://output', $this->charset);
|
||||||
|
} else {
|
||||||
|
$this->dumper = new CliDumper('php://output', $this->charset);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($this->data as $i => $dump) {
|
||||||
|
$this->data[$i] = null;
|
||||||
|
$this->doDump($dump['data'], $dump['name'], $dump['file'], $dump['line']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->data = array();
|
||||||
|
$this->dataCount = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function serialize()
|
public function serialize()
|
||||||
|
@ -140,6 +174,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||||
$this->data = array();
|
$this->data = array();
|
||||||
$this->dataCount = 0;
|
$this->dataCount = 0;
|
||||||
$this->isCollected = true;
|
$this->isCollected = true;
|
||||||
|
$this->dumper = null;
|
||||||
|
|
||||||
return $ser;
|
return $ser;
|
||||||
}
|
}
|
||||||
|
@ -203,31 +238,14 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('cli' !== PHP_SAPI && stripos($h[$i], 'html')) {
|
if ('cli' !== PHP_SAPI && stripos($h[$i], 'html')) {
|
||||||
$dumper = new HtmlDumper('php://output', $this->charset);
|
$this->dumper = new HtmlDumper('php://output', $this->charset);
|
||||||
} else {
|
} else {
|
||||||
$dumper = new CliDumper('php://output', $this->charset);
|
$this->dumper = new CliDumper('php://output', $this->charset);
|
||||||
$dumper->setColors(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->data as $i => $dump) {
|
foreach ($this->data as $i => $dump) {
|
||||||
$this->data[$i] = null;
|
$this->data[$i] = null;
|
||||||
|
$this->doDump($dump['data'], $dump['name'], $dump['file'], $dump['line']);
|
||||||
if ($dumper instanceof HtmlDumper) {
|
|
||||||
$dump['name'] = $this->htmlEncode($dump['name']);
|
|
||||||
$dump['file'] = $this->htmlEncode($dump['file']);
|
|
||||||
if ('' !== $dump['file']) {
|
|
||||||
if ($this->fileLinkFormat) {
|
|
||||||
$link = strtr($this->fileLinkFormat, array('%f' => $dump['file'], '%l' => $dump['line']));
|
|
||||||
$dump['name'] = sprintf('<a href="%s" title="%s">%s</a>', $link, $dump['file'], $dump['name']);
|
|
||||||
} else {
|
|
||||||
$dump['name'] = sprintf('<abbr title="%s">%s</abbr>', $dump['file'], $dump['name']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "\n<span class=\"sf-dump-meta\">{$dump['name']} on line {$dump['line']}:</span>";
|
|
||||||
} else {
|
|
||||||
echo "{$dump['name']} on line {$dump['line']}:\n";
|
|
||||||
}
|
|
||||||
$dumper->dump($dump['data']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->data = array();
|
$this->data = array();
|
||||||
|
@ -235,6 +253,26 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function doDump($data, $name, $file, $line)
|
||||||
|
{
|
||||||
|
if ($this->dumper instanceof HtmlDumper) {
|
||||||
|
$name = $this->htmlEncode($name);
|
||||||
|
$file = $this->htmlEncode($file);
|
||||||
|
if ('' !== $file) {
|
||||||
|
if ($this->fileLinkFormat) {
|
||||||
|
$link = strtr($this->fileLinkFormat, array('%f' => $file, '%l' => $line));
|
||||||
|
$name = sprintf('<a href="%s" title="%s">%s</a>', $link, $file, $name);
|
||||||
|
} else {
|
||||||
|
$name = sprintf('<abbr title="%s">%s</abbr>', $file, $name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "\n<span class=\"sf-dump-meta\">{$name} on line {$line}:</span>";
|
||||||
|
} else {
|
||||||
|
echo "{$name} on line {$line}:\n";
|
||||||
|
}
|
||||||
|
$this->dumper->dump($data);
|
||||||
|
}
|
||||||
|
|
||||||
private function htmlEncode($s)
|
private function htmlEncode($s)
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
|
|
|
@ -674,7 +674,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface
|
||||||
{
|
{
|
||||||
$container = new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
|
$container = new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
|
||||||
|
|
||||||
if (class_exists('ProxyManager\Configuration')) {
|
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator')) {
|
||||||
$container->setProxyInstantiator(new RuntimeInstantiator());
|
$container->setProxyInstantiator(new RuntimeInstantiator());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,8 +694,8 @@ abstract class Kernel implements KernelInterface, TerminableInterface
|
||||||
// cache the container
|
// cache the container
|
||||||
$dumper = new PhpDumper($container);
|
$dumper = new PhpDumper($container);
|
||||||
|
|
||||||
if (class_exists('ProxyManager\Configuration')) {
|
if (class_exists('ProxyManager\Configuration') && class_exists('Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper')) {
|
||||||
$dumper->setProxyDumper(new ProxyDumper());
|
$dumper->setProxyDumper(new ProxyDumper(md5((string) $cache)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass, 'file' => $cache->getPath()));
|
$content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass, 'file' => $cache->getPath()));
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
namespace Symfony\Component\HttpKernel\Tests\DataCollector;
|
namespace Symfony\Component\HttpKernel\Tests\DataCollector;
|
||||||
|
|
||||||
use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector;
|
use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\VarDumper\Cloner\Data;
|
use Symfony\Component\VarDumper\Cloner\Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DumpDataCollectorTest
|
|
||||||
*
|
|
||||||
* @author Nicolas Grekas <p@tchwork.com>
|
* @author Nicolas Grekas <p@tchwork.com>
|
||||||
*/
|
*/
|
||||||
class DumpDataCollectorTest extends \PHPUnit_Framework_TestCase
|
class DumpDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||||
|
@ -58,6 +58,49 @@ class DumpDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertSame('a:0:{}', $collector->serialize());
|
$this->assertSame('a:0:{}', $collector->serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testCollectDefault()
|
||||||
|
{
|
||||||
|
$data = new Data(array(array(123)));
|
||||||
|
|
||||||
|
$collector = new DumpDataCollector();
|
||||||
|
|
||||||
|
$collector->dump($data);
|
||||||
|
$line = __LINE__ - 1;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
$collector->collect(new Request(), new Response());
|
||||||
|
$output = ob_get_clean();
|
||||||
|
|
||||||
|
$this->assertSame("DumpDataCollectorTest.php on line {$line}:\n123\n", $output);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testCollectHtml()
|
||||||
|
{
|
||||||
|
$data = new Data(array(array(123)));
|
||||||
|
|
||||||
|
$collector = new DumpDataCollector(null, 'test://%f:%l');
|
||||||
|
|
||||||
|
$collector->dump($data);
|
||||||
|
$line = __LINE__ - 1;
|
||||||
|
$file = __FILE__;
|
||||||
|
$xOutput = <<<EOTXT
|
||||||
|
|
||||||
|
<span class="sf-dump-meta"><a href="test://{$file}:{$line}" title="{$file}">DumpDataCollectorTest.php</a> on line {$line}:</span> <pre class=sf-dump id=sf-dump data-indent-pad=" "><span class=sf-dump-num>123</span>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
EOTXT;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
$response = new Response();
|
||||||
|
$response->headers->set('Content-Type', 'text/html');
|
||||||
|
$collector->collect(new Request(), $response);
|
||||||
|
$output = ob_get_clean();
|
||||||
|
$output = preg_replace('#<(script|style).*?</\1>#s', '', $output);
|
||||||
|
$output = preg_replace('/sf-dump-\d+/', 'sf-dump', $output);
|
||||||
|
|
||||||
|
$this->assertSame($xOutput, $output);
|
||||||
|
}
|
||||||
|
|
||||||
public function testFlush()
|
public function testFlush()
|
||||||
{
|
{
|
||||||
$data = new Data(array(array(456)));
|
$data = new Data(array(array(456)));
|
||||||
|
|
|
@ -217,7 +217,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
|
||||||
* @param array $cookieParts
|
* @param array $cookieParts
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return TokenInterface
|
* @return UserInterface
|
||||||
*/
|
*/
|
||||||
abstract protected function processAutoLoginCookie(array $cookieParts, Request $request);
|
abstract protected function processAutoLoginCookie(array $cookieParts, Request $request);
|
||||||
|
|
||||||
|
|
|
@ -292,15 +292,10 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
|
||||||
*/
|
*/
|
||||||
public function getMessages($locale = null)
|
public function getMessages($locale = null)
|
||||||
{
|
{
|
||||||
$catalogues = array();
|
$catalogue = $this->getCatalogue($locale);
|
||||||
$catalogues[] = $catalogue = $this->getCatalogue($locale);
|
$messages = $catalogue->all();
|
||||||
while ($catalogue = $catalogue->getFallbackCatalogue()) {
|
while ($catalogue = $catalogue->getFallbackCatalogue()) {
|
||||||
$catalogues[] = $catalogue;
|
$messages = array_replace_recursive($catalogue->all(), $messages);
|
||||||
}
|
|
||||||
$messages = array();
|
|
||||||
for ($i = count($catalogues) - 1; $i >= 0; $i--) {
|
|
||||||
$localeMessages = $catalogues[$i]->all();
|
|
||||||
$messages = array_replace_recursive($messages, $localeMessages);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $messages;
|
return $messages;
|
||||||
|
|
Reference in New Issue