Repository navigation
fix(task) #22 #23 GetTask and SetTask reject non-array inputs and validate the option values given by the input - #24
Merged
Merged
Conversation
…idate the option values given by the input Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3 tasks
… for the strict coverage metadata Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3 tasks done
This was referenced Sep 30, 2026
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 #22.
Fixes #23.
GetTaskandSetTaskmerged their input over their resolved options witharray_merge(): a non-array input triggered an unrelated\TypeError, and the values given by the input (adapter,key,value) were never validated by the options resolver.AbstractCacheTask::getMergedOptions(): throw an\UnexpectedValueExceptiongiving the task and the received type on a non-array input (GetTask and SetTask fail with an unrelated TypeError on a non-array input #22); resolve the options merged with the input keys matching a defined option, so the input values are validated and the other input keys stay ignored (GetTask and SetTask do not validate the option values given by the input #23)GetTaskTest,SetTaskTest(new): nominal cases, input overriding the options, non-array input and invalid input value (the last two fail without the fix)get_task.md,set_task.md: update "Accepted inputs", remove the note "The values coming from the input are not validated";index.md:getMergedOptions()description for custom cache tasksChecked with process-bundle-demo:
demo.cache.get_invalid_input:GetTask expects an array or null input, string given(array_merge(): Argument #2 must be of type array, string givenbefore)demo.cache.set_invalid_input_option:The option "adapter" with value 1 is expected to be of type "string", but is of type "int".(TypeErrorfromAdapterRegistry::getAdapter()before)demo.cache.set_get: unchangedBoth issues are fixed in the same PR because they change the same method.
Requirements
Breaking changes
None for valid inputs. Non-array inputs and invalid input values already made the task fail (or passed an invalid key to the adapter), only the exception changes. A custom task extending
AbstractCacheTasknow gets resolved options fromgetMergedOptions(), including the input values of its own options.🤖 Generated with Claude Code