Skip to content

"Source fallback is disabled. Not trying alternative sources." and preferred-install composer.json #12887

@staabm

Description

@staabm

My composer.json:

{
    "require-dev": {
        "complex/rocket-phpstandba": "^2.4"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.packagist.com/complex-gmbh/"
        },
        {
            "packagist.org": false
        }
    ],
    "config": {
        "preferred-install": {
            "complex/*": "source"
        }
    }
}

Output of composer diagnose:

composer 2.10.0 installed in github-actions via shivammathur/setup-php@v2

starting with todays release we see builds failling with a "Source fallback is disabled. Not trying alternative sources." error:

- Syncing complex/rocket-phpstan (5.0.4) into cache
Failed to download complex/rocket-phpstan from source: Failed to execute git clone --mirror -- ***github.com/complex-gmbh/php-rocket-phpstan.git /home/runner/.cache/composer/vcs/git-github.com-complex-gmbh-php-rocket-phpstan.git/
Cloning into bare repository '/home/runner/.cache/composer/vcs/git-github.com-complex-gmbh-php-rocket-phpstan.git'...
remote: Invalid username or token. Password authentication is not supported for Git operations.
fatal: Authentication failed for 'https://github.com/complex-gmbh/php-rocket-phpstan.git/'
Source fallback is disabled. Not trying alternative sources.

we wonder whether its a bug in composer, that it thinks a source fallback is happening but shouldn't.

the github action in question did not see any changes in the last few days and worked "fine" right before the 2.2.0 release.
while I found the deprecation notices on the composer release blog page, it reads like our above use-case should not be considered a source fallback and work without the need for us adding new opt-in CLI flags

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions