immusen / yii2-swoole-websocket

yii2-extension for websocket base on swoole, Support JSONRPC called from websocket client or http client or redis publish to do async task or realtime connect.
Apache License 2.0
33 stars 12 forks source link

immusen/yii2-swoole-websocket #2

Closed wuqinqiang closed 5 years ago

wuqinqiang commented 5 years ago

Root package 'immusen/yii2-swoole-websocket' cannot require itself in its composer.json Did you accidentally name your root package after an external package?

这个包装不进去??

immusen commented 5 years ago

感谢支持和反馈 ,经测试验证是可以安装的,暂不明确原因也未复现这个问题,我会继续留意这个问题

暂时可以尝试手动安装 1、解压项目到./vendor/immusen目录下,完整路径:./vendor/immusen/yii2-swoole-websocket

2、添加别名:修改./vendor/yiisoft/extensions.php, 在数据中追加如下代码:

'immusen/yii2-swoole-websocket' =>
  array (
    'name' => 'immusen/yii2-swoole-websocket',
    'version' => '1.11.0.0',
    'alias' =>
    array (
      '@immusen/websocket' => $vendorDir . '/immusen/yii2-swoole-websocket',
    ),
  ),

在./common/config/bootstrap.php中绑定别名也能达到同样效果

3、(非必须)修改./composer.json, 在require代码块中添加

"immusen/yii2-swoole-websocket": "~1.0"
wuqinqiang commented 5 years ago

感谢回复,是我自身的问题,现在好了