bariew / yii1-to-yii2
Yii1 to Yii2 migration project
Requires
- php: >=5.4.0
- bariew/yii2yii: dev-master
- fxp/composer-asset-plugin: *
- nikic/php-parser: ^2.0@dev
- yiisoft/yii: dev-master
- yiisoft/yii2: >=2.0.5
- yiisoft/yii2-bootstrap: *
- yiisoft/yii2-jui: ^2.0@dev
- yiisoft/yii2-swiftmailer: *
Requires (Dev)
- bariew/yii2-doctest-extension: dev-master
- codeception/codeception: 2.0.*
- codeception/specify: *
- codeception/verify: *
- yiisoft/yii2-codeception: 2.0.*
- yiisoft/yii2-debug: 2.0.*
- yiisoft/yii2-faker: *
- yiisoft/yii2-gii: 2.0.*
This package is auto-updated.
Last update: 2024-10-16 15:20:25 UTC
README
UPGRADE PLAN
- Change upgrade.php content according to current project
- Run upgrade script
php vendor/bariew/yii2yii/script.php upgrade.php
- Fix manually
- UserIdentity
- WebUser, login
- CDbCriteria
YII2 upgrade
-
Check ->isNewRecord in beforeSave/afterSave
-
Check 'condition' appearance
-
Check rbac configs
-
'getFlash' does not delete flash by default
-
search for "label for=" - since Html::checkbox no longer generates id automatically
-
module->id does not have submodule (not == module/submodule, but just 'submodule')
-
urls should start with / if not relative - replace 'module/controller/action' with '/module/controller/action'
-
remove errorSummary(
-
model rules first element to array and 'on', 'except' => 'asd,ads' to array
-
->update() not working for 1 attribute
-
search for "js:" js usage
-
$form->field()->label(false)->checkbox() will still render label
-
find not echoing render: ^(?!.(echo|=|return)).
-
createUrl
-
look for CLASS , get_class( , new $class for it did not have namespaces
-
look for camelCase action call or rewrite controller action detect
-
array(([^\)\(\'\"]+)) -> [$1] // to new array look
-
DatePicker -> 'model'=>$model // add model to options
-
(createUrl(\s*)('[^\']+') -> $1[$2] // use arrays for creating urls