This is a sub-issue of #1910624: [META] Introduce and complete configuration schemas in all of core.

Problem/motivation

#1866610: Introduce Kwalify-inspired schema format for configuration introduced the idea of config schema. The changelog leads to (hopefully extensive) documentation on the format at http://drupal.org/node/1905070. While there are little cleanups planned for the format overall, the current format is a result of months of back and forths, so it should be perfectly fine to apply it more widely to core.

Proposed solution

Create a configuration schema for file module.

Schema in place

Schema not yet in place
filter.settings.yml
filter.format.plain_text.yml

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vijaycs85’s picture

Status: Active » Needs review
FileSize
1.32 KB

Adding schema file...

Status: Needs review » Needs work

The last submitted patch, 1919174-filter-schema.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
420 bytes
1.32 KB

Fixing typo...

Status: Needs review » Needs work

The last submitted patch, 1919174-filter-schema-3.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
704 bytes
1.25 KB

Removing type def: filter

Status: Needs review » Needs work

The last submitted patch, 1919174-filter-schema-5.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
726 bytes
1.27 KB

Re-rolling with fixes.

vijaycs85’s picture

Status: Needs review » Needs work
FileSize
9.46 KB

In filter.format.full_html.yml

format: full_html
...
...
...
filters:
  filter_url:
    module: filter
    status: '1'
  filter_autop:
    module: filter
    status: '1'
  filter_htmlcorrector:
    module: filter
    status: '1'

In filter.format.php_code.yml

format: php_code
...
...
...
filters:
  php_code:
    module: php
    status: '1'
langcode: und

To update them in Schema file(filter.schama.yml):

filter.format.*:
  type: mapping
  label: 'Filter format'
...
...
...
    filters:
      type: sequence
      label: 'Filters'
      sequence:
        - type: format.filter.[%key]

Where as %key has been defined as

format.filter.filter_html_escape:
  type: filter
  label: 'Filter HTML'

format.filter.filter_url:
  type: filter
  label: 'Filter URL'

format.filter.filter_autop:
  type: filter
  label: 'Filter autotop'

format.filter.php_code:
  type: filter
  label: 'PHP filter'

and filter defined in system.data_types.schema.yml

# Filter with module and status.
filter:
  type: mapping
  label: 'Filter'
  mapping:
    module:
      type: string
      label: 'Module'
    status:
      type: boolean
      label: 'Status'

when visit admin/reports/config-inspector/filter.format.php_code/form, I' getting all filters defined, instead of just PHP's (i.e. php_code)

2013-02-21_215035.png

Am I doing anything wrong here?

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
1.04 KB
1.59 KB

Status: Needs review » Needs work
Issue tags: -Configuration system, -D8MI, -language-config, -Configuration schema

The last submitted patch, 1919174-filter-schema-9.patch, failed testing.

vijaycs85’s picture

Status: Needs work » Needs review

#9: 1919174-filter-schema-9.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Configuration system, +D8MI, +language-config, +Configuration schema

The last submitted patch, 1919174-filter-schema-9.patch, failed testing.

vijaycs85’s picture

Re-rolling...

Gábor Hojtsy’s picture

Status: Needs work » Needs review

#9: 1919174-filter-schema-9.patch queued for re-testing.

mr.york’s picture

Added always_show_fallback_choice config option with the last patch.

mr.york’s picture

FileSize
563 bytes

Interdiff.

mr.york’s picture

Issue tags: +SprintWeekend2013

Add #sprintweekend tag :).

Status: Needs review » Needs work

The last submitted patch, 1919174-diff-13-15.patch, failed testing.

Anonymous’s picture

Status: Needs work » Reviewed & tested by the community

Ran the test on file and filter module and they seems clean. Also ran node test, found couple of failures but I don't think its related to this issue.

webchick’s picture

#16: 1919174-diff-13-15.patch queued for re-testing.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Yay! :D

disasm’s picture

Thanks for the patch review AshishK! You got a patch committed in less than a day with your review! Congrats!

Automatically closed -- issue fixed for 2 weeks with no activity.