PHPackages                             2amigos/yiinitializr - 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. 2amigos/yiinitializr

AbandonedArchivedLibrary[Framework](/categories/framework)

2amigos/yiinitializr
====================

Yii Web Programming Framework Application initializing library.

1.0.1(13y ago)432.8k15[10 issues](https://github.com/2amigos/yiinitializr/issues)BSD-3-ClausePHPPHP &gt;=5.3.0

Since Apr 18Pushed 8y ago15 watchersCompare

[ Source](https://github.com/2amigos/yiinitializr)[ Packagist](https://packagist.org/packages/2amigos/yiinitializr)[ Docs](http://yiinitializr.2amigos.us/)[ RSS](/packages/2amigos-yiinitializr/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

IMPORTANT
---------

[](#important)

> **DEPRECATED. At 2amigos we are not longer supporting Yii 1. We highly recommend you to adopt Yii 2 as soon as possible.**

Yiinitializr
============

[](#yiinitializr)

Library that will help boost your application installation with ease and also to run Yii applications from its bootstrap files on a much cleaner way that the framework currently proposes. For example:

```

// if installed via composer
require('./../../common/lib/vendor/autoload.php');

Yiinitializr\Helpers\Initializer::create('./../', 'frontend', array(
	__DIR__ .'/../../common/config/main.php',
	__DIR__ .'/../../common/config/env.php',
	__DIR__ .'/../../common/config/local.php'
))->run();

```

\##How to use it If you are going to use Yiinitializr to make use of `Yiinitializr\Helpers\Initializr` you can easily install it via `composer`, but if you are going to use it within your application structure in order to configure your application according to your custom needs, then the recommended use is that you [download](https://github.com/2amigos/yiinitializr/archive/master.zip)its source files and place them on a top level folder.

\###Configuration Settings As with Yii, you need to go through a bit of configuration settings if you wish to handle your project structure setup with `composer`. Don't worry, is not going to be too hard, the following is an example configuration file:

```
\\ where am i?
$dirname = dirname(__FILE__);
\\ where is the application folder?
$app = $dirname . '/../../..';
\\ where is the root?
$root = $app . '/..';

return array(
    // yii configurations
	'yii' => array(
		// where is the path of the yii framework?
		// On this example we have installed yii with composer
		// and as it is used after composer installation, we
		// can safely point to the vendor folder.
		'path' => $app . '/lib/vendor/yiisoft/yii/framework'
	),
	// yiinitializr specific settings
	'yiinitializr' => array(
	    // config folders
		'config' => array(
		    // we just need the console settings
		    // On this example, and due that I used environments
		    // i created a custom console.php app for
		    // Yiinitializr\Composer\Callbak class (see below example)
			'console' => $dirname . '/console.php'
		),
		// application structure settings
		'app' => array(
			// where is the root?
			'root' => $root,
			// directories setup
			'directories' => array(
				// where are the different configuration files settings?
				'config' => array(
					// 'key' is the configuration name (see above init example)
					'main' => $app . '/config',
					'console' => $app . '/config',
					'test' => $app . '/config'
				),
				// where are my runtime folders?
				'runtime' => array(
					// heads up! only the folder location as "/config" will be
					// appended
					$app
				),
				'assets' => array(
					// where to write the "assets folders"?
					$root . '/www'
				)
			),
			'files' => array(
				// files to merge the main configuration file with
				// initializr will merge it automatically
				'config' => array(
					'main' => array('env', 'local'),
					'console' => array('env', 'local'),
				)
			)
		),
	)
);

```

Here is an example of a custom `console.php` settings file when working with environments. As you saw on the previous code, this file on the example was located on the same `Yiinitializr\config` folder:

```
require_once dirname(__FILE__) . '/../Helpers/Initializer.php';
require_once dirname(__FILE__) . '/../Helpers/ArrayX.php';

return Yiinitializr\Helpers\ArrayX::merge(
	Yiinitializr\Helpers\Initializer::config('console', array('common', 'env', 'local')),
	array(
		'params' => array(
			// here is where the composer magic start.
			// Thanks! mr Tobias a.k.a Phundament man!
			'composer.callbacks' => array(
				'post-update' => array('yiic', 'migrate'),
				'post-install' => array('yiic', 'migrate'),
			)
		),
	)
);

```

\####Examples

- [YIInitializr-basic](https://github.com/tonydspaniard/yiinitializr-basic)
- [YIInitializr-intermediate](https://github.com/tonydspaniard/yiinitializr-intermediate)
- [YIInitializr-advanced](https://github.com/tonydspaniard/yiinitializr-advanced)

\###Requirements It works in conjunction with `composer` to install the boilerplate but The minimum requirements by Yiinitializr that you have installed `composer` or have a `composer.phar` on your application root in order to run and \*\* PHP 5.3+\*\*

\###Resources

- [Composer](http://getcomposer.org)
- [Phundament](http://phundament.com/)
- [Download latest ZIPball](https://github.com/2amigos/yiinitializr/archive/master.zip)
- [2amigOS Packagist Profile](https://packagist.org/packages/2amigos/)

> [![2amigOS!](https://camo.githubusercontent.com/9fd8f1de41dc23003bb2a54034cb6658dde5be97092e195a62d629d0d7fa7f6c/687474703a2f2f7777772e67726176617461722e636f6d2f6176617461722f35353336333339346437323934356666376564333132353536656330343165302e706e67)](http://www.2amigos.us)
> *web development has never been so fun*
> [www.2amigos.us](http://www.2amigos.us)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

4770d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/566016?v=4)[Antonio Ramirez](/maintainers/tonydspaniard)[@tonydspaniard](https://github.com/tonydspaniard)

---

Top Contributors

[![Borales](https://avatars.githubusercontent.com/u/1118933?v=4)](https://github.com/Borales "Borales (3 commits)")[![tonydspaniard](https://avatars.githubusercontent.com/u/566016?v=4)](https://github.com/tonydspaniard "tonydspaniard (3 commits)")[![matperez](https://avatars.githubusercontent.com/u/1917115?v=4)](https://github.com/matperez "matperez (1 commits)")[![padaVVan](https://avatars.githubusercontent.com/u/493343?v=4)](https://github.com/padaVVan "padaVVan (1 commits)")[![vasiliy-pdk](https://avatars.githubusercontent.com/u/2930187?v=4)](https://github.com/vasiliy-pdk "vasiliy-pdk (1 commits)")

---

Tags

frameworkboilerplateyiiapplication

### Embed Badge

![Health badge](/badges/2amigos-yiinitializr/health.svg)

```
[![Health](https://phpackages.com/badges/2amigos-yiinitializr/health.svg)](https://phpackages.com/packages/2amigos-yiinitializr)
```

###  Alternatives

[fuel/fuel

FuelPHP is a simple, flexible, community driven PHP 5.4+ framework, based on the best ideas of other frameworks, with a fresh start!

1.5k42.3k](/packages/fuel-fuel)[hprose/hprose-yii

Hprose Server for Yii 2

357.1k](/packages/hprose-hprose-yii)

PHPackages © 2026

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