Merge branch '2.8' into 3.1

* 2.8:
  Relax 1 test failing with latest PHP versions
  bumped Symfony version to 2.8.10
  Remove usage of __CLASS__ outside of a class
  [HttpKernel] Fix variable conflicting name
  [Process] Fix double-fread() when reading unix pipes
  [Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least)
  [Validator] Fix dockblock typehint in XmlFileLoader
  bumped Symfony version to 2.8.10
  updated VERSION for 2.8.9
  updated CHANGELOG for 2.8.9
  bumped Symfony version to 2.7.17
  updated VERSION for 2.7.16
  update CONTRIBUTORS for 2.7.16
  updated CHANGELOG for 2.7.16
  Minor fixes
  [Console] Overcomplete argument exception message tweak.
  fixed bad auto merge
  Console table cleanup
  undefined offset fix (#19406)
  [EventDispatcher] Removed unused variable

Conflicts:
	CHANGELOG-2.7.md
	CHANGELOG-3.0.md
	src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
	src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
	src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php
	src/Symfony/Component/Console/Tests/Helper/TableTest.php
	src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php
	src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
	src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php
	src/Symfony/Component/HttpKernel/Kernel.php
This commit is contained in:
Nicolas Grekas 2016-08-05 10:37:39 +02:00
commit 6f390d45e3
26 changed files with 138 additions and 81 deletions

View File

@ -7,6 +7,37 @@ in 3.0 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/v3.0.0...v3.0.1
* 3.0.9 (2016-07-30)
* bug #19470 undefined offset fix (#19406) (ReenExe)
* bug #19300 [HttpKernel] Use flock() for HttpCache's lock files (mpdude)
* bug #19428 [Process] Fix write access check for pipes on Windows (nicolas-grekas)
* bug #19439 [DependencyInjection] Fixed deprecated default message template with XML (jeremyFreeAgent)
* bug #19397 [HttpFoundation] HttpCache refresh stale responses containing an ETag (maennchen)
* bug #19426 [Form] Fix the money form type render with Bootstrap3 (Th3Mouk)
* bug #19422 [DomCrawler] Inherit the namespace cache in subcrawlers (stof)
* bug #19425 [BrowserKit] Uppercase the "GET" method in redirects (jakzal)
* bug #19384 Fix PHP 7.1 related failures (nicolas-grekas)
* bug #19379 [VarDumper] Fix for PHP 7.1 (nicolas-grekas)
* bug #19342 Added class existence check if is_subclass_of() fails in compiler passes (SCIF)
* bug #19369 Fix the DBAL session handler version check for Postgresql (stof)
* bug #19368 [VarDumper] Fix dumping jsons casted as arrays (nicolas-grekas)
* bug #19334 [Security] Fix the retrieval of the last username when using forwarding (stof)
* bug #19321 [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods (dunglas)
* bug #19317 [BrowserKit] Update Client::getAbsoluteUri() for query string only URIs (georaldc)
* bug #19298 [ClassLoader] Fix declared classes being computed when not needed (nicolas-grekas)
* bug #19316 [Validator] Added additional MasterCard range to the CardSchemeValidator (Dennis Væversted)
* bug #19290 [HttpKernel] fixed internal subrequests having an if-modified-since-header (MalteWunsch)
* bug #19307 [Security] Fix deprecated usage of DigestAuthenticationEntryPoint::getKey() in DigestAuthenticationListener (Maxime STEINHAUSSER)
* bug #19309 [DoctrineBridge] added missing error code for constraint. (Koc)
* bug #19306 [Form] fixed bug - name in ButtonBuilder (cheprasov)
* bug #19292 [varDumper] Fix missing usage of ExceptionCaster::$traceArgs (nicolas-grekas)
* bug #19288 [VarDumper] Fix indentation trimming in ExceptionCaster (nicolas-grekas)
* bug #19267 [Validator] UuidValidator must accept a Uuid constraint. (hhamon)
* bug #19186 Fix for #19183 to add support for new PHP MongoDB extension in sessions. (omanizer)
* bug #19253 [Console] Fix block() padding formatting after #19189 (chalasr)
* bug #19218 [Security][Guard] check if session exist before using it (pasdeloup)
* 3.0.8 (2016-06-30)
* bug #19217 [HttpKernel] Inline ValidateRequestListener logic into HttpKernel (nicolas-grekas)

View File

@ -53,16 +53,16 @@ Symfony is the result of the work of many people who made the code better
- Bilal Amarni (bamarni)
- Florin Patan (florinpatan)
- Peter Rehm (rpet)
- Ener-Getick (energetick)
- Iltar van der Berg (kjarli)
- Kevin Bond (kbond)
- Gábor Egyed (1ed)
- Ener-Getick (energetick)
- Michel Weimerskirch (mweimerskirch)
- Eric Clemmons (ericclemmons)
- Iltar van der Berg (kjarli)
- Matthias Pigulla (mpdude)
- Andrej Hudec (pulzarraider)
- Christian Raue
- Charles Sarrazin (csarrazi)
- Matthias Pigulla (mpdude)
- Deni
- Henrik Westphal (snc)
- Dariusz Górecki (canni)
@ -75,25 +75,25 @@ Symfony is the result of the work of many people who made the code better
- Pierre du Plessis (pierredup)
- Bart van den Burg (burgov)
- Jordan Alliot (jalliot)
- Graham Campbell (graham)
- John Wards (johnwards)
- Toni Uebernickel (havvg)
- Fran Moreno (franmomu)
- Graham Campbell (graham)
- Antoine Hérault (herzult)
- Robin Chalas (chalas_r)
- Arnaud Le Blanc (arnaud-lb)
- Jérôme Tamarelle (gromnan)
- Paráda József (paradajozsef)
- Michal Piotrowski (eventhorizon)
- Tim Nagel (merk)
- Brice BERNARD (brikou)
- Robin Chalas (chalas_r)
- Konstantin Myakshin (koc)
- Alexander M. Turek (derrabus)
- Dariusz Ruminski
- marc.weistroff
- Issei Murasawa (issei_m)
- lenar
- Włodzimierz Gajda (gajdaw)
- Konstantin Myakshin (koc)
- Baptiste Clavié (talus)
- Alexander Schwenn (xelaris)
- Florian Voutzinos (florianv)
@ -111,11 +111,12 @@ Symfony is the result of the work of many people who made the code better
- Gordon Franke (gimler)
- Eric GELOEN (gelo)
- David Buchmann (dbu)
- Théo FIDRY (theofidry)
- Robert Schönthal (digitalkaoz)
- Florian Lonqueu-Brochard (florianlb)
- Titouan Galopin (tgalopin)
- Stefano Sala (stefano.sala)
- Juti Noppornpitak (shiroyuki)
- Titouan Galopin (tgalopin)
- Tigran Azatyan (tigranazatyan)
- Sebastian Hörl (blogsh)
- Daniel Gomes (danielcsgomes)
@ -162,6 +163,7 @@ Symfony is the result of the work of many people who made the code better
- bronze1man
- sun (sun)
- Larry Garfield (crell)
- Vyacheslav Pavlov
- Martin Schuhfuß (usefulthink)
- Matthieu Bontemps (mbontemps)
- Pierre Minnieur (pminnieur)
@ -220,8 +222,10 @@ Symfony is the result of the work of many people who made the code better
- Joseph Rouff (rouffj)
- Félix Labrecque (woodspire)
- GordonsLondon
- jeremyFreeAgent (jeremyfreeagent)
- Jan Sorgalla (jsor)
- Ray
- Grégoire Paris (greg0ire)
- Chekote
- Thomas Adam
- Albert Casademont (acasademont)
@ -253,12 +257,11 @@ Symfony is the result of the work of many people who made the code better
- Andrew Moore (finewolf)
- Bertrand Zuchuat (garfield-fr)
- Gabor Toth (tgabi333)
- Grégoire Paris (greg0ire)
- Alex Pott
- realmfoo
- jeremyFreeAgent (jeremyfreeagent)
- Thomas Tourlourat (armetiz)
- Andrey Esaulov (andremaha)
- Tobias Nyholm (tobias)
- Grégoire Passault (gregwar)
- Ismael Ambrosi (iambrosi)
- Uwe Jäger (uwej711)
@ -275,6 +278,7 @@ Symfony is the result of the work of many people who made the code better
- Francesc Rosàs (frosas)
- Massimiliano Arione (garak)
- Julien Galenski (ruian)
- Andreas Schempp (aschempp)
- Bongiraud Dominique
- janschoenherr
- Thomas Schulz (king2500)
@ -288,6 +292,7 @@ Symfony is the result of the work of many people who made the code better
- Erin Millard
- Artur Melo (restless)
- Matthew Lewinski (lewinski)
- Magnus Nordlander (magnusnordlander)
- alquerci
- Francesco Levorato
- Vitaliy Zakharov (zakharovvi)
@ -301,6 +306,7 @@ Symfony is the result of the work of many people who made the code better
- Felix Labrecque
- Yaroslav Kiliba
- Terje Bråten
- Roland Franssen (ro0)
- Robbert Klarenbeek (robbertkl)
- Alessandro Chitolina
- JhonnyL
@ -315,7 +321,6 @@ Symfony is the result of the work of many people who made the code better
- Costin Bereveanu (schniper)
- Loïc Chardonnet (gnusat)
- Marek Kalnik (marekkalnik)
- Tobias Nyholm (tobias)
- Vyacheslav Salakhutdinov (megazoll)
- Hassan Amouhzi
- Tamas Szijarto
@ -345,7 +350,6 @@ Symfony is the result of the work of many people who made the code better
- Marc Morales Valldepérez (kuert)
- Jean-Baptiste GOMOND (mjbgo)
- Vadim Kharitonov (virtuozzz)
- Andreas Schempp (aschempp)
- Oscar Cubo Medina (ocubom)
- Karel Souffriau
- Christophe L. (christophelau)
@ -366,7 +370,6 @@ Symfony is the result of the work of many people who made the code better
- Mihai Stancu
- Olivier Dolbeau (odolbeau)
- Jan Rosier (rosier)
- Magnus Nordlander (magnusnordlander)
- vagrant
- EdgarPE
- Florian Pfitzer (marmelatze)
@ -382,7 +385,6 @@ Symfony is the result of the work of many people who made the code better
- Christian Schmidt
- Marek Štípek (maryo)
- Marcin Sikoń (marphi)
- Roland Franssen (ro0)
- Dominik Zogg (dominik.zogg)
- Marek Pietrzak
- Chad Sikorra (chadsikorra)
@ -391,6 +393,7 @@ Symfony is the result of the work of many people who made the code better
- Christian Wahler
- Mathieu Lemoine
- Gintautas Miselis
- David Badura (davidbadura)
- Zander Baldwin
- Adam Harvey
- Alex Bakhturin
@ -406,6 +409,7 @@ Symfony is the result of the work of many people who made the code better
- Benoît Burnichon (bburnichon)
- Sebastian Bergmann
- Pablo Díez (pablodip)
- SpacePossum
- Kevin McBride
- Philipp Rieber (bicpi)
- Manuel de Ruiter (manuel)
@ -417,7 +421,6 @@ Symfony is the result of the work of many people who made the code better
- ondrowan
- Barry vd. Heuvel (barryvdh)
- Jerzy Zawadzki (jzawadzki)
- Théo FIDRY (theofidry)
- Evan S Kaufman (evanskaufman)
- mcben
- Jérôme Vieilledent (lolautruche)
@ -507,6 +510,7 @@ Symfony is the result of the work of many people who made the code better
- Wang Jingyu
- Åsmund Garfors
- Maxime Douailin
- Jean Pasdeloup (pasdeloup)
- Javier López (loalf)
- Reinier Kip
- Geoffrey Brier (geoffrey-brier)
@ -542,7 +546,6 @@ Symfony is the result of the work of many people who made the code better
- Arturs Vonda
- Sascha Grossenbacher
- Szijarto Tamas
- David Badura (davidbadura)
- Catalin Dan
- Stephan Vock
- Benjamin Zikarsky (bzikarsky)
@ -576,7 +579,6 @@ Symfony is the result of the work of many people who made the code better
- Peter Ward
- Dominik Ritter (dritter)
- Sebastian Grodzicki (sgrodzicki)
- SpacePossum
- Martin Hujer (martinhujer)
- Pascal Helfenstein
- Baldur Rensch (brensch)
@ -594,6 +596,7 @@ Symfony is the result of the work of many people who made the code better
- Lars Vierbergen
- Dennis Hotson
- Andrew Tchircoff (andrewtch)
- Remi Collet
- michaelwilliams
- 1emming
- Leevi Graham (leevigraham)
@ -655,6 +658,7 @@ Symfony is the result of the work of many people who made the code better
- Cyril Quintin (cyqui)
- Gerard van Helden (drm)
- Johnny Peck (johnnypeck)
- Ivan Menshykov
- David Romaní
- Patrick Allaert
- Gustavo Falco (gfalco)
@ -714,6 +718,7 @@ Symfony is the result of the work of many people who made the code better
- Benoît Merlet (trompette)
- Koen Kuipers
- datibbaw
- Rootie
- Raul Fraile (raulfraile)
- sensio
- Patrick Kaufmann
@ -747,6 +752,7 @@ Symfony is the result of the work of many people who made the code better
- fabios
- Sander Coolen (scoolen)
- Nicolas Le Goff (nlegoff)
- Ben Oman
- Manuele Menozzi
- Anton Babenko (antonbabenko)
- Irmantas Šiupšinskas (irmantas)
@ -795,6 +801,7 @@ Symfony is the result of the work of many people who made the code better
- Ken Marfilla (marfillaster)
- benatespina (benatespina)
- Denis Kop
- Maxime STEINHAUSSER
- jfcixmedia
- Martijn Evers
- Benjamin Paap (benjaminpaap)
@ -823,6 +830,7 @@ Symfony is the result of the work of many people who made the code better
- Marcin Chwedziak
- hjkl
- Tony Cosentino (tony-co)
- Alexander Cheprasov
- Rodrigo Díez Villamuera (rodrigodiez)
- e-ivanov
- Jochen Bayer (jocl)
@ -853,6 +861,7 @@ Symfony is the result of the work of many people who made the code better
- David de Boer (ddeboer)
- Gilles Doge (gido)
- abulford
- antograssiot
- Brooks Boyd
- Roger Webb
- Dmitriy Simushev
@ -893,7 +902,6 @@ Symfony is the result of the work of many people who made the code better
- Aharon Perkel
- Abdul.Mohsen B. A. A
- Benoît Burnichon
- Remi Collet
- pthompson
- Malaney J. Hill
- Alexandre Pavy
@ -944,6 +952,7 @@ Symfony is the result of the work of many people who made the code better
- ChrisC
- Ilya Biryukov
- Kim Laï Trinh
- Jonatan Männchen
- Jason Desrosiers
- m.chwedziak
- Philip Frank
@ -1042,6 +1051,8 @@ Symfony is the result of the work of many people who made the code better
- Nicolas Badey (nico-b)
- Shane Preece (shane)
- Geoff
- georaldc
- Malte Wunsch
- wusuopu
- povilas
- Alessandro Tagliapietra (alex88)
@ -1091,6 +1102,7 @@ Symfony is the result of the work of many people who made the code better
- David Stone
- Jovan Perovic (jperovic)
- Pablo Maria Martelletti (pmartelletti)
- Zhuravlev Alexander (scif)
- Yassine Guedidi (yguedidi)
- Luis Muñoz
- Andreas
@ -1100,6 +1112,7 @@ Symfony is the result of the work of many people who made the code better
- Manatsawin Hanmongkolchai
- Gunther Konig
- Maciej Schmidt
- Dennis Væversted
- nuncanada
- flack
- František Bereň
@ -1193,6 +1206,7 @@ Symfony is the result of the work of many people who made the code better
- Dan Patrick (mdpatrick)
- Rares Vlaseanu (raresvla)
- tante kinast (tante)
- Jérémy M (th3mouk)
- Vincent LEFORT (vlefort)
- Sadicov Vladimir (xtech)
- Alexander Zogheb
@ -1280,7 +1294,6 @@ Symfony is the result of the work of many people who made the code better
- Muriel (metalmumu)
- Michael Pohlers (mick_the_big)
- Cayetano Soriano Gallego (neoshadybeat)
- Jean Pasdeloup (pasdeloup)
- Patrick McDougle (patrick-mcdougle)
- Pablo Monterde Perez (plebs)
- Jimmy Leger (redpanda)
@ -1379,7 +1392,6 @@ Symfony is the result of the work of many people who made the code better
- Jon Cave
- Sébastien HOUZE
- Abdulkadir N. A.
- Ivan Menshykov
- Yevgen Kovalienia
- Lebnik
- Sema

View File

@ -45,7 +45,7 @@ class SessionController implements ContainerAwareInterface
public function logoutAction(Request $request)
{
$request->getSession('session')->invalidate();
$request->getSession()->invalidate();
return new Response('Session cleared.');
}

View File

@ -105,7 +105,7 @@ EOF
return 1;
}
$passwordQuestion = $this->createPasswordQuestion($input, $output);
$passwordQuestion = $this->createPasswordQuestion();
$password = $io->askQuestion($passwordQuestion);
}

