Problem/Motivation
When twig.config:auto_reload is true, the component's templates are not refreshed, they only refreshed after the change to the YML file.
This is also weird because the parsed YML file is cached separately anyway.
This issue lies in \Drupal\Core\Template\Loader\ComponentLoader::isFresh. It is checking the YML file, and if YML is not updated, it will never check the template itself.
Steps to reproduce
Set twig.config:auto_reload to true
Create component
Render component
Change the component's template
The component still renders the old contents while the usual templates are refreshed.
Proposed resolution
Always check if the template file is fresh. Not sure the YML file needs to be checked at all since its contents will be cached anyway.
Remaining tasks
-
User interface changes
-
API changes
-
Data model changes
-
Release notes snippet
-