Repository navigation
#105 - New router task - #527
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #105 (second pull request, after #526 which added the
branchestask key andProcessState::setOutputBranch()).A core
routertask dispatches each input to the conditional branches of the task:conditions: by branch name, the conditions ofConditionTrait(match,not_match,empty,not_empty,match_regexp,not_match_regexp) and an optional ExpressionLanguageexpression(the input asdata, the bundle'scleverage_process.expression_languageservice); all of them must hold, a branch without conditions (~) matches every input.mode:first(default, the first matching branch in the order ofconditions) orall(every matching branch).default: the branch of the inputs matching no branch; without it, they go to the error outputs with a warning, never silently lost.~is rejected.error_strategyof the task and never sends the input to the default branch; a missing array key in an expression is an error whatever the PHP error handler (it gavenulland the default branch when the warnings were not converted, e.g. in production).filterpositioned as the task dropping items (router: dispatching them), a warning against{{ }}contextual values in an expression, CHANGELOG.Checked locally:
make quality, and PHPUnit with pcov (1468 tests, none risky), including an integration test with the real services.Requirements
Breaking changes
None: a new task. The PHPDoc types of the branches of
TaskConfigurationaccept integer keys (numeric branch names).🤖 Generated with Claude Code