Verified Commit 8b9c5ed1 authored by Dave Long's avatar Dave Long
Browse files

Revert "fix: #3525391 Conditions plugin validation schema is wrong"

This reverts commit a5831a7d.
parent f5060667
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -492,8 +492,9 @@ condition.plugin:
    negate:
      type: boolean
      label: 'Negate'
    uuid:
      type: uuid
    context_mapping:
      requiredKey: false
      type: sequence
      label: 'Context assignments'
      sequence:
+10 −8
Original line number Diff line number Diff line
@@ -405,15 +405,14 @@ 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',
      ],
      // 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.
      [],
      // Note the presence of `id`, `negate`, `uuid` 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!
@@ -421,24 +420,28 @@ 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',
        ],
@@ -454,15 +457,14 @@ 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',
      ],
      // 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`
      [],
      // Note the ABSENCE of `id`, `negate`, `uuid` and `context_mapping`
      // compared to the previous test case, because now the
      // `condition.plugin.*` type does exist.
      [