[Symfony 6] Refactor the "update.root" service to return an object not a string

Created on 9 September 2021, almost 3 years ago
Updated 10 September 2023, 9 months ago

Problem/Motivation

Method "Symfony\Component\DependencyInjection\ContainerInterface::get()" will return "?object" as of its next major version. Doing the same in implementation "Drupal\Component\DependencyInjection\Container" will be required when upgrading.

In Symfony 5.4 the above deprecation warning is given that in Symfony 6 the return value must be of the type object. The service "update.root" however returns a string value instead of the in Symfony 6 required object type.

Steps to reproduce

Proposed resolution

Refactor the service "update.root" as that it is no longer used or does return an object.

The return type hint will be added in #3238485: [Symfony 6] Add return type hints to the class methods of Drupal\Component\DependencyInjection\Container β†’ .

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

9.4

Component
UpdateΒ  β†’

Last updated about 16 hours ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @tedbow
  • πŸ‡ΊπŸ‡ΈUnited States @dww
Created by

πŸ‡³πŸ‡±Netherlands daffie

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024