[PP-1] Deprecate unused `provider` exported property from Block config entities

Created on 7 March 2024, 8 months ago

Problem/Motivation

It was discovered in πŸ“Œ Make Block config entities fully validatable Fixed that the provider exported property is unused.

This explains why all blocks have

provider: null

at the root, but then have another provider key that is not empty, under settings (so settings.provider).

For example, block.block.olivero_account_menu.yml:

langcode: en
status: true
dependencies:
  config:
    - system.menu.account
  module:
    - system
  theme:
    - olivero
id: olivero_account_menu
theme: olivero
region: secondary_menu
weight: -4
provider: null
plugin: 'system_menu_block:account'
settings:
  id: 'system_menu_block:account'
  label: 'User account menu'
  label_display: '0'
  provider: system
  level: 1
  depth: 1
  expand_all_items: false
visibility: {  }

Top-level null provider, but the "settings" provider is system, which makes sense: this is a block plugin provided by the System module.

This was introduced in #2432791: Skip Config::save schema validation of config data for trusted data β†’ and appears to have been an accident.

Note: the Block class has never had a $provider property πŸ˜… Which is why we see provider: null in all block.block.*.yml files πŸ˜„

Steps to reproduce

N/A

Proposed resolution

  1. Mark block.block.*:provider as deprecated β€” this will trigger deprecation warnings for any code producing
  2. Remove provider from the config_export annotation for the Block config entity type
  3. Provide an update path that removes provider from EVERY block. That will ensure no deprecation warning is triggered anymore, unless the site owner restores old/invalid config.

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
BlockΒ  β†’

Last updated about 19 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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

Comments & Activities

Production build 0.71.5 2024