swoft / component
基于swoole的微服务框架
v2.0.11
2021-05-07 16:51 UTC
Requires
- php: >7.1.0
- ext-json: *
- ext-mbstring: *
- ext-pdo: *
- ext-sockets: *
- doctrine/annotations: ^1.6
- monolog/monolog: ^1.24
- nikic/php-parser: ~4.2
- php-di/phpdoc-reader: ^2.0
- psr/container: ^1.0
- psr/http-message: ^1.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- symfony/yaml: ^4.3
- toolkit/cli-utils: ^1.0
- vlucas/phpdotenv: ^3.4
Requires (Dev)
- phpunit/phpunit: ^7.5 || ^8.0
- swoft/swoole-ide-helper: dev-master
Replaces
- swoft/annotation: v2.0.11
- swoft/aop: v2.0.11
- swoft/bean: v2.0.11
- swoft/config: v2.0.11
- swoft/connection-pool: v2.0.11
- swoft/console: v2.0.11
- swoft/db: v2.0.11
- swoft/error: v2.0.11
- swoft/event: v2.0.11
- swoft/framework: v2.0.11
- swoft/http-message: v2.0.11
- swoft/http-server: v2.0.11
- swoft/i18n: v2.0.11
- swoft/log: v2.0.11
- swoft/process: v2.0.11
- swoft/proxy: v2.0.11
- swoft/redis: v2.0.11
- swoft/rpc: v2.0.11
- swoft/rpc-client: v2.0.11
- swoft/rpc-server: v2.0.11
- swoft/server: v2.0.11
- swoft/stdlib: v2.0.11
- swoft/task: v2.0.11
- swoft/tcp: v2.0.11
- swoft/tcp-server: v2.0.11
- swoft/test: v2.0.11
- swoft/validator: v2.0.11
- swoft/websocket-server: v2.0.11
This package is auto-updated.
Last update: 2024-09-20 15:47:10 UTC
README
此仓库用于管理所有swoft核心组件。
中文说明
中文说明请查看README.zh-CN.md
重要
所有组件将不会在ext组件的原始仓库中修改,必须在此仓库中修改,也请在此仓库中提交和推送,然后由@swoft-bot通过git subtree push
同步到组件的原始仓库,注意此操作需要由仓库所有者触发。
用法
将require添加到composer.json
"require": { "swoft/ext": "dev-master as 2.0" }
安装
composer update
单元测试
为组件快速运行测试
// For all components ./phpunit.sh all // For multi components ./phpunit.sh db event // For one component ./phpunit.sh event
仅测试特定组件
./phpunit.sh event
// use run.php
php run.php -c src/event/phpunit.xml
// filter test method name
php run.php -c src/event/phpunit.xml --filter testAddModule
输出覆盖率数据
// output coverage. require xdebug ext phpunit --coverage-text // output coverage without xdebug phpdbg -dauto_globals_jit=Off -qrr /usr/local/bin/phpunit --coverage-text phpdbg -dauto_globals_jit=Off -qrr run.php --coverage-text -c src/event/phpunit.xml
版本发布
请参阅https://github.com/swoftlabs/swoft-releasecli
文档
讨论
- 论坛https://github.com/swoft-cloud/forum/issues
- Gitter.im https://gitter.im/swoft-cloud/community
- Reddit https://www.reddit.com/r/swoft/
- QQ群1: 548173319
- QQ群2: 778656850
贡献
开发团队欢迎您向我们提交PR(拉取请求),但为确保代码质量和统一风格,请访问官方主仓库swoft/swoft和开发仓库,注意贡献代码时的代码和提交格式。
提交PR时的注意事项
- 请勿向每个子仓库提交PR,它们都是只读的
- 核心组件的开发仓库是swoft/swoft-component
- 扩展组件的开发仓库是swoft/swoft-ext
- 请
fork
相应的开发仓库。修改后,请将您的PR提交到相应的开发仓库。
新版本发布时,官方会同步代码到各个子仓库
提交信息
- 提交信息只能使用英文
- 请尽量确保提交信息是有意义的
- 最好以关键字
add:
update:
fix:
开始
代码风格
- 提交的PHP代码必须遵循PSR-2代码风格
- 合理的、有意义的类、方法、变量命名
- 适当的注释,合理使用空白行以保持代码简洁易读
- 不要包含一些无意义的信息,如
@author
等。(作者可以从提交日志中看到)