From 11014c271f29a7e6add1f0bc61d7eb8a5ed9e583 Mon Sep 17 00:00:00 2001 From: Tatsuya Tsuruoka Date: Fri, 5 Dec 2014 17:50:33 +0900 Subject: [PATCH 01/21] [Console][Table] Fix cell padding with multi-byte When the `TableHelper` dealing with East Asian text, it renders wrong widths. This fixes that problem. --- .../Component/Console/Helper/Helper.php | 2 +- .../Component/Console/Helper/TableHelper.php | 4 +-- .../Console/Tests/Helper/TableHelperTest.php | 29 ++++++++++++++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Console/Helper/Helper.php b/src/Symfony/Component/Console/Helper/Helper.php index ceef972b01..dc42600de8 100644 --- a/src/Symfony/Component/Console/Helper/Helper.php +++ b/src/Symfony/Component/Console/Helper/Helper.php @@ -41,7 +41,7 @@ abstract class Helper implements HelperInterface } /** - * Returns the length of a string, using mb_strlen if it is available. + * Returns the length of a string, using mb_strwidth if it is available. * * @param string $string The string to check its length * diff --git a/src/Symfony/Component/Console/Helper/TableHelper.php b/src/Symfony/Component/Console/Helper/TableHelper.php index 2fd6f5e900..3a9fbeeb18 100644 --- a/src/Symfony/Component/Console/Helper/TableHelper.php +++ b/src/Symfony/Component/Console/Helper/TableHelper.php @@ -387,8 +387,8 @@ class TableHelper extends Helper $width = $this->getColumnWidth($column); // str_pad won't work properly with multi-byte strings, we need to fix the padding - if (function_exists('mb_strlen') && false !== $encoding = mb_detect_encoding($cell)) { - $width += strlen($cell) - mb_strlen($cell, $encoding); + if (function_exists('mb_strwidth') && false !== $encoding = mb_detect_encoding($cell)) { + $width += strlen($cell) - mb_strwidth($cell, $encoding); } $width += $this->strlen($cell) - $this->computeLengthWithoutDecoration($cell); diff --git a/src/Symfony/Component/Console/Tests/Helper/TableHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/TableHelperTest.php index 7a9eb40819..cd9e0f469d 100644 --- a/src/Symfony/Component/Console/Tests/Helper/TableHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/TableHelperTest.php @@ -235,7 +235,7 @@ TABLE public function testRenderMultiByte() { - if (!function_exists('mb_strlen')) { + if (!function_exists('mb_strwidth')) { $this->markTestSkipped('The "mbstring" extension is not available'); } @@ -255,6 +255,33 @@ TABLE | 1234 | +------+ +TABLE; + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + public function testRenderFullWidthCharacters() + { + if (!function_exists('mb_strwidth')) { + $this->markTestSkipped('The "mbstring" extension is not available'); + } + + $table = new TableHelper(); + $table + ->setHeaders(array('あいうえお')) + ->setRows(array(array(1234567890))) + ->setLayout(TableHelper::LAYOUT_DEFAULT) + ; + $table->render($output = $this->getOutputStream()); + + $expected = + <<assertEquals($expected, $this->getOutputContent($output)); From b6d4390ab6768c91dcde5976a7b4d37b048161db Mon Sep 17 00:00:00 2001 From: Giorgio Premi Date: Thu, 22 Jan 2015 11:07:27 +0100 Subject: [PATCH 02/21] Keep "pre" meaning for var_dump quick-and-dirty debug --- .../Bundle/FrameworkBundle/Resources/public/css/structure.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/structure.css b/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/structure.css index 00b948f228..87499d072a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/structure.css +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/structure.css @@ -62,7 +62,7 @@ img { width: 970px; margin: 0 auto; } -pre { +#content pre { white-space: normal; font-family: Arial, Helvetica, sans-serif; } From 4d22bf7f7269f49d8c87bb4b779426bf4728a455 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Mon, 12 Jan 2015 11:05:05 +0000 Subject: [PATCH 03/21] [YAML] Fix one-liners to work with multiple new lines --- src/Symfony/Component/Yaml/Parser.php | 13 ++++++------- src/Symfony/Component/Yaml/Tests/ParserTest.php | 8 ++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index 2771f51fd2..6b2cc72aed 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -51,13 +51,13 @@ class Parser */ public function parse($value, $exceptionOnInvalidType = false, $objectSupport = false) { - $this->currentLineNb = -1; - $this->currentLine = ''; - $this->lines = explode("\n", $this->cleanup($value)); - if (!preg_match('//u', $value)) { throw new ParseException('The YAML value does not appear to be valid UTF-8.'); } + $this->currentLineNb = -1; + $this->currentLine = ''; + $value = $this->cleanup($value); + $this->lines = explode("\n", $value); if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { $mbEncoding = mb_internal_encoding(); @@ -197,9 +197,8 @@ class Parser throw new ParseException('Multiple documents are not supported.'); } - // 1-liner optionally followed by newline - $lineCount = count($this->lines); - if (1 === $lineCount || (2 === $lineCount && empty($this->lines[1]))) { + // 1-liner optionally followed by newline(s) + if ($this->lines[0] === trim($value)) { try { $value = Inline::parse($this->lines[0], $exceptionOnInvalidType, $objectSupport, $this->refs); } catch (ParseException $e) { diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index aca190ac8b..5c71889cb2 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -135,6 +135,14 @@ EOF; ); $tests['Literal block chomping strip with multiple trailing newlines'] = array($expected, $yaml); + $yaml = <<<'EOF' +{} + + +EOF; + $expected = array(); + $tests['Literal block chomping strip with multiple trailing newlines after a 1-liner'] = array($expected, $yaml); + $yaml = <<<'EOF' foo: |- one From 2b33ba618c2d4653524800218473e5229ca88af9 Mon Sep 17 00:00:00 2001 From: Andrew M Date: Sat, 29 Nov 2014 11:11:35 +0100 Subject: [PATCH 04/21] Add reference to documentation in FormEvents phpdocs --- src/Symfony/Component/Form/FormEvents.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Symfony/Component/Form/FormEvents.php b/src/Symfony/Component/Form/FormEvents.php index 54c72271c7..13fc97f494 100644 --- a/src/Symfony/Component/Form/FormEvents.php +++ b/src/Symfony/Component/Form/FormEvents.php @@ -11,6 +11,12 @@ namespace Symfony\Component\Form; /** + * To learn more about how form events work check the documentation + * entry at {@link http://symfony.com/doc/current/components/form/form_events.html} + * + * To learn how to dynamically modify forms using events check the cookbook + * entry at {@link http://symfony.com/doc/current/cookbook/form/dynamic_form_modification.html} + * * @author Bernhard Schussek */ final class FormEvents From a0298331ad7196f2fb2c600ba7b81654f1913fc6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 5 Feb 2015 10:28:56 +0100 Subject: [PATCH 05/21] fixed URL --- src/Symfony/Component/Form/FormEvents.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/FormEvents.php b/src/Symfony/Component/Form/FormEvents.php index 13fc97f494..c48dff3880 100644 --- a/src/Symfony/Component/Form/FormEvents.php +++ b/src/Symfony/Component/Form/FormEvents.php @@ -12,10 +12,10 @@ namespace Symfony\Component\Form; /** * To learn more about how form events work check the documentation - * entry at {@link http://symfony.com/doc/current/components/form/form_events.html} + * entry at {@link http://symfony.com/doc/any/components/form/form_events.html} * * To learn how to dynamically modify forms using events check the cookbook - * entry at {@link http://symfony.com/doc/current/cookbook/form/dynamic_form_modification.html} + * entry at {@link http://symfony.com/doc/any/cookbook/form/dynamic_form_modification.html} * * @author Bernhard Schussek */ From 0b9f310055185b9ffefa97ed366c10d95b9c8fc6 Mon Sep 17 00:00:00 2001 From: Mauro Foti Date: Sat, 29 Nov 2014 11:51:02 +0100 Subject: [PATCH 06/21] [HttpFoundation] [Hackday] #9942 test: Request::getContent() for null value --- src/Symfony/Component/HttpFoundation/Tests/RequestTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index 3952f6712e..a8e59fd6d6 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -921,6 +921,13 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertTrue(feof($retval)); } + public function testEmptyStringContentReturns() + { + $req = Request::create('test'); + + $this->assertEquals('', $req->getContent()); + } + /** * @expectedException \LogicException * @dataProvider getContentCantBeCalledTwiceWithResourcesProvider From b0a4c384652847e7c2da391f0e5d2bea1cb2067a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 5 Feb 2015 10:43:13 +0100 Subject: [PATCH 07/21] fixed assertion --- src/Symfony/Component/HttpFoundation/Tests/RequestTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index a8e59fd6d6..c3829a6dfc 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -925,7 +925,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase { $req = Request::create('test'); - $this->assertEquals('', $req->getContent()); + $this->assertSame('', $req->getContent()); } /** From 6e9768c8b9d0c9aeec018fe2e537caaba7f58c70 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 5 Feb 2015 10:45:38 +0100 Subject: [PATCH 08/21] Revert "fixed assertion" This reverts commit b0a4c384652847e7c2da391f0e5d2bea1cb2067a. --- src/Symfony/Component/HttpFoundation/Tests/RequestTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index c3829a6dfc..a8e59fd6d6 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -925,7 +925,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase { $req = Request::create('test'); - $this->assertSame('', $req->getContent()); + $this->assertEquals('', $req->getContent()); } /** From 58fcb8d51531a4250e981c693e8856e2629edfa6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 5 Feb 2015 10:45:43 +0100 Subject: [PATCH 09/21] Revert "minor #12652 [HttpFoundation] [Hackday] #9942 test: Request::getContent() for null value (skler)" This reverts commit 09225c7466e5da18990b808d82f1a635ed2f2341, reversing changes made to a0298331ad7196f2fb2c600ba7b81654f1913fc6. --- src/Symfony/Component/HttpFoundation/Tests/RequestTest.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index a8e59fd6d6..3952f6712e 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -921,13 +921,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertTrue(feof($retval)); } - public function testEmptyStringContentReturns() - { - $req = Request::create('test'); - - $this->assertEquals('', $req->getContent()); - } - /** * @expectedException \LogicException * @dataProvider getContentCantBeCalledTwiceWithResourcesProvider From 380d8052ac4f4329c60bb82caed5ed8bf3f6cebe Mon Sep 17 00:00:00 2001 From: Dave Marshall Date: Tue, 20 Jan 2015 13:50:10 +0000 Subject: [PATCH 10/21] [Security] Remove ContextListener's onKernelResponse listener as it is used --- .../Http/Firewall/ContextListener.php | 3 ++ .../Http/Firewall/ContextListenerTest.php | 36 +++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php index 3ea6512386..c80fff3317 100644 --- a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php @@ -114,6 +114,9 @@ class ContextListener implements ListenerInterface return; } + $this->dispatcher->removeListener(KernelEvents::RESPONSE, array($this, 'onKernelResponse')); + $this->registered = false; + if (null !== $this->logger) { $this->logger->debug('Write SecurityContext in the session'); } diff --git a/src/Symfony/Component/Security/Tests/Http/Firewall/ContextListenerTest.php b/src/Symfony/Component/Security/Tests/Http/Firewall/ContextListenerTest.php index f44c60aa0f..6b4ef7310f 100644 --- a/src/Symfony/Component/Security/Tests/Http/Firewall/ContextListenerTest.php +++ b/src/Symfony/Component/Security/Tests/Http/Firewall/ContextListenerTest.php @@ -21,6 +21,7 @@ use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Http\Firewall\ContextListener; +use Symfony\Component\EventDispatcher\EventDispatcher; class ContextListenerTest extends \PHPUnit_Framework_TestCase { @@ -111,7 +112,7 @@ class ContextListenerTest extends \PHPUnit_Framework_TestCase new Response() ); - $listener = new ContextListener($this->securityContext, array(), 'session'); + $listener = new ContextListener($this->securityContext, array(), 'session', null, new EventDispatcher()); $listener->onKernelResponse($event); $this->assertTrue($session->isStarted()); @@ -130,7 +131,7 @@ class ContextListenerTest extends \PHPUnit_Framework_TestCase new Response() ); - $listener = new ContextListener($this->securityContext, array(), 'session'); + $listener = new ContextListener($this->securityContext, array(), 'session', null, new EventDispatcher()); $listener->onKernelResponse($event); $this->assertFalse($session->isStarted()); @@ -202,6 +203,35 @@ class ContextListenerTest extends \PHPUnit_Framework_TestCase $listener->handle($event); } + public function testOnKernelResponseListenerRemovesItself() + { + $context = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); + $dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\FilterResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + + $listener = new ContextListener($context, array(), 'key123', null, $dispatcher); + + $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); + $request->expects($this->any()) + ->method('hasSession') + ->will($this->returnValue(true)); + + $event->expects($this->any()) + ->method('getRequestType') + ->will($this->returnValue(HttpKernelInterface::MASTER_REQUEST)); + $event->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + + $dispatcher->expects($this->once()) + ->method('removeListener') + ->with(KernelEvents::RESPONSE, array($listener, 'onKernelResponse')); + + $listener->onKernelResponse($event); + } + public function testHandleRemovesTokenIfNoPreviousSessionWasFound() { $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); @@ -240,7 +270,7 @@ class ContextListenerTest extends \PHPUnit_Framework_TestCase new Response() ); - $listener = new ContextListener($this->securityContext, array(), 'session'); + $listener = new ContextListener($this->securityContext, array(), 'session', null, new EventDispatcher()); $listener->onKernelResponse($event); return $session; From b12843971c8d9cd709c2bd52b66da9b3fb1b7397 Mon Sep 17 00:00:00 2001 From: Vladimir Sadicov Date: Fri, 6 Feb 2015 12:24:56 +0200 Subject: [PATCH 11/21] Fix form icon position in web profiler --- .../DependencyInjection/FrameworkExtension.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index f7886d6ec0..e407bed175 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -278,13 +278,13 @@ class FrameworkExtension extends Extension return; } + $loader->load('profiling.xml'); + $loader->load('collectors.xml'); + if (true === $this->formConfigEnabled) { $loader->load('form_debug.xml'); } - $loader->load('profiling.xml'); - $loader->load('collectors.xml'); - $container->setParameter('profiler_listener.only_exceptions', $config['only_exceptions']); $container->setParameter('profiler_listener.only_master_requests', $config['only_master_requests']); From eabc5d8e9226448c3d37cc0b8e0ea8cf628e7c1a Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Fri, 6 Feb 2015 17:58:23 +0100 Subject: [PATCH 12/21] =?UTF-8?q?=E2=80=9Cconsole=20help=E2=80=9D=20ignore?= =?UTF-8?q?s=20--raw=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Symfony/Component/Console/Command/HelpCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Command/HelpCommand.php b/src/Symfony/Component/Console/Command/HelpCommand.php index d370da2709..4cf9362419 100644 --- a/src/Symfony/Component/Console/Command/HelpCommand.php +++ b/src/Symfony/Component/Console/Command/HelpCommand.php @@ -83,7 +83,7 @@ EOF $helper = new DescriptorHelper(); $helper->describe($output, $this->command, array( 'format' => $input->getOption('format'), - 'raw' => $input->getOption('raw'), + 'raw_text' => $input->getOption('raw'), )); $this->command = null; From 1c62eb77e0eb21372fe6a2111b7270f525e2c81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=BCsges?= Date: Fri, 6 Feb 2015 09:41:05 +0100 Subject: [PATCH 13/21] [Console] Fixed output bug, if escaped string in a formatted string. --- .../Component/Console/Formatter/OutputFormatter.php | 7 ++++--- .../Console/Tests/Formatter/OutputFormatterTest.php | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatter.php b/src/Symfony/Component/Console/Formatter/OutputFormatter.php index 774f65fba4..90b1970f4b 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatter.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatter.php @@ -150,6 +150,10 @@ class OutputFormatter implements OutputFormatterInterface $pos = $match[1]; $text = $match[0]; + if (0 != $pos && '\\' == $message[$pos - 1]) { + continue; + } + // add the text up to the next tag $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset)); $offset = $pos + strlen($text); @@ -164,9 +168,6 @@ class OutputFormatter implements OutputFormatterInterface if (!$open && !$tag) { // $this->styleStack->pop(); - } elseif ($pos && '\\' == $message[$pos - 1]) { - // escaped tag - $output .= $this->applyCurrentStyle($text); } elseif (false === $style = $this->createStyleFromString(strtolower($tag))) { $output .= $this->applyCurrentStyle($text); } elseif ($open) { diff --git a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php index bdaf36caef..d122f71161 100644 --- a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php +++ b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php @@ -101,6 +101,11 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase "(\033[32mz>=2.0,format('('.$formatter->escape('z>=2.0,)') ); + + $this->assertEquals( + "\033[32msome error\033[39m", + $formatter->format(''.$formatter->escape('some error').'') + ); } public function testDeepNestedStyles() From 004e5abbd6e887a4dd004ca74948430ed385e5d4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 8 Feb 2015 08:28:06 +0100 Subject: [PATCH 14/21] fixed a test --- .../Component/Console/Tests/Formatter/OutputFormatterTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php index d122f71161..6f1e16da43 100644 --- a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php +++ b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php @@ -103,7 +103,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase ); $this->assertEquals( - "\033[32msome error\033[39m", + "\033[32msome error\033[0m", $formatter->format(''.$formatter->escape('some error').'') ); } From af593165369aeb17e504900b5185a5c4583a7951 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 8 Feb 2015 08:33:54 +0100 Subject: [PATCH 15/21] removed composer --dev option everywhere --- .travis.yml | 6 +++--- src/Symfony/Bridge/ProxyManager/README.md | 2 +- src/Symfony/Component/Debug/README.md | 2 +- src/Symfony/Component/Intl/CONTRIBUTING.md | 2 +- src/Symfony/Component/Intl/README.md | 2 +- src/Symfony/Component/Intl/Resources/bin/update-data.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3c3ba5b4ce..eba78dcddf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,10 +36,10 @@ before_install: - if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi; install: - - if [ "$components" = "no" ]; then composer --prefer-source --dev install; fi; + - if [ "$components" = "no" ]; then composer --prefer-source install; fi; script: - if [ "$components" = "no" ]; then ls -d src/Symfony/*/* | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; - if [ "$components" = "no" ]; then echo -e "\\nRunning tests requiring tty"; phpunit --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi; - - if [ "$components" = "high" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --dev update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; - - if [ "$components" = "low" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --dev --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; + - if [ "$components" = "high" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; + - if [ "$components" = "low" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; diff --git a/src/Symfony/Bridge/ProxyManager/README.md b/src/Symfony/Bridge/ProxyManager/README.md index f2ce134241..dc68f5b4d1 100644 --- a/src/Symfony/Bridge/ProxyManager/README.md +++ b/src/Symfony/Bridge/ProxyManager/README.md @@ -9,7 +9,7 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Bridge/ProxyManager/ - $ composer.phar install --dev + $ composer.phar install $ phpunit [1]: https://github.com/Ocramius/ProxyManager diff --git a/src/Symfony/Component/Debug/README.md b/src/Symfony/Component/Debug/README.md index cad3893855..7d9edc3103 100644 --- a/src/Symfony/Component/Debug/README.md +++ b/src/Symfony/Component/Debug/README.md @@ -40,5 +40,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Debug/ - $ composer.phar install --dev + $ composer.phar install $ phpunit diff --git a/src/Symfony/Component/Intl/CONTRIBUTING.md b/src/Symfony/Component/Intl/CONTRIBUTING.md index 0657e12019..c4e2bace90 100644 --- a/src/Symfony/Component/Intl/CONTRIBUTING.md +++ b/src/Symfony/Component/Intl/CONTRIBUTING.md @@ -10,7 +10,7 @@ Preparation To prepare, you need to install the development dependencies of the component. $ cd /path/to/Symfony/Component/Intl - $ composer.phar install --dev + $ composer.phar install Determining your ICU version --------------------------- diff --git a/src/Symfony/Component/Intl/README.md b/src/Symfony/Component/Intl/README.md index d7f218f423..b601c78ebb 100644 --- a/src/Symfony/Component/Intl/README.md +++ b/src/Symfony/Component/Intl/README.md @@ -18,7 +18,7 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Intl/ - $ composer.phar install --dev + $ composer.phar install $ phpunit [0]: http://www.php.net/manual/en/intl.setup.php diff --git a/src/Symfony/Component/Intl/Resources/bin/update-data.php b/src/Symfony/Component/Intl/Resources/bin/update-data.php index 1d92bd851e..bfe99ecb3e 100644 --- a/src/Symfony/Component/Intl/Resources/bin/update-data.php +++ b/src/Symfony/Component/Intl/Resources/bin/update-data.php @@ -50,7 +50,7 @@ the subdirectories bin/ and lib/. For running this script, the intl extension must be loaded and all vendors must have been installed through composer: -composer install --dev +composer install MESSAGE ); From bfa181bd65210ec0d4e3a42e502f107d0322bee6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 8 Feb 2015 08:36:25 +0100 Subject: [PATCH 16/21] [FrameworkBundle] bumped min version of Routing to 2.3 --- src/Symfony/Bundle/FrameworkBundle/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 51d3d343e7..9bd4e7f6f9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -23,7 +23,7 @@ "symfony/http-foundation": "~2.3,>=2.3.19", "symfony/http-kernel": "~2.3,>=2.3.22", "symfony/filesystem": "~2.3", - "symfony/routing": "~2.2", + "symfony/routing": "~2.3", "symfony/stopwatch": "~2.3", "symfony/templating": "~2.1", "symfony/translation": "~2.3,>=2.3.19", From 0fe49130797a3adeca461eac5260c4ec5331b6b5 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 8 Feb 2015 08:41:14 +0100 Subject: [PATCH 17/21] renamed composer.phar to composer to be consistent with the Symfony docs --- src/Symfony/Bridge/Doctrine/README.md | 2 +- src/Symfony/Bridge/Monolog/README.md | 2 +- src/Symfony/Bridge/Propel1/README.md | 2 +- src/Symfony/Bridge/ProxyManager/README.md | 2 +- src/Symfony/Bridge/Twig/README.md | 2 +- src/Symfony/Component/BrowserKit/README.md | 2 +- src/Symfony/Component/ClassLoader/README.md | 2 +- src/Symfony/Component/Config/README.md | 2 +- src/Symfony/Component/Console/README.md | 2 +- src/Symfony/Component/CssSelector/README.md | 2 +- src/Symfony/Component/Debug/README.md | 2 +- src/Symfony/Component/DependencyInjection/README.md | 2 +- src/Symfony/Component/DomCrawler/README.md | 2 +- src/Symfony/Component/EventDispatcher/README.md | 2 +- src/Symfony/Component/Filesystem/README.md | 2 +- src/Symfony/Component/Finder/README.md | 2 +- src/Symfony/Component/Form/README.md | 2 +- src/Symfony/Component/HttpFoundation/README.md | 2 +- src/Symfony/Component/HttpKernel/README.md | 2 +- src/Symfony/Component/Intl/CONTRIBUTING.md | 2 +- src/Symfony/Component/Intl/README.md | 2 +- src/Symfony/Component/OptionsResolver/README.md | 2 +- src/Symfony/Component/Process/README.md | 2 +- src/Symfony/Component/PropertyAccess/README.md | 2 +- src/Symfony/Component/Routing/README.md | 2 +- src/Symfony/Component/Security/README.md | 2 +- src/Symfony/Component/Serializer/README.md | 2 +- src/Symfony/Component/Stopwatch/README.md | 2 +- src/Symfony/Component/Templating/README.md | 2 +- src/Symfony/Component/Translation/README.md | 2 +- src/Symfony/Component/Validator/README.md | 2 +- src/Symfony/Component/Yaml/README.md | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/README.md b/src/Symfony/Bridge/Doctrine/README.md index 972ccbfc96..3dabc3cd6d 100644 --- a/src/Symfony/Bridge/Doctrine/README.md +++ b/src/Symfony/Bridge/Doctrine/README.md @@ -10,5 +10,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Bridge/Doctrine/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Bridge/Monolog/README.md b/src/Symfony/Bridge/Monolog/README.md index c666f1d150..b0d91ca4f4 100644 --- a/src/Symfony/Bridge/Monolog/README.md +++ b/src/Symfony/Bridge/Monolog/README.md @@ -9,5 +9,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Bridge/Monolog/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Bridge/Propel1/README.md b/src/Symfony/Bridge/Propel1/README.md index 22d0aa2a7a..22590ca583 100644 --- a/src/Symfony/Bridge/Propel1/README.md +++ b/src/Symfony/Bridge/Propel1/README.md @@ -9,5 +9,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Bridge/Propel1/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Bridge/ProxyManager/README.md b/src/Symfony/Bridge/ProxyManager/README.md index dc68f5b4d1..35d41998b8 100644 --- a/src/Symfony/Bridge/ProxyManager/README.md +++ b/src/Symfony/Bridge/ProxyManager/README.md @@ -9,7 +9,7 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Bridge/ProxyManager/ - $ composer.phar install + $ composer install $ phpunit [1]: https://github.com/Ocramius/ProxyManager diff --git a/src/Symfony/Bridge/Twig/README.md b/src/Symfony/Bridge/Twig/README.md index c5053c860b..1f92af944f 100644 --- a/src/Symfony/Bridge/Twig/README.md +++ b/src/Symfony/Bridge/Twig/README.md @@ -11,5 +11,5 @@ If you want to run the unit tests, install dev dependencies before running PHPUnit: $ cd path/to/Symfony/Bridge/Twig/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/BrowserKit/README.md b/src/Symfony/Component/BrowserKit/README.md index 1b40c9fe2d..3c0ee3a040 100644 --- a/src/Symfony/Component/BrowserKit/README.md +++ b/src/Symfony/Component/BrowserKit/README.md @@ -19,5 +19,5 @@ provided by the HttpKernel component. You can run the unit tests with the following command: $ cd path/to/Symfony/Component/BrowserKit/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/ClassLoader/README.md b/src/Symfony/Component/ClassLoader/README.md index 37df048699..0d2955dc97 100644 --- a/src/Symfony/Component/ClassLoader/README.md +++ b/src/Symfony/Component/ClassLoader/README.md @@ -81,5 +81,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/ClassLoader/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Config/README.md b/src/Symfony/Component/Config/README.md index 1b12e89a8b..690d7d74f9 100644 --- a/src/Symfony/Component/Config/README.md +++ b/src/Symfony/Component/Config/README.md @@ -12,6 +12,6 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Config/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Console/README.md b/src/Symfony/Component/Console/README.md index 00722e6fb7..98041446e8 100644 --- a/src/Symfony/Component/Console/README.md +++ b/src/Symfony/Component/Console/README.md @@ -50,7 +50,7 @@ Tests You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Console/ - $ composer.phar install + $ composer install $ phpunit Third Party diff --git a/src/Symfony/Component/CssSelector/README.md b/src/Symfony/Component/CssSelector/README.md index ef28bc9d17..ffe6c890f6 100644 --- a/src/Symfony/Component/CssSelector/README.md +++ b/src/Symfony/Component/CssSelector/README.md @@ -43,5 +43,5 @@ which is distributed under the BSD license. You can run the unit tests with the following command: $ cd path/to/Symfony/Component/CssSelector/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Debug/README.md b/src/Symfony/Component/Debug/README.md index 7d9edc3103..ad10a41889 100644 --- a/src/Symfony/Component/Debug/README.md +++ b/src/Symfony/Component/Debug/README.md @@ -40,5 +40,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Debug/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/DependencyInjection/README.md b/src/Symfony/Component/DependencyInjection/README.md index cd170ab09a..66f62be5de 100644 --- a/src/Symfony/Component/DependencyInjection/README.md +++ b/src/Symfony/Component/DependencyInjection/README.md @@ -77,5 +77,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/DependencyInjection/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/DomCrawler/README.md b/src/Symfony/Component/DomCrawler/README.md index 646573f4e0..d2c8de5da4 100644 --- a/src/Symfony/Component/DomCrawler/README.md +++ b/src/Symfony/Component/DomCrawler/README.md @@ -32,5 +32,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/DomCrawler/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/EventDispatcher/README.md b/src/Symfony/Component/EventDispatcher/README.md index 0fbc35e2a4..8031f4dd3f 100644 --- a/src/Symfony/Component/EventDispatcher/README.md +++ b/src/Symfony/Component/EventDispatcher/README.md @@ -23,5 +23,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/EventDispatcher/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Filesystem/README.md b/src/Symfony/Component/Filesystem/README.md index 85b0f1c522..df09f93dce 100644 --- a/src/Symfony/Component/Filesystem/README.md +++ b/src/Symfony/Component/Filesystem/README.md @@ -43,5 +43,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Filesystem/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Finder/README.md b/src/Symfony/Component/Finder/README.md index 7a96219cce..413cdf57e7 100644 --- a/src/Symfony/Component/Finder/README.md +++ b/src/Symfony/Component/Finder/README.md @@ -45,7 +45,7 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Finder/ - $ composer.phar install + $ composer install $ phpunit [1]: http://api.symfony.com/2.5/Symfony/Component/Finder/SplFileInfo.html diff --git a/src/Symfony/Component/Form/README.md b/src/Symfony/Component/Form/README.md index 4396ec0155..bde6b78be6 100644 --- a/src/Symfony/Component/Form/README.md +++ b/src/Symfony/Component/Form/README.md @@ -22,5 +22,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Form/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/HttpFoundation/README.md b/src/Symfony/Component/HttpFoundation/README.md index 008c1587f6..11ad6eef54 100644 --- a/src/Symfony/Component/HttpFoundation/README.md +++ b/src/Symfony/Component/HttpFoundation/README.md @@ -52,5 +52,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/HttpFoundation/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/HttpKernel/README.md b/src/Symfony/Component/HttpKernel/README.md index d9ad1cbc3f..9ec8c0427b 100644 --- a/src/Symfony/Component/HttpKernel/README.md +++ b/src/Symfony/Component/HttpKernel/README.md @@ -95,5 +95,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/HttpKernel/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Intl/CONTRIBUTING.md b/src/Symfony/Component/Intl/CONTRIBUTING.md index c4e2bace90..971e0af7f5 100644 --- a/src/Symfony/Component/Intl/CONTRIBUTING.md +++ b/src/Symfony/Component/Intl/CONTRIBUTING.md @@ -10,7 +10,7 @@ Preparation To prepare, you need to install the development dependencies of the component. $ cd /path/to/Symfony/Component/Intl - $ composer.phar install + $ composer install Determining your ICU version --------------------------- diff --git a/src/Symfony/Component/Intl/README.md b/src/Symfony/Component/Intl/README.md index b601c78ebb..3c8164c375 100644 --- a/src/Symfony/Component/Intl/README.md +++ b/src/Symfony/Component/Intl/README.md @@ -18,7 +18,7 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Intl/ - $ composer.phar install + $ composer install $ phpunit [0]: http://www.php.net/manual/en/intl.setup.php diff --git a/src/Symfony/Component/OptionsResolver/README.md b/src/Symfony/Component/OptionsResolver/README.md index 412222e857..bb54c287c1 100644 --- a/src/Symfony/Component/OptionsResolver/README.md +++ b/src/Symfony/Component/OptionsResolver/README.md @@ -111,5 +111,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/OptionsResolver/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Process/README.md b/src/Symfony/Component/Process/README.md index 29d1cf9330..7c83ed413e 100644 --- a/src/Symfony/Component/Process/README.md +++ b/src/Symfony/Component/Process/README.md @@ -47,5 +47,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Process/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/PropertyAccess/README.md b/src/Symfony/Component/PropertyAccess/README.md index 79b6ebca5a..9fb92f058d 100644 --- a/src/Symfony/Component/PropertyAccess/README.md +++ b/src/Symfony/Component/PropertyAccess/README.md @@ -10,5 +10,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/PropertyAccess/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Routing/README.md b/src/Symfony/Component/Routing/README.md index cd566a59c1..1a94583a87 100644 --- a/src/Symfony/Component/Routing/README.md +++ b/src/Symfony/Component/Routing/README.md @@ -32,5 +32,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Routing/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Security/README.md b/src/Symfony/Component/Security/README.md index 53efa5eece..21f8a24d3c 100644 --- a/src/Symfony/Component/Security/README.md +++ b/src/Symfony/Component/Security/README.md @@ -19,5 +19,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Security/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Serializer/README.md b/src/Symfony/Component/Serializer/README.md index 5a1606ca09..4d8ab012e9 100644 --- a/src/Symfony/Component/Serializer/README.md +++ b/src/Symfony/Component/Serializer/README.md @@ -11,5 +11,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Serializer/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Stopwatch/README.md b/src/Symfony/Component/Stopwatch/README.md index 428bba6b63..611df90ca5 100644 --- a/src/Symfony/Component/Stopwatch/README.md +++ b/src/Symfony/Component/Stopwatch/README.md @@ -9,5 +9,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Stopwatch/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Templating/README.md b/src/Symfony/Component/Templating/README.md index bde622fef4..253eb4f507 100644 --- a/src/Symfony/Component/Templating/README.md +++ b/src/Symfony/Component/Templating/README.md @@ -14,5 +14,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Templating/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Translation/README.md b/src/Symfony/Component/Translation/README.md index 0eba8455ae..ce965e5a78 100644 --- a/src/Symfony/Component/Translation/README.md +++ b/src/Symfony/Component/Translation/README.md @@ -33,5 +33,5 @@ http://symfony.com/doc/2.3/book/translation.html You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Translation/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md index 2e2586938b..271b306d80 100644 --- a/src/Symfony/Component/Validator/README.md +++ b/src/Symfony/Component/Validator/README.md @@ -122,5 +122,5 @@ http://jcp.org/en/jsr/detail?id=303 You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Validator/ - $ composer.phar install + $ composer install $ phpunit diff --git a/src/Symfony/Component/Yaml/README.md b/src/Symfony/Component/Yaml/README.md index 96abbbfd16..85a9786735 100644 --- a/src/Symfony/Component/Yaml/README.md +++ b/src/Symfony/Component/Yaml/README.md @@ -17,5 +17,5 @@ Resources You can run the unit tests with the following command: $ cd path/to/Symfony/Component/Yaml/ - $ composer.phar install + $ composer install $ phpunit From 7ed48db94c6ed0b0e8e123a3254e0f440dffd588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=9F=D0=B0?= =?UTF-8?q?=D1=86=D1=83=D1=80=D0=B0?= Date: Mon, 9 Feb 2015 11:38:13 +0800 Subject: [PATCH 18/21] RequestDataCollector - small fix --- .../Component/HttpKernel/DataCollector/RequestDataCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php index f92f3e68c5..84d4347fbd 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -88,7 +88,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $this->data = array( 'format' => $request->getRequestFormat(), 'content' => $content, - 'content_type' => $response->headers->get('Content-Type') ? $response->headers->get('Content-Type') : 'text/html', + 'content_type' => $response->headers->get('Content-Type', 'text/html'), 'status_text' => isset(Response::$statusTexts[$statusCode]) ? Response::$statusTexts[$statusCode] : '', 'status_code' => $statusCode, 'request_query' => $request->query->all(), From dcb2306d03560c259fd0cd4a532b53fdb62c6414 Mon Sep 17 00:00:00 2001 From: Abdellatif Ait boudad Date: Tue, 10 Feb 2015 13:48:21 +0000 Subject: [PATCH 19/21] [Translator][Logging] implement TranslatorBagInterface. --- .../Component/Translation/LoggingTranslator.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Translation/LoggingTranslator.php b/src/Symfony/Component/Translation/LoggingTranslator.php index a5d244a1e2..851188230b 100644 --- a/src/Symfony/Component/Translation/LoggingTranslator.php +++ b/src/Symfony/Component/Translation/LoggingTranslator.php @@ -16,7 +16,7 @@ use Psr\Log\LoggerInterface; /** * @author Abdellatif Ait boudad */ -class LoggingTranslator implements TranslatorInterface +class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface { /** * @var TranslatorInterface @@ -84,6 +84,14 @@ class LoggingTranslator implements TranslatorInterface return $this->translator->getLocale(); } + /** + * {@inheritdoc} + */ + public function getCatalogue($locale = null) + { + return $this->translator->getCatalogue($locale); + } + /** * Passes through all unknown calls onto the translator object. */ From 1a9aca7152979b71c1e41d905979bbca43d7a065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Haso=C5=88?= Date: Tue, 10 Feb 2015 11:34:15 +0100 Subject: [PATCH 20/21] [TwigBridge] Removed duplicated code from TwigRenderer --- src/Symfony/Bridge/Twig/Form/TwigRenderer.php | 10 ---------- src/Symfony/Bridge/Twig/composer.json | 1 - 2 files changed, 11 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Form/TwigRenderer.php b/src/Symfony/Bridge/Twig/Form/TwigRenderer.php index 3b47c26ea6..ac139e44a1 100644 --- a/src/Symfony/Bridge/Twig/Form/TwigRenderer.php +++ b/src/Symfony/Bridge/Twig/Form/TwigRenderer.php @@ -11,11 +11,7 @@ namespace Symfony\Bridge\Twig\Form; -use Symfony\Component\Form\Exception\UnexpectedTypeException; -use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter; -use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface; use Symfony\Component\Form\FormRenderer; -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; /** * @author Bernhard Schussek @@ -29,12 +25,6 @@ class TwigRenderer extends FormRenderer implements TwigRendererInterface public function __construct(TwigRendererEngineInterface $engine, $csrfTokenManager = null) { - if ($csrfTokenManager instanceof CsrfProviderInterface) { - $csrfTokenManager = new CsrfProviderAdapter($csrfTokenManager); - } elseif (null !== $csrfTokenManager && !$csrfTokenManager instanceof CsrfTokenManagerInterface) { - throw new UnexpectedTypeException($csrfTokenManager, 'CsrfProviderInterface or CsrfTokenManagerInterface'); - } - parent::__construct($engine, $csrfTokenManager); $this->engine = $engine; diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index 33882d739d..7acca3398e 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -17,7 +17,6 @@ ], "require": { "php": ">=5.3.3", - "symfony/security-csrf": "~2.4", "twig/twig": "~1.13,>=1.13.1" }, "require-dev": { From f82193db99246c901b25c8c602b8dbfd888e5b58 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 10 Feb 2015 17:14:04 +0000 Subject: [PATCH 21/21] [FrameworkBundle] Fix title and placeholder rendering in php form templates. --- .../views/Form/widget_attributes.html.php | 2 +- .../Component/Form/Tests/AbstractLayoutTest.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php b/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php index 210b84cad5..9c47c58a4b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php @@ -6,5 +6,5 @@ name="escape($full_name) ?>" maxlength="escape($max_length) ?>" pattern="escape($pattern) ?>" $v): ?> - escape($k), $view->escape(in_array($v, array('placeholder', 'title')) ? $view['translator']->trans($v, array(), $translation_domain) : $v)) ?> + escape($k), $view->escape(in_array($k, array('placeholder', 'title')) ? $view['translator']->trans($v, array(), $translation_domain) : $v)) ?> diff --git a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php index e05176cf43..cfc41cdf48 100644 --- a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php @@ -1898,4 +1898,18 @@ abstract class AbstractLayoutTest extends \Symfony\Component\Form\Test\FormInteg $this->assertSame('
', $html); } + + public function testTranslatedAttributes() + { + $view = $this->factory->createNamedBuilder('name', 'form') + ->add('firstName', 'text', array('attr' => array('title' => 'Foo'))) + ->add('lastName', 'text', array('attr' => array('placeholder' => 'Bar'))) + ->getForm() + ->createView(); + + $html = $this->renderForm($view); + + $this->assertMatchesXpath($html, '/form//input[@title="[trans]Foo[/trans]"]'); + $this->assertMatchesXpath($html, '/form//input[@placeholder="[trans]Bar[/trans]"]'); + } }