Deprecate `null` as valid `weight` for Block config entities

Created on 7 March 2024, 8 months ago
Updated 18 July 2024, 4 months ago

Problem/Motivation

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

This seems to have been unintentional/an oversight, because

  • BlockInterface::getWeight() has a int return type
  • its implementation Block::getWeight()does not cast from null to int

Therefore null never makes sense, and it's only thanks to PHP's automatic typecasting that this has never been a problem πŸ˜…

Steps to reproduce

N/A

Proposed resolution

  1. Remove the nullable: true that πŸ“Œ Make Block config entities fully validatable Fixed added.
  2. Provide an update path that converts a weight of null to 0 for all blocks.

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

πŸ“Œ Task
Status

Closed: duplicate

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