diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index 2daf5e5f99..aca9624db5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -84,16 +84,9 @@ EOF ->locateResource('@FrameworkBundle/Resources/config/router.php') ; - $builder = new ProcessBuilder(array( - PHP_BINARY, - '-S', - $input->getArgument('address'), - $router - )); - + $builder = new ProcessBuilder(array(PHP_BINARY, '-S', $input->getArgument('address'), $router)); $builder->setWorkingDirectory($input->getOption('docroot')); $builder->setTimeout(null); - $builder->getProcess()->run(function ($type, $buffer) use ($output) { $output->write($buffer); }); diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/router.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/router.php index e7174612f3..69dd9b0699 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/router.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/router.php @@ -22,11 +22,8 @@ if (isset($_SERVER['SCRIPT_FILENAME'])) { return false; -} else { - $_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] - . DIRECTORY_SEPARATOR - . 'app.php' - ; - - require 'app.php'; } + +$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app.php'; + +require 'app.php'; diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index 3214f28d08..d30899fa89 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -94,7 +94,7 @@ class JsonResponse extends Response if ($this->callback) { // Not using application/javascript for compatibility reasons with older browsers. $this->headers->set('Content-Type', 'text/javascript', true); - + return $this->setContent(sprintf('%s(%s);', $this->callback, $this->data)); } diff --git a/tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Handler/NativeRedisSessionHandlerTest.php b/tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Handler/NativeRedisSessionHandlerTest.php index 77ac423c51..0cf512a2a0 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Handler/NativeRedisSessionHandlerTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Handler/NativeRedisSessionHandlerTest.php @@ -31,4 +31,4 @@ class NativeRedisSessionHandlerTest extends \PHPUnit_Framework_TestCase $this->assertEquals('tcp://127.0.0.1:6379?persistent=0', ini_get('session.save_path')); $this->assertEquals('TESTING', ini_get('session.name')); } -} \ No newline at end of file +}