Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 2.06 KB

php.composer.nootbook.md

File metadata and controls

49 lines (33 loc) · 2.06 KB

Composer

Sources

Composer is a tool for dependency management in PHP.

It allows you to declare the dependent libraries your project needs and it will install them in your project for you.

It borrows many ideas from npm and uses basic json files for package definitions. Composer packages are generally published on the packagist, but can also be published & installed from other servers


Install Composer globally

$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

Then, just run composer instead of php composer.phar

Update a phar install with the latest version

$ composer self-update

Table of Contents


Composer Courses | Tutorials | Screencasts


Word definition list

phar

The phar extension provides a way to put entire PHP applications into a single file called a "phar" (PHP Archive) for easy distribution and installation. In addition to providing this service, the phar extension also provides a file-format abstraction method for creating and manipulating tar and zip files through the PharData class, much as PDO provides a unified interface for accessing different databases. Unlike PDO, which cannot convert between different databases, Phar also can convert between tar, zip and phar file formats with a single line of code.