PHPackages                             neam/yii-yii2-bridge - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. neam/yii-yii2-bridge

ActiveYii-extension[Utility &amp; Helpers](/categories/utility)

neam/yii-yii2-bridge
====================

Use Yii 2 widgets in Yii 1 applications

621321PHP

Since Dec 9Pushed 11y agoCompare

[ Source](https://github.com/neam/yii-yii2-bridge)[ Packagist](https://packagist.org/packages/neam/yii-yii2-bridge)[ RSS](/packages/neam-yii-yii2-bridge/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

Yii &lt;- Yii 2 Bridge
======================

[](#yii---yii-2-bridge)

Use Yii 2 widgets in legacy Yii 1 applications.

Requirements
------------

[](#requirements)

- Yii 1.1.15 application

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist "neam/yii-yii2-bridge" "*"

```

or add

```
"neam/yii-yii2-bridge" : "*"
```

to the require section of your application's `composer.json` file.

Make sure you have the following in your yii 1 app's composer.json:

```
"extra": {
    "asset-installer-paths": {
        "npm-asset-library": "vendor/npm",
        "bower-asset-library": "vendor/bower"
    }
},
```

In your index.php, instead of including yii.php, do the following (which will include yii 1 and yii 2):

```
$approot = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..';
require("$approot/vendor/neam/yii-yii2-bridge/include.php");

```

Make sure that your layout or view file includes:

```
// Necessary in order to publish the yii2 assets required for this view
Yii::$app->getView()->registerYii2Assets();

```

Usage
-----

[](#usage)

Install yii 2 widgets via composer and use them as usual.

What this extension does
------------------------

[](#what-this-extension-does)

- Loads but does not run a Yii 2 app, so that it is available under Yii::$app.
- Overrides the core yii 2 view component to register asset files using Yii 1 client script.
- Disables the yii 2 error handler so that both error handlers are not activated at the same time.

What this extension does not do (yet... pull requests are welcome)
------------------------------------------------------------------

[](#what-this-extension-does-not-do-yet-pull-requests-are-welcome)

- Does not handle InputWidgets, only Widgets at the moment.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![motin](https://avatars.githubusercontent.com/u/793037?v=4)](https://github.com/motin "motin (5 commits)")

### Embed Badge

![Health badge](/badges/neam-yii-yii2-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/neam-yii-yii2-bridge/health.svg)](https://phpackages.com/packages/neam-yii-yii2-bridge)
```

PHPackages © 2026

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