Change record status: 
Project: 
Introduced in branch: 
11.1.x
Introduced in version: 
11.1.0
Description: 

You'd think that block weights would always be integers, right? That would make sense, given what weights are for.

Welp, it turns out that it has been possible, all this time, for blocks to have weights that weren't integers. They could be anything, really, including numeric strings (like '21') or even NULL.

As of #3379725: Make Block config entities fully validatable, this is no longer allowed. Block weights have to be integers (and are 0 by default), or they will raise a deprecation error. Any non-integer passed to Block::setWeight() will be cast to an integer.

Impacts: 
Module developers
Site templates, recipes and distribution developers