Composer
Composer 2012, inspired by npm
, with composer.json
and per-project ./vendor/
Composer Docs
jakoch/awesome-composer: A curated awesome list for Composer, Packagist, Satis, Plugins, Scripts, Composer related resources, tutorials.
Composer (software) - Wikiwand
How to Install and Use PHP Composer on Linux Distributions
{
"require": {
"vendor/package": "1.3.2",
"vendor/package2": "1.*",
"vendor/package3": "^2.0.3"
}
}
composer diagnose
# add package
composer require <pacakage>
# add global package
composer global require <pacakage>
Global package location:
- Windows:
%USERPROFILE%\AppData\Roaming\Composer\vendor\bin
- macOS:
$HOME/.composer/vendor/bin
- GNU / Linux Distributions:
$HOME/.config/composer/vendor/bin
or$HOME/.composer/vendor/bin
Packagist repository
Autoloader
PSR-0: Autoloading Standard - PHP-FIG
PSR-4: Autoloader - PHP-FIG
Basic usage Autoloading - Composer
Autoloader optimization - Composer
<?php
require __DIR__ . "/vendor/autoload.php";
// your app code
?php>
PEAR
obsolete
PEAR - PHP Extension and Application Repository 1999, global pear/
PEAR - Wikiwand