-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[AssetMapper] Allow DirectoryResource for cache #50749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AssetMapper] Allow DirectoryResource for cache #50749
Conversation
@@ -103,6 +104,7 @@ public function testAssetConfigCacheResourceContainsDependencies() | |||
|
|||
// just adding any file as an example | |||
$mappedAsset->addFileDependency(__DIR__.'/../fixtures/importmap.php'); | |||
$mappedAsset->addFileDependency(__DIR__.'/../fixtures/dir3'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a addDirectoryDependency
instead to make the intent more clear ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps - though I'm also trying to keep the patch on the smaller side.
We could merge this as-is, then think about a more generic method name like addPathDependency()
for 6.4.
eb79228
to
d2d1476
Compare
Thank you @weaverryan. |
…e not seen due to cache (weaverryan) This PR was merged into the 2.x branch. Discussion ---------- [StimulusBundle] Fixing bug where new custom controllers were not seen due to cache | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Tickets | Fix #961 | License | MIT This requires symfony/symfony#50749 Cheers! Commits ------- 4503e3d [StimulusBundle] Fixing bug where new custom controlles were not seen due to cache
…e not seen due to cache (weaverryan) This PR was merged into the 2.x branch. Discussion ---------- [StimulusBundle] Fixing bug where new custom controllers were not seen due to cache | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Tickets | Fix #961 | License | MIT This requires symfony/symfony#50749 Cheers! Commits ------- 4503e3de [StimulusBundle] Fixing bug where new custom controlles were not seen due to cache
Hi!
In StimulusBundle, one file is dynamically generated to contain the list of custom Stimulus controllers. This means the file's contents need to be regenerated in the
dev
environment whenever a new file is added to that directory. This PR allows thefileDependencies
to also be a directory so that we can use aDirectoryResource
.This may not quite fit technically as a bug fix. However, as the component is experimental, this affects the
dev
environment only and it will allow for a pretty critical bug fix in StimulusBundle, I've characterized it as a bug fix for 6.3.Thanks!