@@ -86,34 +86,14 @@ public function __construct(string $globalPrefix, ILogger $logger,
8686 $ missingCacheMessage = 'Memcache {class} not available for {use} cache ' ;
8787 $ missingCacheHint = 'Is the matching PHP module installed and enabled? ' ;
8888 if (!class_exists ($ localCacheClass ) || !$ localCacheClass ::isAvailable ()) {
89- if (\OC ::$ CLI && !defined ('PHPUNIT_RUN ' )) {
90- // CLI should not hard-fail on broken memcache
91- $ this ->logger ->info ($ missingCacheMessage , [
92- 'class ' => $ localCacheClass ,
93- 'use ' => 'local ' ,
94- 'app ' => 'cli '
95- ]);
96- $ localCacheClass = self ::NULL_CACHE ;
97- } else {
98- throw new \OC \HintException (strtr ($ missingCacheMessage , [
99- '{class} ' => $ localCacheClass , '{use} ' => 'local '
100- ]), $ missingCacheHint );
101- }
89+ throw new \OC \HintException (strtr ($ missingCacheMessage , [
90+ '{class} ' => $ localCacheClass , '{use} ' => 'local '
91+ ]), $ missingCacheHint );
10292 }
10393 if (!class_exists ($ distributedCacheClass ) || !$ distributedCacheClass ::isAvailable ()) {
104- if (\OC ::$ CLI && !defined ('PHPUNIT_RUN ' )) {
105- // CLI should not hard-fail on broken memcache
106- $ this ->logger ->info ($ missingCacheMessage , [
107- 'class ' => $ distributedCacheClass ,
108- 'use ' => 'distributed ' ,
109- 'app ' => 'cli '
110- ]);
111- $ distributedCacheClass = self ::NULL_CACHE ;
112- } else {
113- throw new \OC \HintException (strtr ($ missingCacheMessage , [
114- '{class} ' => $ distributedCacheClass , '{use} ' => 'distributed '
115- ]), $ missingCacheHint );
116- }
94+ throw new \OC \HintException (strtr ($ missingCacheMessage , [
95+ '{class} ' => $ distributedCacheClass , '{use} ' => 'distributed '
96+ ]), $ missingCacheHint );
11797 }
11898 if (!($ lockingCacheClass && class_exists ($ distributedCacheClass ) && $ lockingCacheClass ::isAvailable ())) {
11999 // don't fallback since the fallback might not be suitable for storing lock
0 commit comments