Problem/Motivation

Method "Symfony\Component\DependencyInjection\Dumper\DumperInterface::dump()" will return "string|array" as of its next major version. Doing the same in implementation "Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper" will be required when upgrading.

Steps to reproduce

Proposed resolution

Add the "string|array" return type hint.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3232092-2.patch643 bytesdaffie

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
StatusFileSize
new643 bytes

I could not find any overrides of the method Symfony\Component\DependencyInjection\Dumper\DumperInterface::dump() in contrib. All the dump methods are doing something else. See: Symfony\Component\DependencyInjection\Dumper\DumperInterface::dump().

mondrake’s picture

Union types are a PHP 8+ thing, https://wiki.php.net/rfc/union_types_v2

So this cannot be merged in D9, will have to wait D10, I guess

daffie’s picture

Priority: Normal » Critical
Issue tags: +Drupal 10

Part of the Symfony 6 in D10 initiative.

daffie’s picture

Version: 9.3.x-dev » 10.0.x-dev
longwave’s picture

Status: Needs review » Reviewed & tested by the community

  • catch committed e3e4995 on 10.0.x
    Issue #3232092 by daffie, mondrake: [Symfony 6] Add "string|array" to...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed e3e4995 and pushed to 10.0.x. Thanks!

Status: Fixed » Closed (fixed)

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