Guides

How to find outdated Composer packages

By Server.Biz. Updated .

Run composer outdated in your project. It lists every installed package that has a newer release, with the version you have and the latest one. The rest of this guide is about reading that list and deciding what to do first.

The basic command

composer outdated

composer outdated is a short form of composer show --latest --outdated. Each line shows the package, the installed version, the latest version and the package description. The colour, or the symbol when colours are off, says how far behind you are:

Red is the colour that looks urgent, but it is usually the easy part: those updates fit your constraints and a plain composer update installs them.

Options worth knowing

Why the latest version is not installed

When composer update leaves a package behind, something stops it. The usual reasons:

Composer tells you which one it is:

composer why-not laravel/framework 13.0

why-not (also called prohibits) lists every requirement that blocks that version, including the package that sets it.

What to update first

  1. Security advisories. An outdated package is a risk only when the version you run has a known problem. Run composer audit first; see what composer audit checks.
  2. Patch and minor updates. Run composer update, run your tests and deploy. Doing this often keeps each step small. If you want a cautious first round, composer update --patch-only limits it to patch releases.
  3. Abandoned packages. Composer reports packages whose maintainers have marked them abandoned, often with a suggested replacement. They will not get security fixes, so plan the switch.
  4. Major updates, one package at a time, after reading the upgrade guide. See how to check for breaking changes before composer update.

Framework support windows

For your framework, "outdated" can also mean "no longer supported". Laravel gives each major release bug fixes for 18 months and security fixes for 2 years. Symfony supports its long-term releases (the x.4 versions) with bug fixes for 3 years and security fixes for 4 years, and its other releases for 8 months. After that, a security problem in your version is not fixed, so a major upgrade stops being optional.

composer outdated and vgit

composer outdated needs the project and Composer at hand, and it does not show advisories or what a major update changes. vgit works from the lock file alone: paste it and you get outdated packages, security advisories and plain-language breaking changes in one list, ranked by what needs attention first.

Sources