Skip to content

Commit 5848bcc

Browse files
committed
Merge branch '2.6' into 2.7
* 2.6: Fix small coding style [2.3] Static Code Analysis for Components [Form] fixed phpdoc CS: Convert double quotes to single quotes Fixed MongoODM entity loader. Improved loading behavior of entities and documents by reusing entity loader. [Validator] added Japanese translation for unmatched charset (id: 80) [WebProfilerBundle] fixed undefined buttons. [WebProfilerBundle] Fix javascript toolbar on IE8 [DependencyInjection] Highest precedence for user parameters bumped Symfony version to 2.6.6 [Translation][MoFileLoader] fixed load empty translation. updated VERSION for 2.6.5 updated CHANGELOG for 2.6.5 bumped Symfony version to 2.3.27 updated VERSION for 2.3.26 update CONTRIBUTORS for 2.3.26 updated CHANGELOG for 2.3.26 [HttpKernel] UriSigner::buildUrl - default params for http_build_query Conflicts: src/Symfony/Bridge/Propel1/Tests/DataCollector/PropelDataCollectorTest.php src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf
2 parents 78b9ad7 + c0e70bc commit 5848bcc

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

Event/FilterControllerEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private function varToString($var)
8686
$a[] = sprintf('%s => %s', $k, $this->varToString($v));
8787
}
8888

89-
return sprintf("Array(%s)", implode(', ', $a));
89+
return sprintf('Array(%s)', implode(', ', $a));
9090
}
9191

9292
if (is_resource($var)) {

HttpKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ private function varToString($var)
269269
$a[] = sprintf('%s => %s', $k, $this->varToString($v));
270270
}
271271

272-
return sprintf("Array(%s)", implode(', ', $a));
272+
return sprintf('Array(%s)', implode(', ', $a));
273273
}
274274

275275
if (is_resource($var)) {

Tests/HttpCache/HttpCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ public function testEsiCacheSendsTheLowestTtl()
10671067
$this->setNextResponses($responses);
10681068

10691069
$this->request('GET', '/', array(), array(), true);
1070-
$this->assertEquals("Hello World! My name is Bobby.", $this->response->getContent());
1070+
$this->assertEquals('Hello World! My name is Bobby.', $this->response->getContent());
10711071

10721072
// check for 100 or 99 as the test can be executed after a second change
10731073
$this->assertTrue(in_array($this->response->getTtl(), array(99, 100)));

Tests/Profiler/FileProfilerStorageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function testReadLineFromFile()
9494
fwrite($h, "line1\n\n\nline2\n");
9595
fseek($h, 0, SEEK_END);
9696

97-
$this->assertEquals("line2", $r->invoke(self::$storage, $h));
98-
$this->assertEquals("line1", $r->invoke(self::$storage, $h));
97+
$this->assertEquals('line2', $r->invoke(self::$storage, $h));
98+
$this->assertEquals('line1', $r->invoke(self::$storage, $h));
9999
}
100100
}

Tests/UriSignerTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,16 @@ public function testCheck()
3636

3737
$this->assertTrue($signer->sign('http://example.com/foo?foo=bar&bar=foo') === $signer->sign('http://example.com/foo?bar=foo&foo=bar'));
3838
}
39+
40+
public function testCheckWithDifferentArgSeparator()
41+
{
42+
$this->iniSet('arg_separator.output', '&');
43+
$signer = new UriSigner('foobar');
44+
45+
$this->assertSame(
46+
"http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D",
47+
$signer->sign('http://example.com/foo?foo=bar&baz=bay')
48+
);
49+
$this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay')));
50+
}
3951
}

UriSigner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function computeHash($uri)
9292
private function buildUrl(array $url, array $params = array())
9393
{
9494
ksort($params);
95-
$url['query'] = http_build_query($params);
95+
$url['query'] = http_build_query($params, '', '&');
9696

9797
$scheme = isset($url['scheme']) ? $url['scheme'].'://' : '';
9898
$host = isset($url['host']) ? $url['host'] : '';

0 commit comments

Comments
 (0)