[4.0] WebAssetRegistry Improve dependency handling#22741
Merged
wilsonge merged 4 commits intojoomla:4.0-devfrom Oct 26, 2018
Merged
[4.0] WebAssetRegistry Improve dependency handling#22741wilsonge merged 4 commits intojoomla:4.0-devfrom
wilsonge merged 4 commits intojoomla:4.0-devfrom
Conversation
Contributor
Good. Plugins that are arbitrarily trying to load media in |
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is update to #22435
Summary of Changes
Now the WebAssetRegistry shows a correct state of dependency, even before attach happen. So the asset state active/inactive should be correct at any time.
Also I have improved dependency calculation, to use Topological sorting.
Testing Instructions
Run somewhere:
Expected result
Actual result
@mbabker one more review? 😉
ping @mbabker @wilsonge
Additional question:
Need to decide how to use assets in layouts and other parts of the CMS.
Current ways are:
Factory::getContainer()->get('webasset')- does not depends from a request, and can be run at any time of execution, that I likeFactory::getDocument()->getWebAssetManager()- depends from request, and can be run only "afterRoute"what could be better, any ideas? something "between" these two.