From 9fc48b8bb24cd62100adae711daee05b0a04ee15 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 6 Jun 2016 13:49:15 +0200 Subject: [PATCH 1/4] [Debug] Fix context dependent test --- src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php index 12f2fcb40b..f3b7701c3f 100644 --- a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -428,7 +428,7 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase $handler->handleException($exception); $this->assertInstanceOf('Symfony\Component\Debug\Exception\ClassNotFoundException', $args[0]); - $this->assertSame("Attempted to load class \"Foo\" from the global namespace.\nDid you forget a \"use\" statement?", $args[0]->getMessage()); + $this->assertStringStartsWith("Attempted to load class \"Foo\" from the global namespace.\nDid you forget a \"use\" statement", $args[0]->getMessage()); } public function testHandleFatalErrorOnHHVM() From 065dee8525e51091407221ece8a81424bb6bb0f0 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 6 Jun 2016 14:20:11 +0200 Subject: [PATCH 2/4] [HttpKernel] Fix context dependent test --- .../FrameworkBundle/Tests/Controller/ControllerResolverTest.php | 2 +- .../HttpKernel/Tests/Controller/ControllerResolverTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php index b4dc8ada55..00ffa4c1fd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php @@ -150,7 +150,7 @@ class ControllerResolverTest extends BaseControllerResolverTest { return array( array('foo', '\LogicException', 'Unable to parse the controller name "foo".'), - array('foo::bar', '\InvalidArgumentException', 'Class "foo" does not exist.'), + array('oof::bar', '\InvalidArgumentException', 'Class "oof" does not exist.'), array('stdClass', '\LogicException', 'Unable to parse the controller name "stdClass".'), array( 'Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar', diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php index 7fc127e49b..101782e490 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php @@ -127,7 +127,7 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase { return array( array('foo'), - array('foo::bar'), + array('oof::bar'), array('stdClass'), array('Symfony\Component\HttpKernel\Tests\Controller\ControllerResolverTest::bar'), ); From 73b812e3a8dd6d943db5315f852360daa1b7b60a Mon Sep 17 00:00:00 2001 From: Alexander Obuhovich Date: Fri, 3 Jun 2016 17:53:01 +0300 Subject: [PATCH 3/4] Make one call to "OutputInterface::write" method per table row --- .../Component/Console/Helper/Table.php | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index f0445e118d..c4e24a63d9 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -257,7 +257,7 @@ class Table */ private function renderColumnSeparator() { - $this->output->write(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); + return sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()); } /** @@ -274,12 +274,12 @@ class Table return; } - $this->renderColumnSeparator(); + $rowContent = $this->renderColumnSeparator(); foreach ($this->getRowColumns($row) as $column) { - $this->renderCell($row, $column, $cellFormat); - $this->renderColumnSeparator(); + $rowContent .= $this->renderCell($row, $column, $cellFormat); + $rowContent .= $this->renderColumnSeparator(); } - $this->output->writeln(''); + $this->output->writeln($rowContent); } /** @@ -306,12 +306,13 @@ class Table } if ($cell instanceof TableSeparator) { - $this->output->write(sprintf($this->style->getBorderFormat(), str_repeat($this->style->getHorizontalBorderChar(), $width))); - } else { - $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); - $content = sprintf($this->style->getCellRowContentFormat(), $cell); - $this->output->write(sprintf($cellFormat, str_pad($content, $width, $this->style->getPaddingChar(), $this->style->getPadType()))); + return sprintf($this->style->getBorderFormat(), str_repeat($this->style->getHorizontalBorderChar(), $width)); } + + $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); + $content = sprintf($this->style->getCellRowContentFormat(), $cell); + + return sprintf($cellFormat, str_pad($content, $width, $this->style->getPaddingChar(), $this->style->getPadType())); } /** From 5579d8645423c55bc5144f8fe99511724a43e012 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 6 Jun 2016 13:57:55 +0100 Subject: [PATCH 4/4] [BrowserKit] Bump dom-crawler minimum version requirement The BrowserKit Client will not work with DomCrawler 2.0 if the CssSelector component is not installed. --- src/Symfony/Component/BrowserKit/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/BrowserKit/composer.json b/src/Symfony/Component/BrowserKit/composer.json index 7c0234e1fe..344e3e81af 100644 --- a/src/Symfony/Component/BrowserKit/composer.json +++ b/src/Symfony/Component/BrowserKit/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": ">=5.3.9", - "symfony/dom-crawler": "~2.0,>=2.0.5" + "symfony/dom-crawler": "~2.1" }, "require-dev": { "symfony/process": "~2.3.34|~2.7,>=2.7.6",