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

version 1.1.0 - ide problem

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



98.9k

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 ?



98.9k

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 :)