View File

@ -78,7 +78,7 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface
return $fs;
}
$apcu = new ApcuAdapter($namespace, $defaultLifetime / 5, $version);
$apcu = new ApcuAdapter($namespace, (int) $defaultLifetime / 5, $version);
if (null !== $logger) {
$apcu->setLogger($logger);
}

View File

@ -115,11 +115,11 @@ class Table
self::$styles = self::initStyles();
}
if (!self::$styles[$name]) {
throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
if (isset(self::$styles[$name])) {
return self::$styles[$name];
}
return self::$styles[$name];
throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
}
/**
@ -131,13 +131,7 @@ class Table
*/
public function setStyle($name)
{
if ($name instanceof TableStyle) {
$this->style = $name;
} elseif (isset(self::$styles[$name])) {
$this->style = self::$styles[$name];
} else {
throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
}
$this->style = $this->resolveStyle($name);
return $this;
}
@ -164,13 +158,7 @@ class Table
{
$columnIndex = intval($columnIndex);
if ($name instanceof TableStyle) {
$this->columnStyles[$columnIndex] = $name;
} elseif (isset(self::$styles[$name])) {
$this->columnStyles[$columnIndex] = self::$styles[$name];
} else {
throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
}
$this->columnStyles[$columnIndex] = $this->resolveStyle($name);
return $this;
}
@ -701,4 +689,17 @@ class Table
'symfony-style-guide' => $styleGuide,
);
}
private function resolveStyle($name)
{
if ($name instanceof TableStyle) {
return $name;
}
if (isset(self::$styles[$name])) {
return self::$styles[$name];
}
throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
}
}

