我正在开发这个软件包:https://github.com/craftisan/laravel-seo作为laravel admin的扩展,虽然需要通过composer将其放入laravel项目中,但我遇到了以下错误(请参见此处的github问题):
% composer require craftisan/laravel-seo --ignore-platform-reqs Using version dev-master for craftisan/laravel-seo ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 1 install, 0 updates, 0 removals - Installing craftisan/laravel-seo (dev-master 96e32bc): Cloning 96e32bc192 from cache Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead. Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead. Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead. Writing lock file Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255 Installation failed, reverting ./composer.json to its original content.
我尝试调试了很多,检查了配置文件语法,甚至在artisan中从包中倾倒输出:发现命令,但什么也没找到。
存储/
你知道为什么会这样吗?
固定的
在新的laravel应用程序中安装了相同的软件包。显然,到配置文件的相对链接已断开,但是composer安装
没有给出错误跟踪。在\uuuuu DIR\uuuuuu
之后错过了前面的/
:
// Publish configuration
$this->publishes([
__DIR__ . '../config/seo.php' => config_path('seo.php'),
// fix: __DIR__ . '/../config/seo.php' => config_path('seo.php'),
], 'seo');