-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected: 5.3.0-BETA1
Description
When a config class is generated, config classes in their constructor are missing their namespace. This is because in
$code = 'array_map(function($v) { return new '.$p->getType().'($v); }, $value["ORG_NAME"]);'; |
getType
does not include it.
How to reproduce
See #40921 (comment)
In my cache.php
config file
$config->cache(['pools' => [[
'adapters' => 'my.dedicated.cache',
]]]);
calls Symfony\Config\Framework\CacheConfig
constructor, which contains
if (isset($value["pools"])) {
$this->pools = array_map(function($v) { return new PoolConfig($v); }, $value["pools"]);;
unset($value["pools"]);
}
PoolConfig
is in the Symfony\Config\Framework\Cache
namespace so it results in
Attempted to load class "PoolConfig" from namespace "Symfony\Config\Framework".
Did you forget a "use" statement for another namespace?