#67293Generalize the DependencyResolver to be useful for more purposes
Description
The DependencyResolver is currently used for the PackageManager to determine the loading order of extensions.
The same mechanism is useful for other purposes, eg. hook ordering, as well.
Therefore the DependencyResolver should be extracted from the Package context.
Adjusting the DependencyResolver slightly, makes it a powerful tool to resolve dependency trees.
It will support:- building a dependency tree based on “before” and “after” information
- transformation of the tree into a sorted list
The PackageManager needs only small adjustments on the way it uses the DependencyResolver.
Basically “dependencies” and “suggestions” of packages are matched to “after”; “before” is not supported for packages.