PHPackages                             mazl/onion - 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. mazl/onion

ActiveProject[Framework](/categories/framework)

mazl/onion
==========

Onion PHP Framework

1.0(4y ago)03MITPHPPHP &gt;=7.0

Since Jul 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mazl001/onion)[ Packagist](https://packagist.org/packages/mazl/onion)[ RSS](/packages/mazl-onion/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

```
运行环境要求

PHP >= 7.0

安装Composer

参考 https://docs.phpcomposer.com/00-intro.html#Downloading-the-Composer-Executable

创建项目

切换到你的WEB根目录, 运行命令 composer create-project mazl/onion

测试运行

访问项目 public 目录, 例如: http://localhost/onion/public/index.php, 输出 hello world.

源码下载:

https://github.com/mazl001/onion      (不含演示代码)

https://github.com/mazl001/onion-demo (包含演示代码)

隐藏 index.php:

项目入口文件为 public/index.php, 可以通过配置让 URL 不需要 index.php 即可访问:

1、apache 服务器, 需要开启 mod_rewrite 模块, 在 public 目录下创建 .htaccess 文件

  Options +FollowSymlinks -Multiviews
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

2、nginx 服务器, 可以在网站设置中增加以下设置来开启「优雅链接」

location / {
    try_files $uri $uri/ /index.php?$query_string;
}
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

1756d ago

### Community

Maintainers

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

---

Top Contributors

[![mazl001](https://avatars.githubusercontent.com/u/87896263?v=4)](https://github.com/mazl001 "mazl001 (8 commits)")

### Embed Badge

![Health badge](/badges/mazl-onion/health.svg)

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

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[laravel/reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.

1.5k9.4M48](/packages/laravel-reverb)[sulu/sulu

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

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

The SilverStripe framework

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

The Illuminate Routing package.

1238.6M2.3k](/packages/illuminate-routing)[oro/platform

Business Application Platform (BAP)

644134.8k84](/packages/oro-platform)

PHPackages © 2026

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