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

ActiveFramework[Framework](/categories/framework)

urn2/nx
=======

A Trait Framework for PHP

1.3.3(1y ago)21.6kPHPPHP &gt;=8.1

Since May 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/veasin/nx)[ Packagist](https://packagist.org/packages/urn2/nx)[ Docs](https://github.com/veasin/nx)[ RSS](/packages/urn2-nx/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (46)Used By (0)

```
        ___  ___
     __ \  \/  /
    /  \ \  \ /
   /  / \ \  \
  /  /\  / \  \
 /__/  \/__/\__\  vea, 2025

```

[![nx](./logo.png)](./logo.png) is **"a next-gen framework"**
=============================================================

[](#-is-a-next-gen-framework)

php 8.1+

```
small,fast,emmmm...

使用php语言中的trait实现在代码编写时的加载扩充，而不是运行时的扩充

小框架，可以随意扩充

```

resources
=========

[](#resources)

- [cache-redis](https://github.com/veasin/nx-cache-redis) 基于redis的cache简单封装
- [db-pdo](https://github.com/veasin/nx-db-pdo) 数据库访问，提供ar
- [filter-from](https://github.com/veasin/nx-filter-from) 过滤器，可书写混乱规则
- [log](https://github.com/veasin/nx-log) 日志，支持同时多个writer
- [log-cli](https://github.com/veasin/nx-log-cli) 在shell中输出，提供颜色封装
- [log-ws](https://github.com/veasin/nx-log-ws) 通过websocket输出日志和调试
- [model](https://github.com/veasin/nx-model) mvc的m封装
- [controller-model](https://github.com/veasin/nx-controller-model) mvc的c封装
- [network-context](https://github.com/veasin/nx-network-context) 网络请求封装
- [queue-amqp](https://github.com/veasin/nx-queue-amqp) 简单的amqp队列封装
- [router-annotation](https://github.com/veasin/nx-router-annotation) 注解生成路由

feature
=======

[](#feature)

- trait,trait,trait!!!
- 支持命名空间
- 支持composer
- 尽可能支持psr
- 尽可能兼容next
- 支持调度 使用route并闭包
    - 同时多route匹配
    - 改造route数组为对象
    - 修改调度方式
- 支持php8，支持php新功能
- 脚手架
    - 项目预制
    - 编译（打包phar）
- PHPUnit
    - filter\\throw
    - db\\sql
    - router\\uri

code
====

[](#code)

```
class app extends \nx\app{
  use \nx\log\file,
      \nx\control\mvc,
      \nx\router\ca,
      \nx\db\pdo;
}
(new app)->run();

```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance41

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 75% 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 ~69 days

Recently: every ~136 days

Total

41

Last Release

498d ago

Major Versions

0.2.0 → 1.0.02018-12-21

PHP version history (3 changes)0.1.0PHP &gt;=5.5

1.0.0PHP &gt;=7.0

1.2.1PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![veasin](https://avatars.githubusercontent.com/u/5161853?v=4)](https://github.com/veasin "veasin (12 commits)")[![chudaozhe](https://avatars.githubusercontent.com/u/1473364?v=4)](https://github.com/chudaozhe "chudaozhe (4 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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