Change record status: 
Project: 
Introduced in branch: 
10.2.x
Introduced in version: 
10.2.0
Description: 

Getting a new batch ID from \Drupal::service('database')->nextId() is now deprecated. It has been replaced by the new method getId() on the batch.storage service. The primary key field of the {batch} table is changed to a serial type. This is part of the effort to deprecate the method \Drupal::service('database')->nextId() and the use of the {sequences} table.

// Before
$batch['id'] = \Drupal::service('database')->nextId();

// After
$batch['id'] = \Drupal::service('batch.storage')->getId();
Impacts: 
Module developers