entity.api.php is in core/includes. Surely it should be in core/modules/entity?

CommentFileSizeAuthor
#5 entity-2088775-5.patch187 bytestim.plunkett
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

It seems to have a bunch of probably obsolete hooks in it, like I'm pretty sure hook_entity_info() does not exist any more. It used to be in includes because there was no entity module... anyway yeah.

tim.plunkett’s picture

Title: entity.api.php should be in the entity module » Consider moving entity.api.php out of /core/includes

No, none of those hooks are relevant to the entity module, which might be renamed soon to entity_ui module. All of these are part of Drupal\Core\Entity, and we've left those sort of api.php in core/includes.

So either we leave it, start putting api.php files in core/lib/Drupal/Core/*, or move them to system.module

jhodgdon’s picture

Ah. I think in the past we've put other ones in the system directory. Isn't there a theme.api.php file there and some others? Alternatively, maybe all of them should be in core/includes, as that is really where the hooks in them are defined, rather than actually in the System module? or in core/lib? ??

joachim’s picture

All other api.php files live in module folders. Theme.api.php lives in system along with a few others:

modules/system/language.api.php
modules/system/system.api.php
modules/system/theme.api.php

tim.plunkett’s picture

Status: Active » Needs review
FileSize
187 bytes

Great.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

yeah.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again - committed to 8.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.