I have a factory within Module/src/Module/Service/Factory/CourseServiceFactory.php
I have defined this factory in module.config.php
as follows:
'service_manager' => array(
'factories' => array(
'CourseServiceFactory' => 'Module\Service\Factory\CourseServiceFactory',
),
),
However this factory isn't being loaded upon calling the application and I receive this error:
Warning: Missing argument 1 for Module\Service\CourseService::__construct(),
This is how my CourseServiceFactory.php looks like:
public function createService(ServiceLocatorInterface $serviceLocator)
{
$config = $serviceLocator->get('config');
return new CourseService($config);
}
Anyone have any idea what's wrong?