Problem/Motivation
#2238217: Introduce a RouteMatch class →
removed the getActiveTheme() method. Granted, not much was using it, but that is changing (two patches in the queue were using it and broke).
Now instead of calling that method, a properly injected class also has to inject a RouteMatch and pass it along. All I want is the current theme, I should be able to ask the theme negotiator for that.
In addition to all of the other classes implementing ThemeNegotiatorInterface, ThemeNegotiator is the one acting as the service, and has the extra methods to gather and delegate. This is similar to BreadcrumbManager, which implements BreadcrumbBuilderInterface.
Proposed resolution
Remove the RouteMatch parameter from determineActiveTheme(), so it serves as a replacement for getActiveTheme().
Inject RouteMatch into any theme negotiators that need it via their service definition.
Additionally, add a new interface for the addNegotiator() method that only ThemeNegotiator (the service class) implements.
Remaining tasks
N/A
User interface changes
N/A
API changes
ThemeNegotiatorInterface::determineActiveTheme() no longer takes any parameters.
Theme negotiators that need a route match should inject it via their service definition.