Change record status: 
Project: 
Introduced in branch: 
11.5.x
Introduced in version: 
11.5.0
Description: 

BatchStorageInterface::getId() has been added.

/**
 * Returns a new batch id.
 *
 * @return int
 *   A batch id.
 *
 * @throws \Exception
 *   Thrown when a new batch id could not be generated.
 */
public function getId(): int;

The getId() method already existed on the concrete \Drupal\Core\Batch\BatchStorage service and was being called through the interface type-hint, for example in form.inc. However, getId() was not declared on \Drupal\Core\Batch\BatchStorageInterface, so the interface contract did not match how the service was actually used. Calling getId() on an arbitrary BatchStorageInterface implementation was therefore not guaranteed to work.

Impacts: 
Module developers