Skip to content

Commit c4922fb

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: Fix param annotation in HttpKernelBrowser [Cache] fix compat with apcu < 5.1.10 Run `open_basedir` tests in separate processes
2 parents 8c6ad6a + 7baf01f commit c4922fb

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

src/Symfony/Component/Cache/Adapter/ApcuAdapter.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ protected function doFetch(array $ids)
6060
$unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback');
6161
try {
6262
$values = [];
63-
foreach (apcu_fetch($ids, $ok) ?: [] as $k => $v) {
63+
$ids = array_flip($ids);
64+
foreach (apcu_fetch(array_keys($ids), $ok) ?: [] as $k => $v) {
65+
if (!isset($ids[$k])) {
66+
// work around https://github.com/krakjoe/apcu/issues/247
67+
$k = key($ids);
68+
}
69+
unset($ids[$k]);
70+
6471
if (null !== $v || $ok) {
6572
$values[$k] = null !== $this->marshaller ? $this->marshaller->unmarshall($v) : $v;
6673
}

src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,15 @@ public function testWeirdDataMatchingMetadataWrappedValues()
306306

307307
$this->assertTrue($cache->hasItem('foobar'));
308308
}
309+
310+
public function testNullByteInKey()
311+
{
312+
$cache = $this->createCachePool(0, __FUNCTION__);
313+
314+
$cache->save($cache->getItem("a\0b")->set(123));
315+
316+
$this->assertSame(123, $cache->getItem("a\0b")->get());
317+
}
309318
}
310319

311320
class NotUnserializable

src/Symfony/Component/HttpKernel/HttpKernelBrowser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ protected function filterFiles(array $files)
192192
/**
193193
* {@inheritdoc}
194194
*
195-
* @param Request $request
195+
* @param Response $response
196196
*
197197
* @return DomResponse
198198
*/

src/Symfony/Component/Process/Tests/ExecutableFinderTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ public function testFindWithExtraDirs()
9696
$this->assertSamePath(\PHP_BINARY, $result);
9797
}
9898

99+
/**
100+
* @runInSeparateProcess
101+
*/
99102
public function testFindWithOpenBaseDir()
100103
{
101104
if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -114,6 +117,9 @@ public function testFindWithOpenBaseDir()
114117
$this->assertSamePath(\PHP_BINARY, $result);
115118
}
116119

120+
/**
121+
* @runInSeparateProcess
122+
*/
117123
public function testFindProcessInOpenBasedir()
118124
{
119125
if (ini_get('open_basedir')) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy