- Issue created by @reinfate
- Merge request !8518Issue #3456676: Single Directory Components templates are not auto reloaded after change β (Open) created by reinfate
- Status changed to Needs review
11 months ago 11:29am 24 June 2024 - Status changed to Needs work
11 months ago 1:58pm 25 June 2024 - πΊπΈUnited States smustgrave
Nice catch!
Feel this is something we should probably have test coverage for.
- Merge request !10244Issue #3456676: Single Directory Components templates are not auto reloaded after change β (Closed) created by reinfate
Added the test coverage for the
isFresh
function inComponentLoader
I've removed the yml file change check, it is not needed, since the component schema will be refreshed only after the discovery cache clear anyway.
The test failures seem to be not related to this issue. I've rerun them multiple times on 11.x and 11.1.x branches, and each time different test was failed.
- Status changed to Needs review
3 months ago 5:44pm 31 January 2025 - π«π·France Grimreaper France π«π·
Hi,
Thanks for the bug report and the fix, I also witnessed this behavior to be in Twig debug mode and not have component refreshed after change in Twig.
Tested ok.
I just put one question on MR, so not RTBC for that.
- π¬π§United Kingdom alexpott πͺπΊπ
I think if we're enabling
twig.config:auto_reload
i would expect changes to the yml or the template to result in changes automatically. Made a suggestion to make it work this way. I don't see why we need to check the YML file.
The class is responsible specifically for the component's twig file.
Even if we assume that the YML discovery cache is disabled, the YML file itself doesn't affect the twig compilation in any way.
Unless the changes are in the twig file itself it shouldn't be recompiled therefore it is fresh.- Assigned to pdureau
- π«π·France Grimreaper France π«π·
Hi,
Even if we could disable YML discovery cache with
$settings['cache']['bins']['discovery'] = 'cache.backend.null';
, it will disable all plugin discovery cache which could slow down development environment.So even if I would say we should not check for YML change, I agree that it could be handy to have that check.
I don't see why we need to check the YML file.
I am not sure but with UI Patterns 2 features not yet in Core like with data normalization, you may change some prop types and it can impact the template results?
I will update the MR regarding @alexpott proposed changes, so maintainers can easily decide if they want it or not.
- π«π·France Grimreaper France π«π·
Unrelated fails in the pipeline. I rebased and repushed to see if that's better.
- π¬π§United Kingdom alexpott πͺπΊπ
The updates made by @grimreaper look great.
-
pdureau β
committed de5530c6 on 11.x
Issue #3456676 by reinfate, grimreaper, pdureau, alexpott: Single...
-
pdureau β
committed de5530c6 on 11.x
-
pdureau β
committed 4c016c7d on 11.2.x
Issue #3456676 by reinfate, grimreaper, pdureau, alexpott: Single...
-
pdureau β
committed 4c016c7d on 11.2.x
- π«π·France pdureau Paris