Skip to content

Commit 4849c0e

Browse files
authored
Merge pull request #396 from Geolim4/final
Added PFC_IGNORE_COMPOSER_WARNING constant
2 parents 0cb0817 + fb724ef commit 4849c0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/autoload.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646
});
4747

48-
if (class_exists('Composer\Autoload\ClassLoader')) {
49-
trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
50-
E_USER_WARNING);
48+
if ((!defined('PFC_IGNORE_COMPOSER_WARNING') || !PFC_IGNORE_COMPOSER_WARNING) && class_exists('Composer\Autoload\ClassLoader')) {
49+
trigger_error('Your project already makes use of Composer. You SHOULD use the composer dependency "phpfastcache/phpfastcache" instead of hard-autoloading.',
50+
E_USER_WARNING);
5151
}

0 commit comments

Comments
 (0)