-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Config] ParamConfigurator is not longer respected as scalar-string-value #54852
Comments
Can you figure out which change trigger this regression? |
As far as I know is:
#52843 this change is the closest to regression, but I could be wrong. Edit: I think, I found something ! In 7.0 (https://github.com/symfony/symfony/blob/7.0/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php#L150) each In 7.1 collected configs are loaded directly by https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php#L157 without processing values by using My suggestion to fix this problem: Subject: [PATCH] Fixed non-processed configs
diff --git a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php
--- a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php
+++ b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php
@@ -27,6 +27,7 @@
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
+use Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator;
/**
* FileLoader is the abstract class used by all built-in loaders that are file based.
@@ -229,6 +230,8 @@
final protected function loadExtensionConfig(string $namespace, array $config): void
{
+ $config = AbstractConfigurator::processValue($config);
+
if (!$this->prepend) {
$this->container->loadFromExtension($namespace, $config); |
@nicolas-grekas Can We move further this issue ? I think it's important blocker, somebody who using PHP config. |
…ig loader (yceruto) This PR was merged into the 7.1 branch. Discussion ---------- [DependencyInjection] Fix prepending strategy for php config loader | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #54852 | License | MIT working towards fixing #54970 Commits ------- a7ecb85 Fix prepending strategy for php config loader
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 asscalar
value.I don't know what changes cause this issue.
How to reproduce
One of:
Possible Solution
Cast
ParamConfigurator
to string anyway, when the configuration allows you to pass an object.Additional Context
The text was updated successfully, but these errors were encountered: