summaryrefslogtreecommitdiff
path: root/vendor/symfony/cache/Adapter/PhpArrayAdapter.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/cache/Adapter/PhpArrayAdapter.php')
-rw-r--r--vendor/symfony/cache/Adapter/PhpArrayAdapter.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/vendor/symfony/cache/Adapter/PhpArrayAdapter.php b/vendor/symfony/cache/Adapter/PhpArrayAdapter.php
index 5f6e99169c..b4f13d1346 100644
--- a/vendor/symfony/cache/Adapter/PhpArrayAdapter.php
+++ b/vendor/symfony/cache/Adapter/PhpArrayAdapter.php
@@ -61,22 +61,17 @@ class PhpArrayAdapter implements AdapterInterface, CacheInterface, PruneableInte
* This adapter takes advantage of how PHP stores arrays in its latest versions.
*
* @param string $file The PHP file were values are cached
- * @param CacheItemPoolInterface $fallbackPool Fallback when opcache is disabled
+ * @param CacheItemPoolInterface $fallbackPool A pool to fallback on when an item is not hit
*
* @return CacheItemPoolInterface
*/
public static function create($file, CacheItemPoolInterface $fallbackPool)
{
- // Shared memory is available in PHP 7.0+ with OPCache enabled
- if (filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN)) {
- if (!$fallbackPool instanceof AdapterInterface) {
- $fallbackPool = new ProxyAdapter($fallbackPool);
- }
-
- return new static($file, $fallbackPool);
+ if (!$fallbackPool instanceof AdapterInterface) {
+ $fallbackPool = new ProxyAdapter($fallbackPool);
}
- return $fallbackPool;
+ return new static($file, $fallbackPool);
}
/**