public function validateCommand(string $type = null, string $path = null, bool $verbose = false)
    {
        if ($type === null) {
            $this->outputLine('Validating <b>all</b> configuration');
        } else {
            $this->outputLine('Validating <b>' . $type . '</b> configuration' . ($path !== null ? ' on path <b>' . $path . '</b>' : ''));
        }
        $this->outputLine();

        $validatedSchemaFiles = [];
        try {
            $result = $this->configurationSchemaValidator->validate($type, $path, $validatedSchemaFiles);
        } catch (SchemaValidationException $exception) {
            $this->outputLine('<b>Exception:</b>');
            $this->outputFormatted($exception->getMessage(), [], 4);
            $this->quit(2);
            return;
        }

        if ($verbose) {
            $this->outputLine('<b>Loaded Schema Files:</b>');
            foreach ($validatedSchemaFiles as $validatedSchemaFile) {
                $this->outputLine('- ' . substr($validatedSchemaFile, strlen(FLOW_PATH_ROOT)));
            }
            $this->outputLine();
            if ($result->hasNotices()) {
                $notices = $result->getFlattenedNotices();
                $this->outputLine('<b>%d notices:</b>', [count($notices)]);
                /** @var Notice $notice */
                foreach ($notices as $path => $pathNotices) {
                    foreach ($pathNotices as $notice) {
                        $this->outputLine(' - %s -> %s', [$path, $notice->render()]);
                    }
                }
                $this->outputLine();
            }
        }

        if ($result->hasErrors()) {
            $errors = $result->getFlattenedErrors();
            $this->outputLine('<b>%d errors were found:</b>', [count($errors)]);
            /** @var Error $error */
            foreach ($errors as $path => $pathErrors) {
                foreach ($pathErrors as $error) {
                    $this->outputLine(' - %s -> %s', [$path, $error->render()]);
                }
            }
            $this->quit(1);
        } else {
            $this->outputLine('<b>All Valid!</b>');
        }
    }
public function validateCommand(string $type = null, string $path = null, bool $verbose = false)
    {
        if ($type === null) {
            $this->outputLine('Validating <b>all</b> configuration');
        } else {
            $this->outputLine('Validating <b>' . $type . '</b> configuration' . ($path !== null ? ' on path <b>' . $path . '</b>' : ''));
        }
        $this->outputLine();

        $validatedSchemaFiles = [];
        try {
            $result = $this->configurationSchemaValidator->validate($type, $path, $validatedSchemaFiles);
        } catch (SchemaValidationException $exception) {
            $this->outputLine('<b>Exception:</b>');
            $this->outputFormatted($exception->getMessage(), [], 4);
            $this->quit(2);
            return;
        }

        if ($verbose) {
            $this->outputLine('<b>Loaded Schema Files:</b>');
            foreach ($validatedSchemaFiles as $validatedSchemaFile) {
                $this->outputLine('- ' . substr($validatedSchemaFile, strlen(FLOW_PATH_ROOT)));
            }
            $this->outputLine();
            if ($result->hasNotices()) {
                $notices = $result->getFlattenedNotices();
                $this->outputLine('<b>%d notices:</b>', [count($notices)]);
                /** @var Notice $notice */
                foreach ($notices as $path => $pathNotices) {
                    foreach ($pathNotices as $notice) {
                        $this->outputLine(' - %s -> %s', [$path, $notice->render()]);
                    }
                }
                $this->outputLine();
            }
        }

        if ($result->hasErrors()) {
            $errors = $result->getFlattenedErrors();
            $this->outputLine('<b>%d errors were found:</b>', [count($errors)]);
            /** @var Error $error */
            foreach ($errors as $path => $pathErrors) {
                foreach ($pathErrors as $error) {
                    $this->outputLine(' - %s -> %s', [$path, $error->render()]);
                }
            }
            $this->quit(1);
        } else {
            $this->outputLine('<b>All Valid!</b>');
        }
    }
public function validateCommand ( string $ type = null , string $ path = null , bool $ verbose = false ) { if ( $ type === null ) { $ this -> outputLine ( 'Validating <b>all</b> configuration' ) ; } else { $ this -> outputLine ( 'Validating <b>' . $ type . '</b> configuration' . ( $ path !== null ? ' on path <b>' . $ path . '</b>' : '' ) ) ; } $ this -> outputLine ( ) ; $ validatedSchemaFiles = [ ] ; try { $ result = $ this -> configurationSchemaValidator -> validate ( $ type , $ path , $ validatedSchemaFiles ) ; } catch ( SchemaValidationException $ exception ) { $ this -> outputLine ( '<b>Exception:</b>' ) ; $ this -> outputFormatted ( $ exception -> getMessage ( ) , [ ] , 4 ) ; $ this -> quit ( 2 ) ; return ; } if ( $ verbose ) { $ this -> outputLine ( '<b>Loaded Schema Files:</b>' ) ; foreach ( $ validatedSchemaFiles as $ validatedSchemaFile ) { $ this -> outputLine ( '- ' . substr ( $ validatedSchemaFile , strlen ( FLOW_PATH_ROOT ) ) ) ; } $ this -> outputLine ( ) ; if ( $ result -> hasNotices ( ) ) { $ notices = $ result -> getFlattenedNotices ( ) ; $ this -> outputLine ( '<b>%d notices:</b>' , [ count ( $ notices ) ] ) ; /** @var Notice $notice */ foreach ( $ notices as $ path => $ pathNotices ) { foreach ( $ pathNotices as $ notice ) { $ this -> outputLine ( ' - %s -> %s' , [ $ path , $ notice -> render ( ) ] ) ; } } $ this -> outputLine ( ) ; } } if ( $ result -> hasErrors ( ) ) { $ errors = $ result -> getFlattenedErrors ( ) ; $ this -> outputLine ( '<b>%d errors were found:</b>' , [ count ( $ errors ) ] ) ; /** @var Error $error */ foreach ( $ errors as $ path => $ pathErrors ) { foreach ( $ pathErrors as $ error ) { $ this -> outputLine ( ' - %s -> %s' , [ $ path , $ error -> render ( ) ] ) ; } } $ this -> quit ( 1 ) ; } else { $ this -> outputLine ( '<b>All Valid!</b>' ) ; } }
Validate the given configuration

<b>Validate all configuration</b>
./flow configuration:validate

<b>Validate configuration at a certain subtype</b>
./flow configuration:validate --type Settings --path Neos.Flow.persistence

You can retrieve the available configuration types with:
./flow configuration:listtypes

@param string $type Configuration type to validate
@param string $path path to the subconfiguration separated by "." like "Neos.Flow"
@param boolean $verbose if true, output more verbose information on the schema files which were used
@return void
Validate the given configuration