8000 [FrameworkBundle] integrate the Cache component by nicolas-grekas · Pull Request #18371 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] integrate the Cache component #18371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 7, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Cache] Normalize constructor arguments order
  • Loading branch information
nicolas-grekas committed Apr 4, 2016
commit bc51fdeec365fecf24b50c41598e64199de0d5df
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DoctrineAdapter extends AbstractAdapter
{
private $provider;

public function __construct(CacheProvider $provider, $defaultLifetime = 0, $namespace = '')
public function __construct(CacheProvider $provider, $namespace = '', $defaultLifetime = 0)
{
parent::__construct('', $defaultLifetime);
$this->provider = $provider;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class FilesystemAdapter extends AbstractAdapter
{
private $directory;

public function __construct($directory, $defaultLifetime = 0, $namespace = '')
public function __construct($namespace = '', $defaultLifetime = 0, $directory = null)
{
parent::__construct('', $defaultLifetime);

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/Adapter/ProxyAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ProxyAdapter implements AdapterInterface
private $hits = 0;
private $misses = 0;

public function __construct(CacheItemPoolInterface $pool, $defaultLifetime = 0, $namespace = '')
public function __construct(CacheItemPoolInterface $pool, $namespace = '', $defaultLifetime = 0)
{
$this->pool = $pool;
$this->namespace = $this->getId($namespace, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function createCachePool()
$this->skippedTests['testDeferredSaveWithoutCommit'] = 'Fails on HHVM';
}

return new ChainAdapter(array(new ArrayAdapter(), new ExternalAdapter(), new FilesystemAdapter(null)));
return new ChainAdapter(array(new ArrayAdapter(), new ExternalAdapter(), new FilesystemAdapter()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class NamespacedProxyAdapterTest extends ProxyAdapterTest
{
public function createCachePool()
{
return new ProxyAdapter(new ArrayAdapter(), 0, 'foo');
return new ProxyAdapter(new ArrayAdapter(), 'foo');
}
}
0