Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Yii Cleanapp

Yii web application template on steroids.


  • Composer attached.
  • Using composer classmap to autoload components and models.
  • Preconfigured .htaccess and .gitignore files.
  • Git ignored file main-local.php to store private application config.
  • Custom migration template with variable to copy/paste SQL query.
  • Console config uses main config to avoid code duplication.
  • Preconfigured frendly urls.
  • YII_DEBUG is enabled when client IP is
  • Full/Zero error reporting depending on YII_DEBUG.
  • Fake CApplication class with phpdoc comments describing components for editor autocomplete function.
  • DB schema caching enabled with cache flushing after "migrate" command (description in Russian).
  • ClientScript package "jquery" is connected to public CDN's (Google, Yandex, Media Temple).
  • Automatic assets minifying + gzip conpression.
  • Ability to automatically publish CClientSctipt css/js files as assets.
  • .htaccess to send headers for caching of all assets for 1 year by default with mod_expires.
  • ConsoleCommand converts unnamed shell arguments to action params.
  • Blueprint CSS framework replaced with Bootstrap 3.
  • PHPUnit with all Yii dependencies installed via composer.
  • 3 new file log routes: error.log, error404.log and warning.log. Error404.log also contains referer information.

And lot of small changes.

Included shell scripts

  • protected/init.sh -
    • Fixes file/directory permissions (like "runtime" and "assets").
    • Creates local config file if not created.
    • Downloads composer.phar if not exists or runs composer self-update if exists.
    • Runs composer install (composer install --no-dev --optimize-autoloader if called like protected/init.sh prod).
  • protected/phpunit.sh - runs phpunit tests. This script can be launched from anywhere but takes "phpunit.xml" file from "protected/tests/" directory. If you want to run specific tests directory or file you can pass it's path as first argument.
  • protected/live-commit.sh - commits all changed files and adds current datetime to commit message.

Preinstalled extensions