version 1.1.0 - ide problem

Hi, I have got problem with $this->assets in Controller. Is class Assets exist in IDE stub?



83.4k

It seems Phalcon\Assets\Manager needs to be registered in the $di:

$di['assets'] = function() {
   return new Phalcon\Assets\Manager();
};

I know, i registered it and it works fine. But problems is with autocompletion in Php Storm IDE. Could be done something with it? In general, could be done something in Php Storm, in cace of services registered in the $di ?



83.4k

The script that generates the autocompletion manually adds those hints: https://github.com/phalcon/phalcon-devtools/blob/master/ide/gen-stubs.php#L208

Once that Phalcon\Assets\Manager is added to that file, you wouldn't have this problem anymore.

Thank you, I did it and it works :)