How to find outdated Composer packages
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:
- Green (=): you have the latest version.
- Red (!): a newer version exists that is compatible with yours under semantic versioning, usually a minor or patch release. Composer's advice is to upgrade.
- Yellow (~): the newer version is a new major release, which may contain breaking changes. Upgrading may take work.
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
--direct(-D): only the packages in your own composer.json. Start here: these are the ones you control.--patch-only,--minor-onlyand--major-only: only one size of update.--locked: read composer.lock instead of the vendor folder, so you can check a project without installing it.--no-dev: leave out development packages, to see what runs in production.--strict: exit with a non-zero code when anything is outdated, for a CI step.--format=json: output for scripts.--ignore=vendor/package: hide a package you have decided not to update for now.
Why the latest version is not installed
When composer update leaves a package behind, something stops it. The usual reasons:
- Your constraint does not allow it:
^12.0never installs 13.0. - The new version needs a newer PHP version or an extension you do not have.
- Another package in your project requires an older version.
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
- Security advisories. An outdated package is a risk only when the version you run has a known problem. Run
composer auditfirst; see what composer audit checks. - 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-onlylimits it to patch releases. - 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.
- 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.