Skip to content

Commit bbcf514

Browse files
committed
Updated CacheManager to refuse class instantiation + Doc update
1 parent 92a1048 commit bbcf514

3 files changed

Lines changed: 28 additions & 3 deletions

File tree

docs/migration/MigratingFromV7ToV8.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,22 @@ Calling `CacheManager::getStaticSystemDrivers()`
6464
#### :alarm_clock: Now:
6565
Replaced by `CacheManager::getDriverList()`
6666

67+
### Removal of `ActOnAll` helper
68+
69+
#### :clock1: Then:
70+
The helper `ActOnAll` used to be useful to act on all instance
71+
72+
#### :alarm_clock: Now:
73+
The "ActOnAll Helper" have been removed in profit of aggregated cluster support
74+
75+
### Removal of `fallback` feature
76+
77+
#### :clock1: Then:
78+
The `fallback` features used to be useful when a backend failed to initialize
79+
80+
#### :alarm_clock: Now:
81+
Use aggregated cluster Master/Slave instead
82+
6783
------
6884
More infos in our comprehensive [changelog](./../../CHANGELOG.md).
6985

lib/Phpfastcache/Api.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@
2424
*/
2525
class Api
2626
{
27-
protected static $version = '3.0.0-rc2';
27+
protected static $version = '3.0.0-rc3';
2828

2929
/**
3030
* Api constructor.
3131
*/
32-
final private function __construct()
32+
final protected function __construct()
3333
{
34+
// The Api is not meant to be instantiated
3435
}
3536

3637
/**
@@ -162,4 +163,4 @@ public static function getChangelog(): string
162163
}
163164
throw new PhpfastcacheIOException('The CHANGELOG_API.md file is not readable or has been removed.');
164165
}
165-
}
166+
}

lib/Phpfastcache/CacheManager.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ class CacheManager
9292
*/
9393
protected static $badPracticeOmeter = [];
9494

95+
/**
96+
* CacheManager constructor.
97+
*/
98+
final protected function __construct()
99+
{
100+
// The cache manager is not meant to be instantiated
101+
}
102+
95103
/**
96104
* @param string $instanceId
97105
* @return ExtendedCacheItemPoolInterface

0 commit comments

Comments
 (0)