private function validateEachCanonicalLocaleExists(array $config)
    {
        $canonicals = $config['canonicals'] ?? [];
        foreach ($canonicals as $locale => $canonical) {
            if (!$this->existsAsLocale($config['locales'], $locale)) {
                throw new InvalidConfig('Canonical key '.$locale.' is not present as locale.');
            }
        }
    }