Use ClassInfo::ancestry() instead of get_parent_class()