Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Config] ParamConfigurator is not longer respected as scalar-string-value #54852

Copy link
Copy link
@michaljusiega

Description

@michaljusiega
Issue body actions

Symfony version(s) affected

7.1.0-BETA1

Description

After update to BETA released version, I got an error for configuration, where ParamConfigurator is not anymore respected as scalar value.

I don't know what changes cause this issue.

How to reproduce

One of:

use Symfony\Config\FrameworkConfig;

use function Symfony\Component\DependencyInjection\Loader\Configurator\param;

return static function (FrameworkConfig $frameworkConfig): void {
    $frameworkConfig->phpErrors()
        ->log(value: param(name: 'kernel.debug'));
};

Possible Solution

Cast ParamConfigurator to string anyway, when the configuration allows you to pass an object.

use Symfony\Config\FrameworkConfig;

use function Symfony\Component\DependencyInjection\Loader\Configurator\param;

return static function (FrameworkConfig $frameworkConfig): void {
    $frameworkConfig->phpErrors()
        ->log(value: (string) param(name: 'kernel.debug'));
};

Additional Context

obraz
obraz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.