w7corp / easywechat

📦 一个 PHP 微信 SDK
https://easywechat.com
MIT License
10.29k stars 2.4k forks source link

Laravel9.0 安装 #2364

Closed zhouws-chn closed 2 years ago

zhouws-chn commented 2 years ago

我用的环境

问题及现象

使用 composer require "overtrue/wechat:^5.0" -vvv 代码安装easywechat,提示使用-W选项升级软件包

添加-W指令后,提示是否信任 easywechat-composer/easywechat-compose,选择 yes后,安装成功提示:

Executing command (CWD): '/usr/bin/php8.1' -d allow_url_fopen='1' -d disable_functions='' -d memory_limit='-1' artisan vendor:publish --tag=laravel-assets --ansi --force 
No publishable resources for tag [laravel-assets]. 
Publishing complete.

执行:php artisan vendor:publish 并没有找到easywechat相关的选项,显示的信息如下:

ubuntu@ubuntu-vm:~/test/blog3$ php artisan vendor:publish

Which provider or tag's files would you like to publish?:
[0 ] Publish files from all providers and tags listed below
[1 ] Provider: Fruitcake\Cors\CorsServiceProvider
[2 ] Provider: Illuminate\Foundation\Providers\FoundationServiceProvider
[3 ] Provider: Illuminate\Mail\MailServiceProvider
[4 ] Provider: Illuminate\Notifications\NotificationServiceProvider
[5 ] Provider: Illuminate\Pagination\PaginationServiceProvider
[6 ] Provider: Laravel\Sail\SailServiceProvider
[7 ] Provider: Laravel\Sanctum\SanctumServiceProvider
[8 ] Provider: Laravel\Tinker\TinkerServiceProvider
[9 ] Provider: Spatie\LaravelIgnition\IgnitionServiceProvider
[10] Tag: cors
[11] Tag: laravel-errors
[12] Tag: laravel-mail
[13] Tag: laravel-notifications
[14] Tag: laravel-pagination
[15] Tag: sail
[16] Tag: sail-bin
[17] Tag: sail-docker
[18] Tag: sanctum-config
[19] Tag: sanctum-migrations

请问这个情况改如何解决呢?

是不是要用Laravel 6.x版本,然后搭配 easywechat 5.x 使用呢?

overtrue commented 2 years ago

easywechat 没有任何东西需要 publish 啊……

zbage commented 2 years ago

overtrue/laravel-wechat 能兼容laravel9 吗?

zbage commented 2 years ago

Your requirements could not be resolved to an installable set of packages.

Problem 1

zhouws-chn commented 2 years ago

easywechat 没有任何东西需要 publish 啊……

那配置文件需要怎么添加呢?有没有在laravel上使用easywechat的文档呢?我看官网的视频教程中需要用publish生成config文件呢