laravel 5.7发送邮件,根据官方文档安装报错:
yjl@fibocom:/opt/redmine-4.1.1-0/apps/redminel/htdocs$ composer require guzzlehttp/guzzle
...
Problem 1
- laravel/slack-notification-channel v1.0.3 requires guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.3).
- laravel/framework v5.7.29 requires laravel/slack-notification-channel ^1.0 -> satisfiable by laravel/slack-notification-channel[v1.0.3].
- laravel/framework is locked to version v5.7.29 and an update of this package was not requested.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
根据laravel-ide-helper报错Your requirements could not be resolved to an installable set of packages.文章解决方案,猜想可能是安装的版本与composer.json中不匹配导致。
查看 laravel/slack-notification-channel 包 和 guzzlehttp/guzzle 包发现,默认安装的 guzzlehttp/guzzle 版本是7.3.0 ,而 laravel/slack-notification-channel 中 guzzlehttp/guzzle: ^6.0,意思是 laravel/slack-notification-channel 需要的guzzlehttp/guzzle需要在6.0—7.0之间,所以降低安装的guzzlehttp/guzzle版本,安装成功
composer require guzzlehttp/guzzle v6.5.5
yjl@fibocom:/opt/redmine-4.1.1-0/apps/redminel/htdocs$ composer require guzzlehttp/guzzle v6.5.5
...
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: fideloper/proxy
Discovered Package: laravel/nexmo-notification-channel
Discovered Package: laravel/slack-notification-channel
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
56 packages you are using are looking for funding.
Use the `composer fund` command to find out more!