update 1.0.8.0

Commits for version update
This commit is contained in:
Manish Verma
2016-10-17 12:02:27 +05:30
parent dec927987b
commit 76e85db070
9674 changed files with 495757 additions and 58922 deletions

View File

@@ -50,13 +50,13 @@ class ArrayStore extends TaggableStore implements Store
*/
public function increment($key, $value = 1)
{
$this->storage[$key] = $this->storage[$key] + $value;
$this->storage[$key] = ((int) $this->storage[$key]) + $value;
return $this->storage[$key];
}
/**
* Increment the value of an item in the cache.
* Decrement the value of an item in the cache.
*
* @param string $key
* @param mixed $value

View File

@@ -35,7 +35,7 @@ class CacheTableCommand extends Command
protected $composer;
/**
* Create a new session table command instance.
* Create a new cache table command instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
* @param \Illuminate\Support\Composer $composer

View File

@@ -4,6 +4,7 @@ namespace Illuminate\Cache\Console;
use Illuminate\Console\Command;
use Illuminate\Cache\CacheManager;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class ClearCommand extends Command
@@ -47,17 +48,23 @@ class ClearCommand extends Command
*
* @return void
*/
public function fire()
public function handle()
{
$storeName = $this->argument('store');
$tags = array_filter(explode(',', $this->option('tags')));
$this->laravel['events']->fire('cache:clearing', [$storeName]);
$cache = $this->cache->store($store = $this->argument('store'));
$this->cache->store($storeName)->flush();
$this->laravel['events']->fire('cache:clearing', [$store, $tags]);
$this->laravel['events']->fire('cache:cleared', [$storeName]);
if (! empty($tags)) {
$cache->tags($tags)->flush();
} else {
$cache->flush();
}
$this->info('Application cache cleared!');
$this->info('Cache cleared successfully.');
$this->laravel['events']->fire('cache:cleared', [$store, $tags]);
}
/**
@@ -71,4 +78,16 @@ class ClearCommand extends Command
['store', InputArgument::OPTIONAL, 'The name of the store you would like to clear.'],
];
}
/**
* Get the console command options.
*
* @return array
*/
protected function getOptions()
{
return [
['tags', null, InputOption::VALUE_OPTIONAL, 'The cache tags you would like to clear.', null],
];
}
}

View File

@@ -128,7 +128,7 @@ class DatabaseStore implements Store
}
/**
* Increment the value of an item in the cache.
* Decrement the value of an item in the cache.
*
* @param string $key
* @param mixed $value
@@ -165,7 +165,7 @@ class DatabaseStore implements Store
}
$current = $this->encrypter->decrypt($cache->value);
$new = $callback($current, $value);
$new = $callback((int) $current, $value);
if (! is_numeric($current)) {
return false;

View File

@@ -5,7 +5,7 @@ namespace Illuminate\Cache\Events;
class CacheMissed
{
/**
* THe key that was missed.
* The key that was missed.
*
* @var string
*/

View File

@@ -52,7 +52,7 @@ class NullStore extends TaggableStore implements Store
}
/**
* Increment the value of an item in the cache.
* Decrement the value of an item in the cache.
*
* @param string $key
* @param mixed $value

View File

@@ -10,7 +10,7 @@
"authors": [
{
"name": "Taylor Otwell",
"email": "taylorotwell@gmail.com"
"email": "taylor@laravel.com"
}
],
"require": {