swoft/swoole-ide-helper

Swoft 和 Swoole 的 IDE 辅助工具

v4.4.8 2019-10-17 09:54 UTC

This package is auto-updated.

Last update: 2024-09-18 11:48:38 UTC


README

Latest Stable Version Packagist License

添加对 swoole 扩展的 IDE 辅助工具,从 swoole/ide-helper 分支出来

swoft/swoole-ide-helper 保持与 swoole 相同的版本

与 swoole/ide-helper 的差异

与源代码库不同:为大多数方法参数添加了变量类型,以便于参考。

旧:

/**
 * @param $fd
 * @param $data
 * @param $opcode
 * @param $finish
 * @return mixed
 */
public function push($fd, $data, $opcode = null, $finish = null){}

现在:

/**
 * @param int $fd
 * @param mixed $data
 * @param int $opcode
 * @param bool $finish
 * @return mixed
 */
public function push(int $fd, $data, int $opcode = null, bool $finish = null){}

安装

Swoft 使用它作为默认工具。

您可以通过 composer 添加它

composer require --dev swoft/swoole-ide-helper

# use latest code
composer require --dev swoft/swoole-ide-helper@dev-master

# for specific version
composer require --dev swoft/swoole-ide-helper:~4.4.2

构建

您可以在本地重新生成它。

当然,您必须确保 swoole 扩展已经安装。

cd /path/to/swoole-ide-helper
php dump.php

通过 Docker

docker run -ti --rm -v /path/to/swoole-ide-helper:/var/www/swoft swoft/swoft bash
php dump.php

许可协议

查看 许可协议