From 41ffc69fa091ecb04bd8b4c70c0f96c09819b470 Mon Sep 17 00:00:00 2001 From: Amrouche Hamza Date: Sat, 16 Dec 2017 06:43:52 +0100 Subject: [PATCH 1/6] [Console] fix a bug when you are passing a default value and passing -n would ouput the index --- src/Symfony/Component/Console/Helper/QuestionHelper.php | 6 ++++++ .../Component/Console/Tests/Helper/QuestionHelperTest.php | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index 2034ce14a4..bce0534ed0 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -45,6 +45,12 @@ class QuestionHelper extends Helper } if (!$input->isInteractive()) { + if ($question instanceof ChoiceQuestion) { + $choices = $question->getChoices(); + + return $choices[$question->getDefault()]; + } + return $question->getDefault(); } diff --git a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php index 3538cbc0b7..d9bdb606ac 100644 --- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -84,6 +84,10 @@ class QuestionHelperTest extends TestCase $question->setMultiselect(true); $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, 0); + // We are supposed to get the default value since we are not in interactive mode + $this->assertEquals('Superman', $questionHelper->ask($this->createInputInterfaceMock(true), $this->createOutputInterface(), $question)); } public function testAsk() From 11bee7fdfdeb6090f8e25ea3785532776fd2d6ea Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 17 Dec 2017 18:52:49 +0000 Subject: [PATCH 2/6] [Intl] Update ICU data to 60.2 Not much has changed in data we actually use in Symfony. However, the extension compiled for ICU 60.2 behaves slightly differently in some cases. This can be observed on one assertion that had to be disabled. There's no point in keeping it since the Symfony implementation does not support the behaviour. --- src/Symfony/Component/Intl/Intl.php | 2 +- src/Symfony/Component/Intl/Resources/bin/icu.ini | 2 +- .../Component/Intl/Resources/data/currencies/de.json | 2 +- .../Component/Intl/Resources/data/currencies/ur.json | 2 +- src/Symfony/Component/Intl/Resources/data/languages/de.json | 2 +- src/Symfony/Component/Intl/Resources/data/languages/ur.json | 2 +- src/Symfony/Component/Intl/Resources/data/regions/de.json | 2 +- src/Symfony/Component/Intl/Resources/data/regions/ur.json | 2 +- src/Symfony/Component/Intl/Resources/data/scripts/de.json | 2 +- src/Symfony/Component/Intl/Resources/data/scripts/ur.json | 2 +- src/Symfony/Component/Intl/Resources/data/svn-info.txt | 6 +++--- src/Symfony/Component/Intl/Resources/data/version.txt | 2 +- .../Tests/DateFormatter/AbstractIntlDateFormatterTest.php | 4 +++- 13 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/Symfony/Component/Intl/Intl.php b/src/Symfony/Component/Intl/Intl.php index 3fc1974bfc..3444c10f83 100644 --- a/src/Symfony/Component/Intl/Intl.php +++ b/src/Symfony/Component/Intl/Intl.php @@ -234,7 +234,7 @@ final class Intl */ public static function getIcuStubVersion() { - return '60.1'; + return '60.2'; } /** diff --git a/src/Symfony/Component/Intl/Resources/bin/icu.ini b/src/Symfony/Component/Intl/Resources/bin/icu.ini index f06bc75335..da25128e28 100644 --- a/src/Symfony/Component/Intl/Resources/bin/icu.ini +++ b/src/Symfony/Component/Intl/Resources/bin/icu.ini @@ -15,4 +15,4 @@ 57 = http://source.icu-project.org/repos/icu/icu/tags/release-57-1/source 58 = http://source.icu-project.org/repos/icu/tags/release-58-2/icu4c/source 59 = http://source.icu-project.org/repos/icu/tags/release-59-1/icu4c/source -60 = http://source.icu-project.org/repos/icu/tags/release-60-1/icu4c/source +60 = http://source.icu-project.org/repos/icu/tags/release-60-2/icu4c/source diff --git a/src/Symfony/Component/Intl/Resources/data/currencies/de.json b/src/Symfony/Component/Intl/Resources/data/currencies/de.json index 0a07964357..015dfbd138 100644 --- a/src/Symfony/Component/Intl/Resources/data/currencies/de.json +++ b/src/Symfony/Component/Intl/Resources/data/currencies/de.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.11", + "Version": "2.1.37.96", "Names": { "ADP": [ "ADP", diff --git a/src/Symfony/Component/Intl/Resources/data/currencies/ur.json b/src/Symfony/Component/Intl/Resources/data/currencies/ur.json index bbe4edc0ea..0a5ca9e1d3 100644 --- a/src/Symfony/Component/Intl/Resources/data/currencies/ur.json +++ b/src/Symfony/Component/Intl/Resources/data/currencies/ur.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.28", + "Version": "2.1.37.69", "Names": { "AED": [ "AED", diff --git a/src/Symfony/Component/Intl/Resources/data/languages/de.json b/src/Symfony/Component/Intl/Resources/data/languages/de.json index f4a01cd421..58e7a7c571 100644 --- a/src/Symfony/Component/Intl/Resources/data/languages/de.json +++ b/src/Symfony/Component/Intl/Resources/data/languages/de.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.11", + "Version": "2.1.37.96", "Names": { "aa": "Afar", "ab": "Abchasisch", diff --git a/src/Symfony/Component/Intl/Resources/data/languages/ur.json b/src/Symfony/Component/Intl/Resources/data/languages/ur.json index 33871c2dee..e28f6175c9 100644 --- a/src/Symfony/Component/Intl/Resources/data/languages/ur.json +++ b/src/Symfony/Component/Intl/Resources/data/languages/ur.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.28", + "Version": "2.1.37.69", "Names": { "aa": "افار", "ab": "ابقازیان", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/de.json b/src/Symfony/Component/Intl/Resources/data/regions/de.json index bd2259f580..1bc40b718a 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/de.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/de.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.11", + "Version": "2.1.37.96", "Names": { "AC": "Ascension", "AD": "Andorra", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ur.json b/src/Symfony/Component/Intl/Resources/data/regions/ur.json index a28f28f770..89fbae8bf9 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ur.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ur.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.28", + "Version": "2.1.37.69", "Names": { "AC": "اسینشن آئلینڈ", "AD": "انڈورا", diff --git a/src/Symfony/Component/Intl/Resources/data/scripts/de.json b/src/Symfony/Component/Intl/Resources/data/scripts/de.json index 07898c2c2e..735ee0fdcf 100644 --- a/src/Symfony/Component/Intl/Resources/data/scripts/de.json +++ b/src/Symfony/Component/Intl/Resources/data/scripts/de.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.11", + "Version": "2.1.37.96", "Names": { "Afak": "Afaka", "Aghb": "Kaukasisch-Albanisch", diff --git a/src/Symfony/Component/Intl/Resources/data/scripts/ur.json b/src/Symfony/Component/Intl/Resources/data/scripts/ur.json index bedfaaae75..7c26e92044 100644 --- a/src/Symfony/Component/Intl/Resources/data/scripts/ur.json +++ b/src/Symfony/Component/Intl/Resources/data/scripts/ur.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.28", + "Version": "2.1.37.69", "Names": { "Arab": "عربی", "Armn": "آرمینیائی", diff --git a/src/Symfony/Component/Intl/Resources/data/svn-info.txt b/src/Symfony/Component/Intl/Resources/data/svn-info.txt index c452480e2f..1bfc195f5b 100644 --- a/src/Symfony/Component/Intl/Resources/data/svn-info.txt +++ b/src/Symfony/Component/Intl/Resources/data/svn-info.txt @@ -1,7 +1,7 @@ SVN information =============== -URL: http://source.icu-project.org/repos/icu/tags/release-60-1/icu4c/source -Revision: 40662 +URL: http://source.icu-project.org/repos/icu/tags/release-60-2/icu4c/source +Revision: 40727 Author: yoshito -Date: 2017-10-31T15:14:15.305164Z +Date: 2017-12-13T20:01:38.026283Z diff --git a/src/Symfony/Component/Intl/Resources/data/version.txt b/src/Symfony/Component/Intl/Resources/data/version.txt index c4601b28ee..76887d82ad 100644 --- a/src/Symfony/Component/Intl/Resources/data/version.txt +++ b/src/Symfony/Component/Intl/Resources/data/version.txt @@ -1 +1 @@ -60.1 +60.2 diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php index d512b37d6d..d068a4168d 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php @@ -936,7 +936,9 @@ abstract class AbstractIntlDateFormatterTest extends TestCase $position = null; $formatter = $this->getDefaultDateFormatter('y'); $this->assertSame(0, $formatter->parse('1970', $position)); - $this->assertNull($position); + // Since $position is not supported by the Symfony implementation, the following won't work. + // The intl implementation works this way since 60.2. + // $this->assertSame(4, $position); } public function testSetPattern() From 945f23602b6ffa440669d1eec3d8d9367d3422e9 Mon Sep 17 00:00:00 2001 From: Nicolas Appriou Date: Thu, 14 Dec 2017 10:22:00 +0100 Subject: [PATCH 3/6] improve FormType::getType exception message details --- src/Symfony/Component/Form/FormRegistry.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Form/FormRegistry.php b/src/Symfony/Component/Form/FormRegistry.php index 7da3d2ceb6..8df65de87b 100644 --- a/src/Symfony/Component/Form/FormRegistry.php +++ b/src/Symfony/Component/Form/FormRegistry.php @@ -84,11 +84,14 @@ class FormRegistry implements FormRegistryInterface if (!$type) { // Support fully-qualified class names - if (class_exists($name) && in_array('Symfony\Component\Form\FormTypeInterface', class_implements($name))) { - $type = new $name(); - } else { - throw new InvalidArgumentException(sprintf('Could not load type "%s"', $name)); + if (!class_exists($name)) { + throw new InvalidArgumentException(sprintf('Could not load type "%s": class does not exist.', $name)); } + if (!in_array(FormTypeInterface::class, class_implements($name))) { + throw new InvalidArgumentException(sprintf('Could not load type "%s": class does not implement "%s".', $name, FormTypeInterface::class)); + } + + $type = new $name(); } $this->resolveAndAddType($type); From 1a75e8568f9e44ecd576e254b669a119930e4f5e Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Tue, 19 Dec 2017 13:12:38 +0100 Subject: [PATCH 4/6] [WebProfilerBundle] Let fetch() cast URL to string --- .../Resources/views/Profiler/base_js.html.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index 78c3f51173..ae267c7654 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -250,6 +250,8 @@ mode: arguments[0].mode, redirect: arguments[0].redirect }; + } else { + url = String(url); } if (!url.match(new RegExp({{ excluded_ajax_paths|json_encode|raw }}))) { var method = 'GET'; From e913b68a08f07bc9723d63d3741f4822d03a5f12 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Tue, 19 Dec 2017 10:26:29 -0200 Subject: [PATCH 5/6] Add php_unit_dedicate_assert to PHPCS --- .php_cs.dist | 1 + .../Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php | 1 - .../Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.php_cs.dist b/.php_cs.dist index f1a3691142..7f8d3b03bc 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -10,6 +10,7 @@ return PhpCsFixer\Config::create() '@Symfony:risky' => true, 'array_syntax' => array('syntax' => 'long'), 'protected_to_private' => false, + 'php_unit_dedicate_assert' => array('target' => '3.5'), )) ->setRiskyAllowed(true) ->setFinder( diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php index d068a4168d..e47b5f6d48 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php @@ -231,7 +231,6 @@ abstract class AbstractIntlDateFormatterTest extends TestCase array('s', 3601, '1'), array('s', 3630, '30'), array('s', 43200, '0'), // 12 hours - ); $dateTime = new \DateTime('@0'); diff --git a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php index da90bc4fdf..69c394c67a 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -75,7 +75,7 @@ class PhpMatcherDumperTest extends TestCase ->setMethods(array('redirect')) ->setConstructorArgs(array(new RequestContext())) ->getMock(); - + $matcher->expects($this->once())->method('redirect')->with('/foo%3Abar/', 'foo'); $matcher->match('/foo%3Abar'); From afa1f149a3463181e804a8e41ed6810160c48fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Mon, 18 Dec 2017 12:23:20 +0100 Subject: [PATCH 6/6] [2.7] Fix issues found by PHPStan --- .../Doctrine/Tests/Form/Type/EntityTypeTest.php | 11 ++--------- .../Templating/Helper/CodeHelper.php | 2 +- .../Tests/Functional/CacheWarmingTest.php | 3 ++- .../Tests/Functional/NoTemplatingEntryTest.php | 3 ++- .../Tests/Definition/Builder/TreeBuilderTest.php | 14 +++++--------- .../Tests/Fixtures/Builder/BarNodeDefinition.php | 2 +- .../Config/Tests/Fixtures/Builder/NodeBuilder.php | 2 +- .../Fixtures/Builder/VariableNodeDefinition.php | 2 +- .../Debug/Tests/Exception/FlattenExceptionTest.php | 1 + .../HttpFoundation/Tests/ResponseTest.php | 2 +- 10 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index a7d41ce8f3..c1dfa2ad36 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -31,7 +31,6 @@ use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Form\Forms; use Symfony\Component\Form\Tests\Extension\Core\Type\BaseTypeTest; use Symfony\Component\Form\Tests\Extension\Core\Type\FormTypeTest; -use Symfony\Component\PropertyAccess\PropertyAccess; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleAssociationToIntIdEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity; @@ -1102,10 +1101,7 @@ class EntityTypeTest extends BaseTypeTest $repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS); - $entityType = new EntityType( - $this->emRegistry, - PropertyAccess::createPropertyAccessor() - ); + $entityType = new EntityType($this->emRegistry); $entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry); @@ -1165,10 +1161,7 @@ class EntityTypeTest extends BaseTypeTest $repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS); - $entityType = new EntityType( - $this->emRegistry, - PropertyAccess::createPropertyAccessor() - ); + $entityType = new EntityType($this->emRegistry); $entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry); diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php index b27c6663c7..7390144dc8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php @@ -115,7 +115,7 @@ class CodeHelper extends Helper { if (is_readable($file)) { if (extension_loaded('fileinfo')) { - $finfo = new \Finfo(); + $finfo = new \finfo(); // Check if the file is an application/octet-stream (eg. Phar file) because highlight_file cannot parse these files if ('application/octet-stream' === $finfo->file($file, FILEINFO_MIME_TYPE)) { diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php index 455ed0b6a8..a3f04afe4f 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/Functional/CacheWarmingTest.php @@ -9,12 +9,13 @@ * file that was distributed with this source code. */ -namespace Symfony\Bundle\TwigBundle\Tests; +namespace Symfony\Bundle\TwigBundle\Tests\Functional; use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; +use Symfony\Bundle\TwigBundle\Tests\TestCase; use Symfony\Bundle\TwigBundle\TwigBundle; class CacheWarmingTest extends TestCase diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php index d07e0e946b..05417670e3 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/Functional/NoTemplatingEntryTest.php @@ -9,12 +9,13 @@ * file that was distributed with this source code. */ -namespace Symfony\Bundle\TwigBundle\Tests; +namespace Symfony\Bundle\TwigBundle\Tests\Functional; use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; +use Symfony\Bundle\TwigBundle\Tests\TestCase; use Symfony\Bundle\TwigBundle\TwigBundle; class NoTemplatingEntryTest extends TestCase diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php index 13304fae36..0a9312346e 100644 --- a/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Builder/TreeBuilderTest.php @@ -12,13 +12,9 @@ namespace Symfony\Component\Config\Tests\Definition\Builder; use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder as CustomNodeBuilder; +use Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder as CustomNodeBuilder; use Symfony\Component\Config\Definition\Builder\TreeBuilder; -require __DIR__.'/../../Fixtures/Builder/NodeBuilder.php'; -require __DIR__.'/../../Fixtures/Builder/BarNodeDefinition.php'; -require __DIR__.'/../../Fixtures/Builder/VariableNodeDefinition.php'; - class TreeBuilderTest extends TestCase { public function testUsingACustomNodeBuilder() @@ -28,11 +24,11 @@ class TreeBuilderTest extends TestCase $nodeBuilder = $root->children(); - $this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder', $nodeBuilder); + $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder); $nodeBuilder = $nodeBuilder->arrayNode('deeper')->children(); - $this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder', $nodeBuilder); + $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder); } public function testOverrideABuiltInNodeType() @@ -42,7 +38,7 @@ class TreeBuilderTest extends TestCase $definition = $root->children()->variableNode('variable'); - $this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\VariableNodeDefinition', $definition); + $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\VariableNodeDefinition', $definition); } public function testAddANodeType() @@ -52,7 +48,7 @@ class TreeBuilderTest extends TestCase $definition = $root->children()->barNode('variable'); - $this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\BarNodeDefinition', $definition); + $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\BarNodeDefinition', $definition); } public function testCreateABuiltInNodeTypeWithACustomNodeBuilder() diff --git a/src/Symfony/Component/Config/Tests/Fixtures/Builder/BarNodeDefinition.php b/src/Symfony/Component/Config/Tests/Fixtures/Builder/BarNodeDefinition.php index 0d46f3d2c8..b9c62e5377 100644 --- a/src/Symfony/Component/Config/Tests/Fixtures/Builder/BarNodeDefinition.php +++ b/src/Symfony/Component/Config/Tests/Fixtures/Builder/BarNodeDefinition.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\Config\Tests\Definition\Builder; +namespace Symfony\Component\Config\Tests\Fixtures\Builder; use Symfony\Component\Config\Definition\Builder\NodeDefinition; use Symfony\Component\Config\Tests\Fixtures\BarNode; diff --git a/src/Symfony/Component/Config/Tests/Fixtures/Builder/NodeBuilder.php b/src/Symfony/Component/Config/Tests/Fixtures/Builder/NodeBuilder.php index aa5986311b..22b8b32fb6 100644 --- a/src/Symfony/Component/Config/Tests/Fixtures/Builder/NodeBuilder.php +++ b/src/Symfony/Component/Config/Tests/Fixtures/Builder/NodeBuilder.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\Config\Tests\Definition\Builder; +namespace Symfony\Component\Config\Tests\Fixtures\Builder; use Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder; diff --git a/src/Symfony/Component/Config/Tests/Fixtures/Builder/VariableNodeDefinition.php b/src/Symfony/Component/Config/Tests/Fixtures/Builder/VariableNodeDefinition.php index 1017880c11..6126ed434f 100644 --- a/src/Symfony/Component/Config/Tests/Fixtures/Builder/VariableNodeDefinition.php +++ b/src/Symfony/Component/Config/Tests/Fixtures/Builder/VariableNodeDefinition.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\Config\Tests\Definition\Builder; +namespace Symfony\Component\Config\Tests\Fixtures\Builder; use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition; diff --git a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php index ae01e9cb0d..d3b9ab2eb7 100644 --- a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php +++ b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php @@ -193,6 +193,7 @@ class FlattenExceptionTest extends TestCase public function testRecursionInArguments() { + $a = null; $a = array('foo', array(2, &$a)); $exception = $this->createException($a); diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php index 8043ee45c1..5f69735fca 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -912,7 +912,7 @@ class ResponseTest extends ResponseTestCase $ianaCodesReasonPhrases = array(); - $xpath = new \DomXPath($ianaHttpStatusCodes); + $xpath = new \DOMXPath($ianaHttpStatusCodes); $xpath->registerNamespace('ns', 'http://www.iana.org/assignments'); $records = $xpath->query('//ns:record');