Repository navigation
cleverage/process-bundle#143 - ZipTask and UnzipTask: compatibility with process-bundle v6.0 - #24
Draft
njoubert-cleverage wants to merge 1 commit into
Draft
njoubert-cleverage wants to merge 1 commit into
njoubert-cleverage wants to merge 1 commit into
Conversation
This was referenced Oct 9, 2026
Merged
9 tasks
…ons() returns an array and options are not read on initialization, for compatibility with cleverage/process-bundle v6.0 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
njoubert-cleverage
force-pushed
the
process-bundle-143
branch
from
December 1, 2026 14:29
b0027f9 to
8ee6664
Compare
njoubert-cleverage
marked this pull request as ready for review
December 1, 2026 14:29
njoubert-cleverage
marked this pull request as draft
December 1, 2026 14:37
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
Refs cleverage/process-bundle#143, linked to cleverage/process-bundle#253 (merged into
dev-v6, milestone v6.0): this PR must be released before process-bundle v6.0.In process-bundle v6.0,
AbstractConfigurableTask::getOptions()returns anarrayinstead of?array.ZipTaskandUnzipTaskoverride it with a?arrayreturn type, which is then a fatal error (Declaration of ...ZipTask::getOptions(...): ?array must be compatible with ...AbstractConfigurableTask::getOptions(...): array). This PR:arrayreturn type on both overrides (covariant with the v5?array, so it works with v5 and v6), and removes the@phpstan-ignore return.type;getOptions()(from the contextualized options, merged with the input when it is an array), instead of returningnullwhen the input is not an array (execute()already rejects a non-array input before);initialize()as a no-op: the options depend on the input, so they cannot be validated on initialization (the input is alwaysnullthere). This keeps the current behaviour: on initialization,getOptions()used to returnnullwithout resolving anything;max_files/max_sizegiven by the input ofarchive_unzip; the zip bomb checks and the atomic write ofZipTaskare untouched;(array)cast instead of?? [](not nullable in v6);cleverage/process-bundle^5.4|^6.0.Rebased on
main(after v2.6). Checked against process-bundle v5.10 (installed) and v6 (dev-v6sources, with cleverage/process-bundle#253): PHPStan (no ignore), PHPUnit (also with coverage, no risky test), PHP-CS-Fixer and Rector pass with both (Rector would remove the(array)casts once only v6 is supported). With v6, the currentmainfails with the fatal error above. The CI only installs released versions of process-bundle, so^6.0is not tested there until v6.0 is tagged.Requirements
Breaking changes
None for users of the tasks. Classes extending
ZipTask/UnzipTask(@final since 2.3) and overridinggetOptions()with a?arrayreturn type must declarearray.🤖 Generated with Claude Code