diff --git a/.composer-auth.json b/.composer-auth.json new file mode 100644 index 0000000000000..bf40540cc644c --- /dev/null +++ b/.composer-auth.json @@ -0,0 +1,7 @@ +{ + "github-oauth": { + "github.com": "PLEASE DO NOT USE THIS TOKEN IN YOUR OWN PROJECTS/FORKS", + "github.com": "This token is reserved for testing the symfony/symfony repository", + "github.com": "52270bad1071a099c8d24629f2db2b7f07db960d" + } +} diff --git a/.php_cs b/.php_cs index 11d42d1287e47..290e9bf5fbcba 100644 --- a/.php_cs +++ b/.php_cs @@ -24,5 +24,7 @@ return Symfony\CS\Config\Config::create() ->notPath('src/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml') // test template ->notPath('src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php') + // explicit heredoc test + ->notPath('src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php') ) ; diff --git a/.travis.yml b/.travis.yml index ef1ef5c7987f4..99b2dc0671b9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ services: mongodb before_install: - if [[ ! $deps && ! $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; fi; - - if [[ ! $deps && ! -d php-$MIN_PHP/sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP.tar.bz2 -O - | tar -xj; (cd php-$MIN_PHP; ./configure --enable-sigchild --enable-pcntl; make -j2); fi; + - if [[ ! $deps && $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && ! -d php-$MIN_PHP/sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP.tar.bz2 -O - | tar -xj; (cd php-$MIN_PHP; ./configure --enable-sigchild --enable-pcntl; make -j2); fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi; - echo memory_limit = -1 >> $INI_FILE - echo session.gc_probability = 0 >> $INI_FILE @@ -43,6 +43,7 @@ before_install: - if [[ $TRAVIS_PHP_VERSION = 5.* && ! $deps ]]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> $INI_FILE); fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo extension = ldap.so >> $INI_FILE; fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi; + - if [[ $TRAVIS_REPO_SLUG = symfony/symfony ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; - if [[ $deps != skip ]]; then composer self-update; fi; - if [[ $deps != skip ]]; then ./phpunit install; fi; - export PHPUNIT=$(readlink -f ./phpunit) @@ -54,13 +55,13 @@ install: - if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; fi; - if [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]]; then LEGACY=,legacy; fi; - export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev; - - if [[ ! $deps ]]; then composer --prefer-source install; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi; + - if [[ ! $deps ]]; then composer update --prefer-dist; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi; script: - if [[ ! $deps ]]; then echo "$COMPONENTS" | parallel --gnu '$PHPUNIT --exclude-group tty,benchmark,intl-data {}'; fi; - if [[ ! $deps ]]; then echo -e "\\nRunning tests requiring tty"; $PHPUNIT --group tty; fi; - - if [[ ! $deps && $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} ]]; then echo -e "1\\n0" | parallel --gnu 'echo -e "\\nPHP --enable-sigchild enhanced={}" && ENHANCE_SIGCHLD={} php-$MIN_PHP/sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/'; fi; - - if [[ $deps = high ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source update; $PHPUNIT --exclude-group tty,benchmark,intl-data'$LEGACY; fi; - - if [[ $deps = low ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi; + - if [[ ! $deps && $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} ]]; then echo -e "1\\n0" | xargs -I{} sh -c 'echo "\\nPHP --enable-sigchild enhanced={}" && ENHANCE_SIGCHLD={} php-$MIN_PHP/sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/'; fi; + - if [[ $deps = high ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer update --prefer-dist; $PHPUNIT --exclude-group tty,benchmark,intl-data'$LEGACY; fi; + - if [[ $deps = low ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer update --prefer-dist --prefer-lowest --prefer-stable; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi; - if [[ $deps = skip ]]; then echo This matrix line is skipped for pull requests.; fi; diff --git a/CHANGELOG-2.3.md b/CHANGELOG-2.3.md index 4974aa08b3a2c..f520c60219662 100644 --- a/CHANGELOG-2.3.md +++ b/CHANGELOG-2.3.md @@ -7,6 +7,34 @@ in 2.3 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.3.0...v2.3.1 +* 2.3.36 (2015-12-26) + + * bug #16864 [Yaml] fix indented line handling in folded blocks (xabbuh) + * bug #16826 Embedded identifier support (mihai-stancu) + * bug #17129 [Config] Fix array sort on normalization in edge case (romainneutron) + * bug #17094 [Process] More robustness and deterministic tests (nicolas-grekas) + * bug #17112 [PropertyAccess] Reorder elements array after PropertyPathBuilder::replace (alekitto) + * bug #16797 [Filesystem] Recursivly widen non-executable directories (Slamdunk) + * bug #17040 [Console] Avoid extra blank lines when rendering exceptions (ogizanagi) + * bug #17055 [Security] Verify if a password encoded with bcrypt is no longer than 72 characters (jakzal) + * bug #16959 [Form] fix #15544 when a collection type attribute "required" is false, "prototype" should too (HeahDude) + * bug #16860 [Yaml] do not remove "comments" in scalar blocks (xabbuh) + * bug #16971 [HttpFoundation] Added the ability of using BinaryFileResponse with stream wrappers (jakzal, Sander-Toonen) + * bug #17048 Fix the logout path when not using the router (stof) + * bug #17057 [FrameworkBundle][HttpKernel] the finder is required to discover bundle commands (xabbuh) + * bug #16915 [Process] Enhance compatiblity with --enable-sigchild (nicolas-grekas) + * bug #16829 [FrameworkBundle] prevent cache:clear creating too long paths (Tobion) + * bug #16870 [FrameworkBundle] Disable the server:run command when Process component is missing (gnugat, xabbuh) + * bug #16799 Improve error message for undefined DIC aliases (mpdude) + * bug #16772 Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error (weaverryan) + * bug #16753 [Process] Fix signaling/stopping logic on Windows (nicolas-grekas) + * bug #16733 [Console] do not encode backslashes in console default description (Tobion) + * bug #16312 [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released (mpdude) + * bug #16695 [SecurityBundle] disable the init:acl command if ACL is not used (Tobion) + * bug #16676 [HttpFoundation] Workaround HHVM rewriting HTTP response line (nicolas-grekas) + * bug #16668 [ClassLoader] Fix parsing namespace when token_get_all() is missing (nicolas-grekas) + * bug #16386 Bug #16343 [Router] Too many Routes ? (jelte) + * 2.3.35 (2015-11-23) * security #16631 CVE-2015-8124: Session Fixation in the "Remember Me" Login Feature (xabbuh) diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md index 19e9036c82bb2..0055a236352aa 100644 --- a/CHANGELOG-2.7.md +++ b/CHANGELOG-2.7.md @@ -7,6 +7,50 @@ 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.8 (2015-12-26) + + * bug #16864 [Yaml] fix indented line handling in folded blocks (xabbuh) + * bug #17052 Fixed flatten exception recursion with errors (GrahamCampbell) + * bug #16826 Embedded identifier support (mihai-stancu) + * bug #17079 Also transform inline mappings to objects (WouterJ) + * bug #17129 [Config] Fix array sort on normalization in edge case (romainneutron) + * bug #17094 [Process] More robustness and deterministic tests (nicolas-grekas) + * bug #17112 [PropertyAccess] Reorder elements array after PropertyPathBuilder::replace (alekitto) + * bug #16797 [Filesystem] Recursivly widen non-executable directories (Slamdunk) + * bug #17040 [Console] Avoid extra blank lines when rendering exceptions (ogizanagi) + * bug #17055 [Security] Verify if a password encoded with bcrypt is no longer than 72 characters (jakzal) + * bug #16959 [Form] fix #15544 when a collection type attribute "required" is false, "prototype" should too (HeahDude) + * bug #16860 [Yaml] do not remove "comments" in scalar blocks (xabbuh) + * bug #17002 [Console][Table] fixed render row that contains multiple cells. (aitboudad) + * bug #16971 [HttpFoundation] Added the ability of using BinaryFileResponse with stream wrappers (jakzal, Sander-Toonen) + * bug #17048 Fix the logout path when not using the router (stof) + * bug #17049 Fix the logout path when not using the router (stof) + * bug #17057 [FrameworkBundle][HttpKernel] the finder is required to discover bundle commands (xabbuh) + * bug #17006 [Form] Fix casting regression in DoctrineChoiceLoader (bendavies) + * bug #16915 [Process] Enhance compatiblity with --enable-sigchild (nicolas-grekas) + * bug #16829 [FrameworkBundle] prevent cache:clear creating too long paths (Tobion) + * bug #16921 Fix short array syntax for php 5.3 (ewgRa) + * bug #16450 [Serializer] Fixed `array_unique` on array of objects in `getAllowedAttributes`. (CornyPhoenix) + * bug #16757 [FrameworkBundle] [Translation] Fixed translations not written when no translations directory in update command (jeremyFreeAgent) + * bug #16871 [FrameworkBundle] Disable built-in server commands when Process component is missing (gnugat, xabbuh) + * bug #16870 [FrameworkBundle] Disable the server:run command when Process component is missing (gnugat, xabbuh) + * bug #16742 [Console][ProgressBar] redrawFrequency should never be 0 (dritter) + * bug #16799 Improve error message for undefined DIC aliases (mpdude) + * bug #16825 [VarDumper] fix .sf-dump z-index (debug bar conflict) (Antoine LA) + * bug #16772 Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error (weaverryan) + * bug #16753 [Process] Fix signaling/stopping logic on Windows (nicolas-grekas) + * bug #16733 [Console] do not encode backslashes in console default description (Tobion) + * bug #16312 [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released (mpdude) + * bug #16351 [WIP] [Form] [TwigBridge] Bootstrap horizontal theme missing tests (pieter2627) + * bug #16685 [Form] Fixed: Duplicate choice labels are remembered when using "choices_as_values" = false (webmozart) + * bug #16705 [Form] Deprecated setting "choices_as_values" to "false" (webmozart) + * bug #16695 [SecurityBundle] disable the init:acl command if ACL is not used (Tobion) + * bug #16679 [Form] Disabled view data validation if "data_class" is set to null (webmozart) + * bug #16676 [HttpFoundation] Workaround HHVM rewriting HTTP response line (nicolas-grekas) + * bug #16668 [ClassLoader] Fix parsing namespace when token_get_all() is missing (nicolas-grekas) + * bug #16386 Bug #16343 [Router] Too many Routes ? (jelte) + * bug #16651 [Debug] Ensure class declarations are loaded only once (nicolas-grekas) + * 2.7.7 (2015-11-23) * security #16631 CVE-2015-8124: Session Fixation in the "Remember Me" Login Feature (xabbuh) diff --git a/CHANGELOG-2.8.md b/CHANGELOG-2.8.md index 473d320587100..3154c3ed85eae 100644 --- a/CHANGELOG-2.8.md +++ b/CHANGELOG-2.8.md @@ -7,6 +7,43 @@ 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.2 (2016-01-14) + + * security #17359 do not ship with a custom rng implementation (xabbuh, fabpot) + * bug #17253 [Console] HHVM read input stream bug (mbutkereit) + * bug #17314 Fix max width for multibyte keys in choice question (mheki) + * bug #17326 [Console] Display console application name even when no version set (polc) + * bug #17328 [Serializer] Allow to use proxies in object_to_populate (dunglas) + * bug #17202 [FrameworkBundle] Don't log twice with the error handler (nicolas-grekas) + * bug #17347 Workaround https://bugs.php.net/63206 (nicolas-grekas) + * bug #17199 [Serializer] Allow context to contain not serializable data (dunglas, nicolas-grekas) + * bug #17334 [WebProfiler] Fixed sf-minitoolbar height (yceruto) + * bug #17140 [Serializer] Remove normalizer cache in Serializer class (jvasseur) + * bug #17320 [Debug] Fixed erroneous deprecation notice for extended Interfaces (peterrehm) + * bug #17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase) + * bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator (Disparity) + * bug #17298 [FrameworkBundle] Use proper class to fetch $versionStrategy property (dosten) + * bug #17287 [HttpKernel] Forcing string comparison on query parameters sort in UriSigner (Tim van Densen) + * bug #17279 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin) + * bug #17278 [FrameworkBundle] Add case in Kernel directory guess for PHPUnit (tgalopin) + * bug #17283 [WebProfilerBundle] Remove loading status from AJAX toolbar after error (kucharovic) + * bug #17275 [PhpUnitBridge] Re-enable the garbage collector (nicolas-grekas) + * bug #17276 [Process] Fix potential race condition (nicolas-grekas) + * bug #17261 [FrameworkBundle] Allow to autowire service_container (dunglas) + * bug #17183 [FrameworkBundle] Set the kernel.name properly after a cache warmup (jakzal) + * bug #17197 [Yaml] cast arrays to objects after parsing has finished (xabbuh) + * bug #17247 Fix toolbar display when nvd3 is loaded on page (Seldaek) + * bug #17159 [Yaml] recognize when a block scalar is left (xabbuh) + * bug #17195 bug #14246 [Filesystem] dumpFile() non atomic (Hidde Boomsma) + * feature #16747 [Form] Improved performance of ChoiceType and its subtypes (webmozart) + * bug #17179 [WebProfiler] Removed an object as route generator argument (iltar) + * bug #17177 [Process] Fix potential race condition leading to transient tests (nicolas-grekas) + * bug #17163 [Form] fix Catchable Fatal Error if choices is not an array (Gladhon, nicolas-grekas) + * bug #17152 [DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException (dunglas) + * bug #17119 [Form] improve deprecation message for "empty_value" and "choice_list" options. (hhamon) + * bug #17156 [HttpFoundation] add missing symfony/polyfill-php55 dependency (xabbuh) + * bug #17162 [Form] Fix regression on Collection type (hason) + * 2.8.1 (2015-12-26) * bug #16864 [Yaml] fix indented line handling in folded blocks (xabbuh) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 9b30d35c1a0ae..e131844910157 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -13,8 +13,8 @@ Symfony is the result of the work of many people who made the code better - Christophe Coevoet (stof) - Johannes S (johannes) - Kris Wallsmith (kriswallsmith) - - Jakub Zalas (jakubzalas) - Christian Flothmann (xabbuh) + - Jakub Zalas (jakubzalas) - Ryan Weaver (weaverryan) - Pascal Borreli (pborreli) - Hugo Hamon (hhamon) @@ -30,8 +30,8 @@ Symfony is the result of the work of many people who made the code better - Martin Hasoň (hason) - Wouter De Jong (wouterj) - Eriksen Costa (eriksencosta) - - Grégoire Pineau (lyrixx) - Javier Eguiluz (javier.eguiluz) + - Grégoire Pineau (lyrixx) - Kévin Dunglas (dunglas) - Jonathan Wage (jwage) - Alexandre Salomé (alexandresalome) @@ -49,17 +49,17 @@ Symfony is the result of the work of many people who made the code better - Konstantin Kudryashov (everzet) - Bilal Amarni (bamarni) - Florin Patan (florinpatan) + - Maxime Steinhausser (ogizanagi) - Eric Clemmons (ericclemmons) - Andrej Hudec (pulzarraider) - - Maxime Steinhausser (ogizanagi) - Deni - Henrik Westphal (snc) - Dariusz Górecki (canni) - Gábor Egyed (1ed) - Christian Raue + - Michel Weimerskirch (mweimerskirch) - Arnout Boks (aboks) - Kevin Bond (kbond) - - Michel Weimerskirch (mweimerskirch) - Douglas Greenshields (shieldo) - Lee McDermott - Brandon Turner @@ -67,11 +67,11 @@ Symfony is the result of the work of many people who made the code better - Daniel Holmes (dholmes) - Bart van den Burg (burgov) - Jordan Alliot (jalliot) + - Matthias Pigulla (mpdude) - John Wards (johnwards) - Fran Moreno (franmomu) - Antoine Hérault (herzult) - Toni Uebernickel (havvg) - - Matthias Pigulla (mpdude) - Arnaud Le Blanc (arnaud-lb) - Tim Nagel (merk) - Brice BERNARD (brikou) @@ -80,21 +80,21 @@ Symfony is the result of the work of many people who made the code better - lenar - Graham Campbell (graham) - Włodzimierz Gajda (gajdaw) + - Michal Piotrowski (eventhorizon) - Florian Voutzinos (florianv) + - Peter Rehm (rpet) - Colin Frei - Adrien Brault (adrienbrault) - excelwebzone - Jacob Dreesen (jdreesen) - - Michal Piotrowski (eventhorizon) + - Dariusz Ruminski - Peter Kokot (maastermedia) - Fabien Pennequin (fabienpennequin) - - Peter Rehm (rpet) - Pierre du Plessis (pierredup) - Alexander Schwenn (xelaris) - Gordon Franke (gimler) - Robert Schönthal (digitalkaoz) - Jérémy DERUSSÉ (jderusse) - - Dariusz Ruminski - Joshua Thijssen - Stefano Sala (stefano.sala) - David Buchmann (dbu) @@ -112,12 +112,15 @@ Symfony is the result of the work of many people who made the code better - Sebastiaan Stok (sstok) - Rafael Dohms (rdohms) - Arnaud Kleinpeter (nanocom) + - Alexander M. Turek (derrabus) - Tigran Azatyan (tigranazatyan) - Richard Shank (iampersistent) + - Charles Sarrazin (csarrazi) - Clemens Tolboom - Helmer Aaviksoo - Baptiste Clavié (talus) - Tugdual Saunier (tucksaun) + - Andréia Bohner (andreia) - Hiromi Hishida (77web) - Matthieu Ouellette-Vachon (maoueh) - Michał Pipa (michal.pipa) @@ -125,9 +128,7 @@ Symfony is the result of the work of many people who made the code better - Jonathan Ingram (jonathaningram) - Artur Kotyrba - Rouven Weßling (realityking) - - Charles Sarrazin (csarrazi) - Warnar Boekkooi (boekkooi) - - Andréia Bohner (andreia) - Dmitrii Chekaliuk (lazyhammer) - Clément JOBEILI (dator) - Dorian Villet (gnutix) @@ -135,19 +136,19 @@ Symfony is the result of the work of many people who made the code better - Richard Miller (mr_r_miller) - hacfi (hifi) - Mario A. Alvarez Garcia (nomack84) + - Thomas Rabaix (rande) - Dennis Benkert (denderello) - - Alexander M. Turek (derrabus) - Konstantin Myakshin (koc) - Benjamin Dulau (dbenjamin) - Andreas Hucks (meandmymonkey) - Mikael Pajunen - Noel Guilbert (noel) - Joel Wurtz (brouznouf) + - Evgeniy (ewgraf) - bronze1man - sun (sun) - Larry Garfield (crell) - Martin Schuhfuß (usefulthink) - - Thomas Rabaix (rande) - Matthieu Bontemps (mbontemps) - Pierre Minnieur (pminnieur) - fivestar @@ -163,7 +164,6 @@ Symfony is the result of the work of many people who made the code better - Lars Strojny (lstrojny) - Daniel Wehner - Rui Marinho (ruimarinho) - - Evgeniy (ewgraf) - Julien Brochet (mewt) - Sergey Linnik (linniksa) - Jáchym Toušek @@ -244,6 +244,7 @@ Symfony is the result of the work of many people who made the code better - Julien Galenski (ruian) - Bongiraud Dominique - janschoenherr + - Jannik Zschiesche (apfelbox) - Thomas Schulz (king2500) - Marco Pivetta (ocramius) - Ricard Clau (ricardclau) @@ -252,6 +253,7 @@ Symfony is the result of the work of many people who made the code better - Erin Millard - Matthew Lewinski (lewinski) - Antonio J. García Lagar (ajgarlag) + - Roumen Damianoff (roumen) - alquerci - Francesco Levorato - Vitaliy Zakharov (zakharovvi) @@ -273,7 +275,9 @@ Symfony is the result of the work of many people who made the code better - Stéphane PY (steph_py) - Philipp Kräutli (pkraeutli) - Kirill chEbba Chebunin (chebba) + - Filippo Tessarotto - Greg Thornton (xdissent) + - jeremyFreeAgent (jeremyfreeagent) - Costin Bereveanu (schniper) - Loïc Chardonnet (gnusat) - Marek Kalnik (marekkalnik) @@ -306,7 +310,6 @@ Symfony is the result of the work of many people who made the code better - Christophe L. (christophelau) - Massimiliano Arione (garak) - Anthon Pang (robocoder) - - Jannik Zschiesche (apfelbox) - Emanuele Gaspari (inmarelibero) - Dariusz Rumiński - Brian King @@ -321,9 +324,10 @@ Symfony is the result of the work of many people who made the code better - Markus Bachmann (baachi) - lancergr - Olivier Dolbeau (odolbeau) - - Roumen Damianoff (roumen) + - Ben Davies (bendavies) - vagrant - Asier Illarramendi (doup) + - Artur Melo (restless) - Chris Sedlmayr (catchamonkey) - Seb Koelen - Christoph Mewes (xrstf) @@ -348,10 +352,11 @@ Symfony is the result of the work of many people who made the code better - Sebastian Bergmann - Pablo Díez (pablodip) - Kevin McBride + - Ener-Getick (energetick) - Philipp Rieber (bicpi) - Manuel de Ruiter (manuel) - - Jérémy Romey (jeremyfreeagent) - Eduardo Oliveira (entering) + - Eugene Wissner - Iker Ibarguren (ikerib) - Ricardo Oliveira (ricardolotr) - ondrowan @@ -406,6 +411,7 @@ Symfony is the result of the work of many people who made the code better - Lenar Lõhmus - Benjamin Laugueux (yzalis) - Zach Badgett (zachbadgett) + - Loïc Faugeron - Aurélien Fredouelle - Pavel Campr (pcampr) - Johnny Robeson (johnny) @@ -435,6 +441,7 @@ Symfony is the result of the work of many people who made the code better - Åsmund Garfors - Maxime Douailin - Gregor Harlan + - Michael Hirschler (mvhirsch) - Javier López (loalf) - Reinier Kip - Dustin Dobervich (dustin10) @@ -465,7 +472,6 @@ Symfony is the result of the work of many people who made the code better - Sascha Grossenbacher - Szijarto Tamas - Benjamin Zikarsky (bzikarsky) - - Ben Davies (bendavies) - Mickaël Andrieu (mickaelandrieu) - Simon Schick (simonsimcity) - redstar504 @@ -485,13 +491,13 @@ Symfony is the result of the work of many people who made the code better - Mark Sonnabaum - Alexander Obuhovich (aik099) - jochenvdv - - Filippo Tessarotto - Arturas Smorgun (asarturas) - Alexander Volochnev (exelenz) - Michael Piecko - yclian - Sergio Santoro - Sebastian Grodzicki (sgrodzicki) + - Martin Hujer (martinhujer) - Pascal Helfenstein - Baldur Rensch (brensch) - Vladyslav Petrovych @@ -521,6 +527,7 @@ Symfony is the result of the work of many people who made the code better - Benoit Lévêque (benoit_leveque) - Jeroen Fiege (fieg) - Krzysiek Łabuś + - Ilya Antipenko (aivus) - Nicolas Dewez (nicolas_dewez) - Xavier Lacot (xavier) - Olivier Maisonneuve (olineuve) @@ -532,7 +539,6 @@ Symfony is the result of the work of many people who made the code better - fago - Harm van Tilborg - Jan Prieser - - Artur Melo (restless) - James Michael DuPont - Tom Klingenberg - Christopher Hall (mythmakr) @@ -628,6 +634,7 @@ Symfony is the result of the work of many people who made the code better - xaav - Jean-Christophe Cuvelier [Artack] - Mahmoud Mostafa (mahmoud) + - Pieter - Michael Tibben - Sander Marechal - Radosław Benkel @@ -635,7 +642,6 @@ Symfony is the result of the work of many people who made the code better - Mei Gwilym (meigwilym) - Michael H. Arieli (excelwebzone) - Luciano Mammino (loige) - - Michael Hirschler (mvhirsch) - fabios - Jérôme Vasseur - Sander Coolen (scoolen) @@ -646,6 +652,7 @@ Symfony is the result of the work of many people who made the code better - Irmantas Šiupšinskas (irmantas) - Charles-Henri Bruyand - Danilo Silva + - Konstantin S. M. Möllers (ksmmoellers) - Zachary Tong (polyfractal) - Hryhorii Hrebiniuk - dantleech @@ -748,7 +755,6 @@ Symfony is the result of the work of many people who made the code better - Brooks Boyd - Roger Webb - Dmitriy Simushev - - Martin Hujer (martinhujer) - Max Voloshin (maxvoloshin) - Nicolas Fabre (nfabre) - Raul Rodriguez (raul782) @@ -765,6 +771,7 @@ Symfony is the result of the work of many people who made the code better - Philipp Strube - Christian Sciberras - Anton Bakai + - Chad Sikorra (chadsikorra) - Clement Herreman (clemherreman) - Nyro (nyro) - Trent Steel (trsteel88) @@ -779,6 +786,8 @@ Symfony is the result of the work of many people who made the code better - Jakub Kulhan - Mo Di (modi) - Jeroen van den Enden (stoefke) + - Christian Wahler + - Jelte Steijaert (jelte) - Quique Porta (quiqueporta) - Tomasz Szymczyk (karion) - ConneXNL @@ -796,6 +805,7 @@ Symfony is the result of the work of many people who made the code better - Sebastian Göttschkes (sgoettschkes) - Tatsuya Tsuruoka - Ross Tuck + - Zander Baldwin - Kévin Gomez (kevin) - azine - Dawid Sajdak @@ -835,11 +845,14 @@ Symfony is the result of the work of many people who made the code better - m.chwedziak - Philip Frank - Lance McNearney + - Dominik Ritter (dritter) - Frank Neff (fneff) + - Roman Lapin (memphys) - Giorgio Premi - caponica - Matt Daum (daum) - Alberto Pirovano (geezmo) + - Jules Pietri (heah) - Pete Mitchell (peterjmit) - Tom Corrigan (tomcorrigan) - Martin Pärtel @@ -868,6 +881,7 @@ Symfony is the result of the work of many people who made the code better - Adrien Samson (adriensamson) - Samuel Gordalina (gordalina) - Max Romanovsky (maxromanovsky) + - Dariusz Ruminski - Mathieu Morlon - Daniel Tschinder - Rafał Muszyński (rafmus90) @@ -948,6 +962,7 @@ Symfony is the result of the work of many people who made the code better - 2manypeople - Wing - Thomas Bibb + - Alessandro Chitolina - Matt Farmer - catch - Alexandre Segura @@ -977,6 +992,7 @@ Symfony is the result of the work of many people who made the code better - nuncanada - flack - František Bereň + - Almog Baku (almogbaku) - Christoph Nissle (derstoffel) - Ionel Scutelnicu (ionelscutelnicu) - Nicolas Tallefourtané (nicolab) @@ -1046,6 +1062,7 @@ Symfony is the result of the work of many people who made the code better - Drew Butler - J Bruni - Alexey Prilipko + - Oleg Voronkovich - bertillon - Victor Bocharsky (bocharsky_bw) - Luca Genuzio (genuzio) @@ -1092,6 +1109,7 @@ Symfony is the result of the work of many people who made the code better - Alex Pods - hadriengem - timaschew + - Jelle Kapitein - Ian Phillips - Haritz - Matthieu Prat @@ -1104,6 +1122,7 @@ Symfony is the result of the work of many people who made the code better - David Windell - Gabriel Birke - skafandri + - NothingWeAre - Alan Chen - Maerlyn - Even André Fiskvik @@ -1112,6 +1131,7 @@ Symfony is the result of the work of many people who made the code better - Lenar Lõhmus - Cristian Gonzalez - AlberT + - hainey - Juan M Martínez - Gilles Gauthier - ddebree @@ -1121,6 +1141,7 @@ Symfony is the result of the work of many people who made the code better - possum - Rafał - Adria Lopez (adlpz) + - Andreas Schempp (aschempp) - Rosio (ben-rosio) - Simon Paarlberg (blamh) - Jeroen Thora (bolle) @@ -1147,7 +1168,9 @@ Symfony is the result of the work of many people who made the code better - Pablo Monterde Perez (plebs) - Jimmy Leger (redpanda) - Pavel Batanov (scaytrase) + - Simone Di Maulo (toretto460) - Cyrille Jouineau (tuxosaurus) + - Sander Toonen (xatoo) - Yorkie Chadwick (yorkie76) - Yanick Witschi - Ondrej Mirtes @@ -1197,6 +1220,7 @@ Symfony is the result of the work of many people who made the code better - Vladimir Sazhin - lol768 - jamogon + - Antoine LA - Vyacheslav Slinko - Johannes - Jörg Rühl @@ -1219,7 +1243,6 @@ Symfony is the result of the work of many people who made the code better - Sam Williams - Adrian Philipp - James Michael DuPont - - Eugene Wissner - Kasperki - Tammy D - Ondrej Slinták @@ -1237,6 +1260,7 @@ Symfony is the result of the work of many people who made the code better - Pierre-Louis LAUNAY - djama - Eduardo Conceição + - Sébastien Santoro - Jon Cave - Sébastien HOUZE - Abdulkadir N. A. @@ -1248,6 +1272,7 @@ Symfony is the result of the work of many people who made the code better - Norman Soetbeer - Benjamin Long - Matt Janssen + - Jeremy Benoist - Peter Gribanov - kwiateusz - David Soria Parra @@ -1267,6 +1292,7 @@ Symfony is the result of the work of many people who made the code better - Dawid Nowak - Richard Quadling - Karolis Daužickas + - Baptiste Lafontaine - tirnanog06 - phc - Дмитрий Пацура @@ -1314,6 +1340,7 @@ Symfony is the result of the work of many people who made the code better - Ismail Faizi (kanafghan) - Sébastien Armand (khepin) - Krzysztof Menżyk (krymen) + - Krzysztof Piasecki (krzysztek) - samuel laulhau (lalop) - Laurent Bachelier (laurentb) - Jérôme Parmentier (lctrs) diff --git a/LICENSE b/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/UPGRADE-3.0.md b/UPGRADE-3.0.md index 9467925e56c28..a5f1f86c00419 100644 --- a/UPGRADE-3.0.md +++ b/UPGRADE-3.0.md @@ -10,7 +10,7 @@ UPGRADE FROM 2.x to 3.0 | -------- | --- | `registerNamespaces()` | `addPrefixes()` | `registerPrefixes()` | `addPrefixes()` - | `registerNamespaces()` | `addPrefix()` + | `registerNamespace()` | `addPrefix()` | `registerPrefix()` | `addPrefix()` | `getNamespaces()` | `getPrefixes()` | `getNamespaceFallbacks()` | `getFallbackDirs()` diff --git a/appveyor.yml b/appveyor.yml index f4abf2e89855a..9cd1d0b10e6a1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,9 +50,11 @@ install: - appveyor DownloadFile https://getcomposer.org/composer.phar - copy /Y php.ini-max php.ini - cd c:\projects\symfony + - mkdir %APPDATA%\Composer + - IF %APPVEYOR_REPO_NAME%==symfony/symfony copy /Y .composer-auth.json %APPDATA%\Composer\auth.json - php phpunit install - IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev) - - composer update --prefer-source --no-progress --ansi + - composer update --prefer-dist --no-progress --ansi test_script: - cd c:\projects\symfony diff --git a/phpunit b/phpunit index 146ab9d37610c..0517719add9e6 100755 --- a/phpunit +++ b/phpunit @@ -53,7 +53,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ chdir("phpunit-$PHPUNIT_VERSION"); passthru("$COMPOSER remove --no-update symfony/yaml"); passthru("$COMPOSER require --dev --no-update symfony/phpunit-bridge \">=2.8@dev\""); - passthru("$COMPOSER install --prefer-source --no-progress --ansi"); + passthru("$COMPOSER install --prefer-dist --no-progress --ansi"); file_put_contents('phpunit', <<registry = $registry; - $this->choiceListFactory = $choiceListFactory ?: new PropertyAccessDecorator(new DefaultChoiceListFactory(), $propertyAccessor); + $this->choiceListFactory = $choiceListFactory ?: new CachingFactoryDecorator( + new PropertyAccessDecorator( + new DefaultChoiceListFactory(), + $propertyAccessor + ) + ); } public function buildForm(FormBuilderInterface $builder, array $options) diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php index 7e0c6cb6cda70..196d7607356b7 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php @@ -12,6 +12,7 @@ namespace Symfony\Bridge\Doctrine\Form\Type; use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\Query\Parameter; use Doctrine\ORM\QueryBuilder; use Symfony\Bridge\Doctrine\Form\ChoiceList\ORMQueryBuilderLoader; use Symfony\Component\Form\Exception\UnexpectedTypeException; @@ -86,8 +87,20 @@ public function getBlockPrefix() public function getQueryBuilderPartsForCachingHash($queryBuilder) { return array( - $queryBuilder->getQuery()->getSQL(), - $queryBuilder->getParameters()->toArray(), + $queryBuilder->getQuery()->getSQL(), + array_map(array($this, 'parameterToArray'), $queryBuilder->getParameters()->toArray()), ); } + + /** + * Converts a query parameter to an array. + * + * @param Parameter $parameter The query parameter + * + * @return array The array representation of the parameter + */ + private function parameterToArray(Parameter $parameter) + { + return array($parameter->getName(), $parameter->getType(), $parameter->getValue()); + } } diff --git a/src/Symfony/Bridge/Doctrine/LICENSE b/src/Symfony/Bridge/Doctrine/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/src/Symfony/Bridge/Doctrine/LICENSE +++ b/src/Symfony/Bridge/Doctrine/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php index dc22e235959bd..6e330e558aa06 100644 --- a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php +++ b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php @@ -14,6 +14,7 @@ use Doctrine\Common\Persistence\Mapping\ClassMetadataFactory; use Doctrine\Common\Persistence\Mapping\MappingException; use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\Mapping\MappingException as OrmMappingException; use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\PropertyInfo\Type; @@ -44,6 +45,8 @@ public function getProperties($class, array $context = array()) $metadata = $this->classMetadataFactory->getMetadataFor($class); } catch (MappingException $exception) { return; + } catch (OrmMappingException $exception) { + return; } return array_merge($metadata->getFieldNames(), $metadata->getAssociationNames()); @@ -58,6 +61,8 @@ public function getTypes($class, $property, array $context = array()) $metadata = $this->classMetadataFactory->getMetadataFor($class); } catch (MappingException $exception) { return; + } catch (OrmMappingException $exception) { + return; } if ($metadata->hasAssociation($property)) { diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index 9681629b1a540..fa0bd27fd3d6c 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -1140,6 +1140,72 @@ public function testLoaderCaching() $this->assertSame($choiceLoader1, $choiceLoader3); } + public function testLoaderCachingWithParameters() + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + $entity3 = new SingleIntIdEntity(3, 'Baz'); + + $this->persist(array($entity1, $entity2, $entity3)); + + $repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS); + + $entityType = new EntityType( + $this->emRegistry, + PropertyAccess::createPropertyAccessor() + ); + + $entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry); + + $factory = Forms::createFormFactoryBuilder() + ->addType($entityType) + ->addTypeGuesser($entityTypeGuesser) + ->getFormFactory(); + + $formBuilder = $factory->createNamedBuilder('form', 'Symfony\Component\Form\Extension\Core\Type\FormType'); + + $formBuilder->add('property1', 'Symfony\Bridge\Doctrine\Form\Type\EntityType', array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => $repo->createQueryBuilder('e')->where('e.id = :id')->setParameter('id', 1), + )); + + $formBuilder->add('property2', 'Symfony\Bridge\Doctrine\Form\Type\EntityType', array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => function (EntityRepository $repo) { + return $repo->createQueryBuilder('e')->where('e.id = :id')->setParameter('id', 1); + }, + )); + + $formBuilder->add('property3', 'Symfony\Bridge\Doctrine\Form\Type\EntityType', array( + 'em' => 'default', + 'class' => self::SINGLE_IDENT_CLASS, + 'query_builder' => function (EntityRepository $repo) { + return $repo->createQueryBuilder('e')->where('e.id = :id')->setParameter('id', 1); + }, + )); + + $form = $formBuilder->getForm(); + + $form->submit(array( + 'property1' => 1, + 'property2' => 1, + 'property3' => 2, + )); + + $choiceLoader1 = $form->get('property1')->getConfig()->getOption('choice_loader'); + $choiceLoader2 = $form->get('property2')->getConfig()->getOption('choice_loader'); + $choiceLoader3 = $form->get('property3')->getConfig()->getOption('choice_loader'); + + $this->assertInstanceOf('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface', $choiceLoader1); + $this->assertSame($choiceLoader1, $choiceLoader2); + $this->assertSame($choiceLoader1, $choiceLoader3); + } + + /** + * @group legacy + */ public function testCacheChoiceLists() { $entity1 = new SingleIntIdEntity(1, 'Foo'); diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php index df6c355895086..376208088c1d1 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php @@ -81,4 +81,14 @@ public function typesProvider() array('notMapped', null), ); } + + public function testGetPropertiesCatchException() + { + $this->assertNull($this->extractor->getProperties('Not\Exist')); + } + + public function testGetTypesCatchException() + { + $this->assertNull($this->extractor->getTypes('Not\Exist', 'baz')); + } } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php index 6efeebc451818..c54556b243475 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -11,6 +11,7 @@ namespace Symfony\Bridge\Doctrine\Tests\Validator\Constraints; +use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\Persistence\ObjectRepository; @@ -336,6 +337,44 @@ public function testValidateUniquenessWithUnrewoundArray() $this->assertNoViolation(); } + /** + * @dataProvider resultTypesProvider + */ + public function testValidateResultTypes($entity1, $result) + { + $constraint = new UniqueEntity(array( + 'message' => 'myMessage', + 'fields' => array('name'), + 'em' => self::EM_NAME, + 'repositoryMethod' => 'findByCustom', + )); + + $repository = $this->createRepositoryMock(); + $repository->expects($this->once()) + ->method('findByCustom') + ->will($this->returnValue($result)) + ; + $this->em = $this->createEntityManagerMock($repository); + $this->registry = $this->createRegistryMock($this->em); + $this->validator = $this->createValidator(); + $this->validator->initialize($this->context); + + $this->validator->validate($entity1, $constraint); + + $this->assertNoViolation(); + } + + public function resultTypesProvider() + { + $entity = new SingleIntIdEntity(1, 'foo'); + + return array( + array($entity, array($entity)), + array($entity, new \ArrayIterator(array($entity))), + array($entity, new ArrayCollection(array($entity))), + ); + } + public function testAssociatedEntity() { $constraint = new UniqueEntity(array( diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php index 0fbf42c5bec65..edd972b9831fe 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php @@ -114,6 +114,10 @@ public function validate($entity, Constraint $constraint) $repository = $em->getRepository(get_class($entity)); $result = $repository->{$constraint->repositoryMethod}($criteria); + if ($result instanceof \IteratorAggregate) { + $result = $result->getIterator(); + } + /* If the result is a MongoCursor, it must be advanced to the first * element. Rewinding should have no ill effect if $result is another * iterator implementation. diff --git a/src/Symfony/Bridge/Monolog/LICENSE b/src/Symfony/Bridge/Monolog/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/src/Symfony/Bridge/Monolog/LICENSE +++ b/src/Symfony/Bridge/Monolog/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/PhpUnit/LICENSE b/src/Symfony/Bridge/PhpUnit/LICENSE index ef1cde91a61c3..39fa189d2b5fc 100644 --- a/src/Symfony/Bridge/PhpUnit/LICENSE +++ b/src/Symfony/Bridge/PhpUnit/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2015 Fabien Potencier +Copyright (c) 2014-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/PhpUnit/README.md b/src/Symfony/Bridge/PhpUnit/README.md index ef5f76f1a7f93..90dbe83bb8e79 100644 --- a/src/Symfony/Bridge/PhpUnit/README.md +++ b/src/Symfony/Bridge/PhpUnit/README.md @@ -5,7 +5,6 @@ Provides utilities for PHPUnit, especially user deprecation notices management. It comes with the following features: - * disable the garbage collector; * enforce a consistent `C` locale; * auto-register `class_exists` to load Doctrine annotations; * print a user deprecation notices summary at the end of the test suite; diff --git a/src/Symfony/Bridge/PhpUnit/bootstrap.php b/src/Symfony/Bridge/PhpUnit/bootstrap.php index 0a43d98bab851..1283da08fa408 100644 --- a/src/Symfony/Bridge/PhpUnit/bootstrap.php +++ b/src/Symfony/Bridge/PhpUnit/bootstrap.php @@ -17,12 +17,6 @@ return; } -if (PHP_VERSION_ID >= 50400 && gc_enabled()) { - // Disabling Zend Garbage Collection to prevent segfaults with PHP5.4+ - // https://bugs.php.net/bug.php?id=53976 - gc_disable(); -} - // Enforce a consistent locale setlocale(LC_ALL, 'C'); diff --git a/src/Symfony/Bridge/ProxyManager/LICENSE b/src/Symfony/Bridge/ProxyManager/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/src/Symfony/Bridge/ProxyManager/LICENSE +++ b/src/Symfony/Bridge/ProxyManager/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Swiftmailer/LICENSE b/src/Symfony/Bridge/Swiftmailer/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/src/Symfony/Bridge/Swiftmailer/LICENSE +++ b/src/Symfony/Bridge/Swiftmailer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Twig/Extension/AssetExtension.php b/src/Symfony/Bridge/Twig/Extension/AssetExtension.php index d90d13f6fd3d4..a72f4503dd869 100644 --- a/src/Symfony/Bridge/Twig/Extension/AssetExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/AssetExtension.php @@ -98,19 +98,16 @@ private function getLegacyAssetUrl($path, $packageName = null, $absolute = false { if ($version) { $package = $this->packages->getPackage($packageName); - $class = new \ReflectionClass($package); - while ('Symfony\Component\Asset\Package' !== $class->getName()) { - $class = $class->getParentClass(); - } - - $v = $class->getProperty('versionStrategy'); + $v = new \ReflectionProperty('Symfony\Component\Asset\Package', 'versionStrategy'); $v->setAccessible(true); + $currentVersionStrategy = $v->getValue($package); if (property_exists($currentVersionStrategy, 'format')) { $f = new \ReflectionProperty($currentVersionStrategy, 'format'); $f->setAccessible(true); + $format = $f->getValue($currentVersionStrategy); $v->setValue($package, new StaticVersionStrategy($version, $format)); diff --git a/src/Symfony/Bridge/Twig/LICENSE b/src/Symfony/Bridge/Twig/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/src/Symfony/Bridge/Twig/LICENSE +++ b/src/Symfony/Bridge/Twig/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php index a6169889c4a75..ce6d1b7c677e4 100644 --- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php +++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php @@ -13,9 +13,9 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; /** * DebugExtension. diff --git a/src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE index ef1cde91a61c3..39fa189d2b5fc 100644 --- a/src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2015 Fabien Potencier +Copyright (c) 2014-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index 647dc0fd58506..414b6d541f1f9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -52,7 +52,7 @@ protected function configure() ->addOption('symlink', null, InputOption::VALUE_NONE, 'Symlinks the assets instead of copying it') ->addOption('relative', null, InputOption::VALUE_NONE, 'Make relative symlinks') ->setDescription('Installs bundles web assets under a public web directory') - ->setHelp(<<setHelp(<<<'EOT' The %command.name% command installs bundle assets into a given directory (e.g. the web directory). diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index 71208b30929fc..eb8bbbadb2891 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -38,7 +38,7 @@ protected function configure() new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), )) ->setDescription('Clears the cache') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command clears the application cache for a given environment and debug mode: @@ -164,9 +164,18 @@ protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = tr } // fix references to kernel/container related classes - $search = $tempKernel->getName().ucfirst($tempKernel->getEnvironment()); - $replace = $realKernel->getName().ucfirst($realKernel->getEnvironment()); - foreach (Finder::create()->files()->name($search.'*')->in($warmupDir) as $file) { + $fileSearch = $tempKernel->getName().ucfirst($tempKernel->getEnvironment()).'*'; + $search = array( + $tempKernel->getName().ucfirst($tempKernel->getEnvironment()), + sprintf('\'kernel.name\' => \'%s\'', $tempKernel->getName()), + sprintf('key="kernel.name">%s<', $tempKernel->getName()), + ); + $replace = array( + $realKernel->getName().ucfirst($realKernel->getEnvironment()), + sprintf('\'kernel.name\' => \'%s\'', $realKernel->getName()), + sprintf('key="kernel.name">%s<', $realKernel->getName()), + ); + foreach (Finder::create()->files()->name($fileSearch)->in($warmupDir) as $file) { $content = str_replace($search, $replace, file_get_contents($file)); file_put_contents(str_replace($search, $replace, $file), $content); unlink($file); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php index fdbf9d6d7be97..1e0c4b6b3a251 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php @@ -34,7 +34,7 @@ protected function configure() new InputOption('no-optional-warmers', '', InputOption::VALUE_NONE, 'Skip optional cache warmers (faster)'), )) ->setDescription('Warms up an empty cache') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command warms up the cache. Before running this command, the cache must be empty. diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php index 6b1d9ea2c19b1..1d015c94ac0b4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php @@ -40,7 +40,7 @@ protected function configure() new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (yaml or xml)', 'yaml'), )) ->setDescription('Dumps the default configuration for an extension') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command dumps the default configuration for an extension/bundle. diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index 42ad9ba91ce12..3c8eca370ffec 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -54,7 +54,7 @@ protected function configure() new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw description'), )) ->setDescription('Displays current services for an application') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command displays all configured public services: php %command.full_name% diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php index 9d77ba03eacde..ec45ef04fe5fa 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php @@ -58,7 +58,7 @@ protected function configure() new InputOption('base-uri', null, InputOption::VALUE_REQUIRED, 'The base URI'), )) ->setDescription('[DEPRECATED] Dumps all routes as Apache rewrite rules') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% dumps all routes as Apache rewrite rules. These can then be used with the ApacheUrlMatcher to use Apache for route matching. diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index d631733423cf5..f8fae2b584282 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -61,7 +61,7 @@ protected function configure() new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw route(s)'), )) ->setDescription('Displays current routes for an application') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% displays the configured routes: php %command.full_name% diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php index 7b17e2529436c..2e23ad72c2aef 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php @@ -57,7 +57,7 @@ protected function configure() new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Sets the URI host'), )) ->setDescription('Helps debug routes by simulating a path info match') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% shows which routes match a given request and which don't and for what reason: php %command.full_name% /foo diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index 9be88e427e6f9..ef5c0bbbe0f09 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -40,7 +40,7 @@ protected function configure() )) ->setName('server:run') ->setDescription('Runs PHP built-in web server') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% runs PHP built-in web server: %command.full_name% diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php index 01678dd890f8a..d5609750486a4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php @@ -46,7 +46,7 @@ protected function configure() new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'), )) ->setDescription('Updates the translation file') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command extract translation strings from templates of a given bundle or the app folder. It can display them or merge the new ones into the translation files. When new translation strings are found it can automatically add a prefix to the translation diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 6d9c5f892134b..5b742830419ef 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -143,6 +143,8 @@ public function load(array $configs, ContainerBuilder $container) } if ($container->getParameter('kernel.debug')) { + $definition->replaceArgument(2, -1 & ~(E_COMPILE_ERROR | E_PARSE | E_ERROR | E_CORE_ERROR | E_RECOVERABLE_ERROR)); + $loader->load('debug.xml'); $definition = $container->findDefinition('http_kernel'); @@ -154,7 +156,7 @@ public function load(array $configs, ContainerBuilder $container) $container->setDefinition('debug.event_dispatcher.parent', $definition); $container->setAlias('event_dispatcher', 'debug.event_dispatcher'); } else { - $definition->replaceArgument(2, E_COMPILE_ERROR | E_PARSE | E_ERROR | E_CORE_ERROR); + $definition->replaceArgument(1, null); } $this->addClassesToCompile(array( @@ -689,16 +691,17 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder $dirs[] = dirname($r->getFileName()).'/../Resources/translations'; } - $overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations'; + $rootDir = $container->getParameter('kernel.root_dir'); foreach ($container->getParameter('kernel.bundles') as $bundle => $class) { $reflection = new \ReflectionClass($class); if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/translations')) { $dirs[] = $dir; } - if (is_dir($dir = sprintf($overridePath, $bundle))) { + if (is_dir($dir = $rootDir.sprintf('/Resources/%s/translations', $bundle))) { $dirs[] = $dir; } } + foreach ($config['paths'] as $dir) { if (is_dir($dir)) { $dirs[] = $dir; @@ -706,7 +709,8 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder throw new \UnexpectedValueException(sprintf('%s defined in translator.paths does not exist or is not a directory', $dir)); } } - if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/translations')) { + + if (is_dir($dir = $rootDir.'/Resources/translations')) { $dirs[] = $dir; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml index 7789d404bab7b..8d6dd4bf50750 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml @@ -57,6 +57,19 @@ + + + + + + + + + + + + + @@ -69,6 +82,7 @@ + diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml index a4de2ce2a3002..91b4089651c10 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml @@ -46,7 +46,9 @@ The "%service_id%" service is deprecated since Symfony 2.7 and will be removed in 3.0. Use the "request_stack" service instead. - + + Symfony\Component\DependencyInjection\ContainerInterface + diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php index 8379c6830eb19..6acc04539393d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php @@ -95,13 +95,14 @@ private function getLegacyAssetUrl($path, $packageName = null, $version = null) if ($version) { $package = $this->packages->getPackage($packageName); - $v = new \ReflectionProperty($package, 'versionStrategy'); + $v = new \ReflectionProperty('Symfony\Component\Asset\Package', 'versionStrategy'); $v->setAccessible(true); $currentVersionStrategy = $v->getValue($package); $f = new \ReflectionProperty($currentVersionStrategy, 'format'); $f->setAccessible(true); + $format = $f->getValue($currentVersionStrategy); $v->setValue($package, new StaticVersionStrategy($version, $format)); diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php index aa8b66929c7ce..7f8de034f94b9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php @@ -80,10 +80,14 @@ private static function getPhpUnitCliConfigArgument() if (preg_match('/^-[^ \-]*c$/', $testArg) || $testArg === '--configuration') { $dir = realpath($reversedArgs[$argIndex - 1]); break; - } elseif (strpos($testArg, '--configuration=') === 0) { + } elseif (0 === strpos($testArg, '--configuration=')) { $argPath = substr($testArg, strlen('--configuration=')); $dir = realpath($argPath); break; + } elseif (0 === strpos($testArg, '-c')) { + $argPath = substr($testArg, strlen('-c')); + $dir = realpath($argPath); + break; } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php index 9830897914a3f..44e3b5d113020 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php @@ -81,5 +81,6 @@ public function testCacheIsFreshAfterCacheClearedWithWarmup() } } $this->assertTrue($found, 'Kernel file should present as resource'); + $this->assertRegExp(sprintf('/\'kernel.name\'\s*=>\s*\'%s\'/', $this->kernel->getName()), file_get_contents($containerFile), 'kernel.name is properly set on the dumped container'); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php index e7f170d075ddf..38ce8d3990514 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php @@ -12,7 +12,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; class TestExtension extends Extension implements PrependExtensionInterface diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php index 71528de92e916..9460799684bdd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php @@ -14,6 +14,7 @@ use Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper; use Symfony\Component\Asset\Package; use Symfony\Component\Asset\Packages; +use Symfony\Component\Asset\PathPackage; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; class AssetsHelperTest extends \PHPUnit_Framework_TestCase @@ -23,11 +24,14 @@ class AssetsHelperTest extends \PHPUnit_Framework_TestCase */ public function testLegacyGetUrl() { - $package = new Package(new StaticVersionStrategy('22', '%s?version=%s')); - $packages = new Packages($package); + $versionStrategy = new StaticVersionStrategy('22', '%s?version=%s'); + $package = new Package($versionStrategy); + $imagePackage = new PathPackage('images', $versionStrategy); + $packages = new Packages($package, array('images' => $imagePackage)); $helper = new AssetsHelper($packages); $this->assertEquals('me.png?version=42', $helper->getUrl('me.png', null, '42')); + $this->assertEquals('/images/me.png?version=42', $helper->getUrl('me.png', 'images', '42')); } /** diff --git a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php index 14271dc459a08..e12859661298b 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php @@ -43,7 +43,7 @@ protected function configure() $this ->setName('init:acl') ->setDescription('Mounts ACL tables in the database') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command mounts ACL tables in the database. php %command.full_name% diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php index 90b6b3e5eb238..dfedac3735f53 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/DependencyInjection/FirewallEntryPointExtension.php @@ -13,8 +13,8 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; class FirewallEntryPointExtension extends Extension { diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php index 4bdd3e8266e83..6d5715931e1fa 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/DependencyInjection/FormLoginExtension.php @@ -13,7 +13,7 @@ use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Extension\Extension; class FormLoginExtension extends Extension { diff --git a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php index 60afc27ea59d2..e902ab88f9531 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php @@ -54,7 +54,7 @@ protected function configure() $this ->setHelp( - $this->getHelp().<<getHelp().<<<'EOF' Or all template files in a bundle: diff --git a/src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig b/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig index 947df655836b8..72dea08ea21d7 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig +++ b/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig @@ -98,7 +98,7 @@ if (clazz) { var tags = document.getElementsByTagName('*'); - for (i = tags.length - 1; i >= 0 ; i--) { + for (i = tags.length - 1; i >= 0; i--) { if (tags[i].className === clazz) { tags[i].style.display = 'none'; } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php b/src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php index 57e201e32be4c..e405739581250 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php @@ -55,7 +55,7 @@ protected function configure() ->setDefinition(array( new InputArgument('token', InputArgument::REQUIRED, 'The profile token'), )) - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command exports a profile to the standard output: php %command.full_name% profile_token diff --git a/src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php b/src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php index 850d79c051d9d..1371a1b89ed58 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php @@ -55,7 +55,7 @@ protected function configure() ->setDefinition(array( new InputArgument('filename', InputArgument::OPTIONAL, 'The profile path'), )) - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command imports a profile: php %command.full_name% profile_filepath diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 51a52099b7d73..6d37caf4f11dc 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -307,7 +307,6 @@ public function searchResultsAction(Request $request, $token) 'end' => $end, 'limit' => $limit, 'panel' => null, - 'request' => $request, )), 200, array('Content-Type' => 'text/html')); } @@ -353,7 +352,6 @@ public function searchAction(Request $request) $tokens = $this->profiler->find($ip, $url, $limit, $method, $start, $end); return new RedirectResponse($this->generator->generate('_profiler_search_results', array( - 'request' => $request, 'token' => $tokens ? $tokens[0]['token'] : 'empty', 'ip' => $ip, 'method' => $method, diff --git a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php index 724fe5503b3b8..8af7c63e64aaa 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php +++ b/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/WebProfilerExtension.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\WebProfilerBundle\DependencyInjection; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE b/src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE index 43028bc600f26..12a74531e40a4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index 6f819e4275890..c25a5c54d6cd2 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -184,7 +184,7 @@ {% for index, call in stack if index > 1 %} {% if index == 2 %} -
    +