Issue #3612202 by hidehisa, sriram_s: Allow subclassed VersionHistoryController in RouteSubscriber
Carrying forward @Hidehisa's patch from #1 into a merge request as requested in #3.
- In
RouteSubscriber::alterRoutes(), route controller matching was previously checking for strict class equality ($controller === VersionHistoryController::class). This prevented custom entities or modules with controllers extendingVersionHistoryControllerfrom having their revision routes altered to use Diff's revision overview controller. - Switched the check to
is_a($controller, VersionHistoryController::class, TRUE)to support subclassed version history controllers. - Verified locally on Drupal 10.6 that standard, subclassed, and unrelated route controllers behave as expected. Closes #3612202