Since PHP arrays make no clear distinction between lists (JSON arrays) and maps (JSON objects), some edge case handling is needed to make validation work reliably when we declare types for all arrays: 1) Allow array keys to be ignored, so an associative PHP array validates as a JSON array. This is needed for the SessionProviders setting. 2) Allow associative arrays with numeric keys to validate as JSON objects. This is done by ignoring the type validation when numeric keys are detected. A warning is returned in the status object. 3) Work around validation failing on float values that are expected to be integers. All numbers come from the yaml parser as floats, and the "integer" type in JSON schema should accept floats with if the fractional part is 0. But that doesn't seem to work, we need to cast the values to integers explicitly. Also, this fixes some mistakes in the schema: LockManagers is a list, so it should use the JSON type "array". NamespacesToBeSearchedDefault is a map (JSON object), even though it uses numeric keys. The Actions registry is also a map. Change-Id: I9d0453d740c377b7cce574df743536c39a0ec619 |
||
|---|---|---|
| .. | ||
| Cache | ||
| Config | ||
| Source | ||
| SettingsBuilder.php | ||
| SettingsBuilderException.php | ||