Drupal is a registered trademark of Dries Buytaert

sequences

4 sites Security covered
View on drupal.org

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.

Activity

Total releases
3
First release
May 2025
Latest release
4 months ago
Release cadence
72 days
Stability
67% stable

Release Timeline

Releases

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