PHPackages                             php-sword/sword - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. php-sword/sword

ActiveProject[Framework](/categories/framework)

php-sword/sword
===============

The PhpSword Framework.

v0.2.2(4y ago)4141Apache-2.0PHP

Since Jul 16Pushed 4y agoCompare

[ Source](https://github.com/php-sword/sword)[ Packagist](https://packagist.org/packages/php-sword/sword)[ RSS](/packages/php-sword-sword/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

PHP-Sword
=========

[](#php-sword)

[![Latest Stable Version](https://camo.githubusercontent.com/661679ada7a25c6a16b457e7ac9ff7c3dc34919b453e4a531989cc5031dadf0d/68747470733a2f2f706f7365722e707567782e6f72672f7068702d73776f72642f73776f72642f76)](//packagist.org/packages/php-sword/sword)[![Total Downloads](https://camo.githubusercontent.com/4d031cec175375d06d2bd1e1912b53db24b1ab572121f6f5d8c4bead8a43dcfa/68747470733a2f2f706f7365722e707567782e6f72672f7068702d73776f72642f73776f72642f646f776e6c6f616473)](//packagist.org/packages/php-sword/sword)[![PHP Version](https://camo.githubusercontent.com/15f8cbb36a1880714ce08f56c01e191bd1cfa52ddd3d449b9a5cbb82f0cf74cb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e332d3838393242462e737667)](http://www.php.net/)[![License](https://camo.githubusercontent.com/9da2e4ca3ac42e650d1f5e24ca348fa0c868917f808a34082bff53be018437ac/68747470733a2f2f706f7365722e707567782e6f72672f7068702d73776f72642f73776f72642f6c6963656e7365)](//packagist.org/packages/php-sword/sword)

```
   _____                      _
  / ____|                    | |  PHP      v7.4.27
 | (_____      _____  _ __ __| |  Swoole   v4.8.6
  \___ \ \ /\ / / _ \| '__/ _` |  Temp Dir /www/dev/Temp
  ____) \ V  V | (_) | | | (_| |  Log Dir  /www/dev/Temp/Log
 |_____/ \_/\_/ \___/|_|  \__,_|  Based EasySwoole v3.5.1
 -------------------------v0.2.3-------------------------

```

> 基于EasySwoole的PHP协程快速开发框架，让你更专注于业务代码的开发

主要特性
----

[](#主要特性)

- 采用`PHP7`强类型（严格模式）
- 基于Swoole常驻内存
- 更快速的上手Swoole开发
- 清晰的项目结构
- 提供更多便捷的工具
- 更优的静态资源处理

安装
--

[](#安装)

- 安装Swoole扩展，已安装的跳过此步骤

访问swoole官网文档 [wiki.swoole.com](https://wiki.swoole.com/#/environment)根据文档进行操作

- 安装Composer，已安装的跳过此步骤

通过如下命令下载Composer：

```
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
```

- 项目构建安装：

```
composer create-project php-sword/sword sword
```

- 如果已经安装并需要更新，项目根目录执行命令：

```
composer update php-sword/framework
```

启动项目
----

[](#启动项目)

```
php sword server start
```

守护进程（后台运行）:

```
php sword server start -d
```

停止运行：

```
php sword server stop
```

更多详细文档:

项目结构
----

[](#项目结构)

```
PATH  项目根目录
├─App           应用目录
│  ├─HttpController      Http控制器
│  ├─WebSocket           WebSocket控制器
│  ├─Crontab             定时任务
│  ├─Process             自定义进程
│  ├─Common              公共方法类
│  ├─Model               ORM模型
│  └─helper.php          全局公共函数
├─Config              配置文件目录
│  ├─app.php              应用配置
│  ├─database.php         数据库配置
│  ├─redis.php            redis服务配置
│  ├─session.php          session配置
│  ├─view.php             视图渲染配置
│  └─xxx.php              更多自定义配置
├─Public         Web静态资源目录
├─Temp           临时数据、缓存、日志
├─vendor         Composer包
├─bootstrap.php  bootstrap事件
├─composer.json  Composer包配置信息
├─dev.php        Easyswoole配置信息
├─EasySwooleEvent.php   Easyswoole事件
├─nginx_make.php        Nginx配置生成工具
└─sword          命令行入口

```

更新记录
----

[](#更新记录)

[转到文档查看](https://github.com/php-sword/sword/wiki/Update)

参与开发
----

[](#参与开发)

> 直接提交PR或者Issue即可

版权信息
----

[](#版权信息)

本项目遵循Apache2.0 开源协议发布，并提供免费使用。

本项目包含的第三方源码和二进制文件之版权信息另行标注。

更多细节参阅 [LICENSE](LICENSE)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~119 days

Recently: every ~106 days

Total

6

Last Release

1532d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c57985f59dee65fb0bd442b0eea026e3acd3339ac5fb3f9035008cdf8b36cd62?d=identicon)[kyour-cn](/maintainers/kyour-cn)

---

Top Contributors

[![kyour-cn](https://avatars.githubusercontent.com/u/38110013?v=4)](https://github.com/kyour-cn "kyour-cn (19 commits)")

---

Tags

easyswoolephp-swordphp7swooleswoole-frameworkphpswooleeasyswooleSWORD

### Embed Badge

![Health badge](/badges/php-sword-sword/health.svg)

```
[![Health](https://phpackages.com/badges/php-sword-sword/health.svg)](https://phpackages.com/packages/php-sword-sword)
```

###  Alternatives

[easyswoole/easyswoole

An efficient swoole framework

4.8k186.9k50](/packages/easyswoole-easyswoole)[hyperf/hyperf-skeleton

A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.

301187.4k](/packages/hyperf-hyperf-skeleton)[siam/easyswoole-http-monitor

easyswoole的HTTP请求监控、复发

422.9k](/packages/siam-easyswoole-http-monitor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
