From 891e2ea17b43da17b4def6df0d3310530f8a6ea6 Mon Sep 17 00:00:00 2001 From: Vyacheslav Pavlov Date: Thu, 28 Jul 2016 10:50:15 +0300 Subject: [PATCH 01/20] [EventDispatcher] Removed unused variable --- .../EventDispatcher/Tests/AbstractEventDispatcherTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php index 2e4c3fd97f..bae74bb888 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php @@ -128,7 +128,7 @@ abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase public function testLegacyDispatch() { $event = new Event(); - $return = $this->dispatcher->dispatch(self::preFoo, $event); + $this->dispatcher->dispatch(self::preFoo, $event); $this->assertEquals('pre.foo', $event->getName()); } From 9813888a4f2efcc79e5bf711e64ce862c9715ee8 Mon Sep 17 00:00:00 2001 From: ReenExe Date: Thu, 28 Jul 2016 19:22:45 +0300 Subject: [PATCH 02/20] undefined offset fix (#19406) --- .../Component/Console/Helper/Table.php | 27 ++++++++++++------- .../Console/Tests/Helper/TableTest.php | 19 +++++++++++++ 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index b1111fec65..0d947843a9 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -101,11 +101,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)); } /** @@ -117,13 +117,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; } @@ -611,4 +605,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)); + } } diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php index c933ff6a69..9628bc36fa 100644 --- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -577,6 +577,25 @@ TABLE; $this->assertEquals($table, $table->addRow(new TableSeparator()), 'fluent interface on addRow() with a single TableSeparator() works'); } + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Style "absent" is not defined. + */ + public function testIsNotDefinedStyleException() + { + $table = new Table($this->getOutputStream()); + $table->setStyle('absent'); + } + + /** + * @expectedException \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); From 217274b3c1729afdfb5b2309b2102a152b58c9f9 Mon Sep 17 00:00:00 2001 From: ReenExe Date: Fri, 22 Jul 2016 19:57:17 +0300 Subject: [PATCH 03/20] Console table cleanup --- .../Component/Console/Helper/Table.php | 8 +------- .../Console/Tests/Helper/TableTest.php | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index a8d90966fd..04aa98d5b4 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -151,13 +151,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; } diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php index 2af74b2daf..7eddb13140 100644 --- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -650,6 +650,25 @@ TABLE; Table::getStyleDefinition('absent'); } + /** + * @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); From 6404e8e033980ad4d522f71e0c3278d4e53d22b8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 28 Jul 2016 12:58:23 -0400 Subject: [PATCH 04/20] fixed bad auto merge --- .../Console/Tests/Helper/TableTest.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php index 7eddb13140..c3182329ca 100644 --- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -641,25 +641,6 @@ TABLE; $table->setStyle('absent'); } - /** - * @expectedException Symfony\Component\Console\Exception\InvalidArgumentException - * @expectedExceptionMessage Style "absent" is not defined. - */ - public function testGetStyleDefinition() - { - Table::getStyleDefinition('absent'); - } - - /** - * @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. From 7af59cdf867225e454cf2b0256823e95c14d5bab Mon Sep 17 00:00:00 2001 From: SpacePossum Date: Wed, 27 Jul 2016 12:20:49 +0200 Subject: [PATCH 05/20] [Console] Overcomplete argument exception message tweak. --- src/Symfony/Component/Console/Input/ArgvInput.php | 7 ++++++- .../Component/Console/Tests/Input/ArgvInputTest.php | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Console/Input/ArgvInput.php b/src/Symfony/Component/Console/Input/ArgvInput.php index 1732387f7b..f18d6e1899 100644 --- a/src/Symfony/Component/Console/Input/ArgvInput.php +++ b/src/Symfony/Component/Console/Input/ArgvInput.php @@ -174,7 +174,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)); } } diff --git a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php index d2c540e6fe..3b0dc3f231 100644 --- a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php +++ b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php @@ -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'), From 774c984863e8bb891eb73d6902ef02419b7f93e4 Mon Sep 17 00:00:00 2001 From: Vyacheslav Pavlov Date: Thu, 28 Jul 2016 14:36:19 +0300 Subject: [PATCH 06/20] Minor fixes --- .../Tests/Extension/ExpressionExtensionTest.php | 1 - .../DependencyInjection/FrameworkExtension.php | 1 - .../FrameworkExtensionTest.php | 1 - .../TestBundle/Controller/SessionController.php | 2 +- .../Command/UserPasswordEncoderCommand.php | 2 +- .../Tests/Helper/LegacyDialogHelperTest.php | 5 ----- .../Debug/Tests/DebugClassLoaderTest.php | 1 - .../Compiler/ResolveReferencesToAliasesPass.php | 1 - .../ReplaceAliasByActualDefinitionPassTest.php | 2 +- .../Tests/ContainerBuilderTest.php | 2 +- .../Fixtures/containers/legacy-container9.php | 1 - .../Tests/Loader/XmlFileLoaderTest.php | 1 - .../Component/DomCrawler/Tests/FormTest.php | 1 - .../Extension/Core/Type/CollectionTypeTest.php | 1 - .../Handler/LegacyPdoSessionHandlerTest.php | 2 +- .../Tests/EventListener/LocaleListenerTest.php | 1 - .../Tests/EventListener/RouterListenerTest.php | 1 - .../Command/BarCommand.php | 1 - .../AbstractNumberFormatterTest.php | 2 +- .../Tests/PropertyAccessorArrayAccessTest.php | 2 +- .../Tests/PropertyAccessorCollectionTest.php | 16 ++++------------ .../Core/Tests/LegacySecurityContextTest.php | 2 -- .../Templating/Tests/DelegatingEngineTest.php | 2 +- .../Translation/Tests/PluralizationRulesTest.php | 6 +++--- 24 files changed, 15 insertions(+), 42 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/ExpressionExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/ExpressionExtensionTest.php index 0c7cc1bd41..6d457e395b 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/ExpressionExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/ExpressionExtensionTest.php @@ -12,7 +12,6 @@ namespace Symfony\Bridge\Twig\Tests\Extension; use Symfony\Bridge\Twig\Extension\ExpressionExtension; -use Symfony\Component\ExpressionLanguage\Expression; class ExpressionExtensionTest extends \PHPUnit_Framework_TestCase { diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 77ea285860..1342cc0fce 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -23,7 +23,6 @@ use Symfony\Component\Config\Resource\DirectoryResource; use Symfony\Component\Finder\Finder; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\Config\FileLocator; -use Symfony\Component\Validator\Validation; /** * FrameworkExtension. diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 3c1a233514..92bd30832a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -18,7 +18,6 @@ use Symfony\Component\DependencyInjection\DefinitionDecorator; use Symfony\Component\DependencyInjection\Loader\ClosureLoader; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\Validator\Validation; abstract class FrameworkExtensionTest extends TestCase { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php index bf22e63370..735178320f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php @@ -42,7 +42,7 @@ class SessionController extends ContainerAware public function logoutAction(Request $request) { - $request->getSession('session')->invalidate(); + $request->getSession()->invalidate(); return new Response('Session cleared.'); } diff --git a/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php index 5dbd830a39..342ae79147 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php @@ -105,7 +105,7 @@ EOF return 1; } - $passwordQuestion = $this->createPasswordQuestion($input, $output); + $passwordQuestion = $this->createPasswordQuestion(); $password = $output->askQuestion($passwordQuestion); } diff --git a/src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php index 3310e075bf..79bf7b172a 100644 --- a/src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php @@ -248,11 +248,6 @@ class LegacyDialogHelperTest extends \PHPUnit_Framework_TestCase return $output; } - private function hasStderrSupport() - { - return false === $this->isRunningOS400(); - } - private function hasSttyAvailable() { exec('stty 2>&1', $output, $exitcode); diff --git a/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php b/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php index 02005187bb..eeec0e0beb 100644 --- a/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php +++ b/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php @@ -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 { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php index a1ba8a2732..fed851a88d 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php @@ -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; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php index 7cb63c6613..1b2ec6bd76 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php @@ -51,7 +51,7 @@ class ReplaceAliasByActualDefinitionPassTest extends \PHPUnit_Framework_TestCase $this->assertSame('b_alias', $aDefinition->getFactoryService(false)); $this->assertTrue($container->has('container')); - $resolvedFactory = $aDefinition->getFactory(false); + $resolvedFactory = $aDefinition->getFactory(); $this->assertSame('b_alias', (string) $resolvedFactory[0]); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index b066b4e611..7870c40ea9 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -100,7 +100,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'); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php index 9f4210c9d5..06b4e83b15 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php @@ -4,7 +4,6 @@ require_once __DIR__.'/../includes/classes.php'; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; $container = new ContainerBuilder(); $container-> diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php index e2a097b182..2de5915f4e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\DependencyInjection\Tests\Loader; 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; diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php index 3035e8d371..91e87cc25d 100644 --- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -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 { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php index fe4543e844..c69679a475 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; -use Symfony\Component\Form\Form; use Symfony\Component\Form\Tests\Fixtures\Author; use Symfony\Component\Form\Tests\Fixtures\AuthorType; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php index 4efb33cd09..f8497f53ec 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php @@ -58,7 +58,7 @@ class LegacyPdoSessionHandlerTest extends \PHPUnit_Framework_TestCase { $storage = new LegacyPdoSessionHandler($this->pdo, array('db_table' => 'bad_name')); $this->setExpectedException('RuntimeException'); - $storage->read('foo', 'bar'); + $storage->read('foo'); } public function testWriteRead() diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php index ecc4eb0276..30c823c83c 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; -use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\EventListener\LocaleListener; use Symfony\Component\HttpKernel\HttpKernelInterface; diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php index 5b77d8bb94..122fe2f76a 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; -use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\EventListener\RouterListener; use Symfony\Component\HttpKernel\HttpKernelInterface; diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php index f3fd14b55d..977976b75f 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php @@ -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. diff --git a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php index 9eb7868442..e424b715fc 100644 --- a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php @@ -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() diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php index a253d4030f..07f44f19d8 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTest.php @@ -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)); } } diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php index 17518468eb..ad87687bc0 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php @@ -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')); } /** diff --git a/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php b/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php index 92d7c163a7..fbb847eed5 100644 --- a/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php +++ b/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Security\Core\Tests; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; -use Symfony\Component\Security\Core\Authorization\AuthorizationChecker; use Symfony\Component\Security\Core\SecurityContext; /** diff --git a/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php b/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php index 368723c884..e9cb5fc472 100644 --- a/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php +++ b/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php @@ -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) diff --git a/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php b/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php index 8ce2c58def..78bbc87eec 100644 --- a/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php +++ b/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php @@ -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) { From 02841b4721ae2f447edbcfd116e15dd09365c073 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 30 Jul 2016 04:14:28 -0400 Subject: [PATCH 07/20] updated CHANGELOG for 2.7.16 --- CHANGELOG-2.7.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md index b4ec507066..1972244d21 100644 --- a/CHANGELOG-2.7.md +++ b/CHANGELOG-2.7.md @@ -7,6 +7,28 @@ 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.16 (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 #19397 [HttpFoundation] HttpCache refresh stale responses containing an ETag (maennchen) + * bug #19426 [Form] Fix the money form type render with Bootstrap3 (Th3Mouk) + * 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 #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 #19306 [Form] fixed bug - name in ButtonBuilder (cheprasov) + * 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) + * 2.7.15 (2016-06-30) * bug #19217 [HttpKernel] Inline ValidateRequestListener logic into HttpKernel (nicolas-grekas) From e4d46b0ab6c62f8c436f46b6a1b929a634b8ebc3 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 30 Jul 2016 04:15:15 -0400 Subject: [PATCH 08/20] update CONTRIBUTORS for 2.7.16 --- CONTRIBUTORS.md | 50 ++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6f73ccb150..da27714faf 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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 From 1c32449ae621486869bb6f3ed6f9359df6bd4e4c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 30 Jul 2016 04:15:38 -0400 Subject: [PATCH 09/20] updated VERSION for 2.7.16 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 35b4f79461..8d52f8b426 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -58,12 +58,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.16-DEV'; + const VERSION = '2.7.16'; const VERSION_ID = 20716; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; const RELEASE_VERSION = 16; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; From 2bdf12e42b7bd6cf8dcfe4b93c28c853f027e252 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 30 Jul 2016 04:46:44 -0400 Subject: [PATCH 10/20] bumped Symfony version to 2.7.17 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 8d52f8b426..698b2bf696 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -58,12 +58,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.16'; - const VERSION_ID = 20716; + const VERSION = '2.7.17-DEV'; + const VERSION_ID = 20717; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; - const RELEASE_VERSION = 16; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 17; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019'; From acff9736bebeaf680b4c30bab44bb91595e27a37 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 30 Jul 2016 04:48:30 -0400 Subject: [PATCH 11/20] updated CHANGELOG for 2.8.9 --- CHANGELOG-2.8.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/CHANGELOG-2.8.md b/CHANGELOG-2.8.md index 27060f7527..f3c89cff97 100644 --- a/CHANGELOG-2.8.md +++ b/CHANGELOG-2.8.md @@ -7,6 +7,37 @@ 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.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) + * 2.8.8 (2016-06-30) * bug #19217 [HttpKernel] Inline ValidateRequestListener logic into HttpKernel (nicolas-grekas) From 75257399709b73241e03e369e4f1c870e50562d2 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 30 Jul 2016 04:48:39 -0400 Subject: [PATCH 12/20] updated VERSION for 2.8.9 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index b47d645565..e8dd596cad 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.9-DEV'; + const VERSION = '2.8.9'; const VERSION_ID = 20809; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; const RELEASE_VERSION = 9; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From 068b0f161518eb6b1ba22648bbc72e0a699d2b6c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 30 Jul 2016 05:09:16 -0400 Subject: [PATCH 13/20] bumped Symfony version to 2.8.10 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index e8dd596cad..172435207e 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.9'; - const VERSION_ID = 20809; + const VERSION = '2.8.10-DEV'; + const VERSION_ID = 20810; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 9; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 10; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From 92b3ef4cb23ad887a0740acf66bc8f22cb1eec89 Mon Sep 17 00:00:00 2001 From: Titouan Galopin Date: Mon, 1 Aug 2016 10:59:26 +0200 Subject: [PATCH 14/20] [Validator] Fix dockblock typehint in XmlFileLoader --- .../Component/Validator/Mapping/Loader/XmlFileLoader.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php index 3458c7146a..77a556b5b8 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php @@ -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); From 2bb2b9b35fb0fab3a5e2857b867f19264a605d92 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 2 Aug 2016 09:17:07 +0200 Subject: [PATCH 15/20] [Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least) --- src/Symfony/Component/Process/Pipes/AbstractPipes.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Symfony/Component/Process/Pipes/AbstractPipes.php b/src/Symfony/Component/Process/Pipes/AbstractPipes.php index ffa6a88319..1a94755bd7 100644 --- a/src/Symfony/Component/Process/Pipes/AbstractPipes.php +++ b/src/Symfony/Component/Process/Pipes/AbstractPipes.php @@ -134,9 +134,7 @@ abstract class AbstractPipes implements PipesInterface if (null === $this->input && !isset($this->inputBuffer[0])) { fclose($this->pipes[0]); unset($this->pipes[0]); - } - - if (!$w) { + } elseif (!$w) { return array($this->pipes[0]); } } From ac17617ac0d98ea56c0d953259b5039cbd132075 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 2 Aug 2016 15:52:07 +0200 Subject: [PATCH 16/20] [Process] Fix double-fread() when reading unix pipes --- src/Symfony/Component/Process/Pipes/UnixPipes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Process/Pipes/UnixPipes.php b/src/Symfony/Component/Process/Pipes/UnixPipes.php index 2bf669733e..46130302da 100644 --- a/src/Symfony/Component/Process/Pipes/UnixPipes.php +++ b/src/Symfony/Component/Process/Pipes/UnixPipes.php @@ -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]); From 9ac9f555a64cff35f155eb85f5f582a2c31e2fef Mon Sep 17 00:00:00 2001 From: Titouan Galopin Date: Tue, 2 Aug 2016 17:33:57 +0200 Subject: [PATCH 17/20] [HttpKernel] Fix variable conflicting name --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 6e4ca26219..1a6fdfa2c9 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -473,8 +473,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); } } From 9b0cbabf3e87a98a32faec7483f25e2a4b0f6687 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Wed, 3 Aug 2016 21:26:43 +0200 Subject: [PATCH 18/20] Remove usage of __CLASS__ outside of a class --- .../Bridge/Swiftmailer/DataCollector/MessageDataCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php index 9e1d75ee94..a7d7f541ba 100644 --- a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php +++ b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php @@ -11,7 +11,7 @@ namespace Symfony\Bridge\Swiftmailer\DataCollector; -@trigger_error(__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector class from SwiftmailerBundle instead. Require symfony/swiftmailer-bundle package to download SwiftmailerBundle with Composer.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\MessageDataCollector class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector class from SwiftmailerBundle instead. Require symfony/swiftmailer-bundle package to download SwiftmailerBundle with Composer.', E_USER_DEPRECATED); use Symfony\Component\HttpKernel\DataCollector\DataCollector; use Symfony\Component\HttpFoundation\Request; From eabbcf097e7d43d9b5e6701348210e2e1f8859c8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 30 Jul 2016 05:09:16 -0400 Subject: [PATCH 19/20] bumped Symfony version to 2.8.10 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index e8dd596cad..172435207e 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.9'; - const VERSION_ID = 20809; + const VERSION = '2.8.10-DEV'; + const VERSION_ID = 20810; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 9; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 10; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From 6703b416d8e7edc2fd04a214b317ea4a189cac51 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 5 Aug 2016 09:21:03 +0200 Subject: [PATCH 20/20] Relax 1 test failing with latest PHP versions Related to php bug #52646 which is fixed in 5.6.25RC1, 7.0.10RC1, 7.1.0beta2 --- .../Component/VarDumper/Tests/Caster/SplCasterTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php index c6d247e776..7ed5339ca1 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php @@ -94,10 +94,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 [