PHPackages                             casual/casualman - 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. casual/casualman

AbandonedArchivedLibrary[Framework](/categories/framework)

casual/casualman
================

Low performance Service Framework for PHP based on Workerman.

2.3.0(4y ago)11101MITPHPPHP &gt;=7.2

Since May 22Pushed 4y ago2 watchersCompare

[ Source](https://github.com/chaz6chez/casualman)[ Packagist](https://packagist.org/packages/casual/casualman)[ RSS](/packages/casual-casualman/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (11)Used By (0)

**This frame has dedicated my dear pet , Bunny Nuomi****&lt;谨以此框架献给我亲爱的宠物，兔子糯米&gt;**Casual Man &lt;草率之人&gt;
=======================

[](#casual-man-草率之人)

---

[![](https://camo.githubusercontent.com/20beb3dfdb9e082b8145d21d902014d1e11d0c7e7117779cdfe9e08522147756/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4368617a364368657a2f63617375616c6d616e)](https://camo.githubusercontent.com/20beb3dfdb9e082b8145d21d902014d1e11d0c7e7117779cdfe9e08522147756/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4368617a364368657a2f63617375616c6d616e)[![](https://camo.githubusercontent.com/e63da8b2b9309618ca6cd77cfae2ffd8641f4cb5e09458e1662d3623778e08de/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4368617a364368657a2f63617375616c6d616e)](https://camo.githubusercontent.com/e63da8b2b9309618ca6cd77cfae2ffd8641f4cb5e09458e1662d3623778e08de/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4368617a364368657a2f63617375616c6d616e)[![](https://camo.githubusercontent.com/91e6831bb4306a928c843d1ef4de4e3a0bef104f685034caea959568985e72ec/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f4368617a364368657a2f63617375616c6d616e)](https://camo.githubusercontent.com/91e6831bb4306a928c843d1ef4de4e3a0bef104f685034caea959568985e72ec/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f4368617a364368657a2f63617375616c6d616e)[![](https://camo.githubusercontent.com/94573383862ac0a6668d4c3616459701ecf551c68c0cac7a5d877650693201cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4368617a364368657a2f63617375616c6d616e)](https://camo.githubusercontent.com/94573383862ac0a6668d4c3616459701ecf551c68c0cac7a5d877650693201cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4368617a364368657a2f63617375616c6d616e)[![](https://camo.githubusercontent.com/7293e9ef33c9075245e17a315ba4d004ef4fa76e01b10fc2dff956c42fbd0589/68747470733a2f2f706f7365722e707567782e6f72672f63617375616c2f6672616d65776f726b2f762f737461626c65)](https://camo.githubusercontent.com/7293e9ef33c9075245e17a315ba4d004ef4fa76e01b10fc2dff956c42fbd0589/68747470733a2f2f706f7365722e707567782e6f72672f63617375616c2f6672616d65776f726b2f762f737461626c65)

介绍
--

[](#介绍)

- *Low performance* Service Framework Component for PHP based on Workerman.
- 基于Workerman的 “低性能” PHP服务框架。

结构
--

[](#结构)

```
|-- bin
    |-- app.php
    |-- .env
|-- config         # 所属casual的包通常在组件包根目录下会有对应的config文件，将其复制到此即可
    ...                       # 如casual/database的database.php
|-- runtime      # 临时目录区
    |-- app.log               # 启动器日志文件
    ...
|-- src            # 源码区域可自行规范，以下示例按照进程区
    |-- Common                # 公共区域
        |-- Internal            # 公共的辅助组件
        |-- Process             # 进程
    |-- Application  # APP区域内目录结构可根据个人喜好安排
        |-- Contorller
        |-- Model
        |-- Service
        |-- Middleware
        ...
    ...                       # 可以多个APP区域
|-- vendor
|-- .env.example
|-- composer.json
|-- LICENSE
|-- README.md

```

使用
--

[](#使用)

- 使用composer快速创建项目
    - 建议使用最新版casual/casualman

```
    composer create-project casual/casualman {your project's name} 2.2.0

```

1.说明
----

[](#1说明)

- 常驻内存
- 容器
- 中间件
- 简易路由
- 可拓展进程
- 可拓展配置
- 基于medoo的数据库驱动

2.启动项（可拓展进程）casual/frame - AbstractProcess
------------------------------------------

[](#2启动项可拓展进程casualframe---abstractprocess)

- 在src/Common/Process中添加Kernel/AbstractProcess的子类
- 在config.process进行配置
- AbstractProcess抽象类实现了HandlerInterface为基础进程
- ListerInterface为监听进程接口

3.容器 casual/frame - Container
-----------------------------

[](#3容器-casualframe---container)

- 基于Psr/ContainerInterface的任何容器都可使用
- 默认容器为简单的单例容器Kernel/Container
- 在config.container中进行配置

4.路由 casual/frame - AbstractRouter
----------------------------------

[](#4路由-casualframe---abstractrouter)

- 基础的适合内部JsonRpc的路由
- 可继承/重写拓展为适配HTTP或其他类型协议的路由
- 路由包含中间件

5.中间件 casual/frame - Middlewares
--------------------------------

[](#5中间件-casualframe---middlewares)

- 洋葱型中间件

6.数据库 casual/database
---------------------

[](#6数据库-casualdatabase)

- 默认使用基于Medoo改良的适合常驻的数据库驱动Database/Driver
- 提供基础的Model抽象类Database/AbstractModel
- 提供简单的链式调用连接器类Database/Connection

7.公共方法组件
--------

[](#7公共方法组件)

#### src/Common/Internal 下的公共组件：

[](#srccommoninternal-下的公共组件)

- Timer 基于workerman-timer的封装
- RateLimit 基于Redis的令牌桶限流组件
- Redlock
- Redis
- RpcClient JsonRpc2的客户端

#### src/Common/Process 下的公共服务进程

[](#srccommonprocess-下的公共服务进程)

- HttpServer Http服务
- RpcServer 基于TCP的JsonRpc2.0服务

#### casual/until 提供的服务

[](#casualuntil-提供的服务)

- JsonRpc2协议
- Cache 上下文缓存

    - 进程间相互隔离
    - 在当前进程内常驻
- Context 基于Cache封装的上下文缓存
- Struct Chaz6chez/Structure组件

    - 可用于数据映射
    - 出入参过滤
    - 参数验证判断

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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 ~32 days

Recently: every ~46 days

Total

10

Last Release

1520d ago

Major Versions

1.0.1 → 2.0.02021-05-25

PHP version history (2 changes)1.0.0PHP &gt;=7.2

2.1.1PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/d1b317277226c93c11984f73dfad75533893466b02d06611126aa1687209c6ab?d=identicon)[Chaz6Chez](/maintainers/Chaz6Chez)

---

Top Contributors

[![chaz6chez](https://avatars.githubusercontent.com/u/22535862?v=4)](https://github.com/chaz6chez "chaz6chez (36 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/casual-casualman/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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