0

How do I do change configuration when there is a dash in the yml file?

The configuration is the following one.

source:
  plugin: url
  data_fetcher_plugin: http
  data_parser_plugin: xml
  urls:
    - 'private://migrations/migration.xml'

I need to change it to the following.

source:
  plugin: url
  data_fetcher_plugin: http
  data_parser_plugin: xml
  urls:
    - 'private://migrations/2023-05-01/migration.xml'

I tried the following code, but it does not work.

$this->configFactory()
  ->getEditable('migrate_plus.migration.my_migration')
  ->set('source.urls', $file_values->uri);
$this->configFactory()
  ->getEditable('migrate_plus.migration.my_migration')
  ->set('source.urls', [$file_values->uri]);
3
  • What is the outcome of the things you tried? You haven't mentioned what isn't working here.
    – mona lisa
    Commented May 1, 2023 at 22:01
  • 1
    Did you call save after set?
    – mona lisa
    Commented May 1, 2023 at 22:03
  • Of course ->save();. Smh. Thank you.
    – esod
    Commented May 1, 2023 at 23:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.