Skip to content
Snippets Groups Projects

Issue #3456676: Single Directory Components templates are not auto reloaded after change

Open Issue #3456676: Single Directory Components templates are not auto reloaded after change
3 unresolved threads
3 unresolved threads

Closes #3456676

Merge request reports

Members who can merge are allowed to add commits.
Approval is optional
Code Quality is loading
Test summary results are being parsed
Metrics reports are loading
Ready to merge by members who can write to the target branch.
  • The source branch is 52 commits behind the target branch.
  • 1 commit will be added to 11.x.
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
122 121 catch (ComponentNotFoundException) {
123 122 throw new LoaderError('Unable to find component');
124 123 }
125 // If any of the templates, or the component definition, are fresh. Then the
126 // component is fresh.
127 $metadata_path = $component->getPluginDefinition()[YamlDirectoryDiscovery::FILE_KEY];
  • 122 121 catch (ComponentNotFoundException) {
    123 122 throw new LoaderError('Unable to find component');
    124 123 }
    125 // If any of the templates, or the component definition, are fresh. Then the
    126 // component is fresh.
    127 $metadata_path = $component->getPluginDefinition()[YamlDirectoryDiscovery::FILE_KEY];
  • 122 121 catch (ComponentNotFoundException) {
    123 122 throw new LoaderError('Unable to find component');
    124 123 }
    125 // If any of the templates, or the component definition, are fresh. Then the
    126 // component is fresh.
    127 $metadata_path = $component->getPluginDefinition()[YamlDirectoryDiscovery::FILE_KEY];
    128 if ($file_is_fresh($metadata_path)) {
    129 return TRUE;
    130 }
    124 // We only support refreshing templates.
    125 // If the template is fresh. Then the component is fresh.
    131 126 return $file_is_fresh($component->getTemplatePath());
    • Comment on lines -125 to 131

      I think if I set twig to auto refresh I would expect it to behave like this:

      Suggested change
      124 // We only support refreshing templates.
      125 // If the template is fresh. Then the component is fresh.
      126 return $file_is_fresh($component->getTemplatePath());
      124 $metadata_path = $component->getPluginDefinition()[YamlDirectoryDiscovery::FILE_KEY];
      125 return $file_is_fresh($component->getTemplatePath()) && $file_is_fresh($metadata_path);
    • Please register or sign in to reply
  • added 1 commit

    Compare with previous version

  • Florent Torregrosa added 610 commits

    added 610 commits

    Compare with previous version

  • Pierre Dureau added 73 commits

    added 73 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading