Merge branch '2.7' into 2.8

* 2.7:
  [HttpKernel] Fix lowest dep
  [Security] fix check for empty usernames
  [Form] updated exception message of ButtonBuilder::setRequestHandler()
  [travis] Fix deps=high jobs
  Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7
  [Serializer] Simplify AbstractNormalizer::prepareForDenormalization()
  [HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
  [DependencyInjection] Remove unused code in XmlFileLoader
  [HttpFoundation] Behaviour change in PHP7 for substr
  bumped Symfony version to 2.3.32
  updated VERSION for 2.3.31
  update CONTRIBUTORS for 2.3.31
  updated CHANGELOG for 2.3.31

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
	src/Symfony/Bundle/FrameworkBundle/composer.json
	src/Symfony/Component/HttpKernel/composer.json
This commit is contained in:
Nicolas Grekas 2015-07-22 13:24:41 +02:00
commit 6d82fb8c0c
18 changed files with 226 additions and 114 deletions

11
.gitignore vendored
View File

@ -1,8 +1,7 @@
.php_cs.cache
autoload.php
vendor/
composer.lock
composer.phar
package*.tar
packages.json
phpunit.xml
/vendor/
.php_cs.cache
composer.phar
package.tar
/packages.json

45
.travis.php Normal file
View File

@ -0,0 +1,45 @@
<?php
if (4 > $_SERVER['argc']) {
echo "Usage: commit-range branch dir1 dir2 ... dirN\n";
exit(1);
}
$dirs = $_SERVER['argv'];
array_shift($dirs);
$range = array_shift($dirs);
$branch = array_shift($dirs);
$packages = array();
$flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
foreach ($dirs as $dir) {
if (!`git diff --name-only $range -- $dir`) {
continue;
}
echo "$dir\n";
$package = json_decode(file_get_contents($dir.'/composer.json'));
$package->repositories = array(array(
'type' => 'composer',
'url' => 'file://'.__DIR__.'/',
));
file_put_contents($dir.'/composer.json', json_encode($package, $flags));
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
$package->version = $branch.'.x-dev';
$package->dist['type'] = 'tar';
$package->dist['url'] = 'file://'.__DIR__."/$dir/package.tar";
$packages[$package->name][$package->version] = $package;
$versions = file_get_contents('https://packagist.org/packages/'.$package->name.'.json');
$versions = json_decode($versions);
foreach ($versions->package->versions as $version => $package) {
$packages[$package->name] += array($version => $package);
}
}
file_put_contents('packages.json', json_encode(compact('packages'), $flags));

View File

@ -1,24 +0,0 @@
branch=$1
if [ -z "$branch" ]; then
echo 'Usage: branch dir1 dir2 ... dirN'
exit 1
fi
shift
components=$*
if [ -z "$components" ]; then
echo 'Usage: branch dir1 dir2 ... dirN'
exit 1
fi
echo '{"packages": {' > packages.json
for c in $components; do
sed -i ':a;N;$!ba;s#^{\n\(\s*\)\("name"\)#{\n\1"repositories": \[{ "type": "composer", "url": "file://'$(pwd)'/" }\],\n\1\2#' $c/composer.json
n=$(php -r '$n=json_decode(file_get_contents("'$c'/composer.json"));echo $n->name;')
echo '"'$n'": {"'$branch'.x-dev": ' >> packages.json
cat $c/composer.json >> packages.json
echo '"version": "'$branch.x-dev'",\n "dist": {"type": "tar", "url": "file://'$(pwd)/$c'/package'$branch'.tar"}\n}},' >> packages.json
done;
sed -i ':a;N;$!ba;s/\n}\n"/,\n "/g' packages.json
sed -i ':a;N;$!ba;s/}},$/\n}}\n}}/' packages.json
for c in $components; do
(cd $c && tar -cf package$branch.tar --exclude='package*.tar' *)
done

View File

@ -32,6 +32,7 @@ env:
before_install:
- composer self-update
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi;
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
@ -45,7 +46,7 @@ install:
- if [ "$deps" = "no" ]; then export SYMFONY_DEPRECATIONS_HELPER=strict; fi;
- if [ "$deps" = "no" ]; then composer --prefer-source install; fi;
- components=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n')
- if [ "$deps" != "no" ]; then sh .travis.sh $TRAVIS_BRANCH $components; fi;
- if [ "$deps" != "no" ]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $components; fi;
script:
- if [ "$deps" = "no" ]; then echo "$components" | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;

View File

@ -7,6 +7,37 @@ 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.31 (2015-07-13)
* bug #15248 Added 'default' color (jaytaph)
* bug #15243 Reload the session after regenerating its id (jakzal)
* bug #15202 [Security] allow to use `method` in XML configs (xabbuh)
* bug #15223 [Finder] Command::addAtIndex() fails with Command instance argument (thunderer)
* bug #15220 [DependencyInjection] Freeze also FrozenParameterBag::remove (lyrixx)
* bug #15110 Add a way to reset the singleton (dawehner)
* bug #15163 Update DateTimeToArrayTransformer.php (zhil)
* bug #15150 [Translation] Azerbaijani language pluralization rule is wrong (shehi)
* bug #15146 Towards 100% HHVM compat (nicolas-grekas)
* bug #15069 [Form] Fixed: Data mappers always receive forms indexed by their names (webmozart)
* bug #15137 [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser (Rvanlaak, xabbuh)
* bug #15083 [DependencyInjection] Fail when dumping a Definition with no class nor factory (nicolas-grekas)
* bug #15127 [Validator] fix validation for Maestro UK card numbers (xabbuh)
* bug #15128 DbalLogger: Small nonutf8 array fix (vpetrovych, weaverryan)
* bug #15048 [Translation][Form][choice] empty_value shouldn't be translated when it has an empty value (Restless-ET)
* bug #15117 [Form] fixed sending non array data on submit to ResizeListener (BruceWouaigne)
* bug #15086 Fixed the regexp for the validator of Maestro-based credit/debit cards (javiereguiluz)
* bug #15058 [Console] Fix STDERR output text on IBM iSeries OS400 (johnkary)
* bug #15065 [Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern) (webmozart)
* bug #15039 [Translation][update cmd] taken account into bundle overrides path. (aitboudad)
* bug #14964 [bugfix][MonologBridge] WebProcessor: passing $extraFields to BaseWebProcessor (MacDada)
* bug #15027 [Form] Fixed: Filter non-integers when selecting entities by int ID (webmozart, nicolas-grekas)
* bug #15000 [Debug] Fix fatal-errors handling on HHVM (nicolas-grekas)
* bug #14897 Allow new lines in Messages translated with transchoice() (replacement for #14867) (azine)
* bug #14895 [Form] Support DateTimeImmutable in transform() (c960657)
* bug #14859 Improve the config validation in TwigBundle (stof)
* bug #14785 [BrowserKit] Fix bug when uri starts with http. (amouhzi)
* bug #14807 [Security][Acl] enforce string identifiers (xabbuh)
* 2.3.30 (2015-05-30)
* bug #14262 [REVERTED] [TwigBundle] Refresh twig paths when resources change. (aitboudad)

View File

@ -15,11 +15,11 @@ Symfony is the result of the work of many people who made the code better
- Christophe Coevoet (stof)
- Jakub Zalas (jakubzalas)
- Pascal Borreli (pborreli)
- Christian Flothmann (xabbuh)
- Hugo Hamon (hhamon)
- Joseph Bielawski (stloyd)
- Karma Dordrak (drak)
- Ryan Weaver (weaverryan)
- Christian Flothmann (xabbuh)
- Lukas Kahwe Smith (lsmith)
- Romain Neutron (romain)
- Jeremy Mikola (jmikola)
@ -27,22 +27,23 @@ Symfony is the result of the work of many people who made the code better
- Benjamin Eberlei (beberlei)
- Igor Wiedler (igorw)
- Martin Hasoň (hason)
- Eriksen Costa (eriksencosta)
- Abdellatif Ait boudad (aitboudad)
- Eriksen Costa (eriksencosta)
- Grégoire Pineau (lyrixx)
- Wouter De Jong (wouterj)
- Jonathan Wage (jwage)
- Alexandre Salomé (alexandresalome)
- William Durand (couac)
- Kévin Dunglas (dunglas)
- ornicar
- stealth35 (stealth35)
- Alexander Mols (asm89)
- Kévin Dunglas (dunglas)
- Bulat Shakirzyanov (avalanche123)
- Francis Besset (francisbesset)
- Saša Stamenković (umpirsky)
- Henrik Bjørnskov (henrikbjorn)
- Miha Vrhovnik
- Diego Saint Esteben (dii3g0)
- Sarah Khalil (saro0h)
- Konstantin Kudryashov (everzet)
- Bilal Amarni (bamarni)
@ -55,15 +56,14 @@ Symfony is the result of the work of many people who made the code better
- Arnout Boks (aboks)
- Christian Raue
- Michel Weimerskirch (mweimerskirch)
- Diego Saint Esteben (dii3g0)
- Lee McDermott
- Brandon Turner
- Luis Cordova (cordoval)
- Douglas Greenshields (shieldo)
- Kevin Bond (kbond)
- Daniel Holmes (dholmes)
- Bart van den Burg (burgov)
- Jordan Alliot (jalliot)
- Kevin Bond (kbond)
- John Wards (johnwards)
- Fran Moreno (franmomu)
- Antoine Hérault (herzult)
@ -71,6 +71,7 @@ Symfony is the result of the work of many people who made the code better
- Gábor Egyed (1ed)
- Arnaud Le Blanc (arnaud-lb)
- Tim Nagel (merk)
- Maxime Steinhausser (ogizanagi)
- Brice BERNARD (brikou)
- marc.weistroff
- lenar
@ -83,16 +84,16 @@ Symfony is the result of the work of many people who made the code better
- excelwebzone
- Jacob Dreesen (jdreesen)
- Matthias Pigulla (mpdude)
- Fabien Pennequin (fabienpennequin)
- Peter Kokot (maastermedia)
- Peter Rehm (rpet)
- Michal Piotrowski (eventhorizon)
- Stefano Sala (stefano.sala)
- Javier Eguiluz (javier.eguiluz)
- Fabien Pennequin (fabienpennequin)
- Peter Rehm (rpet)
- Peter Kokot (maastermedia)
- Gordon Franke (gimler)
- Robert Schönthal (digitalkaoz)
- Juti Noppornpitak (shiroyuki)
- Dariusz Ruminski
- Michal Piotrowski (eventhorizon)
- Stefano Sala (stefano.sala)
- Juti Noppornpitak (shiroyuki)
- Sebastian Hörl (blogsh)
- Daniel Gomes (danielcsgomes)
- Hidenori Goto (hidenorigoto)
@ -102,10 +103,13 @@ Symfony is the result of the work of many people who made the code better
- Pablo Godel (pgodel)
- Eric GELOEN (gelo)
- Jérémie Augustin (jaugustin)
- Rafael Dohms (rdohms)
- Tigran Azatyan (tigranazatyan)
- Alexander Schwenn (xelaris)
- Rafael Dohms (rdohms)
- Arnaud Kleinpeter (nanocom)
- Joshua Thijssen
- Vladimir Reznichenko (kalessil)
- Tigran Azatyan (tigranazatyan)
- Issei Murasawa (issei_m)
- Richard Shank (iampersistent)
- Clemens Tolboom
- Helmer Aaviksoo
@ -113,15 +117,16 @@ Symfony is the result of the work of many people who made the code better
- Hiromi Hishida (77web)
- Matthieu Ouellette-Vachon (maoueh)
- Michał Pipa (michal.pipa)
- Issei Murasawa (issei_m)
- Amal Raghav (kertz)
- Jonathan Ingram (jonathaningram)
- Artur Kotyrba
- Iltar van der Berg
- Rouven Weßling (realityking)
- Andréia Bohner (andreia)
- Dmitrii Chekaliuk (lazyhammer)
- Clément JOBEILI (dator)
- Dorian Villet (gnutix)
- Javier Spagnoletti (phansys)
- Richard Miller (mr_r_miller)
- hacfi (hifi)
- Mario A. Alvarez Garcia (nomack84)
@ -136,21 +141,17 @@ Symfony is the result of the work of many people who made the code better
- Larry Garfield (crell)
- Martin Schuhfuß (usefulthink)
- Thomas Rabaix (rande)
- Javier Spagnoletti (phansys)
- Matthieu Bontemps (mbontemps)
- Pierre Minnieur (pminnieur)
- fivestar
- Dominique Bongiraud
- Iltar van der Berg
- Leszek Prabucki (l3l0)
- François Zaninotto (fzaninotto)
- Dustin Whittle (dustinwhittle)
- jeff
- Maxime Steinhausser (ogizanagi)
- Joshua Thijssen
- Justin Hileman (bobthecow)
- Sven Paulus (subsven)
- Vladimir Reznichenko (kalessil)
- Warnar Boekkooi (boekkooi)
- Lars Strojny (lstrojny)
- Rui Marinho (ruimarinho)
- Mikael Pajunen
@ -158,11 +159,14 @@ Symfony is the result of the work of many people who made the code better
- Tugdual Saunier (tucksaun)
- Sergey Linnik (linniksa)
- Marcel Beerta (mazen)
- Vincent AUBERT (vincent)
- julien pauli (jpauli)
- Francois Zaninotto
- Alexander Kotynia (olden)
- Daniel Tschinder
- Alexander M. Turek (derrabus)
- Elnur Abdurrakhimov (elnur)
- John Kary (johnkary)
- Manuel Reinhard (sprain)
- Danny Berger (dpb587)
- Roman Marintšenko (inori)
@ -187,11 +191,10 @@ Symfony is the result of the work of many people who made the code better
- Jeremy Livingston (jeremylivingston)
- Nikita Konstantinov
- Wodor Wodorski
- Vincent AUBERT (vincent)
- Matthieu Auger (matthieuauger)
- Sébastien Lavoie (lavoiesl)
- Beau Simensen (simensen)
- Robert Kiss (kepten)
- John Kary (johnkary)
- Ruben Gonzalez (rubenrua)
- Kim Hemsø Rasmussen (kimhemsoe)
- Florian Lonqueu-Brochard (florianlb)
@ -199,8 +202,8 @@ Symfony is the result of the work of many people who made the code better
- Wouter Van Hecke
- Peter Kruithof (pkruithof)
- Michael Holm (hollo)
- Warnar Boekkooi (boekkooi)
- Marc Weistroff (futurecat)
- Kristen Gilden (kgilden)
- Chris Smith (cs278)
- Florian Klein (docteurklein)
- Manuel Kiessling (manuelkiessling)
@ -226,6 +229,7 @@ Symfony is the result of the work of many people who made the code better
- Julien Galenski (ruian)
- Bongiraud Dominique
- janschoenherr
- Thomas Schulz (king2500)
- Marco Pivetta (ocramius)
- Ricard Clau (ricardclau)
- Erin Millard
@ -235,18 +239,18 @@ Symfony is the result of the work of many people who made the code better
- Vitaliy Zakharov (zakharovvi)
- Tobias Sjösten (tobiassjosten)
- Gyula Sallai (salla)
- Alexander M. Turek (derrabus)
- Konstantin Myakshin (koc)
- Inal DJAFAR (inalgnu)
- Christian Gärtner (dagardner)
- Tomasz Kowalczyk (thunderer)
- Daniel Wehner
- Felix Labrecque
- Yaroslav Kiliba
- Sébastien Lavoie (lavoiesl)
- Stepan Anchugov (kix)
- Terje Bråten
- Kristen Gilden (kgilden)
- Robbert Klarenbeek (robbertkl)
- Blanchon Vincent (blanchonvincent)
- Dawid Nowak
- hossein zolfi (ocean)
- Clément Gautier (clementgautier)
- Eduardo Gulias (egulias)
@ -261,6 +265,7 @@ Symfony is the result of the work of many people who made the code better
- Loïc Chardonnet (gnusat)
- Marek Kalnik (marekkalnik)
- Vyacheslav Salakhutdinov (megazoll)
- Hassan Amouhzi
- Tamas Szijarto
- Pavel Volokitin (pvolok)
- Endre Fejes
@ -283,9 +288,9 @@ Symfony is the result of the work of many people who made the code better
- Oscar Cubo Medina (ocubom)
- Karel Souffriau
- Christophe L. (christophelau)
- Massimiliano Arione (garak)
- Anthon Pang (robocoder)
- Jáchym Toušek
- Thomas Schulz (king2500)
- Jannik Zschiesche (apfelbox)
- Emanuele Gaspari (inmarelibero)
- Dariusz Rumiński
@ -304,7 +309,6 @@ Symfony is the result of the work of many people who made the code better
- Asier Illarramendi (doup)
- Chris Sedlmayr (catchamonkey)
- Seb Koelen
- Daniel Wehner
- Christoph Mewes (xrstf)
- Vitaliy Tverdokhlib (vitaliytv)
- Ariel Ferrandini (aferrandini)
@ -313,7 +317,9 @@ Symfony is the result of the work of many people who made the code better
- Jonas Flodén (flojon)
- Christian Schmidt
- Marcin Sikoń (marphi)
- Dominik Zogg (dominik.zogg)
- franek (franek)
- Damien Alexandre (damienalexandre)
- Adam Harvey
- Alex Bakhturin
- François-Xavier de Guillebon (de-gui_f)
@ -322,7 +328,6 @@ Symfony is the result of the work of many people who made the code better
- Jérôme Macias (jeromemacias)
- Fabian Lange (codingfabian)
- Yoshio HANAWA
- Tomasz Kowalczyk (thunderer)
- Sebastian Bergmann
- Pablo Díez (pablodip)
- Kevin McBride
@ -359,6 +364,7 @@ Symfony is the result of the work of many people who made the code better
- Nils Adermann (naderman)
- Gábor Fási
- Benjamin Leveque (benji07)
- Ivan Kurnosov
- sasezaki
- Dawid Pakuła (zulusx)
- Florian Rey (nervo)
@ -369,13 +375,14 @@ Symfony is the result of the work of many people who made the code better
- Daniel Tschinder
- Ryan
- Alexander Deruwe (aderuwe)
- Dave Hulbert (dave1010)
- François Pluchino (francoispluchino)
- Massimiliano Arione (garak)
- Ivan Rey (ivanrey)
- Marcin Chyłek (songoq)
- Ned Schwartz
- Ziumin
- Lenar Lõhmus
- Benjamin Laugueux (yzalis)
- Zach Badgett (zachbadgett)
- Aurélien Fredouelle
- Pavel Campr (pcampr)
@ -416,6 +423,7 @@ Symfony is the result of the work of many people who made the code better
- David Fuhr
- Kamil Kokot (pamil)
- Rostyslav Kinash
- Maciej Malarz (malarzm)
- Daisuke Ohata
- Vincent Simonin
- Stefan Warman
@ -428,7 +436,6 @@ Symfony is the result of the work of many people who made the code better
- umpirski
- Chris Heng (gigablah)
- Ulumuddin Yunus (joenoez)
- Dominik Zogg (dominik.zogg)
- Luc Vieillescazes (iamluc)
- Johann Saunier (prophet777)
- Antoine Corcy
@ -461,9 +468,11 @@ Symfony is the result of the work of many people who made the code better
- Alexander Volochnev (exelenz)
- Michael Piecko
- yclian
- Sergio Santoro
- Sebastian Grodzicki (sgrodzicki)
- Pascal Helfenstein
- Baldur Rensch (brensch)
- Vladyslav Petrovych
- Alex Xandra Albert Sim
- Yuen-Chi Lian
- Besnik Br
@ -485,6 +494,7 @@ Symfony is the result of the work of many people who made the code better
- Marc Morera (mmoreram)
- Andrew Hilobok (hilobok)
- Christian Soronellas (theunic)
- Romain Gautier (mykiwi)
- Yosmany Garcia (yosmanyga)
- Degory Valentine
- Benoit Lévêque (benoit_leveque)
@ -501,7 +511,7 @@ Symfony is the result of the work of many people who made the code better
- fago
- Harm van Tilborg
- Jan Prieser
- Damien Alexandre (damienalexandre)
- Artur Melo (restless)
- James Michael DuPont
- Tom Klingenberg
- Christopher Hall (mythmakr)
@ -510,14 +520,17 @@ Symfony is the result of the work of many people who made the code better
- Berny Cantos (xphere81)
- Reen Lokum
- Martin Parsiegla (spea)
- Possum
- Denis Charrier (brucewouaigne)
- Quentin Schuler
- Pierre Vanliefland (pvanliefland)
- frost-nzcr4
- Oskar Stark (oskarstark)
- Abhoryo
- Fabian Vogler (fabian)
- Korvin Szanto
- MatTheCat
- Maksim Kotlyar (makasim)
- Ivan Kurnosov
- Neil Ferreira
- Dmitry Parnas (parnas)
- DQNEO
@ -541,10 +554,11 @@ Symfony is the result of the work of many people who made the code better
- Shin Ohno (ganchiku)
- Geert De Deckere (geertdd)
- Jan Kramer (jankramer)
- Jean-Baptiste GOMOND (mjbgo)
- Richard van Laak (rvanlaak)
- abdul malik ikhsan (samsonasik)
- Henry Snoek (snoek09)
- Timothée Barray (tyx)
- Benjamin Laugueux (yzalis)
- Christian Morgan
- Alexander Miehe (engerim)
- Morgan Auchede (mauchede)
@ -578,6 +592,7 @@ Symfony is the result of the work of many people who made the code better
- Raul Fraile (raulfraile)
- sensio
- Patrick Kaufmann
- Reece Fowell (reecefowell)
- stefan.r
- Matthieu Napoli (mnapoli)
- Ben Ramsey (ramsey)
@ -594,22 +609,26 @@ Symfony is the result of the work of many people who made the code better
- Michael Tibben
- Sander Marechal
- Radosław Benkel
- Gennady Telegin (gtelegin)
- Marcos Sánchez
- ttomor
- Mei Gwilym (meigwilym)
- Michael H. Arieli (excelwebzone)
- Luciano Mammino (loige)
- fabios
- Jérôme Vasseur
- Sander Coolen (scoolen)
- Nicolas Le Goff (nlegoff)
- Manuele Menozzi
- Anton Babenko (antonbabenko)
- Irmantas Šiupšinskas (irmantas)
- Charles-Henri Bruyand
- Danilo Silva
- Zachary Tong (polyfractal)
- Hryhorii Hrebiniuk
- dantleech
- Xavier Leune
- Christian Schmidt
- Tero Alén (tero)
- DerManoMann
- Guillaume Royer
@ -671,12 +690,12 @@ Symfony is the result of the work of many people who made the code better
- Marcin Chwedziak
- Roland Franssen (ro0)
- Tony Cosentino (tony-co)
- Maciej Malarz
- Rodrigo Díez Villamuera (rodrigodiez)
- e-ivanov
- Jochen Bayer (jocl)
- Jeremy Bush
- wizhippo
- Diego Saint Esteben (dosten)
- rpg600
- Péter Buri (burci)
- Davide Borsatto (davide.borsatto)
@ -701,6 +720,7 @@ 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)
@ -747,6 +767,7 @@ Symfony is the result of the work of many people who made the code better
- Tatsuya Tsuruoka
- Ross Tuck
- Kévin Gomez (kevin)
- azine
- Dawid Sajdak
- Ludek Stepan
- Geoffrey Brier
@ -769,6 +790,7 @@ Symfony is the result of the work of many people who made the code better
- Cédric Lahouste (rapotor)
- Samuel Vogel (samuelvogel)
- Berat Doğan
- twifty
- Anthony Ferrara
- ShiraNai7
- Janusz Jabłoński (yanoosh)
@ -812,6 +834,7 @@ Symfony is the result of the work of many people who made the code better
- Samuel Gordalina (gordalina)
- Max Romanovsky (maxromanovsky)
- Mathieu Morlon
- Daniel Tschinder
- Rafał Muszyński (rafmus90)
- Timothy Anido (xanido)
- Rick Prent
@ -829,7 +852,6 @@ Symfony is the result of the work of many people who made the code better
- Thomas Chmielowiec (chmielot)
- Jānis Lukss
- rkerner
- Vladyslav Petrovych
- Matthew J Mucklo
- fdgdfg (psampaz)
- Stéphane Seng
@ -846,6 +868,7 @@ Symfony is the result of the work of many people who made the code better
- Jonathan Gough
- Benjamin Bender
- Konrad Mohrfeldt
- Lance Chen
- kor3k kor3k (kor3k)
- Stelian Mocanita (stelian)
- Flavian (2much)
@ -877,7 +900,6 @@ Symfony is the result of the work of many people who made the code better
- Adrian Olek (adrianolek)
- Przemysław Piechota (kibao)
- Leonid Terentyev (li0n)
- Oskar Stark (oskarstark)
- Adam Prager (padam87)
- ryunosuke
- victoria
@ -892,7 +914,6 @@ Symfony is the result of the work of many people who made the code better
- catch
- Alexandre Segura
- Josef Cech
- Possum
- Arnau González (arnaugm)
- Nate (frickenate)
- Matthew Foster (mfoster)
@ -930,6 +951,7 @@ Symfony is the result of the work of many people who made the code better
- Grayson Koonce (breerly)
- Karim Cassam Chenaï (ka)
- Nicolas Bastien (nicolas_bastien)
- Andrew Zhilin (zhil)
- Andy Stanberry
- Luiz “Felds” Liscia
- Thomas Rothe
@ -937,11 +959,13 @@ Symfony is the result of the work of many people who made the code better
- avi123
- alsar
- Mike Meier
- michalmarcinkowski
- Warwick
- Chris
- efeen
- Michał Dąbrowski (defrag)
- Simone Fumagalli (hpatoio)
- Brian Graham (incognito)
- Kevin Vergauwen (innocenzo)
- Alessio Baglio (ioalessio)
- John Bafford (jbafford)
@ -960,7 +984,6 @@ Symfony is the result of the work of many people who made the code better
- Daan van Renterghem
- Bram Van der Sype (brammm)
- Julien Moulin (lizjulien)
- Romain Gautier (mykiwi)
- Nikita Nefedov (nikita2206)
- Mauro Foti (skler)
- Yannick Warnier (ywarnier)
@ -989,7 +1012,6 @@ Symfony is the result of the work of many people who made the code better
- Mark de Haan (markdehaan)
- Dan Patrick (mdpatrick)
- Rares Vlaseanu (raresvla)
- Artur Melo (restless)
- Sofiane HADDAG (sofhad)
- tante kinast (tante)
- Vincent LEFORT (vlefort)
@ -1013,7 +1035,6 @@ Symfony is the result of the work of many people who made the code better
- Florian Pfitzer (marmelatze)
- Martin Mayer (martin)
- Grzegorz Łukaszewicz (newicz)
- Richard van Laak (rvanlaak)
- grifx
- Robert Campbell
- Matt Lehner
@ -1022,6 +1043,7 @@ Symfony is the result of the work of many people who made the code better
- Ruben Kruiswijk
- Michael J
- Joseph Maarek
- Alexander Menk
- Alex Pods
- timaschew
- Ian Phillips
@ -1040,6 +1062,7 @@ Symfony is the result of the work of many people who made the code better
- Maerlyn
- Even André Fiskvik
- Diego Agulló
- Gerrit Drost
- Lenar Lõhmus
- Cristian Gonzalez
- Juan M Martínez
@ -1056,7 +1079,6 @@ Symfony is the result of the work of many people who made the code better
- Jeroen Thora (bolle)
- Masao Maeda (brtriver)
- Darius Leskauskas (darles)
- Dave Hulbert (dave1010)
- David Joos (djoos)
- Denis Klementjev (dklementjev)
- Tomáš Polívka (draczris)
@ -1085,6 +1107,7 @@ Symfony is the result of the work of many people who made the code better
- akimsko
- Youpie
- srsbiz
- Taylan Kasap
- Nicolas A. Bérard-Nault
- Gladhon
- Saem Ghani
@ -1108,6 +1131,7 @@ Symfony is the result of the work of many people who made the code better
- Wotre
- goohib
- Xavier HAUSHERR
- Mantas Urnieža
- Cas
- Dusan Kasan
- Myke79
@ -1142,6 +1166,7 @@ Symfony is the result of the work of many people who made the code better
- andreabreu98
- Michael Schneider
- n-aleha
- Şəhriyar İmanov
- Kaipi Yann
- Sam Williams
- Adrian Philipp
@ -1150,6 +1175,7 @@ Symfony is the result of the work of many people who made the code better
- Ondrej Slinták
- vlechemin
- Brian Corrigan
- Ladislav Tánczos
- Brian Freytag
- Skorney
- mieszko4
@ -1175,6 +1201,7 @@ Symfony is the result of the work of many people who made the code better
- Sergiy Sokolenko
- dinitrol
- Penny Leach
- Richard Trebichavský
- g123456789l
- Giorgio Premi
- oscartv
@ -1200,6 +1227,7 @@ Symfony is the result of the work of many people who made the code better
- Alex Olmos (alexolmos)
- Antonio Mansilla (amansilla)
- Juan Ases García (ases)
- Siragusa (asiragusa)
- Daniel Basten (axhm3a)
- DUPUCH (bdupuch)
- Bill Hance (billhance)
@ -1239,6 +1267,7 @@ Symfony is the result of the work of many people who made the code better
- Adam Monsen (meonkeys)
- Ala Eddine Khefifi (nayzo)
- emilienbouard (neime)
- Nicholas Byfleet (nickbyfleet)
- ollie harridge (ollietb)
- Paul Andrieux (paulandrieux)
- Paweł Szczepanek (pauluz)
@ -1270,6 +1299,7 @@ Symfony is the result of the work of many people who made the code better
- Jesper Søndergaard Pedersen (zerrvox)
- Florent Cailhol
- szymek
- Kovacs Nicolas
- craigmarvelley
- Stano Turza
- simpson
@ -1281,6 +1311,7 @@ Symfony is the result of the work of many people who made the code better
- fh-github@fholzhauer.de
- Mark Topper
- Xavier REN
- Zander Baldwin
- Philipp Scheit
- max
- Mohamed Karnichi (amiral)

