I'm using Doctrine ORM in my PHP project.
In one of my queries I'm using the 'COS' (cosine) and 'SIN' (sine) functions, in order to make this possible on Doctrine I have to add this to my entitymanager configuration:
$config->addCustomNumericFunction('COS', 'DoctrineExtensions\Query\Mysql\cos');
$config->addCustomNumericFunction('SIN', 'DoctrineExtensions\Query\Mysql\sin');
This works fine when I run it on my local PC + server.
But once I put the project on the online webserver I'm facing with these errors:
Fatal error: Class 'DoctrineExtensions\Query\Mysql\cos' not found in /home/USER/domains/USER.com/public_html/MYDIRECTORY/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php on line 3418
Fatal error: Class 'DoctrineExtensions\Query\Mysql\sin' not found in /home/USER/domains/USER.com/public_html/MYDIRECTORY/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php on line 3418
It's looking in the 'vendor\doctrine' directory instead of the 'vendor\beberlei\DoctrineExtensions' directory.
My composer contains:
"beberlei/DoctrineExtensions": "dev-master"
And the vendor autoloader contains:
'DoctrineExtensions\\' => array($vendorDir . '/beberlei/DoctrineExtensions/src')
Can anyone explain this to me... I tried adding a classloader, but still the same problem.
Localhost is working fine...