We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

IDE and config Warning

Hello to everyone. I am using PHPstorm and have a question about the phalcon config.

I have something in my config.php like

return new \Phalcon\Config(array(
    'database' => array(
        'adapter' => 'Mysql',

When i use the code, the codestyle is not 100% correct in PHPstorm, because for sure the ide doesnt know if that exists or not. Is there a proper way to make this IDE acceptable?

$config->database->adapter

Thanks for your help. Pat



85.5k
edited Dec '15

u can create a seprate classes and include them just like you make autocomplate for the models, controllers and so on.

I have classes writen in Zephir, so in order for autocompalte to work i create them seperatly and add them to include directory

For some warning you can use:

/**
* @var \Phalcon\Config $config
*/

But:

$config->database

Not solution. for the moment.