Add check if moduleSettings is defined in environment file #868
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Whenever you have an module entry in environment/1.yaml without the key
moduleSettings
the error "array_keys() expects parameter 1 to be array, null given" is caused.The documentation doesn't state clearly if the key
moduleSettings
must be part of the entry in the environment YAML file for a module. Although the documentation is completely about the module configuration, the following example works completely fine and is only about to change meta information about the module - not its configuration:Since this entry only changes the title, one could think to remove the last and empty line
moduleSettings:
since it seems not to be necessary:This leads to such an error message in the shop log:
If it is expected that
moduleSettings
is set all the time, feel free to close this PR, since I'm not sure which solution is the correct one here. But in this case I recommend to adapt the corresponding documentation accordingly.This PR is based on the bug reporting #7241