2017 © Pedro Peláez
 

library component

microservice framework base on swoole

image

swoft/component

microservice framework base on swoole

  • Wednesday, August 1, 2018
  • by swoft
  • Repository
  • 10 Watchers
  • 12 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 26 Forks
  • 11 Open issues
  • 4 Versions
  • 40 % Grown

The README.md

Swoft Component

Actions Status Build Status GitHub tag (latest SemVer), (*1)

This repository is used to manage all swoft core components., (*2)

中文说明

中文说明请查看 README.zh-CN.md, (*3)

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., (*4)

Usage

Add require to composer.json, (*5)

"require": {
    "swoft/ext": "dev-master as 2.0"
}

Install:, (*6)

composer update

Unit Tests

Quick run tests for component:, (*7)

// For all components
./phpunit.sh all
// For multi components
./phpunit.sh db event
// For one component
./phpunit.sh event

Only tests an special component:, (*8)

./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:, (*9)

// 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, (*10)

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, (*11)

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, (*12)

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_)

The Versions