Skip to content

UpdateRecipesCommand: add --next option - #1059

Closed
gharlan wants to merge 1 commit into
symfony:2.xfrom
gharlan:recipe-update-cmd-next
Closed

UpdateRecipesCommand: add --next option#1059
gharlan wants to merge 1 commit into
symfony:2.xfrom
gharlan:recipe-update-cmd-next

Conversation

@gharlan

@gharlan gharlan commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

With symfony:recipes:update you can update the recipes, but you have to do it one by one.
I suggest to add a --next option to update the next outdated package. So you do not need to select the next package interactively.

@gharlan

gharlan commented Jun 30, 2025

Copy link
Copy Markdown
Contributor Author

I'm not sure why my new test case fails with

Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

But first I want to ask what do you think about this new option?

@gharlan
gharlan force-pushed the recipe-update-cmd-next branch from 26d22f1 to af3a64b Compare August 2, 2025 15:14
@gharlan
gharlan force-pushed the recipe-update-cmd-next branch from af3a64b to 8c6348b Compare August 2, 2025 15:15
@gharlan
gharlan marked this pull request as ready for review August 2, 2025 15:16

@fabpot fabpot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

}
}
},
"repositories": [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in composer.json should be removed, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the changes I get this error for the new phpunit test case:

1) Symfony\Flex\Tests\Command\UpdateRecipesCommandTest::testCommandUpdatesRecipe with data set #1 (array(true))
Failed asserting that '<warning>Symfony recipes are disabled: "symfony/flex" not found in the root composer.json\n
All packages appear to be up-to-date!\n
' contains "Recipe updated".

That's why I added symfony/flex to this composer.json (it is not the main one). Don't know if there is maybe a better solution?

@nicolas-grekas

nicolas-grekas commented Oct 15, 2025

Copy link
Copy Markdown
Member

Looks like running in non-interactive mode provides the same experience, no?

composer recipes:update -n

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.

3 participants