Add deprecated for Factory::getSession()