swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 788 forks source link

Swoft2.0.9 RPC组件的依赖问题 #1254

Closed RuizhaoLee closed 4 years ago

RuizhaoLee commented 4 years ago
Q A
Bug report? yes
Feature request? no
Swoft version 2.0.9
Swoole version 4.4.16
PHP version 7.4.4
Runtime environment Mac

Describe the bug 在2.0.9中只使用RPC服务,不加在其他多余composer依赖时:

image

无法启动。报错内容如下:

image

需要加上 "swoft/http-server": "~2.0.0" 依赖才能正常启动

inhere commented 4 years ago

@RuizhaoLee 应该是 devtool 里面使用了http中间件。

你可以将 devtool, http-server 都移到 require-dev 里面,正式环境就不安装dev的包。