View File

@ -176,7 +176,12 @@ class ArgvInput extends Input
// unexpected argument
} else {
throw new RuntimeException('Too many arguments.');
$all = $this->definition->getArguments();
if (count($all)) {
throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all))));
}
throw new RuntimeException(sprintf('No arguments expected, got "%s".', $token));
}
}

View File

@ -694,6 +694,25 @@ TABLE;
$this->assertEquals($expected, $this->getOutputContent($output));
}
/**
* @expectedException Symfony\Component\Console\Exception\InvalidArgumentException
* @expectedExceptionMessage Style "absent" is not defined.
*/
public function testIsNotDefinedStyleException()
{
$table = new Table($this->getOutputStream());
$table->setStyle('absent');
}
/**
* @expectedException \Symfony\Component\Console\Exception\InvalidArgumentException
* @expectedExceptionMessage Style "absent" is not defined.
*/
public function testGetStyleDefinition()
{
Table::getStyleDefinition('absent');
}
protected function getOutputStream()
{
return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, false);

View File

@ -183,7 +183,17 @@ class ArgvInputTest extends \PHPUnit_Framework_TestCase
array(
array('cli.php', 'foo', 'bar'),
new InputDefinition(),
'Too many arguments.',
'No arguments expected, got "foo".',
),
array(
array('cli.php', 'foo', 'bar'),
new InputDefinition(array(new InputArgument('number'))),
'Too many arguments, expected arguments "number".',
),
array(
array('cli.php', 'foo', 'bar', 'zzz'),
new InputDefinition(array(new InputArgument('number'), new InputArgument('county'))),
'Too many arguments, expected arguments "number" "county".',
),
array(
array('cli.php', '--foo'),

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\Debug\Tests;
use Symfony\Component\Debug\DebugClassLoader;
use Symfony\Component\Debug\ErrorHandler;
use Symfony\Component\Debug\Exception\ContextErrorException;
class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase
{

View File

@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View File

@ -48,7 +48,7 @@ class ReplaceAliasByActualDefinitionPassTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($container->has('container'));
$resolvedFactory = $aDefinition->getFactory(false);
$resolvedFactory = $aDefinition->getFactory();
$this->assertSame('b_alias', (string) $resolvedFactory[0]);
}

View File

@ -114,7 +114,7 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
try {
@$builder->get('baz');
$this->fail('->get() throws a ServiceCircularReferenceException if the service has a circular reference to itself');
} catch (\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException $e) {
} catch (ServiceCircularReferenceException $e) {
$this->assertEquals('Circular reference detected for service "baz", path: "baz".', $e->getMessage(), '->get() throws a LogicException if the service has a circular reference to itself');
}

View File

@ -14,7 +14,6 @@ namespace Symfony\Component\DependencyInjection\Tests\Loader;
use Symfony\Bridge\PhpUnit\ErrorAssert;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\DomCrawler\Tests;
use Symfony\Component\DomCrawler\Form;
use Symfony\Component\DomCrawler\FormFieldRegistry;
use Symfony\Component\DomCrawler\Field;
class FormTest extends \PHPUnit_Framework_TestCase
{

View File

@ -432,8 +432,8 @@ abstract class Kernel implements KernelInterface, TerminableInterface
$hierarchy[] = $name;
}
foreach ($hierarchy as $bundle) {
$this->bundleMap[$bundle] = $bundleMap;
foreach ($hierarchy as $hierarchyBundle) {
$this->bundleMap[$hierarchyBundle] = $bundleMap;
array_pop($bundleMap);
}
}

View File

@ -3,7 +3,6 @@
namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\HttpKernel\Bundle;
/**
* This command has a required parameter on the constructor and will be ignored by the default Bundle implementation.

View File

@ -656,7 +656,7 @@ abstract class AbstractNumberFormatterTest extends \PHPUnit_Framework_TestCase
{
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
$parsedValue = $formatter->parse($value, NumberFormatter::TYPE_INT32);
$this->assertSame($expected, $parsedValue);
$this->assertSame($expected, $parsedValue, $message);
}
public function parseTypeInt32Provider()

View File

@ -162,9 +162,7 @@ abstract class AbstractPipes implements PipesInterface
$this->input = null;
fclose($this->pipes[0]);
unset($this->pipes[0]);
}
if (!$w) {
} elseif (!$w) {
return array($this->pipes[0]);
}
}

View File

@ -120,7 +120,7 @@ class UnixPipes extends AbstractPipes
do {
$data = fread($pipe, self::CHUNK_SIZE);
$read[$type] .= $data;
} while (isset($data[0]));
} while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1])));
if (!isset($read[$type][0])) {
unset($read[$type]);

View File

@ -81,6 +81,6 @@ abstract class PropertyAccessorArrayAccessTest extends \PHPUnit_Framework_TestCa
*/
public function testIsWritable($collection, $path)
{
$this->assertTrue($this->propertyAccessor->isWritable($collection, $path, 'Updated'));
$this->assertTrue($this->propertyAccessor->isWritable($collection, $path));
}
}

