From 5c0ac89085db18ca5538fb5f773bcf50a401d910 Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Fri, 9 Oct 2026 17:37:51 +0200 Subject: [PATCH] cleverage/process-bundle#117 - Add demo.mapping_array_target_path Co-Authored-By: Claude Opus 5.5 (1M context) --- .../demo.mapping_array_target_path.yaml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 config/packages/process/demo.mapping_array_target_path.yaml diff --git a/config/packages/process/demo.mapping_array_target_path.yaml b/config/packages/process/demo.mapping_array_target_path.yaml new file mode 100644 index 0000000..7be787d --- /dev/null +++ b/config/packages/process/demo.mapping_array_target_path.yaml @@ -0,0 +1,40 @@ +clever_age_process: + configurations: + demo.mapping_array_target_path: + description: > + Write target properties on an array destination with MappingTransformer + (cleverage/process-bundle#117): a simple name and the index notation are written as expected, while a + nested path ("address.city") creates a literal key and triggers a deprecation (it will throw in v6.0) + help: > + Ex: bin/console cleverage:process:execute demo.mapping_array_target_path -vv + (outputs ['name' => 'John', 'address.city' => 'Lyon', 'address' => ['zip' => '69005'], + 'contact.email' => 'john@example.com'], with a deprecation logged for "address.city") + tasks: + entry: + service: '@CleverAge\ProcessBundle\Task\ConstantOutputTask' + outputs: [ transform ] + options: + output: + name: John + city: Lyon + zip: '69005' + email: john@example.com + + transform: + service: '@CleverAge\ProcessBundle\Task\TransformerTask' + outputs: [ debug ] + options: + transformers: + mapping: + mapping: + name: # simple name: "name" key + code: '[name]' + address.city: # nested path: deprecated "address.city" literal key + code: '[city]' + '[address][zip]': # index notation: nested array + code: '[zip]' + '[contact.email]': # index notation: "contact.email" literal key + code: '[email]' + + debug: + service: '@CleverAge\ProcessBundle\Task\Debug\DebugTask'