Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Sequences

Security covered Under active development 7 sites

This module provides a service to generate unique sequences of IDs, replacing a deprecated core feature. It allows developers to request the next ID in a named sequence, with optional configuration for offsets per entity type to prevent conflicts.

The method `Drupal\Core\Database\Connection::nextId()` and the `sequences` table are deprecated in Drupal 10 and are
removed from Drupal 11. See https://www.drupal.org/node/3349345

This module brings back a database driven functionality to get sequences as a service using a simple API.

Usage

$sequence_name = 'my_sequence';
$next_id = \Drupal::service('sequences.generator')->nextId($sequence_name);

Furthermore you can configure offsets per entity type. This can avoid ID conflicts when syncing entities between instances.

Drupal 10–11

Ask your assistant about Sequences

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
May 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1 Stable 10–11 Oct 10, 2025
1.0.0 Stable 10–11 May 20, 2025
1.0.x-dev Dev 10–11 May 20, 2025