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
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?