class ConfigurationSchemaValidator (View source)

A validator for all configuration entries using Schema

Writing Custom Schemata

The schemas are searched in the path "Resources/Private/Schema" of all active packages. The schema-filenames must match the pattern [type].[path].schema.yaml. The type and/or the path can also be expressed as subdirectories of Resources/Private/Schema. So Settings/Neos/Flow.persistence.schema.yaml will match the same paths like Settings.Neos.Flow.persistence.schema.yaml or Settings/Neos.Flow/persistence.schema.yaml

Properties

protected ConfigurationManager $configurationManager
protected PackageManager $packageManager
protected SchemaValidator $schemaValidator

Methods

validate(string $configurationType = null, string $path = null, array $loadedSchemaFiles = [])

Validate the given $configurationType and $path

validateSingleType(string $configurationType, string $path = null, array $loadedSchemaFiles = [])

Validate a single configuration type

Details

Result validate(string $configurationType = null, string $path = null, array $loadedSchemaFiles = [])

Validate the given $configurationType and $path

Parameters

string $configurationType

(optional) the configuration type to validate. if NULL, validates all configuration.

string $path

(optional) configuration path to validate

array $loadedSchemaFiles

(optional). if given, will be filled with a list of loaded schema files

Return Value

Result

the result of the validation

Exceptions

SchemaValidationException

protected Result validateSingleType(string $configurationType, string $path = null, array $loadedSchemaFiles = [])

Validate a single configuration type

Parameters

string $configurationType

the configuration typr to validate

string $path

configuration path to validate, or NULL.

array $loadedSchemaFiles

will be filled with a list of loaded schema files

Return Value

Result

Exceptions

SchemaValidationException