Found Two Yii 2.0 Bugs With Gii

While playing with Yii 2.0, I have identified two problems with Gii.

[size="3"]Bug 1[/size]

You will never be able to connect to Gii from a host other than localhost. As per documentation, you should modify the allowedIPs array as follows:

'gii' => [

    'class' => 'yii\gii\Module',

    'allowedIPs' => ['', '::1', '192.168.0.*', ''] // adjust this to your needs


This does not work. The temporary solution I found was to update the @vendor/yiisoft/yii2-gii/Module.php file and adjust the public attribute as:

public $allowedIPs = ['', '::1', '192.168.1.*','']; //adjust this to your needs for now.

[size="3"]Bug 2[/size]

The CRUD generator creates the wrong Namespace in the controllers it generates using "app" instead of "frontend":

//incorrectly created by gii:

namespace app\controllers;

//corrected namespace:

namespace frontend\controllers;

I hope this helps anyone encountering gii issues with yii2.