Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
filter.module
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Oct 2021 at 11:01 UTC
Updated:
18 Oct 2021 at 14:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottComment #3
andypostI find that's enough, moreover there's todo in the property docs to rename it to label so default anyway should be empty string - for PHP 7.4 it could become
protected ?string $label;Comment #4
alexpottI'm not sure - if this is just tests then I think we should do what we did for roles and fix the tests and leave the whole can a label for entities ever be NULL to the follow-up.
Comment #5
daffie commentedTo me, the change feels wrong. Almost everywhere in core have entity properties a default value of null. Why do it here now? What is the alternative change to fix this problem for PHP 8.1?
Comment #6
alexpott@daffie regardless of your feeling since FilterFormat::preSave() does:
the affect of that is that the NULL return of a label() on a saved filter format is impossible.
That said we should explore #4 and see where we're saving a filter format without a label.
Here's a patch that fixes all that I can find and adds an assert.
Comment #7
daffie commentedI like this change much more.
Looks good to me.
Comment #8
catchCommitted 3fc999a and pushed to 9.3.x. Thanks!
Comment #10
catch