PhpArrayContainer does not resolve a variable that resolves to an array with services properly

Created on 16 June 2016, about 8 years ago
Updated 21 November 2023, 7 months ago

Problem/Motivation

There is a bug in PhpArrayContainer that prevents it to work with an array like:

  $definition['parameters']['array_parameter'] = [
    0 => [
      'foo' => 'bar',
    ],
    1 => [
      'bar' => 'baz',
    ],
  ];

  $definition['services']['service'] = [
     'class' => '\stdClass',
     'arguments' => [
       '%array_parameter',
     ].
  ];

Proposed resolution

Add the missing is_string check.

Remaining tasks

- Fix it

πŸ› Bug report
Status

Closed: outdated

Version

9.5

Component
BaseΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡©πŸ‡ͺGermany Fabianx

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.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    I'm with you @borisson_

    This needs steps to reproduce to show that it's an error.

  • Status changed to Closed: outdated 7 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    The test only patch in #2 failed 7 years ago on Drupal 8.1. Using the patch in #14, I removed the fix, and ran the test. The test passed. Since there is no interdiff I then rerolled the test only patch from #2. Once again the test passed.

    Based on those test results and the lack of comments for 7 years I am closing this as outdated.

    If that is incorrect, make a new issue and reference this one. Thanks.

Production build 0.69.0 2024