文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

Composer install 报错

2023-09-09 13:55

关注

Composer install 报错

项目构建命令:

composer install --no-dev --no-interaction -o --ignore-platform-reqs

构建输出:没有错误,陷入死循环

> Illuminate\Foundation\ComposerScripts::postAutoloadDump> @php artisan package:discover --ansiDiscovered Package: elfsundae/laravel-hashidDiscovered Package: fideloper/proxyDiscovered Package: fruitcake/laravel-corsDiscovered Package: intervention/imageDiscovered Package: laravel/tinkerDiscovered Package: maatwebsite/excelDiscovered Package: milon/barcodeDiscovered Package: nesbot/carbonDiscovered Package: overtrue/laravel-wechatDiscovered Package: sentry/sentry-laravelDiscovered Package: shallowman/laralogDiscovered Package: tymon/jwt-authPackage manifest generated successfully.69 packages you are using are looking for funding.Use the `composer fund` command to find out more!Loading composer repositories with package informationWarning: Accessing gitlab.zz-med-stg.com over http which is an insecure protocol.                         Updating dependenciesLock file operations: 0 installs, 3 updates, 0 removals  - Downgrading symfony/http-client (v6.2.6 => v5.4.20)  - Downgrading symfony/http-client-contracts (v3.1.1 => v2.5.2)  - Upgrading symfony/http-kernel (v4.4.13 => v4.4.50)Writing lock fileInstalling dependencies from lock filePackage operations: 0 installs, 3 updates, 0 removals  - Downgrading symfony/http-client-contracts (v3.1.1 => v2.5.2): Extracting archive  - Upgrading symfony/http-kernel (v4.4.13 => v4.4.50): Extracting archive  - Downgrading symfony/http-client (v6.2.6 => v5.4.20): Extracting archive101 package suggestions were added by new dependencies, use `composer suggest` to see details.Package overtrue/wechat is abandoned, you should avoid using it. Use w7corp/easywechat instead.Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.Package php-cs-fixer/diff is abandoned, you should avoid using it. No replacement was suggested.Generating optimized autoload filesClass App\Services\Data\Department\DataBoardRoomIdService located in ./app/Services/Data/Department/DataBoardRoomidService.php does not comply with psr-4 autoloading standard. Skipping.> Illuminate\Foundation\ComposerScripts::postAutoloadDump> @php artisan package:discover --ansiDiscovered Package: elfsundae/laravel-hashidDiscovered Package: fideloper/proxyDiscovered Package: fruitcake/laravel-corsDiscovered Package: intervention/imageDiscovered Package: laravel/tinkerDiscovered Package: maatwebsite/excelDiscovered Package: milon/barcodeDiscovered Package: nesbot/carbonDiscovered Package: overtrue/laravel-wechatDiscovered Package: sentry/sentry-laravelDiscovered Package: shallowman/laralogDiscovered Package: tymon/jwt-authPackage manifest generated successfully.69 packages you are using are looking for funding.Use the `composer fund` command to find out more!Loading composer repositories with package informationWarning: Accessing gitlab.zz-med-stg.com over http which is an insecure protocol.                         Updating dependenciesLock file operations: 0 installs, 3 updates, 0 removals  - Upgrading symfony/http-client (v5.4.20 => v6.2.6)  - Upgrading symfony/http-client-contracts (v2.5.2 => v3.1.1)  - Downgrading symfony/http-kernel (v4.4.50 => v4.4.13)Writing lock fileInstalling dependencies from lock filePackage operations: 0 installs, 3 updates, 0 removals  - Downgrading symfony/http-kernel (v4.4.50 => v4.4.13): Extracting archive  - Upgrading symfony/http-client-contracts (v2.5.2 => v3.1.1): Extracting archive  - Upgrading symfony/http-client (v5.4.20 => v6.2.6): Extracting archive101 package suggestions were added by new dependencies, use `composer suggest` to see details.Package overtrue/wechat is abandoned, you should avoid using it. Use w7corp/easywechat instead.Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.Package php-cs-fixer/diff is abandoned, you should avoid using it. No replacement was suggested.Generating optimized autoload filesClass App\Services\Data\Department\DataBoardRoomIdService located in ./app/Services/Data/Department/DataBoardRoomidService.php does not comply with psr-4 autoloading standard. Skipping.> Illuminate\Foundation\ComposerScripts::postAutoloadDump> @php artisan package:discover --ansiDiscovered Package: elfsundae/laravel-hashidDiscovered Package: fideloper/proxyDiscovered Package: fruitcake/laravel-corsDiscovered Package: intervention/imageDiscovered Package: laravel/tinkerDiscovered Package: maatwebsite/excelDiscovered Package: milon/barcodeDiscovered Package: nesbot/carbonDiscovered Package: overtrue/laravel-wechatDiscovered Package: sentry/sentry-laravelDiscovered Package: shallowman/laralogDiscovered Package: tymon/jwt-authPackage manifest generated successfully.69 packages you are using are looking for funding.Use the `composer fund` command to find out more!Loading composer repositories with package informationWarning: Accessing gitlab.zz-med-stg.com over http which is an insecure protocol.

解决办法:

1、 升级composer版本

由composer v2.0.8升至 v2.5.2
composer self-update --stable

升级了版本之后,

报错1:
In PluginManager.php line 738:                         php-http/discovery contains a Composer plugin which is blocked by your allo    w-plugins config. You may add it to the list if you consider it safe.          You can run "composer config --no-plugins allow-plugins.php-http/discovery     [true|false]" to enable it (true) or disable it explicitly and suppress thi    s exception (false)    See https://getcomposer.org/allow-plugins   install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]ERROR: Job failed: command terminated with exit code 1
报错2:
In PluginManager.php line 738:                         easywechat-composer/easywechat-composer contains a Composer plugin which is     blocked by your allow-plugins config. You may add it to the list if you co    nsider it safe.        You can run "composer config --no-plugins allow-plugins.easywechat-composer    /easywechat-composer [true|false]" to enable it (true) or disable it explic    itly and suppress this exception (false)           See https://getcomposer.org/allow-plugins   install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]ERROR: Job failed: command terminated with exit code 1

2、升级后报错解决:

根据报错,在composer.json文件中添加对应插件

"config": {        "allow-plugins": {            "php-http/discovery": false,            "easywechat-composer/easywechat-composer": false        }    },

来源地址:https://blog.csdn.net/weixin_45112997/article/details/128974831

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