iis服务器助手广告广告
返回顶部
首页 > 资讯 > 后端开发 > PHP编程 >Composer install 报错
  • 467
分享到

Composer install 报错

composerphp 2023-09-09 13:09:35 467人浏览 泡泡鱼
摘要

Composer install 报错 项目构建命令: composer install --no-dev --no-interaction -o --ignore-platfORM-reqs 构建输

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

--结束END--

本文标题: Composer install 报错

本文链接: https://www.lsjlt.com/news/401553.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作