参考文档
常用操作 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 composer --version composer self-update composer self-update --1 composer self-update 1.10.20 composer self-update --rollback composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ composer config --unset repos.packagist -vvv composer install composer install --ignore-platform-reqs composer require monolog/monolog composer remove monolog/monolog COMPOSER_MEMORY_LIMIT=-1 composer require jenssegers/mongodb composer update rm -rv vendor rm composer.lock composer clearcache composer search monolog composer show 列出所有已经安装的包 composer dump-autoload php artisan optimize
杂项
Laravel6.X项目,应使用1.X版本compser,避免install时报错
composer install 报错 1 2 3 4 > @php artisan package:discover In PackageManifest.php line 122: Undefined index: name Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
https://exerror.com/packagemanifest-php-line-122-undefined-index-name/
115行左右
1 2 3 $installed = json_decode($this ->files->get($path ), true );$packages = $installed ['packages' ] ?? $installed ;