8000 Merge branch '2.3' into 2.4 · matthieuauger/symfony@29edeea · GitHub
[go: up one dir, main page]

Skip to content

Commit 29edeea

Browse files
committed
Merge branch '2.3' into 2.4
* 2.3: [HttpFoundation] removed test file not related to 2.3 [HttpKernel] fixed CS Add tests for RequestStack class
2 parents 1c02456 + b3cf27a commit 29edeea

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

src/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace Symfony\Component\HttpKernel\Profiler;
1313

14-
use Memcache;
15-
1614
/**
1715
* Memcache Profiler Storage
1816
*
@@ -21,14 +19,14 @@
2119
class MemcacheProfilerStorage extends BaseMemcacheProfilerStorage
2220
{
2321
/**
24-
* @var Memcache
22+
* @var \Memcache
2523
*/
2624
private $memcache;
2725

2826
/**
2927
* Internal convenience method that returns the instance of the Memcache
3028
*
31-
* @return Memcache
29+
* @return \Memcache
3230
*
3331
* @throws \RuntimeException
3432
*/
@@ -42,7 +40,7 @@ protected function getMemcache()
4240
$host = $matches[1] ?: $matches[2];
4341
$port = $matches[3];
4442

45-
$memcache = new Memcache();
43+
$memcache = new \Memcache();
4644
$memcache->addServer($host, $port);
4745

4846
$this->memcache = $memcache;
@@ -54,7 +52,7 @@ protected function getMemcache()
5452
/**
5553
* Set instance of the Memcache
5654
*
57-
* @param Memcache $memcache
55+
* @param \Memcache $memcache
5856
*/
5957
public function setMemcache($memcache)
6058
{
@@ -94,15 +92,15 @@ protected function appendValue($key, $value, $expiration = 0)
9492

9593
if (method_exists($memcache, 'append')) {
9694

97-
//Memcache v3.0
95+
// Memcache v3.0
9896
if (!$result = $memcache->append($key, $value, false, $expiration)) {
9997
return $memcache->set($key, $value, false, $expiration);
10098
}
10199

102100
return $result;
103101
}
104102

105-
//simulate append in Memcache <3.0
103+
// simulate append in Memcache <3.0
106104
$content = $memcache->get($key);
107105

108106
return $memcache->set($key, $content.$value, false, $expiration);

src/Symfony/Component/HttpKernel/Profiler/MemcachedProfilerStorage.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace Symfony\Component\HttpKernel\Profiler;
1313

14-
use Memcached;
15-
1614
/**
1715
* Memcached Profiler Storage
1816
*
@@ -21,14 +19,14 @@
2119
class MemcachedProfilerStorage extends BaseMemcacheProfilerStorage
2220
{
2321
/**
24-
* @var Memcached
22+
* @var \Memcached
2523
*/
2624
private $memcached;
2725

2826
/**
2927
* Internal convenience method that returns the instance of the Memcached
3028
*
31-
* @return Memcached
29+
* @return \Memcached
3230
*
3331
* @throws \RuntimeException
3432
*/
@@ -42,10 +40,10 @@ protected function getMemcached()
4240
$host = $matches[1] ?: $matches[2];
4341
$port = $matches[3];
4442

45-
$memcached = new Memcached();
43+
$memcached = new \Memcached();
4644

47-
//disable compression to allow appending
48-
$memcached->setOption(Memcached::OPT_COMPRESSION, false);
45+
// disable compression to allow appending
46+
$memcached->setOption(\Memcached::OPT_COMPRESSION, false);
4947

5048
$memcached->addServer($host, $port);
5149

@@ -58,7 +56,7 @@ protected function getMemcached()
5856
/**
5957
* Set instance of the Memcached
6058
*
61-
* @param Memcached $memcached
59+
* @param \Memcached $memcached
6260
*/
6361
public function setMemcached($memcached)
6462
{

0 commit comments

Comments
 (0)
0