yiisoft / config

Configuration management
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
31 stars 11 forks source link

Autocomplete for class configuration #114

Open tomaszkane opened 2 years ago

tomaszkane commented 2 years ago

Hi, Yii2 has very useful plugin for best/most popular PHP IDE - PhpStorm, https://plugins.jetbrains.com/plugin/9388-yii2-support

Any chance to provide one for Yii3 to have autocomplete in config files - to set class properties, __construnct() etc. ?

Main goal is to type faster, do less typos and got mistakes highlighted.

Examples:

<?php

return [
    'components' => [
        'db' => [
            'class' => \my\Db::class,
            'name' => 'foo', // <-- autocomplete
            'password' => 'boo', // <-- autocomplete
        ],
    ],
];
return [
    LoggerInterface::class => [
        'class' => Logger::class,
        '__construct()' => [ // <-- autocomplete
            'targets' => ReferencesArray::from([ // <-- autocomplete
                FileTarget::class,
            ]),
        ],
    ],
];
samdark commented 2 years ago

If possible, we should do it with PhpStorm advanced metadata: https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html