You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/autoload.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@
31
31
32
32
if (is_readable($path)) {
33
33
require_once$path;
34
-
}else{
34
+
}else{
35
35
trigger_error('Cannot locate the Psr/Cache files', E_USER_ERROR);
36
36
}
37
37
return;
@@ -40,7 +40,7 @@
40
40
41
41
if (is_readable($path)) {
42
42
require_once$path;
43
-
}else{
43
+
}else{
44
44
trigger_error('Cannot locate the Psr/SimpleCache files', E_USER_ERROR);
45
45
}
46
46
return;
@@ -55,6 +55,6 @@
55
55
});
56
56
57
57
if ((!defined('PFC_IGNORE_COMPOSER_WARNING') || !PFC_IGNORE_COMPOSER_WARNING) && class_exists('Composer\Autoload\ClassLoader')) {
58
-
trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
59
-
E_USER_WARNING);
58
+
trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
trigger_error('A Symfony Bundle to make the PhpFastCache integration more easier is now available here: https://github.com/PHPSocialNetwork/phpfastcache-bundle', E_USER_NOTICE);
211
+
$badPracticeOmeter[ $driver ] = 1;
212
+
if (!$config[ 'ignoreSymfonyNotice' ] && interface_exists('Symfony\Component\HttpKernel\KernelInterface') && !class_exists('phpFastCache\Bundle\phpFastCacheBundle')) {
213
+
trigger_error('A Symfony Bundle to make the PhpFastCache integration more easier is now available here: https://github.com/PHPSocialNetwork/phpfastcache-bundle',
trigger_error(sprintf('The "%s" driver is unavailable at the moment, the fallback driver "%s" has been used instead.', $driver, $fallback), E_USER_WARNING);
224
-
}else{
228
+
trigger_error(sprintf('The "%s" driver is unavailable at the moment, the fallback driver "%s" has been used instead.', $driver,
229
+
$fallback), E_USER_WARNING);
230
+
} else {
225
231
thrownewphpFastCacheInvalidConfigurationException('The fallback driver cannot be the same than the default driver', 0, $e);
trigger_error('[' . $driver . '] Calling many times CacheManager::getInstance() for already instanced drivers is a bad practice and have a significant impact on performances.
236
242
See https://github.com/PHPSocialNetwork/phpfastcache/wiki/[V5]-Why-calling-getInstance%28%29-each-time-is-a-bad-practice-%3F');
237
243
}
238
244
239
-
$badPracticeOmeter[$driver]++;
245
+
$badPracticeOmeter[$driver]++;
240
246
241
247
returnself::$instances[ $instance ];
242
248
}
@@ -340,9 +346,9 @@ public static function setDefaultConfig($name, $value = null)
0 commit comments