Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get List of "Ready to Update" Packages but don't do update #4666

Closed
mtangoo opened this issue Dec 3, 2015 · 7 comments
Closed

Get List of "Ready to Update" Packages but don't do update #4666

mtangoo opened this issue Dec 3, 2015 · 7 comments

Comments

@mtangoo
Copy link

@mtangoo mtangoo commented Dec 3, 2015

I have checked docs and couldn't find any command (or series of commands) to accomplish this. I might be missing something so I need help.
Use Case:
I have an editor that uses composer to manage some of its projects. I want to be able to check for updates for all packages that user have installed and present option to update them if he wishes to. Something similar to Visual Studio NuGet manager.

Is there a way I can use composer to check that? If No, is it possible to write plugin that does so?
I'm ready to write one if it is not so hard (I know PHP but not internals of composer).
Thanks

For those who does not know VS NM
nuget03

@Capenus

This comment has been minimized.

Copy link

@Capenus Capenus commented Dec 3, 2015

composer update --dry-run lists all updates. To update one package you can use composer update package/name

https://getcomposer.org/doc/03-cli.md#update

@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Dec 3, 2015

There is no feature that simply gives you a list of available updates. This functionality has been request a few times, but nobody has actually contributed it as of yet.

@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Dec 3, 2015

Duplicate of #3771

@alcohol alcohol closed this Dec 3, 2015
@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Oct 30, 2017

Not sure why this went into my notifications list; but anyway, the following command now exists:

composer outdated
@beeradmoore

This comment has been minimized.

Copy link

@beeradmoore beeradmoore commented Jan 9, 2018

@alcohol , I think you mean

composer outdated
@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Jan 9, 2018

Correct.

@jlherren

This comment has been minimized.

Copy link

@jlherren jlherren commented Jan 14, 2020

Maybe not so important, but I'd like to point out that composer update --dry-run and composer outdated do not show the same set of updates, so they cannot be used interchangeably, but they're each useful on their own.

composer outdated will show updates that violate version specs in your composer.json. For example it will show phpunit version 8.5.2 even though composer.json says "phpunit/phpunit": "~8.4.0" which forbids any version 8.5.x. `.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.