为什么我运行artisan php总是产生成品?

时间:2019-07-17 10:05:04

标签: laravel

每次我订购php artisan时,它总是产生“完成”。

bromindo-3:firecek_web bromindo$ composer dumpautoload
Generating optimized autoload files
Warning: Ambiguous class resolution, "App\Console\Kernel" was found in both "/Applications/XAMPP/xamppfiles/htdocs/firecek_web/app/Console/Kernel.run.php" and "/Applications/XAMPP/xamppfiles/htdocs/firecek_web/app/Console/Kernel.php", the first will be used.
Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
    You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
“finished”
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
bromindo-3: firecek_web bromindo$ php artisan --optimize:clear
"finished"

2 个答案:

答案 0 :(得分:0)

首先您的命令是错误的,您应该使用:

php artisan optimize:clear

在优化之前不要使用--,并确保代码中没有dd('finished'),以免打印出来:)

答案 1 :(得分:0)

在代码中搜索单词finished。在Linux上使用grep或在Windows上使用grepwin

该词不必位于var_dump()dd()中。也可以是public/index.php ...等

中的一个配置文件中的一些纯文本

例如config/app.php

....
        'URL' => Illuminate\Support\Facades\URL::class,
        'Validator' => Illuminate\Support\Facades\Validator::class,
        'View' => Illuminate\Support\Facades\View::class,
    ],
];
?>
finished