Repository navigation
#94 - TransformerTrait: allow a list syntax for the transformers option - #255
Merged
Merged
Conversation
…accepts a list, whose items are a transformer code without options or a single code: options map, to chain the same transformer without # suffix Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #94.
The
transformersoption ofTransformerTrait(TransformerTask, MappingTransformer, ArrayMapTransformer, CachedTransformer, RulesTransformer, generic transformers) also accepts a list, to chain the same transformer without#suffix. Each item is either:- trimcode: optionsentry:- callback: { callback: array_filter }InvalidArgumentExceptionwith its position.TransformerExceptionmessage, a listed transformer is identified by its code followed by#and its position (Transformation 'callback#1' have failed).#suffixes) is still supported and is not deprecated.A list was not accepted before (integer keys failed with a
TypeError), so this is a pure addition.Checked end-to-end in process-bundle-demo with a
demo.transformer_listprocess (list in a TransformerTask, in the transformers of a mapped property, and in a generic transformer declared in YAML).Requirements
Breaking changes
None.
🤖 Generated with Claude Code