I think it would be nice to have autocomplete and syntax check in configuration PHP arrays (Those used in config/* and for example for widgets, dataProviders and more in Yii).
Of course PHPStorm plugin it an option, but complex one, at least for PHP programmer.
This is a possible solution:
return GridView::widget([
GridView::CONF_DataProvider => $dataProvider,
GridView::CONF_DataColumns => [
[
DataColumn::CONF_Attribute => 'company_name',
DataColumn::CONF_Format => 'test',
DataColumn::CONF_Label => 'Company name'
],
[
'class' => 'yii\grid\ActionColumn',
ActionColumn::CONF_Template => '{view} {update} {delete}'
],
]
]);
Or may be there is a better option? This requires modification of framework code, so would be nice hear from maintainers, of course if there is such need I will be glad to update framework code.