Updated: Comment #N
Forum manager, OverviewTerms and various other places still have to call the procedural taxonomy_term_get_parents(), taxonomy_term_get_parents_all(), taxonomy_get_tree() functions because we have no OO equivalent.
Move these to methods on the TermStorageController
Make it green
User interface changes
taxonomy_term_load_parents(), taxonomy_term_load_parents_all(), taxonomy_term_load_children(), taxonomy_get_tree() all marked as deprecated.
TermStorageControllerInterface::loadParents() and TermStorageControllerInterface::loadChildren() now return Term objects instead of array of tids
TermStorageControllerInterface::loadTree() now returns an array of all term objects in the tree. Each term object is extended to have "depth" and "parents" attributes in addition to its normal ones (aka the original return of taxonomy_get_tree()).
Note that the only calls to the changes methods on TermStorageControllerInterface were inside the deprecated functions.
Original report by @larowlan
Follow up for
taxonomy_get_tree() needs to be a service that can be injected into \Drupal\taxonomy\Form\OverviewTerms and other objects.
Procedural wrappers should be retained for time being but marked as deprecated.