PHPackages                             abelzhou/fisherman - 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. [Database &amp; ORM](/categories/database)
4. /
5. abelzhou/fisherman

ActiveLibrary[Database &amp; ORM](/categories/database)

abelzhou/fisherman
==================

A data access service library.

1.0.3(7y ago)011Apache-2.0PHPPHP &gt;5.3.0

Since Dec 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/AbelZhou/Fisherman)[ Packagist](https://packagist.org/packages/abelzhou/fisherman)[ RSS](/packages/abelzhou-fisherman/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (7)Used By (0)

Fisherman
=========

[](#fisherman)

一个遵循psr4的业务类库，集成了数据库与缓存层。
主要适用于单纯想使用sql，不想使用orm的朋友。
成天用orm都快用傻了，sql都不会写了。

安装
--

[](#安装)

```
composer require abelzhou/Fisherman
```

使用
--

[](#使用)

### 构造项目目录

[](#构造项目目录)

```
vendor/bin/fisherman init
```

构造完项目目录后，会生成如下文件及目录

```
├── Conf
│   ├── local
│   │   ├── cache.yml
│   │   ├── config.yml
│   │   └── db.yml
│   ├── rls
│   └── test
├── Model
│   └── DBName
├── Module
│   └── DBName
├── bootstrap.php
├── composer.json
└── .gitigore

```

- Conf：配置文件目录
    - 环境文件夹(local|rls|test),取决于"RUNTIME\_ENV"环境变量。Default：local
        - cache.yml memcache缓存配置（可更换引擎，目前只实现memcache）
        - config.yml 项目配置文件
        - db.yml 数据库配置
- model：底层数据交互目录，原则上一个数据库一个文件夹
- module：业务逻辑目录，原则上一个数据库一个文件夹
- bootstrap.php 引导文件，在某些web或者常驻内存项目中，需要引入该文件让业务类库生效。
- composer.json

### 修改conf

[](#修改conf)

构造完项目后，需要手工处理两个文件才能生成对应的model和module
1、config.yml
2、db.yml

```
# 修改项目名称 默认为demo
vim Conf/local/config.yml
# 修改数据库连接必要条件  这里假设需要test数据库下的业务
vim Conf/local/db.yml
```

### 生成对应的model以及module

[](#生成对应的model以及module)

```
vendor/bin/fisherman make:model test user -m User
```

详细信息参考

```
vedor/bin/fisherman -h
```

### 配置说明

[](#配置说明)

#### cache.yml

[](#cacheyml)

```
memcached: #引擎tag
  - host: # host 可以配置多个
      127.0.0.1
    port:
      11211
    weight: #权重
      10
```

#### config.yml

[](#configyml)

```
project:
  name: # 项目名称，项目名称会影响之后生成的model与module类的命名空间前缀
    Demo
cache:
  engine: # 选择的缓存引擎
    memcached
  prefix: # 缓存前缀
    prefix_
  expire:  # 默认的过期时间
    300
db:
  engine: # 数据库引擎
    mysql
log:
  dir: # 日志输出目录 每天一个文件
    /../Logs/
  level: # 日志输出的默认等级
    0
```

#### db.yml

[](#dbyml)

```
test: #dbtag 配置标签，标签不能重复，一般为每个数据库配置一个标签
  writer: #写库只能配置一个
    host:
      127.0.0.1
    port:
      3306
    user:
      root
    password:
      123456
    database:
      test
    charset:
      utf8
  reader: # 从库可以配置多个
    - host:
        127.0.0.1
      port:
        3306
      user:
        root
      password:
        123456
      database:
        test
      charset:
        utf8
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

4

Last Release

2643d ago

### Community

Maintainers

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

---

Top Contributors

[![abelzhou](https://avatars.githubusercontent.com/u/2128345?v=4)](https://github.com/abelzhou "abelzhou (34 commits)")

---

Tags

daodata-access-library

### Embed Badge

![Health badge](/badges/abelzhou-fisherman/health.svg)

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

###  Alternatives

[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[bolt/core

🧿 Bolt Core

585142.5k54](/packages/bolt-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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