我是Laravel的全新人物 . 我使用Vagrant和虚拟机,所以我在那里安装了composer a和laravel安装程序 . 当我每次看到它还安装了许多其他应用程序时创建新项目 . 它说
制作应用程序...使用包信息加载composer存储库从锁定文件安装依赖项(包括require-dev)包操作:70次安装,0次更新,0次删除
然后列出它安装的应用程序列表
- Installing doctrine/inflector (v1.3.0): Loading from cache
- Installing doctrine/lexer (v1.0.1): Loading from cache
- Installing dragonmantank/cron-expression (v2.0.0): Loading from cache
- Installing erusev/parsedown (1.7.1): Loading from cache
- Installing vlucas/phpdotenv (v2.4.0): Loading from cache
- Installing symfony/css-selector (v4.0.6): Loading from cache
- Installing tijsverkoyen/css-to-inline-styles (2.2.1): Loading from cache
- Installing symfony/polyfill-php72 (v1.7.0): Loading from cache
- Installing symfony/polyfill-mbstring (v1.7.0): Loading from cache
- Installing symfony/var-dumper (v4.0.6): Loading from cache
- Installing symfony/routing (v4.0.6): Loading from cache
- Installing symfony/process (v4.0.6): Loading from cache
- Installing symfony/http-foundation (v4.0.6): Loading from cache
- Installing symfony/event-dispatcher (v4.0.6): Loading from cache
- Installing psr/log (1.0.2): Loading from cache
- Installing symfony/debug (v4.0.6): Loading from cache
- Installing symfony/http-kernel (v4.0.6): Loading from cache
- Installing symfony/finder (v4.0.6): Loading from cache
- Installing symfony/console (v4.0.6): Loading from cache
- Installing egulias/email-validator (2.1.3): Loading from cache
- Installing swiftmailer/swiftmailer (v6.0.2): Loading from cache
- Installing paragonie/random_compat (v2.0.11): Loading from cache
- Installing ramsey/uuid (3.7.3): Loading from cache
- Installing psr/simple-cache (1.0.1): Loading from cache
- Installing psr/container (1.0.0): Loading from cache
- Installing symfony/translation (v4.0.6): Loading from cache
- Installing nesbot/carbon (1.25.0): Loading from cache
- Installing monolog/monolog (1.23.0): Loading from cache
- Installing league/flysystem (1.0.43): Loading from cache
- Installing laravel/framework (v5.6.14): Downloading (100%)
- Installing fideloper/proxy (4.0.0): Loading from cache
- Installing jakub-onderka/php-console-color (0.1): Loading from cache
- Installing nikic/php-parser (v3.1.5): Loading from cache
等等没问题,或者我做错了什么?我用命令
laravel new exampleProject
1 回答
您没有做错任何事情,这是安装Laravel项目依赖项时的预期行为 .
事情是composer不仅安装了该项目
composer.json
中列出的依赖项,而且还依次安装了依赖项的依赖项等 .例如,Laravel应用程序
composer
文件需要以下依赖项:但是作曲家必须确保你还拥有运行这些所需的所有依赖关系,因此它会查看各自的
composer.json
文件,例如laravel/framework
文件,其中包含:它安装它们等等,直到它完成了每一个依赖 .
您可以想象这可以快速加起来,一旦安装,项目中的每个依赖项都列在
composer.lock
文件中,如果您想要检查它们 .这就是为什么你安装了比你想象的更多的依赖项 .