The most useful php composer commands

Mostafa Kamal
Mar 5 · 2 min read

#composer #php #code4mk #0devco

Composer is dependency manager for php package. PHP developers are known about packagist and composer.

Most used php composer commands that will be helpful for you.

# require

require is the most used command

~ specific version

# show

show command return all package name from your project

# outdated

you can see all outdated package, which package hasn’t the latest version

# update

update command updates all outdated commands

~ update specific package

~ update global package

# remove

remove command remove php package from your project

# install

install command first create a composer.lock if not exists composer.lock file. composer lock file contains composer.json all package with version. then install those packages.

# init

init command create your package.json schema with some arguments.

# dump-autoload

autoload is the most important command. This command adds class, alias, provider etc inside vendor’s composer folder.

https://getcomposer.org/doc/03-cli.md

#code4mk #0devco

Hello Laravel

Hello Laravel is a laravel framework publication https: // code4mk.org

Mostafa Kamal

Written by

A code artist ❯ Developer ❯ Designer .👨‍💻

Hello Laravel

Hello Laravel is a laravel framework publication https: // code4mk.org