|
|
(同じ利用者による、間の17版が非表示) |
行1: |
行1: |
− | パッケージ管理ツール
| + | [[php/composer/基本]] |
− | node.jsのnpmみたいなもの。
| + | |
| | | |
− | ==ローカルプロジェクトにcomposerインストール==
| + | [[php/composer/psr-4]] |
− | $ curl -s http://getcomposer.org/installer | php
| + | |
− | $ sudo mv composer.phar /usr/local/bin/composer
| + | |
− | $ composer -V
| + | |
− | Composer version e77435cd0c984e2031d915a6b42648e7b284dd5c 2014-07-02 15:44:54
| + | |
| | | |
− | ==使い方==
| + | [[php/composer/http_request2]] |
− | composer.json | + | |
− | {
| + | |
− | "require": {
| + | |
− | "monolog/monolog": ">=1.0.0"
| + | |
− | }
| + | |
− | }
| + | |
| | | |
− | $ php composer.phar install
| + | [[php/composer/guzzle]] |
| | | |
− | ==autoload==
| + | [[php/composer/Eloquent]] |
− | vender/autoload.phpでパッケージを読み込んでくれる。
| + | |
| | | |
− | ==composer.json編集した後の更新==
| + | [[php/composer/grpc]] |
− | composer update
| + | |
− | | + | |
− | ==vendorのdirの名前を変更==
| + | |
− | composer.json
| + | |
− | {
| + | |
− | "require": {
| + | |
− | "monolog/monolog": ">=1.0.0"
| + | |
− | },
| + | |
− | "config": {
| + | |
− | "vendor-dir": "lib/"
| + | |
− | }
| + | |
− | }
| + | |
− | | + | |
− | ==pearのその他install例==
| + | |
− | {
| + | |
− | "repositories": [
| + | |
− | {
| + | |
− | "type": "pear",
| + | |
− | "url": "http://pear.php.net"
| + | |
− | },
| + | |
− | {
| + | |
− | "type": "pear",
| + | |
− | "url": "http://pear.phpunit.de"
| + | |
− | }
| + | |
− | ],
| + | |
− | "require": {
| + | |
− | "pear-phpunit/PHPUnit": "3.4.*",
| + | |
− | "pear-pear/Mail": "1.2.*",
| + | |
− | "pear-pear/Net_SMTP": "1.4.1"
| + | |
− | }
| + | |
− | }
| + | |
− | ==参考==
| + | |
− | http://www.ryuzee.com/contents/blog/5681
| + | |
2023年10月20日 (金) 09:22時点における最新版
php/composer/基本
php/composer/psr-4
php/composer/http_request2
php/composer/guzzle
php/composer/Eloquent
php/composer/grpc