Attribute as key for Symfony configuration

Code
<?php

use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;


class Configuration implements ConfigurationInterface
{
    public function getConfigTreeBuilder()
    {
        $treeBuilder= new TreeBuilder('my_config');
        $rootNode = $treeBuilder->getRootNode();
        
        $rootNode->children()
            ->arrayNode('types')
            ->useAttributeAsKey('typename')
            ->prototype('array')
            ->children()
                ->integerNode('number')
                    ->min(3)
                    ->max(9)
                ->end()
                ->booleanNode('boolean')
                    ->defaultTrue()
                ->end()
                ->scalarNode('string')
                ->end()
            ->end();
        
        return $treeBuilder;
    }
}

$configuration = new Configuration();
$processor = new Processor();

// config is valid and processed
$config = ['my_config' => [
'types' => [
    'foo' => [
        'number' => 5,
        'string' => 'value',
    ],
    'bar' => [
        'number' => 8,
        'string' => 'othervalue',
        'boolean' => false,
    ]]
]];

$config = $processor
    ->processConfiguration($configuration, $config);

foreach($config['types'] as $typename => $subconfig) {
    echo $typename . ':' . PHP_EOL;
    dump($subconfig);
    echo PHP_EOL;
}

Result
foo:
^ array:3 [
"number" => 5
"string" => "value"
"boolean" => true
]


bar:
^ array:3 [
"number" => 8
"string" => "othervalue"
"boolean" => false
]
Used Versions
PHP 8.3, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8