How can I see upgraded package versions via Composer?

Asked

Viewed 1,379 times

1

It’s nice and beautiful to see Composer installing the reports according to the version we determined in PHP.

I have many applications where I use the Composer and, at that point, needed to update the libraries in all of them, because of a bug that was launched.

I need to install the versions 4.2.3 of a library, which last time I used 4.2.2. However, since there are many systems, I don’t know which ones I’ve updated or not.

How can I view the versions of one or more apps that are currently installed on Composer?

If you can do this, it will be easier, and the systems I detect that already has the version I want installed just ignore and go to the next.

3 answers

3


  • Took -1 why? The answer is right, that’s right. The only problem is that it could have more details

1

The answer above said very well, just use the command composer show, and a list of packages will appear.

I realized that sometimes it is necessary to filter in order to find a specific package, so you do not have to look line by line from the listing of these packages.

In that case I suggest you use the command:

 composer show | grep 'nome_do_pacote'

If nothing has been installed, this command will not return anything on the screen.

0

Another detail of the grep show they quoted above is that you can filter by package owner:

composer show | grep 'proprietario/pacote'

but can filter by owner or only package name using a wildcard character:

composer show | grep 'proprietario/*'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.