- First commit to issue fork.
- Merge request !6429#2985362 - Add new LayoutBuilderOverridableInterface to remove duplication β (Closed) created by danielveza
- π³πΏNew Zealand danielveza Brisbane, AU
Opened a MR for this change
- Adds a new Interface LayoutBuilderOverridableInterface
- Adds this new interface to DefaultsSectionStorageInterface & LayoutEntityDisplayInterface
- Removes the overridable functions from DefaultsSectionStorageInterface & LayoutEntityDisplayInterface as they're now part of the interface
- Status changed to RTBC
11 months ago 5:29am 6 February 2024 - π¦πΊAustralia mstrelan
This is straight forward and does as described. Only thing I'd say is we can just call it
OverridableInterface
instead ofLayoutBuilderOverridableInterface
as per the proposed resolution, but this is consistent withLayoutBuilderEnabledInterface
so I'm not going to hold it up.I also wondered if we need a change record, but if you're implementing one of the existing interfaces you'll automatically be implementing the new interface already, so you don't need to declare the implementation in your class.
- π³πΏNew Zealand danielveza Brisbane, AU
Only thing I'd say is we can just call it OverridableInterface instead of LayoutBuilderOverridableInterface as per the proposed resolution, but this is consistent with LayoutBuilderEnabledInterface
Yup - I had the same thoughts while developing this. I figured keeping it consistent with LayoutBuilderEnabledInterface was the right call, but I don't feel strongly either way
- Status changed to Needs work
10 months ago 6:28am 26 February 2024 - π³πΏNew Zealand quietone
I'm triaging RTBC issues β . I read the IS, the comments ant the MR. I didn't find any unanswered questions.
Regarding the name, there are no existing interfaces in core using the word 'overridable' plus 'overridable' is not in the American English dictionaries recommended by Drupal.org, and it is in the list of misspelled words used by cspell. I think it we should conform to current patterns and change it.
There are existing interfaces in core using the word 'override';
$ find . -iname \*override\*interface\* -not -path '*tests/*' -not -path '*vendor*' ./core/lib/Drupal/Core/Config/ConfigFactoryOverrideInterface.php ./core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php ./core/modules/layout_builder/src/OverridesSectionStorageInterface.php ./core/modules/language/src/Config/LanguageConfigFactoryOverrideInterface.php
Will
LayoutBuilderOverrideInterface
convey the same meaning?Setting to NW for naming. At least, we should not be using, 'overridable'
- π¦πΊAustralia mstrelan
In that case we need to rename isOverridable method to canBeOverridden. I'd have to disagree with this. We have things like Stringable, I think this is fine as is.
- Status changed to RTBC
10 months ago 8:40am 26 February 2024 - π¦πΊAustralia acbramley
The word already has precedent in the method name
isOverridable
so I'm not sure how it could be against cspell? It definitely is a word in the english language, do we need to expand the dictionary?Changing the semantics of this and having to do BC for changing the method name seems like unnecessary busy work.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
- π¬π§United Kingdom longwave UK
Agree that renaming the existing methods is out of scope here, we just want to add a shared interface to the hierarchy.
Committed and pushed a99e0b5763 to 11.x and 277cf4a8bb to 10.3.x. Thanks!
-
longwave β
committed 277cf4a8 on 10.3.x
Issue #2985362 by DanielVeza, tim.plunkett, mstrelan, quietone, kim....
-
longwave β
committed 277cf4a8 on 10.3.x
- Status changed to Fixed
9 months ago 12:13pm 13 March 2024 -
longwave β
committed a99e0b57 on 11.x
Issue #2985362 by DanielVeza, tim.plunkett, mstrelan, quietone, kim....
-
longwave β
committed a99e0b57 on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.