Fixed
Project:
Entity API
Version:
8.x-1.x-dev
Component:
Core integration
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2025 at 12:57 UTC
Updated:
18 Oct 2026 at 07:39 UTC
Jump to comment: Most recent
Autoloading hooks in the file (entity.views.inc) is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Move the functions in this file to either the .module file or other appropriate location. See https://www.drupal.org/node/3489765
Move the contents of entity.views.inc to the main module file.
Make the changes.
n/a
n/a
n/a
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
damienmckennaThe MR moves entity_views_data().
Comment #4
orkutmuratyilmazTested MR !47 on Drupal 12.0.0-beta1 with Mapillary (https://www.drupal.org/project/mapillary), which uses the Entity API access, permission and query access handlers on four content entity types and
BundleEntityAccessControlHandleron their bundles.Environment
12.0.0-beta1, PHP 8.5.9, PHPUnit 12.5.39, SQLite 3.46.1.3553240-views-inc(ed6eb247).1.0.0-alpha6.The change is needed on Drupal 12
In 12.0.0-beta1,
HookCollectorPassno longer collects thehook_hook_info()group include files; the$module.$group.inchandling from 11.x is gone.entity_views_data()inentity.views.incwould not be found. With the MR it is inentity.module.Mapillary's entity types are not revisionable, so its tests do not reach the revision Views data that
entity_views_data()builds. They cover the rest of the module on Drupal 12.Drupal 12 still refuses to install Entity API
The MR does not change
core_version_requirementinentity.info.yml, which is"^10.1 || ^11"on8.x-1.x. Installing on 12.0.0-beta1 fails:Drupal\Core\Extension\MissingDependencyException: Unable to install modules: module 'entity' is incompatible with this version of Drupal core.Every Functional test of a module that depends on
entitystops there. After adding|| ^12toentity.info.ymllocally (as the lenient next major job of GitLab CI does), everything below passes.Result with
^12added locally@ViewsFieldforentity_link_revisionandentity_link_revision_revert,@Actionforentity_delete_action; #3614512: Convert the remaining plugin annotations to PHP attributes converts them) and return types theDebugClassLoaderasks for (QueryAccessHandler::createInstance(),getEntityLinkTemplate(),ModuleUninstallValidatorInterface::validate()).Could the MR also add
^12tocore_version_requirement, or is that planned in a separate issue?Comment #5
berdirAs usual, I'm not interested in the minimal fix to move the hook, we just have to touch it twice then, lets expand this to convert all hooks to OOP. I'll try to reviewing and merging a few other issues first before working on that myself to minimize conflicts.
Comment #6
berdirComment #8
berdirI'll do a separate issue for D12, plugins and other things.
Comment #10
berdirMerged.
Comment #12
orkutmuratyilmazthank you @berdir for the fix :)