I’m currently experiencing an issue where I need to use some PHP code outside of Dreamfactory.
I am currently unable to do so as I keep receiving this error [2018-07-11 22:22:53] local.ERROR: Class 'SourceQuery' not found {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Class 'SourceQuery' not found at C:\\Bitnami\\dreamfactory-2.12.0-1\\apps\\dreamfactory\\htdocs\\vendor\\dreamfactory\\df-script\\src\\Engines\\Php.php(49) : eval()'d code:34)"}
Including Other Scripts
Currently, PHP scripts can not directly include other PHP code via require() methods or use statements as you normally would. However, DreamFactory can access any other code installed in the system by using fully qualified name-spaced class names.
The best way to bring in libraries is to use composer require on the package, and that will make it accessible via the code installed in the system by using fully qualified name-spaced class names.
For instance:
For example, run:
$ composer require abraham/twitteroauth
Then in your script reference $connection = new \Abraham\TwitterOAuth\TwitterOAuth("...