Verified Commit a5831a7d authored by Dave Long's avatar Dave Long
Browse files

fix: #3525391 Conditions plugin validation schema is wrong

By: penyaskito
By: wim leers
By: smustgrave
By: borisson_
(cherry picked from commit 28b81cc5)
parent dcdd4cfc
Loading
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -492,9 +492,8 @@ condition.plugin:
    negate:
      type: boolean
      label: 'Negate'
    uuid:
      type: uuid
    context_mapping:
      requiredKey: false
      type: sequence
      label: 'Context assignments'
      sequence:
+8 −10
Original line number Diff line number Diff line
@@ -405,14 +405,15 @@ public static function providerMappingInterpretation(): \Generator {
        // @see core/config/schema/core.data_types.schema.yml
        'id',
        'negate',
        'uuid',
        'context_mapping',
        // Keys defined locally, in `type: condition.plugin.response_status`.
        // @see core/modules/system/config/schema/system.schema.yml
        'status_codes',
      ],
      [],
      // Note the presence of `id`, `negate`, `uuid` and `context_mapping` here.
      // This key is optional, see `type: condition.plugin`.
      // @see core.data_types.schema.yml
      ['context_mapping'],
      // Note the presence of `id`, `negate`, and `context_mapping` here.
      // That's because there is no `condition.plugin.*` type that specifies
      // defaults. Each individual condition plugin has the freedom to deviate
      // from this approach!
@@ -420,28 +421,24 @@ public static function providerMappingInterpretation(): \Generator {
        'condition.plugin.entity_bundle:*' => [
          'id',
          'negate',
          'uuid',
          'context_mapping',
          'bundles',
        ],
        'condition.plugin.request_path' => [
          'id',
          'negate',
          'uuid',
          'context_mapping',
          'pages',
        ],
        'condition.plugin.response_status' => [
          'id',
          'negate',
          'uuid',
          'context_mapping',
          'status_codes',
        ],
        'condition.plugin.current_theme' => [
          'id',
          'negate',
          'uuid',
          'context_mapping',
          'theme',
        ],
@@ -457,14 +454,15 @@ public static function providerMappingInterpretation(): \Generator {
        // @see core/config/schema/core.data_types.schema.yml
        'id',
        'negate',
        'uuid',
        'context_mapping',
        // Keys defined locally, in `type: condition.plugin.response_status`.
        // @see core/modules/system/config/schema/system.schema.yml
        'status_codes',
      ],
      [],
      // Note the ABSENCE of `id`, `negate`, `uuid` and `context_mapping`
      // This key is optional, see `type: condition.plugin`.
      // @see core.data_types.schema.yml
      ['context_mapping'],
      // Note the ABSENCE of `id`, `negate`, and `context_mapping`
      // compared to the previous test case, because now the
      // `condition.plugin.*` type does exist.
      [