swoft / component
micro-service framework base on swoole
Installs: 872
Dependents: 1
Suggesters: 0
Security: 0
Stars: 96
Watchers: 17
Forks: 107
Open Issues: 10
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-12-20 16:18:53 UTC
README
This repository is used to manage all swoft core components.
中文说明
中文说明请查看 README.zh-CN.md
IMPORTANT
All components will NOT be modified in the original repository of ext component, SHOULD ALWAYS be modified in this repository, also commit and push to this repository, and then @swoft-bot would sync changes to the original repository of component by git subtree push
, notice that this action needs triggered by the repositories owner.
Usage
Add require to composer.json
"require": { "swoft/ext": "dev-master as 2.0" }
Install:
composer update
Unit Tests
Quick run tests for component:
// For all components ./phpunit.sh all // For multi components ./phpunit.sh db event // For one component ./phpunit.sh event
Only tests an special component:
./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 data:
// 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
Releases
Please see https://github.com/swoftlabs/swoft-releasecli
Document
Discuss
- Forum https://github.com/swoft-cloud/forum/issues
- Gitter.im https://gitter.im/swoft-cloud/community
- Reddit https://www.reddit.com/r/swoft/
- QQ Group1: 548173319
- QQ Group2: 778656850
Contributing
The development team welcomes you to submit PR (Pull Request) to us, but to ensure code quality and uniform style, go to the official main repository swoft/swoft and Development repository, Note the code and commit format when contributing code
Precautions when initiating PR
- Please do not submit PR to each sub-repository, they are all read-only
- The development repository for the core components is swoft/swoft-component
- The development repository for extension components is swoft/swoft-ext
- Please
fork
the corresponding development warehouse. After modification, please submit your PR to the corresponding development warehouse.
Officially syncs code to individual sub-warehouses when new versions are released
Commit Message
- the commit message can only be in English
- Please try to ensure that the commit message is meaningful
- it is best to start with the keyword
add:
update:
fix:
Code Style
- Submitted PHP code Must Follow PSR-2 code style
- Reasonable and meaningful class, method, variable naming
- Appropriate comments, reasonable use of blank lines to keep the code simple and easy to read
- Don't include some meaningless information such as
@author
, etc. (author is that can be seen from the commit log)