drupal-console icon indicating copy to clipboard operation
drupal-console copied to clipboard

[config:import:single] Provide ability to pass only filename and auto lookup it in default config folder

Open MurzNN opened this issue 4 years ago • 0 comments

At now UX for importing single config is too hard: users must fill full path to config file (not relative, but full from root!), or pass folder (with path from root too?) in separate argument. In command documentation there are two examples:

drupal config:import:single --file="/path/to/file/block.block.default_block.yml"
drupal config:import:single --file="block.block.default_block.yml" --directory="/path/to/directory"

Why so hard?

So please add simpler ways to pass single config names:

  1. Add support for paths, relative to drupal root (why we need always absolute path?):
drupal config:import:single --file="config/sync/block.block.default_block.yml"
  1. If user fill only filename, lookup file into default configuration folder:
drupal config:import:single --file="block.block.default_block.yml"
  1. If user fill only config name (without .yml suffix that can be easily copy-pasted from mass config:import output) - automatically add suffix and lookup file in default config folder (maybe with --name attribute, like in ces command, but better without it):
drupal config:import:single block.block.default_block
  1. Also will be good to pass several config options:
drupal config:import:single block.block.default_block core.entity_view_display.node.news.full

MurzNN avatar Dec 04 '19 08:12 MurzNN