- Issue created by @acbramley
- 🇮🇳India libbna New Delhi, India
I’ve only changed the
getDefaultOperations()
method of theConfigEntityListBuilder
class to protected. Is there any other place where this change needs to be reflected or updated? core/modules/block/src/BlockListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/block_content/src/BlockContentTypeListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/comment/src/CommentTypeListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/field_ui/src/FieldConfigListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/filter/src/FilterFormatListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/image/src/ImageStyleListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/menu_ui/src/MenuListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/node/src/NodeTypeListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/responsive_image/src/ResponsiveImageStyleListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/search/src/SearchPageListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/shortcut/src/ShortcutSetListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/taxonomy/src/VocabularyListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/user/src/RoleListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/views_ui/src/ViewListBuilder.php public function getDefaultOperations(EntityInterface $entity) {
Oh, and a couple content entity list builders override as public as well:
core/modules/menu_link_content/src/MenuLinkListBuilder.php public function getDefaultOperations(EntityInterface $entity) { core/modules/menu_link_content/src/MenuLinkListBuilder.php public function getDefaultOperations(EntityInterface $entity) {
I wonder that since these methods are public now, we can't just change them to protected right away, but need to trigger deprecations and add a CR that they will be changed to protected in D12.
- 🇮🇳India libbna New Delhi, India
Hi @godotislate thanks for providing the whole list. So instead of changing it to protected should I add deprecated message?
- 🇨🇭Switzerland berdir Switzerland
I'm not sure how the deprecation message would work. We'd need the differentiate the between internal and external calls, that sounds complicated and slow (checking backtrace?).
These were never meant to be called directly and doing so would be result in incomplete and broken results. Making it protected won't break subclasses, it's possible to extend the visibility of a protected method in the parent class.
I can't find any calls that aren't $this->getDefautOperations(), I'd say we either just do it or we don't bother and leave it?