Add validation constraints to announcements_feed.settings

Created on 16 February 2024, 4 months ago
Updated 6 March 2024, 3 months ago

Problem/Motivation

The Announcements Feed module's settings have 3 property paths that are not yet validatable:

$ ./vendor/bin/drush config:inspect --filter-keys=announcements_feed.settings --detail --list-constraints  --fields=key,validatability,constraints
➜  πŸ€– Analyzing…

 -------------------------------------------------------- ------------- ------------------------------------------ 
  Key                                                      Validatable   Validation constraints                    
 -------------------------------------------------------- ------------- ------------------------------------------ 
  announcements_feed.settings                              50%           ValidKeys: '<infer>'                      
   announcements_feed.settings:                            Validatable   ValidKeys: '<infer>'                      
   announcements_feed.settings:_core                       Validatable   ValidKeys:                                
                                                                           - default_config_hash                   
   announcements_feed.settings:_core.default_config_hash   Validatable   NotNull: {  }                             
                                                                         Regex: '/^[a-zA-Z0-9\-_]+$/'              
                                                                         Length: 43                                
                                                                         ↣ PrimitiveType: {  }                     
   announcements_feed.settings:cron_interval               NOT           ⚠️  @todo Add validation constraints here  
   announcements_feed.settings:limit                       NOT           ⚠️  @todo Add validation constraints here  
   announcements_feed.settings:max_age                     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=announcements_feed--detail --list-constraints

Proposed resolution

  1. Add validation constraints.
  2. Mark FullyValidatable.

Remaining tasks

Review.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
Announcements feedΒ  β†’

Last updated 3 months ago

No maintainer
Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024