Skip to content

Add : void to ComposerUpdateDrupalCommand::initialize() for Composer compatibility#12

Merged
lpeabody merged 1 commit into
mainfrom
fix/initialize-void-return
Jun 2, 2026
Merged

Add : void to ComposerUpdateDrupalCommand::initialize() for Composer compatibility#12
lpeabody merged 1 commit into
mainfrom
fix/initialize-void-return

Conversation

@lpeabody

@lpeabody lpeabody commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The command overrides initialize() without the : void return type that Composer's BaseCommand::initialize(): void declares. Under a modern Composer this is a fatal "declaration must be compatible" error that aborts any composer command in a project that installs this plugin — currently breaking CI in downstream packages (e.g. digitalpolygon/polymer-drupal).

Adds the : void return type. configure(): void and execute(): int were already correct; this is the only affected method.

A 2.0.3-alpha prerelease will be cut from main once this merges so downstream ^2@dev consumers pick it up.

🤖 Generated with Claude Code

Composer's BaseCommand::initialize() declares a : void return type. The override omitted it, causing a fatal "declaration must be compatible" error on any composer command in projects that install this plugin under a modern Composer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lpeabody
lpeabody merged commit 0f4b236 into main Jun 2, 2026
@lpeabody
lpeabody deleted the fix/initialize-void-return branch June 2, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant