Metadata check
Metadata check can be started by using the neos check-metadata command in the cluster folder. The output show errors and warnings that have been detected.
Ignoring errors
Although this is not generally recommended, it is possible to ignore metadata-related errors.
This can be useful when dealing with module dependency issues.
Each persistence error is identified by a letter and a unique number (i.e.: N102
).
It is possible to ignore them by adding the YamlIgnoredErrors
property and listing the error numbers to ignore (without the letter) in the YAML
configuration of your cluster:
YamlIgnoredErrors: [102, 105]
Note
The updated configuration is taken into account immediately, there is no need to restart Neos Studio
.
Warning
The errors will also be ignored in Neos Studio
.
Ignoring errors must remain a temporary solution. Remember to delete the line in the configuration as soon as you no longer need it.
Warnings
Warnings correspond to YAML
files which do not contain exactly the expected content or which should not exist.
You can use the --diff
option to generate two files check-metadata.actual.txt
and check-metadata.expected.txt
at the root of your cluster:
neos check-metadata --diff
By comparing these two files with a file comparator, you can analyze the differences between your current metadata and the expected versions.
The command can update all the files and thus remove warnings by using the --fix
option:
neos check-metadata --fix
Exit code
By default, the exit code is 1
if the command reports error(s) or warning(s) and 0
otherwise.
You can disable this behavior for warnings with the --warnaserror false
option.