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
…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>
This was referenced Oct 9, 2026
Draft
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 (draft, milestone v6.0). Draft, attached to the v2.3 milestone: archive v2.3 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 ...UnzipTask::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;initialize()as a no-op: the options depend on the input, so they cannot be validated on initialization. This keeps the current behaviour (on initialization,getOptions()used to returnnullwithout resolving anything);(array)cast instead of?? [](not nullable in v6);cleverage/process-bundle^5.0 || ^6.0.Checked against process-bundle v5 (installed) and v6 (sources of cleverage/process-bundle#253): PHPStan (level 10, no ignore), PHPUnit, PHP-CS-Fixer and Rector pass with both. With v6, the current
mainfails with the fatal error above. Rector would remove the(array)cast once only v6 is supported.Requirements
Breaking changes
None for users of the tasks. Classes extending
ZipTask/UnzipTaskand overridinggetOptions()with a?arrayreturn type must declarearray.🤖 Generated with Claude Code