Creating Symfony services using the factory pattern