Install

Works with Drupal: ^9.3 || ^10 || ^11 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 34.35 KB
MD5: bc44b4de7d9ad64d4252ab14a92eb2da
SHA-1: b0e311cca2d2a0ee2834ecc269ca87d12aa24ad1
SHA-256: 0e0457f65e0d262aca425fb199dcbd6bc94498402b6534ac6941b3b145b7d98e
Download zip 59.29 KB
MD5: 84bdce6b7814dff055bf0ad2cc8d60ae
SHA-1: 7354930393ddd15f7dc556f66d99527f245f90ee
SHA-256: b8f886408f7f1d3a8d9c0c493c0aa2f862bac80227166f479602223438a89be8

Release notes

Drupal 12 compatibility

#3597716 The module now declares compatibility with Drupal 12. core_version_requirement is ^9.3 || ^10 || ^11 || ^12. Upgrade Status reports no known issues for the module on Drupal 11.4, and the test suite passes there. The module has not been run on a Drupal 12 site yet, so please report anything you find.

The errors that Upgrade Status still listed after the automated fixes are resolved: the list builder no longer injects the entity storage directly and follows the getDefaultOperations() signature of Drupal 11.3, and EntityLimitAddForm::save() returns the save status.

API changes

The hook implementations moved to Drupal\entity_limit\Hook\EntityLimitHooks, which is registered as a service and receives its dependencies through the constructor. The functions in entity_limit.module remain as #[LegacyHook] wrappers for core versions without object oriented hooks.

Added the Drupal\entity_limit\Attribute\EntityLimit plugin attribute. On Drupal 10.2 and later EntityLimitPluginManager discovers plugins by attribute and by annotation, on older core versions by annotation only. The @EntityLimit annotation keeps working, so custom plugins need no change. RoleLimit and UserLimit keep their annotations on this branch.

EntityLimitListBuilder no longer overrides the constructor and createInstance(), and EntityLimitPluginBase no longer overrides the constructor. All three only repeated their parent, so classes that extend them and call the parent keep working.

EntityLimitListBuilder::getDefaultOperations() accepts the optional CacheableMetadata parameter and adds the user.permissions cache context to it.

Known limitations

Three deprecations remain, all of them for Drupal 13: the @EntityType annotation on the entity type and the @EntityLimit annotation on the two plugins that ship with the module. They cannot be replaced on 3.0.x without dropping the older core versions and are left for 3.1.x.

The limitation tracked in #3620956 is unchanged in this release: limits are only enforced on entity types whose creation path checks entity create access.

Plans for 3.1.x

A 3.1.x branch is planned and has not been opened yet. It is meant to support Drupal 11 and 12, and Drupal 13 once it is available, to merge the two plugin interfaces into EntityLimitPluginInterface again, and to declare the plugins and the entity type with attributes. Drupal 9 and 10 stay on 3.0.x. See README.md for details.

Upgrading

This release adds no database updates. Rebuild caches after upgrading, because the hook implementations are now provided by a new service. Sites upgrading from a release older than 3.0.0-beta4 still need to run database updates for the post updates introduced there.

Created by: orkutmuratyilmaz
Created on: 7 Oct 2026 at 10:34 UTC
Last updated: 7 Oct 2026 at 10:35 UTC
New features

Other releases