Skip to content

Remove recipe data from symfony.lock when the contrib recipe is not installed#1078

Merged
GromNaN merged 1 commit intosymfony:2.xfrom
GromNaN:contrib-lock
Apr 2, 2026
Merged

Remove recipe data from symfony.lock when the contrib recipe is not installed#1078
GromNaN merged 1 commit intosymfony:2.xfrom
GromNaN:contrib-lock

Conversation

@GromNaN
Copy link
Copy Markdown
Member

@GromNaN GromNaN commented Jan 14, 2026

Fix #1076

I tested various composer commands with difference values of symfony.lock to find if I can apply a recipe after rejecting it.

1. If the package is removed from symfony.lock (rejected solution)

Command  Install
composer install
composer update
composer recipes:install
composer recipes:install --force
composer recipes:update

2. If the package has no recipe in symfony.lock (this PR)

    "doctrine/mongodb-odm-bundle": {
        "version": "5.5"
    }
Command  Install
composer install
composer update
composer recipes:install
composer recipes:install --force
composer recipes:update

3. If the package has all the recipe informations in symfony.lock (before this PR)

    "doctrine/mongodb-odm-bundle": {
        "version": "5.5",
        "recipe": {
            "repo": "github.com/symfony/recipes-contrib",
            "branch": "main",
            "version": "5.0",
            "ref": "e84b128ea886f70a430eb88de7ac8217611542cc"
        },
        "files": [
            "config/packages/doctrine_mongodb.yaml",
            "src/Document/.gitignore"
        ]
    },
Command  Install
composer install
composer update
composer recipes:install
composer recipes:install --force
composer recipes:update

@GromNaN GromNaN merged commit 51c5ce5 into symfony:2.x Apr 2, 2026
@GromNaN GromNaN deleted the contrib-lock branch April 3, 2026 07:18
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.

Package listed as installed recipe even if recipe-contrib not activated

2 participants