Skip to content

Commit 9c333d7

Browse files
authored
Merge pull request #613 from Geolim4/master
Docs & composer changes
2 parents 8f5ec0c + aa54fa2 commit 9c333d7

File tree

16 files changed

+44
-41
lines changed

16 files changed

+44
-41
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ about: Create a report to help us improve Phpfastcache
55
---
66

77
**Configuration**
8-
- **PhpFastCache version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::GetVersion()`)..."
9-
- **PhpFastCache API version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::getPhpFastCacheVersion()`)..."
8+
- **PhpFastCache version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::getPhpFastCacheVersion()`)..."
9+
- **PhpFastCache API version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::GetVersion()`)..."
1010
- **PHP version:** "...replace me (Can be retrieved using command line `php -v | sed -n 1p`)..."
1111
- **Operating system:** " ...replace me (You REALLY should know it)... "
1212

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ about: Suggest an idea for Phpfastcache
55
---
66

77
**Configuration**
8-
- **PhpFastCache version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::GetVersion()`)..."
9-
- **PhpFastCache API version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::getPhpFastCacheVersion()`)..."
8+
- **PhpFastCache version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::getPhpFastCacheVersion()`)..."
9+
- **PhpFastCache API version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::GetVersion()`)..."
1010
- **PHP version:** "...replace me (Can be retrieved using command line `php -v | sed -n 1p`)..."
1111
- **Operating system:** " ...replace me (You REALLY should know it)... "
1212

.github/ISSUE_TEMPLATE/simple_question.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ about: Ask a question about Phpfastcache
55
---
66

77
**Configuration (optional)**
8-
- **PhpFastCache version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::GetVersion()`)..."
9-
- **PhpFastCache API version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::getPhpFastCacheVersion()`)..."
8+
- **PhpFastCache version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::getPhpFastCacheVersion()`)..."
9+
- **PhpFastCache API version:** "...replace me (Can be retrieved using method `\Phpfastcache\Api::GetVersion()`)..."
1010
- **PHP version:** "...replace me (Can be retrieved using command line `php -v | sed -n 1p`)..."
1111
- **Operating system:** " ...replace me (You REALLY should know it)... "
1212

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^7.0 || ^7.1 || ^7.2",
24+
"php": ">=7.0",
2525
"psr/cache": "~1.0.0",
2626
"psr/simple-cache": "~1.0.0",
2727
"ext-mbstring": "*",

docs/examples/SaveMultiple.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
// OR require_once("../src/phpFastCache/phpFastCache.php");
1717

1818
use Phpfastcache\CacheManager;
19+
use Phpfastcache\Config\Config;
1920

2021
// Setup File Path on your config files
21-
CacheManager::setDefaultConfig([
22+
CacheManager::setDefaultConfig(new Config([
2223
"path" => sys_get_temp_dir()
23-
]);
24+
]));
2425

2526
// In your class, function, you can call the Cache
2627
$InstanceCache = CacheManager::getInstance('files');

docs/examples/cassandra.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414

1515
use Phpfastcache\CacheManager;
16+
use Phpfastcache\Drivers\Cassandra\Config;
1617

1718
// Include composer autoloader
1819
require __DIR__ . '/../../vendor/autoload.php';
@@ -26,7 +27,7 @@
2627
$config['sslEnabled'] = false;
2728
$config['sslVerify'] = false;
2829

29-
$InstanceCache = CacheManager::getInstance('cassandra', $config);
30+
$InstanceCache = CacheManager::getInstance('cassandra', new Config($config));
3031

3132
/**
3233
* Try to get $products from Caching First

docs/examples/couchbase.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,18 @@
1313
*/
1414

1515
use Phpfastcache\CacheManager;
16+
use Phpfastcache\Drivers\Couchbase\Config;
1617

1718
// Include composer autoloader
1819
require __DIR__ . '/../../vendor/autoload.php';
1920

20-
$InstanceCache = CacheManager::getInstance('couchbase', [
21+
$InstanceCache = CacheManager::getInstance('couchbase', new Config([
2122
'host' => 'your-couchbase-host',
2223
'port' => '8091',
2324
'username' => 'your-couchbase-username',
2425
'password' => 'your-couchbase-password',
25-
'buckets' => [
26-
[
27-
'bucket' => 'default', // The bucket name, generally "default" by default
28-
'password' => '' // The bucket password if there is
29-
],
30-
]
31-
]);
26+
'bucketName' => 'default' // The bucket name, generally "default" by default
27+
]));
3228

3329
/**
3430
* Try to get $products from Caching First

docs/examples/couchdb.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@
1313
*/
1414

1515
use Phpfastcache\CacheManager;
16+
use Phpfastcache\Drivers\Couchdb\Config;
1617

1718
// Include composer autoloader
1819
require __DIR__ . '/../../vendor/autoload.php';
1920

20-
$InstanceCache = CacheManager::getInstance('couchdb', [
21+
$InstanceCache = CacheManager::getInstance('couchdb', new Config([
2122
'host' => '127.0.0.1',
2223
'port' => 5984,
2324
'path' => '/',
2425
'username' => 'your-couchdb-username',
2526
'password' => 'your-couchdb-password',
2627
'ssl' => true,
2728
'timeout' => 10,
28-
]);
29+
]));
2930

3031
/**
3132
* Try to get $products from Caching First

docs/examples/files.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818

1919

2020
use Phpfastcache\CacheManager;
21+
use Phpfastcache\Config\Config;
2122
use Phpfastcache\Core\phpFastCache;
2223

2324
// Setup File Path on your config files
24-
CacheManager::setDefaultConfig([
25+
CacheManager::setDefaultConfig(new Config([
2526
"path" => sys_get_temp_dir(),
2627
"itemDetailedDate" => false
27-
]);
28+
]));
2829

2930
// In your class, function, you can call the Cache
3031
$InstanceCache = CacheManager::getInstance('files');

docs/examples/leveldb.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818

1919

2020
use Phpfastcache\CacheManager;
21+
use Phpfastcache\Config\Config;
2122
use Phpfastcache\Core\phpFastCache;
2223

2324
// Setup File Path on your config files
24-
CacheManager::setDefaultConfig([
25+
CacheManager::setDefaultConfig(new Config([
2526
"path" => sys_get_temp_dir(),
26-
]);
27+
]));
2728

2829
// In your class, function, you can call the Cache
2930
$InstanceCache = CacheManager::getInstance('leveldb');

0 commit comments

Comments
 (0)