PHPackages                             cherif/yii2-app-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. cherif/yii2-app-onion

ActiveProject[Framework](/categories/framework)

cherif/yii2-app-onion
=====================

Yii 2 Onion architecture Project Template

0.4(10y ago)110BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jan 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/cherifGsoul/yii2-onion-app)[ Packagist](https://packagist.org/packages/cherif/yii2-app-onion)[ Docs](http://www.yiiframework.com/)[ RSS](/packages/cherif-yii2-app-onion/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (8)Versions (5)Used By (0)

Yii 2 Onion Project Template
============================

[](#yii-2-onion-project-template)

Yii 2 Onion Project Template is a skeleton [Yii 2](http://www.yiiframework.com/) application best for rapidly creating enterprise projects based on onion architecture.

The template contains the basic features including user login/logout and a contact page. It includes all commonly used configurations that would allow you to focus on adding new features to your application.

REQUIREMENTS
------------

[](#requirements)

The minimum requirement by this project template that your Web server supports PHP 5.4.0.

INSTALLATION
------------

[](#installation)

### Install via Composer

[](#install-via-composer)

If you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).

You can then install this project template using the following command:

```
php composer.phar global require "fxp/composer-asset-plugin:~1.1.0"
php composer.phar create-project --prefer-dist --stability=dev cherif/yii2-onion-app onion

```

Now you should be able to access the application through the following URL, assuming `basic` is the directory directly under the Web root.

```
http://localhost/onion/web/

```

CONFIGURATION
-------------

[](#configuration)

### Database

[](#database)

Edit the file `app/config/db.php` with real data, for example:

```
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=yii2onion',
    'username' => 'root',
    'password' => '1234',
    'charset' => 'utf8',
];
```

**NOTES:**

- Yii won't create the database for you, this has to be done manually before you can access it.
- Check and edit the other files in the `config/` directory to customize your application as required.
- Refer to the README in the `tests` directory for information specific to basic application tests.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

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

Total

4

Last Release

3831d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4be70b1b1d59ebec6b57be354923c82f8c9d445e612398e73a838c48130183b?d=identicon)[cherif\_b](/maintainers/cherif_b)

---

Tags

frameworkyii2project templatehexagonalonionlayered

### Embed Badge

![Health badge](/badges/cherif-yii2-app-onion/health.svg)

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

###  Alternatives

[yii2mod/base

Base application template for Yii2

531.3k](/packages/yii2mod-base)

PHPackages © 2026

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