public function setupAllCommand(bool $quiet = false)
    {
        $cacheConfigurations = $this->cacheManager->getCacheConfigurations();
        unset($cacheConfigurations['Default']);
        $hasErrorsOrWarnings = false;
        foreach (array_keys($cacheConfigurations) as $cacheIdentifier) {
            $cache = $this->cacheManager->getCache($cacheIdentifier);
            $cacheBackend = $cache->getBackend();
            $quiet || $this->outputLine('<b>%s:</b>', [$cache->getIdentifier()]);
            if (!$cacheBackend instanceof WithSetupInterface) {
                $quiet || $this->outputLine('Skipped, because backend "%s" does not implement the WithSetupInterface', [TypeHandling::getTypeForValue($cacheBackend)]);
                continue;
            }
            $result = $cacheBackend->setup();
            $hasErrorsOrWarnings = $hasErrorsOrWarnings || $result->hasErrors() || $result->hasWarnings();
            if (!$quiet || $result->hasErrors()) {
                $this->renderResult($result);
            }
        }
        if ($hasErrorsOrWarnings) {
            $this->quit(1);
            return;
        }
    }
public function setupAllCommand(bool $quiet = false)
    {
        $cacheConfigurations = $this->cacheManager->getCacheConfigurations();
        unset($cacheConfigurations['Default']);
        $hasErrorsOrWarnings = false;
        foreach (array_keys($cacheConfigurations) as $cacheIdentifier) {
            $cache = $this->cacheManager->getCache($cacheIdentifier);
            $cacheBackend = $cache->getBackend();
            $quiet || $this->outputLine('<b>%s:</b>', [$cache->getIdentifier()]);
            if (!$cacheBackend instanceof WithSetupInterface) {
                $quiet || $this->outputLine('Skipped, because backend "%s" does not implement the WithSetupInterface', [TypeHandling::getTypeForValue($cacheBackend)]);
                continue;
            }
            $result = $cacheBackend->setup();
            $hasErrorsOrWarnings = $hasErrorsOrWarnings || $result->hasErrors() || $result->hasWarnings();
            if (!$quiet || $result->hasErrors()) {
                $this->renderResult($result);
            }
        }
        if ($hasErrorsOrWarnings) {
            $this->quit(1);
            return;
        }
    }
public function setupAllCommand ( bool $ quiet = false ) { $ cacheConfigurations = $ this -> cacheManager -> getCacheConfigurations ( ) ; unset ( $ cacheConfigurations [ 'Default' ] ) ; $ hasErrorsOrWarnings = false ; foreach ( array_keys ( $ cacheConfigurations ) as $ cacheIdentifier ) { $ cache = $ this -> cacheManager -> getCache ( $ cacheIdentifier ) ; $ cacheBackend = $ cache -> getBackend ( ) ; $ quiet || $ this -> outputLine ( '<b>%s:</b>' , [ $ cache -> getIdentifier ( ) ] ) ; if ( ! $ cacheBackend instanceof WithSetupInterface ) { $ quiet || $ this -> outputLine ( 'Skipped, because backend "%s" does not implement the WithSetupInterface' , [ TypeHandling :: getTypeForValue ( $ cacheBackend ) ] ) ; continue ; } $ result = $ cacheBackend -> setup ( ) ; $ hasErrorsOrWarnings = $ hasErrorsOrWarnings || $ result -> hasErrors ( ) || $ result -> hasWarnings ( ) ; if ( ! $ quiet || $ result -> hasErrors ( ) ) { $ this -> renderResult ( $ result ) ; } } if ( $ hasErrorsOrWarnings ) { $ this -> quit ( 1 ) ; return ; } }
Setup all Caches

Invokes the setup() method on all configured CacheBackend that implement the WithSetupInterface interface
which should setup and validate the backend (i.e. create required database tables, directories, ...)

This command will exit with a code 1 if at least one cache setup failed
This allows the command to be easily integrated in CI setups (the --quiet flag can be used to reduce verbosity)

@param bool $quiet If set, this command only outputs errors & warnings
@return void
@see neos.flow:cache:setup
@throws NoSuchCacheException | StopActionException
Setup all Caches