Change record status: 
Project: 
Introduced in branch: 
12.0.x
Introduced in version: 
12.0.0
Description: 

Most methods that were documented with @return void now declare a native : void return type. Classes that implement or override these methods must add : void to their method signature, or PHP will throw a fatal error.

Interfaces

  • \Drupal\node\NodeGrantDatabaseStorageInterface::alterQuery()

Classes

  • \Drupal\Component\Diff\DiffFormatter: _block(), _start_diff(), _start_block(), _end_block(), _lines(), _context(), _added(), _deleted(), _changed()
  • \Drupal\Core\Diff\DiffFormatter: overrides of the methods above
  • \Drupal\block\BlockPluginCollection::addInstanceId()
  • \Drupal\Component\Annotation\Doctrine\StaticReflectionParser::parse()

Test traits

  • \Drupal\Tests\PerformanceTestTrait::assertCountBetween()

Adding : void is compatible with Drupal 11, so modules can make this change now without dropping 11.x support.

Impacts: 
Module developers