diff --git a/framework/base/Application.php b/framework/base/Application.php index bbc4601..3dcbb26 100644 --- a/framework/base/Application.php +++ b/framework/base/Application.php @@ -8,7 +8,7 @@ namespace yii\base; use Yii; -use yii\util\FileHelper; +use yii\helpers\FileHelper; /** * Application is the base class for all application classes. diff --git a/framework/base/Controller.php b/framework/base/Controller.php index 9219904..17fb4da 100644 --- a/framework/base/Controller.php +++ b/framework/base/Controller.php @@ -8,8 +8,8 @@ namespace yii\base; use Yii; -use yii\util\FileHelper; -use yii\util\StringHelper; +use yii\helpers\FileHelper; +use yii\helpers\StringHelper; /** * Controller is the base class for classes containing controller logic. diff --git a/framework/base/Dictionary.php b/framework/base/Dictionary.php index 343dbfd..9343d68 100644 --- a/framework/base/Dictionary.php +++ b/framework/base/Dictionary.php @@ -7,7 +7,7 @@ namespace yii\base; -use yii\util\ArrayHelper; +use yii\helpers\ArrayHelper; /** * Dictionary implements a collection that stores key-value pairs. diff --git a/framework/base/ErrorHandler.php b/framework/base/ErrorHandler.php index 996fa18..a3ab137 100644 --- a/framework/base/ErrorHandler.php +++ b/framework/base/ErrorHandler.php @@ -16,7 +16,7 @@ namespace yii\base; * @author Qiang Xue * @since 2.0 */ -use yii\util\VarDumper; +use yii\helpers\VarDumper; class ErrorHandler extends Component { diff --git a/framework/base/Model.php b/framework/base/Model.php index b761ada..402a558 100644 --- a/framework/base/Model.php +++ b/framework/base/Model.php @@ -7,7 +7,7 @@ namespace yii\base; -use yii\util\StringHelper; +use yii\helpers\StringHelper; use yii\validators\Validator; use yii\validators\RequiredValidator; diff --git a/framework/base/Module.php b/framework/base/Module.php index 0e5c1cb..9988164 100644 --- a/framework/base/Module.php +++ b/framework/base/Module.php @@ -8,8 +8,8 @@ namespace yii\base; use Yii; -use yii\util\StringHelper; -use yii\util\FileHelper; +use yii\helpers\StringHelper; +use yii\helpers\FileHelper; /** * Module is the base class for module and application classes. diff --git a/framework/base/Theme.php b/framework/base/Theme.php index c5fd925..88ecb0a 100644 --- a/framework/base/Theme.php +++ b/framework/base/Theme.php @@ -9,7 +9,7 @@ namespace yii\base; use Yii; use yii\base\InvalidConfigException; -use yii\util\FileHelper; +use yii\helpers\FileHelper; /** * Theme represents an application theme. diff --git a/framework/base/View.php b/framework/base/View.php index 86020ad..36c90ad 100644 --- a/framework/base/View.php +++ b/framework/base/View.php @@ -9,7 +9,7 @@ namespace yii\base; use Yii; use yii\base\Application; -use yii\util\FileHelper; +use yii\helpers\FileHelper; /** * View represents a view object in the MVC pattern. diff --git a/framework/base/Widget.php b/framework/base/Widget.php index 6b92f09..24d0685 100644 --- a/framework/base/Widget.php +++ b/framework/base/Widget.php @@ -8,7 +8,7 @@ namespace yii\base; use Yii; -use yii\util\FileHelper; +use yii\helpers\FileHelper; /** * Widget is the base class for widgets. diff --git a/framework/console/controllers/AppController.php b/framework/console/controllers/AppController.php index 78cf6fc..93ef5f5 100644 --- a/framework/console/controllers/AppController.php +++ b/framework/console/controllers/AppController.php @@ -8,7 +8,7 @@ namespace yii\console\controllers; use yii\console\Controller; -use yii\util\FileHelper; +use yii\helpers\FileHelper; use yii\base\Exception; /** diff --git a/framework/console/controllers/HelpController.php b/framework/console/controllers/HelpController.php index 01bc994..ea7e3d5 100644 --- a/framework/console/controllers/HelpController.php +++ b/framework/console/controllers/HelpController.php @@ -13,7 +13,7 @@ use yii\console\Exception; use yii\base\InlineAction; use yii\console\Controller; use yii\console\Request; -use yii\util\StringHelper; +use yii\helpers\StringHelper; /** * This command provides help information about console commands. diff --git a/framework/console/controllers/MigrateController.php b/framework/console/controllers/MigrateController.php index 06e100b..7f9a18f 100644 --- a/framework/console/controllers/MigrateController.php +++ b/framework/console/controllers/MigrateController.php @@ -13,7 +13,7 @@ use yii\console\Exception; use yii\console\Controller; use yii\db\Connection; use yii\db\Query; -use yii\util\ArrayHelper; +use yii\helpers\ArrayHelper; /** * This command manages application migrations. diff --git a/framework/db/ActiveRecord.php b/framework/db/ActiveRecord.php index f8d2b99..0c15121 100644 --- a/framework/db/ActiveRecord.php +++ b/framework/db/ActiveRecord.php @@ -16,7 +16,7 @@ use yii\base\InvalidCallException; use yii\db\Connection; use yii\db\TableSchema; use yii\db\Expression; -use yii\util\StringHelper; +use yii\helpers\StringHelper; /** * ActiveRecord is the base class for classes representing relational data in terms of objects. diff --git a/framework/helpers/ArrayHelper.php b/framework/helpers/ArrayHelper.php index 447d034..65fa962 100644 --- a/framework/helpers/ArrayHelper.php +++ b/framework/helpers/ArrayHelper.php @@ -5,7 +5,7 @@ * @license http://www.yiiframework.com/license/ */ -namespace yii\util; +namespace yii\helpers; use Yii; use yii\base\InvalidParamException; @@ -59,11 +59,11 @@ class ArrayHelper * * ~~~ * // working with array - * $username = \yii\util\ArrayHelper::getValue($_POST, 'username'); + * $username = \yii\helpers\ArrayHelper::getValue($_POST, 'username'); * // working with object - * $username = \yii\util\ArrayHelper::getValue($user, 'username'); + * $username = \yii\helpers\ArrayHelper::getValue($user, 'username'); * // working with anonymous function - * $fullName = \yii\util\ArrayHelper::getValue($user, function($user, $defaultValue) { + * $fullName = \yii\helpers\ArrayHelper::getValue($user, function($user, $defaultValue) { * return $user->firstName . ' ' . $user->lastName; * }); * ~~~ diff --git a/framework/helpers/ConsoleColor.php b/framework/helpers/ConsoleColor.php index 74aa154..c64db24 100644 --- a/framework/helpers/ConsoleColor.php +++ b/framework/helpers/ConsoleColor.php @@ -5,7 +5,7 @@ * @license http://www.yiiframework.com/license/ */ -namespace yii\util; +namespace yii\helpers; // todo define how subclassing will work // todo add a run() or render() method diff --git a/framework/helpers/FileHelper.php b/framework/helpers/FileHelper.php index 9108476..f850b98 100644 --- a/framework/helpers/FileHelper.php +++ b/framework/helpers/FileHelper.php @@ -7,7 +7,7 @@ * @license http://www.yiiframework.com/license/ */ -namespace yii\util; +namespace yii\helpers; use yii\base\Exception; use yii\base\InvalidConfigException; diff --git a/framework/helpers/Html.php b/framework/helpers/Html.php index a7b744b..b004885 100644 --- a/framework/helpers/Html.php +++ b/framework/helpers/Html.php @@ -5,7 +5,7 @@ * @license http://www.yiiframework.com/license/ */ -namespace yii\util; +namespace yii\helpers; use Yii; use yii\base\InvalidParamException; @@ -655,7 +655,7 @@ class Html * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too). * For each sub-array, an option group will be generated whose label is the key associated with the sub-array. * If you have a list of data models, you may convert them into the format described above using - * [[\yii\util\ArrayHelper::map()]]. + * [[\yii\helpers\ArrayHelper::map()]]. * * Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in * the labels will also be HTML-encoded. @@ -695,7 +695,7 @@ class Html * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too). * For each sub-array, an option group will be generated whose label is the key associated with the sub-array. * If you have a list of data models, you may convert them into the format described above using - * [[\yii\util\ArrayHelper::map()]]. + * [[\yii\helpers\ArrayHelper::map()]]. * * Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in * the labels will also be HTML-encoded. @@ -866,7 +866,7 @@ class Html * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too). * For each sub-array, an option group will be generated whose label is the key associated with the sub-array. * If you have a list of data models, you may convert them into the format described above using - * [[\yii\util\ArrayHelper::map()]]. + * [[\yii\helpers\ArrayHelper::map()]]. * * Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in * the labels will also be HTML-encoded. diff --git a/framework/helpers/SecurityHelper.php b/framework/helpers/SecurityHelper.php index 4186681..5029dd6 100644 --- a/framework/helpers/SecurityHelper.php +++ b/framework/helpers/SecurityHelper.php @@ -5,7 +5,7 @@ * @license http://www.yiiframework.com/license/ */ -namespace yii\util; +namespace yii\helpers; use Yii; use yii\base\Exception; diff --git a/framework/helpers/StringHelper.php b/framework/helpers/StringHelper.php index 3874701..ace34db 100644 --- a/framework/helpers/StringHelper.php +++ b/framework/helpers/StringHelper.php @@ -5,7 +5,7 @@ * @license http://www.yiiframework.com/license/ */ -namespace yii\util; +namespace yii\helpers; /** * StringHelper diff --git a/framework/helpers/VarDumper.php b/framework/helpers/VarDumper.php index ae474e6..64c3639 100644 --- a/framework/helpers/VarDumper.php +++ b/framework/helpers/VarDumper.php @@ -6,7 +6,7 @@ * @license http://www.yiiframework.com/license/ */ -namespace yii\util; +namespace yii\helpers; /** * VarDumper is intended to replace the buggy PHP function var_dump and print_r. diff --git a/framework/web/CookieCollection.php b/framework/web/CookieCollection.php index 2577d35..c76926b 100644 --- a/framework/web/CookieCollection.php +++ b/framework/web/CookieCollection.php @@ -9,7 +9,7 @@ namespace yii\web; use Yii; use yii\base\DictionaryIterator; -use yii\util\SecurityHelper; +use yii\helpers\SecurityHelper; /** * CookieCollection maintains the cookies available in the current request. diff --git a/framework/web/Response.php b/framework/web/Response.php index 3a0ce8b..d6659cf 100644 --- a/framework/web/Response.php +++ b/framework/web/Response.php @@ -7,7 +7,7 @@ namespace yii\web; -use yii\util\FileHelper; +use yii\helpers\FileHelper; /** * @author Qiang Xue diff --git a/framework/web/Sort.php b/framework/web/Sort.php index 85e9ce8..7cfeeca 100644 --- a/framework/web/Sort.php +++ b/framework/web/Sort.php @@ -8,7 +8,7 @@ namespace yii\web; use Yii; -use yii\util\Html; +use yii\helpers\Html; /** * Sort represents information relevant to sorting. diff --git a/framework/widgets/ActiveForm.php b/framework/widgets/ActiveForm.php index 2d47253..2c965e7 100644 --- a/framework/widgets/ActiveForm.php +++ b/framework/widgets/ActiveForm.php @@ -11,8 +11,8 @@ use Yii; use yii\base\InvalidParamException; use yii\base\Widget; use yii\base\Model; -use yii\util\Html; -use yii\util\ArrayHelper; +use yii\helpers\Html; +use yii\helpers\ArrayHelper; /** * ActiveForm ... @@ -23,7 +23,7 @@ use yii\util\ArrayHelper; class ActiveForm extends Widget { /** - * @param array|string $action the form action URL. This parameter will be processed by [[\yii\util\Html::url()]]. + * @param array|string $action the form action URL. This parameter will be processed by [[\yii\helpers\Html::url()]]. */ public $action = ''; /** diff --git a/tests/unit/framework/util/ArrayHelperTest.php b/tests/unit/framework/util/ArrayHelperTest.php index a36ce68..117c702 100644 --- a/tests/unit/framework/util/ArrayHelperTest.php +++ b/tests/unit/framework/util/ArrayHelperTest.php @@ -2,7 +2,7 @@ namespace yiiunit\framework\util; -use yii\util\ArrayHelper; +use yii\helpers\ArrayHelper; class ArrayHelperTest extends \yii\test\TestCase { diff --git a/tests/unit/framework/util/HtmlTest.php b/tests/unit/framework/util/HtmlTest.php index a887f29..eba1a20 100644 --- a/tests/unit/framework/util/HtmlTest.php +++ b/tests/unit/framework/util/HtmlTest.php @@ -3,7 +3,7 @@ namespace yiiunit\framework\util; use Yii; -use yii\util\Html; +use yii\helpers\Html; use yii\web\Application; class HtmlTest extends \yii\test\TestCase diff --git a/tests/web/app/protected/controllers/SiteController.php b/tests/web/app/protected/controllers/SiteController.php index 38efce3..050bf90 100644 --- a/tests/web/app/protected/controllers/SiteController.php +++ b/tests/web/app/protected/controllers/SiteController.php @@ -1,6 +1,6 @@