[英]What are the Differences Between “php artisan dump-autoload” and “composer dump-autoload”?
I am pretty new to Laravel 4 and Composer.我对 Laravel 4 和 Composer 很陌生。 While I do Laravel 4 tutorials, I couldn't understand the difference between those two commands;当我做 Laravel 4 教程时,我无法理解这两个命令之间的区别; php artisan dump-autoload
and composer dump-autoload
What's the difference between them? php artisan dump-autoload
和composer dump-autoload
什么区别?
Laravel's
Autoload
is a bit different: Laravel's
Autoload
有点不同:
It will in fact use Composer
for some stuff
它实际上会使用Composer
来处理一些stuff
It will call Composer
with the optimize flag
它将使用优化flag
调用Composer
It will ' recompile
' loads of files creating the huge bootstrap/compiled.php
它将“ recompile
”大量文件,创建巨大的bootstrap/compiled.php
And also will find all of your Workbench packages and composer dump-autoload
them, one by one.并且还会一一找到您的所有 Workbench 包和composer dump-autoload
它们。
php artisan dump-autoload
在 Laravel 5 上被弃用,所以你需要使用composer dump-autoload
composer dump-autoload作曲家转储自动加载
PATH vendor/composer/autoload_classmap.php
Composer dump-autoload
won't download a thing. Composer dump-autoload
不会下载任何东西。autoload_classmap.php
).它只是重新生成需要包含在项目中的所有类的列表 ( autoload_classmap.php
)。autoload_classmap.php
also includes the providers
in config/app.php
autoload_classmap.php
还包括config/app.php
的providers
php artisan dump-autoload php artisan 转储自动加载
Composer
with the optimize flag它将使用优化标志调用Composer
recompile
' loads of files creating the huge bootstrap/compiled.php
它将“ recompile
”大量文件,创建巨大的bootstrap/compiled.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.