View File

@ -599,7 +599,7 @@ FrameworkBundle
* The `templating.helper.assets` was refactored and returns now an object of the type
`Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper` instead of
`Symfony\Component\Templating\Helper\CoreAssetsHelper`. You can update your class definition
or use the `assets.package` service instead. Using the `assets.package` service is the recommended
or use the `assets.packages` service instead. Using the `assets.packages` service is the recommended
way. The `templating.helper.assets` service will be removed in Symfony 3.0.
Before:

View File

@ -18,8 +18,8 @@
"require": {
"php": ">=5.3.9",
"symfony/asset": "~2.7|~3.0.0",
"symfony/dependency-injection" : "~2.8",
"symfony/config" : "~2.4",
"symfony/dependency-injection": "~2.8",
"symfony/config": "~2.4",
"symfony/event-dispatcher": "~2.8|~3.0.0",
"symfony/http-foundation": "~2.4.9|~2.5,>=2.5.4|~3.0.0",
"symfony/http-kernel": "~2.7|~3.0.0",

View File

@ -49,7 +49,7 @@ class XmlFileLoader extends FileLoader
$this->parseImports($xml, $path);
// parameters
$this->parseParameters($xml, $path);
$this->parseParameters($xml);
// extensions
$this->loadFromExtensions($xml);
@ -70,9 +70,8 @@ class XmlFileLoader extends FileLoader
* Parses parameters.
*
* @param \DOMDocument $xml
* @param string $file
*/
private function parseParameters(\DOMDocument $xml, $file)
private function parseParameters(\DOMDocument $xml)
{
if ($parameters = $this->getChildren($xml->documentElement, 'parameters')) {
$this->container->getParameterBag()->add($this->getArgumentsAsPhp($parameters[0], 'parameter'));

View File

@ -498,7 +498,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
*/
public function setRequestHandler(RequestHandlerInterface $requestHandler)
{
throw new BadMethodCallException('Buttons do not support form processors.');
throw new BadMethodCallException('Buttons do not support request handlers.');
}
/**

View File

@ -224,13 +224,13 @@ class Request
/**
* Constructor.
*
* @param array $query The GET parameters
* @param array $request The POST parameters
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
* @param array $cookies The COOKIE parameters
* @param array $files The FILES parameters
* @param array $server The SERVER parameters
* @param string $content The raw body data
* @param array $query The GET parameters
* @param array $request The POST parameters
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
* @param array $cookies The COOKIE parameters
* @param array $files The FILES parameters
* @param array $server The SERVER parameters
* @param string|resource $content The raw body data
*
* @api
*/
@ -244,13 +244,13 @@ class Request
*
* This method also re-initializes all properties.
*
* @param array $query The GET parameters
* @param array $request The POST parameters
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
* @param array $cookies The COOKIE parameters
* @param array $files The FILES parameters
* @param array $server The SERVER parameters
* @param string $content The raw body data
* @param array $query The GET parameters
* @param array $request The POST parameters
* @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
* @param array $cookies The COOKIE parameters
* @param array $files The FILES parameters
* @param array $server The SERVER parameters
* @param string|resource $content The raw body data
*
* @api
*/
@ -1563,16 +1563,38 @@ class Request
*/
public function getContent($asResource = false)
{
if (PHP_VERSION_ID < 50600 && (false === $this->content || (true === $asResource && null !== $this->content))) {
$currentContentIsResource = is_resource($this->content);
if (PHP_VERSION_ID < 50600 && false === $this->content) {
throw new \LogicException('getContent() can only be called once when using the resource return type and PHP below 5.6.');
}
if (true === $asResource) {
if ($currentContentIsResource) {
rewind($this->content);
return $this->content;
}
// Content passed in parameter (test)
if (is_string($this->content)) {
$resource = fopen('php://temp','r+');
fwrite($resource, $this->content);
rewind($resource);
return $resource;
}
$this->content = false;
return fopen('php://input', 'rb');
}
if ($currentContentIsResource) {
rewind($this->content);
return stream_get_contents($this->content);
}
if (null === $this->content) {
$this->content = file_get_contents('php://input');
}
@ -1902,7 +1924,8 @@ class Request
$requestUri = substr($requestUri, 0, $pos);
}
if (null !== $baseUrl && false === $pathInfo = substr($requestUri, strlen($baseUrl))) {
$pathInfo = substr($requestUri, strlen($baseUrl));
if (null !== $baseUrl && (false === $pathInfo || '' === $pathInfo)) {
// If substr() returns false then PATH_INFO is set to an empty string
return '/';
} elseif (null === $baseUrl) {

View File

@ -969,6 +969,26 @@ class RequestTest extends \PHPUnit_Framework_TestCase
$this->assertTrue(feof($retval));
}
public function testGetContentReturnsResourceWhenContentSetInConstructor()
{
$req = new Request(array(), array(), array(), array(), array(), array(), 'MyContent');
$resource = $req->getContent(true);
$this->assertTrue(is_resource($resource));
$this->assertEquals('MyContent', stream_get_contents($resource));
}
public function testContentAsResource()
{
$resource = fopen('php://memory','r+');
fwrite($resource, 'My other content');
rewind($resource);
$req = new Request(array(), array(), array(), array(), array(), array(), $resource);
$this->assertEquals('My other content', stream_get_contents($req->getContent(true)));
$this->assertEquals('My other content', $req->getContent());
}
/**
* @expectedException \LogicException
* @dataProvider getContentCantBeCalledTwiceWithResourcesProvider
@ -1013,7 +1033,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase
return array(
'Resource then fetch' => array(true, false),
'Resource then resource' => array(true, true),
'Fetch then resource' => array(false, true),
);
}

View File

@ -17,7 +17,7 @@
],
"require": {
"php": ">=5.3.9",
"symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2|~3.0.0",
"symfony/event-dispatcher": "~2.6,>=2.6.7|~3.0.0",
"symfony/http-foundation": "~2.5,>=2.5.4|~3.0.0",
"symfony/debug": "~2.6,>=2.6.2",
"psr/log": "~1.0"

View File

@ -36,7 +36,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface
*/
public function __construct($username, $class)
{
if (empty($username)) {
if ('' === $username || null === $username) {
throw new \InvalidArgumentException('$username must not be empty.');
}
if (empty($class)) {

View File

@ -62,7 +62,7 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
}
$username = $token->getUsername();
if (empty($username)) {
if ('' === $username || null === $username) {
$username = 'NONE_PROVIDED';
}

View File

@ -40,7 +40,7 @@ final class PersistentToken implements PersistentTokenInterface
if (empty($class)) {
throw new \InvalidArgumentException('$class must not be empty.');
}
if (empty($username)) {
if ('' === $username || null === $username) {
throw new \InvalidArgumentException('$username must not be empty.');
}
if (empty($series)) {

View File

@ -30,7 +30,7 @@ final class User implements AdvancedUserInterface
public function __construct($username, $password, array $roles = array(), $enabled = true, $userNonExpired = true, $credentialsNonExpired = true, $userNonLocked = true)
{
if (empty($username)) {
if ('' === $username || null === $username) {
throw new \InvalidArgumentException('The username cannot be empty.');
}

View File

@ -272,19 +272,7 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N
*/
protected function prepareForDenormalization($data)
{
if (is_array($data) || is_object($data) && $data instanceof \ArrayAccess) {
$normalizedData = $data;
} elseif (is_object($data)) {
$normalizedData = array();
foreach ($data as $attribute => $value) {
$normalizedData[$attribute] = $value;
}
} else {
$normalizedData = array();
}
return $normalizedData;
return (array) $data;
}
/**