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

Namespace in query PhpStorm

PhpStorm give error <join>, <reference> or '{' expected, got '\' with this query:

$phql = "SELECT Sites.*, Users.*, Operators.*, OperatorRights.* FROM \Core\Model\Sites as Sites
LEFT JOIN \Core\Model\Users as Users ON Sites.user_id = Users.id
LEFT JOIN \Core\Model\OperatorRights as OperatorRights ON Sites.id = OperatorRights.site_id
LEFT JOIN \Core\Model\Operators as Operators ON OperatorRights.operator_id = Operators.id
WHERE Sites.uid = :widget_id:";

https://imgur.com/9Mjfn9J

How to fix this?

/phalcon-tools/ide/stubs/Phalcon already installed Thanks.

You can't, just ignore it.

Or, you could implement the PHQL dialect for PhpStorm. It would be much appreciated! :]