diff --git a/app/Console/Commands/Bundle/Upgrade.php b/app/Console/Commands/Bundle/Upgrade.php index cfda19b..a58bc8a 100644 --- a/app/Console/Commands/Bundle/Upgrade.php +++ b/app/Console/Commands/Bundle/Upgrade.php @@ -34,11 +34,13 @@ public function handle() foreach ($bundles as $bundle) { $this->output->write(sprintf('Upgrading %s... ', $bundle->getPath())); - $currentKeywords = $bundle->metadata('metadata')->get('miscKeywords'); + $currentOtherKeywords = $bundle->metadata('metadata')->get('Autres mots-clé', []); + $currentKeywords = $bundle->metadata('metadata')->get('Mots-clé', []); + $merged = array_replace_recursive($currentKeywords, $currentOtherKeywords); - if (!empty($currentKeywords)) { - $bundle->metadata('metadata')->set('Mots-clé', $currentKeywords); - $bundle->metadata('metadata')->remove('miscKeywords'); + if (!empty($merged)) { + $bundle->metadata('metadata')->set('Autres mots-clé', $merged); + $bundle->metadata('metadata')->remove('Mots-clé'); } $currentPeople = $bundle->metadata('metadata')->get('miscPeople'); diff --git a/resources/schemas/metadata.json b/resources/schemas/metadata.json index 49e9f9c..28b1b58 100644 --- a/resources/schemas/metadata.json +++ b/resources/schemas/metadata.json @@ -9,7 +9,7 @@ "type": "array" } }, - "Mots-clé": {}, + "Autres mots-clé": {}, "Personnalités": {}, "Détails": {}, "Sagas": {},