Scenario: components and plugins renderers should be moved to proper namespace classes (XXX\output\renderer). However, someitmes the old renderer.php files cannot be removed from core because contrib plugins still include them in their code (a typical example is course/format/topics/renderer.php to extend the topics format).
Problem: following the deprecation process, the old renderer.php files should have a debugging message to alert the plugins they need to remove the inclusion. However, the current $page->get_renderer method checks if the file is present and to a require_once even if the output class is available. This means that we cannot add the deprecation message because it will appear every time the rendered is create via get_renderer (which is the proper way of doing it).
Extra task: this issue is discovered while integrating
MDL-72578. One of the tasks of this issue is also add a deprecation message to the following legacy renderers:
Technical details: the method that does the require_once is standard_renderer_classnames.
Solution hint: the get_renderer method should check first if the namespace renderer exists and, if not, continue with the regular way of finding the correct renderer testing the several names and locations options. In fact, at some moment this "regular way" of testing multiple renderer formats should disappear and we should be more strict in the way renderers are implemented.