argument('path') ?? '/'; $bundles = Bundle::findBundles(Storage::disk(env('CONTENT_DISK')), $path, true); foreach ($bundles as $bundle) { $this->output->write(sprintf('Updating %s... ', $bundle->getPath())); try { $updater = BundleUpdater::getBundleUpdaterFor($bundle); } catch (BundleUpdaterCannotBeFound $ex) { $this->line('Not updatable'); continue; } try { while (!$updater->canUpdateBundle()) { $specs = $updater->formSpecs(); foreach ($specs as $key => $func) { $result = $func(); $bundle->metadata()->set($key, $result); $bundle->save(); } } } catch (UnableToFindWikidataEntityId $ex) { $this->comment('Unable to find wikidata entity Id'); continue; } $updater->update(); $this->info('OK'); } } }