Composer install 报错

Composer install 报错

项目构建命令:
composer install --no-dev --no-interaction -o --ignore-platform-reqs
构建输出:没有错误,陷入死循环
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: elfsundae/laravel-hashid
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: intervention/image
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: milon/barcode
Discovered Package: nesbot/carbon
Discovered Package: overtrue/laravel-wechat
Discovered Package: sentry/sentry-laravel
Discovered Package: shallowman/laralog
Discovered Package: tymon/jwt-auth
Package 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 information
Warning: Accessing gitlab.zz-med-stg.com over http which is an insecure protocol.
                                                                                 
Updating dependencies
Lock 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 file
Installing dependencies from lock file
Package 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 archive
101 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 files
Class 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 --ansi
Discovered Package: elfsundae/laravel-hashid
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: intervention/image
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: milon/barcode
Discovered Package: nesbot/carbon
Discovered Package: overtrue/laravel-wechat
Discovered Package: sentry/sentry-laravel
Discovered Package: shallowman/laralog
Discovered Package: tymon/jwt-auth
Package 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 information
Warning: Accessing gitlab.zz-med-stg.com over http which is an insecure protocol.
                                                                                 
Updating dependencies
Lock 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 file
Installing dependencies from lock file
Package 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 archive
101 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 files
Class 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 --ansi
Discovered Package: elfsundae/laravel-hashid
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: intervention/image
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: milon/barcode
Discovered Package: nesbot/carbon
Discovered Package: overtrue/laravel-wechat
Discovered Package: sentry/sentry-laravel
Discovered Package: shallowman/laralog
Discovered Package: tymon/jwt-auth
Package 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 information
Warning: 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
        }
    },

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值