From 9ea59ac53142f40b99260f753de5c85d6cc1bbf0 Mon Sep 17 00:00:00 2001 From: Warnar Boekkooi Date: Fri, 9 Jan 2015 16:09:18 +0100 Subject: [PATCH 1/4] [Console] Helper\Table->addRow optimization --- src/Symfony/Component/Console/Helper/TableHelper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/TableHelper.php b/src/Symfony/Component/Console/Helper/TableHelper.php index 3bc8c16b79..d0f70d548e 100644 --- a/src/Symfony/Component/Console/Helper/TableHelper.php +++ b/src/Symfony/Component/Console/Helper/TableHelper.php @@ -143,8 +143,9 @@ class TableHelper extends Helper { $this->rows[] = array_values($row); - $keys = array_keys($this->rows); - $rowKey = array_pop($keys); + end($this->rows); + $rowKey = key($this->rows); + reset($this->rows); foreach ($row as $key => $cellValue) { if (!strstr($cellValue, "\n")) { From f600d1a557dbf3090fc011e06fd82ad9b73556dc Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Sun, 11 Jan 2015 18:40:41 +0100 Subject: [PATCH 2/4] fix missing comma in YamlDumper --- src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php | 2 +- .../Tests/Fixtures/containers/container9.php | 2 +- .../DependencyInjection/Tests/Fixtures/xml/services9.xml | 2 +- .../DependencyInjection/Tests/Fixtures/yaml/services9.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php index 413892a1cd..310eb74e70 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -85,7 +85,7 @@ class YamlDumper extends Dumper foreach ($attributes as $key => $value) { $att[] = sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value)); } - $att = $att ? ', '.implode(' ', $att) : ''; + $att = $att ? ', '.implode(', ', $att) : ''; $tagsCode .= sprintf(" - { name: %s%s }\n", $this->dumper->dump($name), $att); } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php index 862920da02..14f2dad275 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php @@ -11,7 +11,7 @@ $container = new ContainerBuilder(); $container-> register('foo', 'FooClass')-> addTag('foo', array('foo' => 'foo'))-> - addTag('foo', array('bar' => 'bar'))-> + addTag('foo', array('bar' => 'bar', 'baz' => 'baz'))-> setFactoryClass('FooClass')-> setFactoryMethod('getInstance')-> setArguments(array('foo', new Reference('foo.baz'), array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'), true, new Reference('service_container')))-> diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml index de065464c5..36748e01e0 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml @@ -8,7 +8,7 @@ - + foo diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml index a0e941a50a..cda41b2cce 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml @@ -8,7 +8,7 @@ services: class: FooClass tags: - { name: foo, foo: foo } - - { name: foo, bar: bar } + - { name: foo, bar: bar, baz: baz } factory_class: FooClass factory_method: getInstance arguments: [foo, '@foo.baz', { '%foo%': 'foo is %foo%', foobar: '%foo%' }, true, '@service_container'] From fc51d544b5697bf0ebc27e1071e362df4533450e Mon Sep 17 00:00:00 2001 From: Alexander Schwenn Date: Sun, 11 Jan 2015 14:22:08 +0100 Subject: [PATCH 3/4] [HttpFoundation] Make use of isEmpty() method --- src/Symfony/Component/HttpFoundation/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 42ed9ae6e6..fa80ccc2af 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -207,7 +207,7 @@ class Response { $headers = $this->headers; - if ($this->isInformational() || in_array($this->statusCode, array(204, 304))) { + if ($this->isInformational() || $this->isEmpty()) { $this->setContent(null); $headers->remove('Content-Type'); $headers->remove('Content-Length'); From cc359a67980dbb32e2657ce60d76096c259d719b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 13 Jan 2015 08:01:38 +0100 Subject: [PATCH 4/4] [TwigBundle] allowed SecurityBundle to use the latest versions of FrameworkBundle --- src/Symfony/Bundle/SecurityBundle/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index 0b7e49d9ad..89d45e27bf 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -26,7 +26,7 @@ "symfony/dependency-injection": "~2.3", "symfony/dom-crawler": "~2.0,>=2.0.5", "symfony/form": "~2.3", - "symfony/framework-bundle": "~2.2,<2.6.0", + "symfony/framework-bundle": "~2.2", "symfony/http-foundation": "~2.3", "symfony/twig-bundle": "~2.2", "symfony/twig-bridge": "~2.2,>=2.2.6",