Composer (php)
Установка
$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer
Устанока пакетов из composer.json
composer --prefer-dist install
Ключи
Справка
composer install -h
composer update -h
composer require -h
install
--prefer-source Forces installation from package sources when possible, including VCS information.
--prefer-dist Forces installation from package dist even for dev versions.
--dry-run Outputs the operations but will not execute anything (implicitly enables --verbose).
--dev Enables installation of require-dev packages (enabled by default, only present for BC).
--no-dev Disables installation of require-dev packages.
--no-custom-installers DEPRECATED: Use no-plugins instead.
--no-autoloader Skips autoloader generation
--no-scripts Skips the execution of all scripts defined in composer.json file.
--no-progress Do not output download progress.
--no-suggest Do not show package suggestions.
-o, --optimize-autoloader Optimize autoloader during autoloader dump
-a, --classmap-authoritative Autoload classes from the classmap only. Implicitly enables `--optimize-autoloader`.
--ignore-platform-reqs Ignore platform requirements (php & ext- packages).
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--profile Display timing and memory usage information
--no-plugins Whether to disable plugins.
-d, --working-dir=WORKING-DIR If specified, use the given directory as working directory.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1for normal output, 2formore verbose output and 3for debug
update
Установка пакета
php composer.phar require --prefer-dist yiisoft/yii2-gii "*"
php composer.phar require --prefer-dist kop/yii2-scroll-pager "dev-master"
php composer.phar require -vvv --prefer-dist webcreate/jquery-ias "dev-master"
Удаление пакета
php composer.phar remove skeeks/cms-shop
Флаги
Установка пакета через конфиг
"kop/yii2-scroll-pager": "dev-master"
Установленные пакеты
php composer.phar show -i
Обновление пакетов
Отключение кеша или его очистка
Отключение
COMPOSER_CACHE_DIR=/dev/null composer install
Очистка
rm -rf "`composer config cache-dir`"
Возникающие ошибки
Расширения
Видеоуроки