View File

@ -166,33 +166,25 @@ abstract class PropertyAccessorCollectionTest extends PropertyAccessorArrayAcces
public function testIsWritableReturnsTrueIfAdderAndRemoverExists()
{
$car = $this->getMock(__CLASS__.'_Car');
$axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third'));
$this->assertTrue($this->propertyAccessor->isWritable($car, 'axes', $axes));
$this->assertTrue($this->propertyAccessor->isWritable($car, 'axes'));
}
public function testIsWritableReturnsFalseIfOnlyAdderExists()
{
$car = $this->getMock(__CLASS__.'_CarOnlyAdder');
$axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third'));
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes));
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes'));
}
public function testIsWritableReturnsFalseIfOnlyRemoverExists()
{
$car = $this->getMock(__CLASS__.'_CarOnlyRemover');
$axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third'));
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes));
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes'));
}
public function testIsWritableReturnsFalseIfNoAdderNorRemoverExists()
{
$car = $this->getMock(__CLASS__.'_CarNoAdderAndRemover');
$axes = $this->getContainer(array(1 => 'first', 2 => 'second', 3 => 'third'));
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes));
$this->assertFalse($this->propertyAccessor->isWritable($car, 'axes'));
}
/**

View File

@ -121,7 +121,7 @@ class DelegatingEngineTest extends \PHPUnit_Framework_TestCase
$secondEngine = $this->getEngineMock('template.php', false);
$delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine));
$delegatingEngine->getEngine('template.php', array('foo' => 'bar'));
$delegatingEngine->getEngine('template.php');
}
private function getEngineMock($template, $supports)

View File

@ -37,7 +37,7 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
*/
public function testFailedLangcodes($nplural, $langCodes)
{
$matrix = $this->generateTestData($nplural, $langCodes);
$matrix = $this->generateTestData($langCodes);
$this->validateMatrix($nplural, $matrix, false);
}
@ -46,7 +46,7 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
*/
public function testLangcodes($nplural, $langCodes)
{
$matrix = $this->generateTestData($nplural, $langCodes);
$matrix = $this->generateTestData($langCodes);
$this->validateMatrix($nplural, $matrix);
}
@ -108,7 +108,7 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
}
}
protected function generateTestData($plural, $langCodes)
protected function generateTestData($langCodes)
{
$matrix = array();
foreach ($langCodes as $langCode) {

View File

@ -182,13 +182,7 @@ class XmlFileLoader extends FileLoader
return simplexml_import_dom($dom);
}
/**
* Loads the validation metadata from the given XML class description.
*
* @param ClassMetadata $metadata The metadata to load
* @param array $classDescription The XML class description
*/
private function loadClassMetadataFromXml(ClassMetadata $metadata, $classDescription)
private function loadClassMetadataFromXml(ClassMetadata $metadata, \SimpleXMLElement $classDescription)
{
if (count($classDescription->{'group-sequence-provider'}) > 0) {
$metadata->setGroupSequenceProvider(true);

View File

@ -96,10 +96,10 @@ SplFileObject {
file: true
dir: false
link: false
%AcsvControl: array:2 [
%AcsvControl: array:%d [
0 => ","
1 => """
]
%A]
flags: DROP_NEW_LINE|SKIP_EMPTY
maxLineLen: 0
fstat: array:26 [