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.

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

Method "Symfony\Component\DependencyInjection\ContainerInterface::getParameter()" will return "array|bool|string|int|float|null" as of its next major version. Doing the same in implementation "Drupal\Component\DependencyInjection\Container" will be required when upgrading.

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

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

Steps to reproduce

Proposed resolution

Add the return type hints.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#3 3238485-3.patch4.44 KBdaffie

Comments

daffie created an issue. See original summary.

daffie’s picture

daffie’s picture

longwave’s picture

Status: Postponed » Needs review

This needs to be committed to at least 10.0.x so we can upgrade to Symfony 5.4.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

  • catch committed 21d2543 on 10.0.x
    Issue #3238485 by daffie: [Symfony 6] Add return type hints to the class...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 21d2543 and pushed to 10.0.x. Thanks!

Real test failures in 9.3 so looks like this is 10.x-only. We can revive it if we find something that needs backporting after all.

longwave’s picture

9.3 is running into #3232095: [Symfony 6] Refactor the "update.root" service to return an object not a string which is 9.4 only; adding a 9.4 test to see what happens there.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.