Find all usages of:
- public function getGroups()
- public function getGroupMemberships()
- public function getEffectiveGroups()
- public function getAutomaticGroups()
- public function getFormerGroups()
- public function addGroup()
- public function removeGroup()
- public function addAutopromoteOnceGroups())
and need to be replaced with corresponding UserGroupManager methods.
You can obtain UserGroupManager via MediaWikiServices::getInstance()->getUserGroupManager(), but it's preferred to inject it if possible.