IntelliJ IDEA / PhpStorm Yii2 Support
Provides Yii 2 Framework support for PhpStorm
and IntelliJ IDEA.
Donate
Please make donations to support plugin development.
 
Bitcoin: 36TYn22Ch48FsBriJkGmD52Ge8Dqf7Gjkb
Features
Views
- View template names and parameters completion
- Add view parameters after completion
- Inspection for missing view templates
- QuickFix for missing view templates
- Jump to View file (go to declaration)
- Inspection for required and unused template parameters
- QuickFix for required and unused template parameters
- Updates path to view template when file is moved
i18n
- Code completion
- Generate params array
Configuration arrays
Code completion for Yii configuration arrays. Works both in configuration files and on object instantiation.
Following cases are supported:
- Array in $configparameter inyii\base\Objector its descendants constructor
- Array has a classkey with valid class representation: fully qualified name as string,ClassName::classorClass::className()
- Array is a value of a key that corresponds to standard Yii classes (like db,request,mailer, and so on), and
 a file with this array is located withinconfigdirectory
- WidgetClass::widget()and- WidgetClass::begincalls in case- WidgetClassis a descendant of- yii\base\Widget
- $field->widget()method call on- yii\widgets\ActiveFieldand its descendants
- Inside array in GridView,columnskey
- Yii::createObjectmethod
Go To Declaration, Rename, Find usages and Help popups work whenever code completion works.
Database support
Database connection is required
Table Prefix support
Use plugin settings window to set up table prefix
ActiveQuery
- Code completion for ActiveQuery(ActiveRecord::find()->wherefor example)
- Code completion inside ActiveQuerylinked to ActiveRecord
- Inspection in case if ActiveQuerynot linked toActiveRecord
ActiveRecord
- Code completion for ActiveRecordfindAll(),findOne()and so on methods
- Undetectable ActiveRecordtable inspection
- Code completion in relations methods
Migrations
- Code completion for migrations
Condition parameters
- Condition parameters code completion
- Condition parameters inspection
Properties
- Synchronize properties with database
- Unused properties inspection
Form support
- Complete model attribute for $form->field($model, ...)&Html::active*($model, ...)methods
Validators support
- Autocomplete for arrays in model's rules() method
Type resolution
- Yii::createMethod()
- one() and all() methods of ActiveQuery
Migration tool
- Migrations UI Navigator
- Apply/Undo/Redo migrations from UI
- Support Remote CLI for Docker, Vagrant, VM, Remote servers
- Sync IDE DataBase schema after Apply/Undo/Redo migration(s)
- View command execution output
Installation
- Open your PhpStorm or IntelliJ IDEA IDE.
- Go to File→Settings.
- Choose Plugins.
- Press Browse repositories...button.
- Type yii2 support.
- Press Installgreen button on the very top of description.
Contributing
The plugin is Open Source. You may contribute either by testing and reporting issues
or by sending pull requests.
Spreading the Word
Acknowledging and or citing the plugin is as important as direct contributions.
If you are giving a presentation or talk we suggest using
our logo.
 该所有者的项目
                                                                (
                                                                该所有者的项目
                                                                (