PHPackages                             veasin/nx-tiny - 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. veasin/nx-tiny

ActiveLibrary[Framework](/categories/framework)

veasin/nx-tiny
==============

A minimalist, functional PHP framework. Focus on declarative config, tail-call optimization, and clear domain modeling.

0.1.0(2mo ago)1132LGPL-3.0-or-laterPHPPHP ^8.4

Since Mar 23Pushed 3w agoCompare

[ Source](https://github.com/veasin/nx-tiny)[ Packagist](https://packagist.org/packages/veasin/nx-tiny)[ RSS](/packages/veasin-nx-tiny/feed)WikiDiscussions main Synced 2mo ago

READMEChangelogDependencies (2)Versions (23)Used By (2)

ff: A Minimal, Declarative Functional Framework
===============================================

[](#ff-a-minimal-declarative-functional-framework)

`ff` 可以有很多解读：

- **Function Framework** — 函数即框架，一切皆函数
- **Functional Flow** — 函数式数据流，管道组合编排一切
- **Function First** — 函数至上，零类架构
- **Fast &amp; Focused** — 极简专注，不拖泥带水
- **Form &amp; Function** — 形神兼备，设计与功能一体

---

`ff` 是一个轻量级的、纯函数驱动的 PHP 微框架，专为 PHP 8.4+ 设计。核心设计理念：**一函数多用、函数即模块、容器即状态、组合即流程**。

无类、无依赖注入、无服务提供者、无注解路由——全部由命名空间函数组成，极致精简。

### 核心哲学

[](#核心哲学)

- **零类架构**：全部使用命名空间函数，无 class、无 DI 容器、无服务提供者
- **一函数多用**：同一函数通过参数个数、类型、值实现不同语义
- **容器即状态**：`container()` 是唯一全局状态管理器，支持请求级/持久级双生命周期
- **组合即流程**：`middleware()` 洋葱模型、`hump()` 链式调用、`cache()` 多级回退，函数组合编排一切
- **失败返回 null**：统一错误语义，管道中自然短路穿透
- **扩展走容器**：所有可扩展能力通过 `container()` 注入，不增加函数参数签名

### 安装

[](#安装)

```
composer require veasin/ff
```

### 文档

[](#文档)

- [函数参考](doc/functions.md) — 所有内置函数的详细说明与示例
- [使用思路与最佳实践](doc/usage.md) — 框架使用思路与最佳实践指南

### 生态

[](#生态)

ff 生态下的扩展项目：

项目说明[ff-franken](https://github.com/veasin/ff-franken)FrankenPHP worker 模式适配器[ff-llm](https://github.com/veasin/ff-llm)LLM 统一聊天接口，多 provider 切换、Tool Calling[ff-log-ws](https://github.com/veasin/ff-log-ws)WebSocket 日志实时传输[ff-sql](https://github.com/veasin/ff-sql)SQL 查询构建器、DDL 生成与数据库迁移[ff-redis](https://github.com/veasin/ff-redis)Redis 连接池、队列驱动与缓存驱动[ff-web](https://github.com/veasin/ff-web)Web 中间件集合：CORS、CSRF、gzip、JSON、日志、限流、静态文件、认证[ff-xdebug](https://github.com/veasin/ff-xdebug)Xdebug 追踪查看器，格式化表格展示调用时间线

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance91

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Total

21

Last Release

71d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/127591812?v=4)[vea](/maintainers/vea)[@Vea](https://github.com/Vea)

### Embed Badge

![Health badge](/badges/veasin-nx-tiny/health.svg)

```
[![Health](https://phpackages.com/badges/veasin-nx-tiny/health.svg)](https://phpackages.com/packages/veasin-nx-tiny)
```

###  Alternatives

[rmp-up/wp-di

Simple Dependency Injection / Service Container for more OOP in WordPress (PSR-11 compatible)

168.9k](/packages/rmp-up-wp-di)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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