src/Knp/DictionaryBundle/Dictionary/Factory/Extended.php
public function create(string $name, array $config): Dictionary
    {
        if (false === $this->factory->supports($config)) {
            throw new InvalidArgumentException(sprintf(
                'The dictionary with named "%s" cannot be created.',
                $name
            ));
        }

        $extends = $config['extends'];

        unset($config['extends']);

        $dictionaries   = [];
        $dictionaries[] = $this->dictionaries[$extends];
        $dictionaries[] = $this->factory->create($name, $config);

        return new Dictionary\Combined($name, $dictionaries);
    }
public function create(string $name, array $config): Dictionary
    {
        if (false === $this->factory->supports($config)) {
            throw new InvalidArgumentException(sprintf(
                'The dictionary with named "%s" cannot be created.',
                $name
            ));
        }

        $extends = $config['extends'];

        unset($config['extends']);

        $dictionaries   = [];
        $dictionaries[] = $this->dictionaries[$extends];
        $dictionaries[] = $this->factory->create($name, $config);

        return new Dictionary\Combined($name, $dictionaries);
    }
{@inheritdoc}