Add validation constraints to taxonomy.settings

Created on 20 October 2023, about 1 year ago
Updated 13 November 2023, about 1 year ago

Problem/Motivation

Taxonomy settings have 1 property paths that are not yet validatable:

$  ./vendor/bin/drush config:inspect --filter-keys=taxonomy.settings --detail --list-constraints  --fields=key,validatability,constraints
โžœ  ๐Ÿค– Analyzingโ€ฆ

 ---------------------------------------------- ------------- ------------------------------------------ 
  Key                                            Validatable   Validation constraints                    
 ---------------------------------------------- ------------- ------------------------------------------ 
  taxonomy.settings                              83%           ValidKeys: '<infer>'                      
                                                               RequiredKeys: '<infer>'                   
   taxonomy.settings:                            Validatable   ValidKeys: '<infer>'                      
                                                               RequiredKeys: '<infer>'                   
   taxonomy.settings:_core                       Validatable   ValidKeys:                                
                                                                 - default_config_hash                   
                                                               RequiredKeys: '<infer>'                   
   taxonomy.settings:_core.default_config_hash   Validatable   NotNull: {  }                             
                                                               Regex: '/^[a-zA-Z0-9\-_]+$/'              
                                                               Length: 43                                
                                                               โ†ฃ PrimitiveType: {  }                     
   taxonomy.settings:maintain_index_table        Validatable   โ†ฃ PrimitiveType: {  }                     
   taxonomy.settings:override_selector           Validatable   โ†ฃ PrimitiveType: {  }                     
   taxonomy.settings:terms_per_page_admin        NOT           โš ๏ธ  @todo Add validation constraints here  
 ---------------------------------------------- ------------- ------------------------------------------ 

Steps to reproduce

  1. Get a local git clone of Drupal core 11.x.
  2. composer require drupal/config_inspector โ€” or manually install https://www.drupal.org/project/config_inspector/releases/2.1.5 โ†’ or newer (which supports Drupal 11!)
  3. composer require drush/drush
  4. vendor/bin/drush config:inspect --filter-keys=taxonomy.settings --detail --list-constraints

Proposed resolution

Add validation constraints to:

  1. terms_per_page_admin

This requires looking at the existing code and admin UI (if any) to understand which values could be considered valid. Eventually this needs to be reviewed by the relevant subsystem maintainer.

For examples, search *.schema.yml files for the string constraints: ๐Ÿ˜Š

Reach out to @borisson_ or @wimleers in the #distributions-and-recipes.

Remaining tasks

  1. terms_per_page_admin

User interface changes

None.

API changes

None.

Data model changes

More validation ๐Ÿš€

Release notes snippet

None.

๐Ÿ“Œ Task
Status

Fixed

Version

10.2 โœจ

Component
Taxonomyย  โ†’

Last updated 1 day ago

  • Maintained by
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States @xjm
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom @catch
Created by

๐Ÿ‡ง๐Ÿ‡ชBelgium borisson_ Mechelen, ๐Ÿ‡ง๐Ÿ‡ช

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024