[11.x] Add void returns for Symfony 7

Created on 9 December 2023, 7 months ago
Updated 13 March 2024, 4 months ago

Problem/Motivation

Symfony 7 has added void returns to a number of methods. These were added as deprecations in Symfony 6 but we worked around them by adding @return tags, which skipped the deprecation for us but still should have notified any downstream subclasses via the Symfony debug classloader. This means that contrib/custom code has been given the chance to catch and now we need to actually add the void returns to core in order to run on Symfony 7.

Steps to reproduce

Proposed resolution

Convert e.g.


  /**
   * {@inheritdoc}
   *
   * phpcs:ignore Drupal.Commenting.FunctionComment.VoidReturn
   * @return void
   */
  public function set($id, $service) {

to


  /**
   * {@inheritdoc}
   */
  public function set($id, $service): void {

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 4 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom longwave UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024