Get Installed PHP Packages using Composer

Get Installed PHP Packages using Composer

When working on PHP projects, it's essential to keep track of the installed packages and their dependencies. This information allows maintaining a clear overview of the project's dependencies, ensure version compatibility, and manage updates effectively. This tutorial demonstrates how to get installed PHP packages using Composer.

The composer show command displays a detailed list of all installed packages in the project. The command outputs information about each package, including the package name, version number and description. By using this command, developers can effectively explore and understand their project's package ecosystem, enabling them to make informed decisions and maintain a robust and up-to-date PHP codebase.

composer show

Here's an example of the output:

symfony/http-client-contracts      v2.5.2  Generic abstractions related to HTTP clients
symfony/polyfill-ctype             v1.27.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-grapheme     v1.27.0 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-normalizer   v1.27.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring          v1.27.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php73             v1.27.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80             v1.27.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/property-access            v5.4.22 Provides functions to read and write from/to an object or array using a simple string notation
symfony/property-info              v5.4.23 Extracts information about PHP class' properties using metadata of popular sources
symfony/serializer                 v5.4.23 Handles serializing and deserializing data structures, including object graphs, into array structures or other f...
symfony/service-contracts          v3.2.1  Generic abstractions related to writing services

Leave a Comment

Cancel reply

Your email address will not be published.