Show Menu

Composer Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Package Details

composer show -i
List installed packages
composer show <pa­cka­ge>
Show details for package
composer install <pa­cka­ge>
Install a package

Installing & Updating

composer install
Install packages according to compos­er[.js­on|.lock]
composer update <pa­cka­ges>
Update packages according to compos­er.json
Keep in mind how compos­er.json and compos­er.lock mechanism works! Check this page for a refresh https:­//b­log.en­gin­eya­rd.c­om­/20­14/­com­pos­er-­its­-al­l-a­bou­t-t­he-­loc­k-file

Package depend­encies

composer depends <pa­­ck­a­g­e>
Who requires a package?