Skip to content

Commit

Permalink
fixing Commands, update composer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Cassani committed Jul 13, 2017
1 parent 8c26199 commit dc7f6ee
Show file tree
Hide file tree
Showing 6 changed files with 967 additions and 334 deletions.
2 changes: 1 addition & 1 deletion Command/FlushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

try {
$cache = $this->getContainer()->get('in_memory_list');
$cache->getClient()->flush();
$cache->getClient()->getRepository()->flush();

$symfonyOutput->success('[IML] Cache was successful flushed.');
} catch (\Exception $e) {
Expand Down
8 changes: 4 additions & 4 deletions Command/IndexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

try {
$cache = $this->getContainer()->get('in_memory_list');
$index = $cache->getClient()->getIndex(null, true);
$index = $cache->getClient()->getRepository()->getIndex(null, true);

if ($index && count($index)) {
ksort($index);
Expand All @@ -53,9 +53,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$counter+1,
'<fg=yellow>'.$listUuid.'</>',
$created_on->format('Y-m-d H:i:s'),
$cache->getClient()->getNumberOfChunks($listUuid),
$cache->getClient()->getChunkSize($listUuid),
$cache->getClient()->getTtl($listUuid),
$cache->getClient()->getRepository()->getNumberOfChunks($listUuid),
$cache->getClient()->getRepository()->getChunkSize($listUuid),
$cache->getClient()->getRepository()->getTtl($listUuid),
$item['size'],
]
);
Expand Down
2 changes: 1 addition & 1 deletion Command/StatisticsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

try {
$cache = $this->getContainer()->get('in_memory_list');
$statistics = $cache->getClient()->getStatistics();
$statistics = $cache->getClient()->getRepository()->getStatistics();

$table = new Table($output);
$table->setHeaders(['Key', 'Value']);
Expand Down
2 changes: 1 addition & 1 deletion DataCollector/CacheCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function collect(Request $request, Response $response, \Exception $except
$this->data = [
'bundleVersion' => InMemoryListBundle::VERSION,
'driverUsed' => $cacheClient->getDriver(),
'stats' => $cacheClient->getStatistics(),
'stats' => $cacheClient->getRepository()->getStatistics(),
'size' => $size,
];
}
Expand Down
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@
}
],
"require": {
"symfony/symfony": "^2.8|3.*",
"mauretto78/in-memory-list": "^1.2"
"mauretto78/in-memory-list": "^1.2",
"symfony/http-kernel": "~2.3|~3.0",
"symfony/dependency-injection": "~2.3|~3.0",
"symfony/yaml": "~2.3|~3.0",
"symfony/config": "~2.3|~3.0",
"symfony/framework-bundle": "^3.3",
"sensio/framework-extra-bundle": "^3.0",
"twig/extensions": "^1.5"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit dc7f6ee

Please sign in to comment.