Skip to content

Fatal error: UpstreamRequireCommand::configure() signature incompatible with Composer RequireCommand::configure(): void #20

Description

@laetus007

Summary

Running composer upstream:update-dependencies triggers a fatal error: Declaration of
PantheonSystems\UpstreamManagement\Command\UpstreamRequireCommand::configure() must be compatible with Composer\Command\RequireCommand::configure(): void. The codebase fails to load the upstream-management command class.

Steps to reproduce

  1. Checkout repository and update dependencies (environment where Composer\RequireCommand defines configure(): void).
  2. Run composer update:upstream-dependencies
  3. Observe the fatal PHP error during bootstrap.

Error

PHP fatal error: PHP Fatal error: Declaration of PantheonSystems\UpstreamManagement\Command\UpstreamRequireCommand::configure() must be compatible with Composer\Command\RequireCommand::configure(): void in vendor/pantheon-systems/upstream-management/src/Command/UpstreamRequireCommand.php

Environment

PHP: 8.3.27
Terminus: 4.1.0 (observed user-agent)
Composer - version 2.9.2 2025-11-19

File: vendor/pantheon-systems/upstream-management/src/Command/UpstreamRequireCommand.php

Occurs when Composer uses a Composer version whose RequireCommand::configure() signature includes a return type of : void.

Expected behavior

The package should be compatible with the Composer version in use and not cause a fatal type/signature mismatch on class load.

Suspected cause

  • Method signature mismatch between parent Composer\Command\RequireCommand::configure(): void and child UpstreamRequireCommand::configure() (missing or mismatched return type or visibility).
  • Package does not constrain supported Composer versions or has not been updated to match Composer's method signature changes.

I've added :void to the method locally and am able to proceed at this time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions