Skip to content

Commit ffb34cb

Browse files
committed
[Config] avoid loaded non-needed class in prod
1 parent 8182867 commit ffb34cb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ConfigCache.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ class ConfigCache extends ResourceCheckerConfigCache
3333
*/
3434
public function __construct($file, $debug)
3535
{
36-
parent::__construct($file, array(
37-
new SelfCheckingResourceChecker(),
38-
));
3936
$this->debug = (bool) $debug;
37+
38+
$checkers = array();
39+
if (true === $this->debug) {
40+
$checkers = array(new SelfCheckingResourceChecker());
41+
}
42+
43+
parent::__construct($file, $checkers);
4044
}
4145

4246
/**

0 commit comments

Comments
 (0)