[10.x] Do not use app()
Foundation helper on ViewServiceProvider
#51522
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.
PR #51450 makes use of the
app()
helper to solve the view engine resolvers leaking memory issue.The
app()
is provided by the Foundation component, while the fix was made into the View component.Currently, the Foundation component is not a dependency of the View component.
This PR
app()
calls withContainer::getInstance()
calls where appropriateNote that the View component already requires the Container component, and that the
app()
helper code basically delegates toContainer::getInstance()
:framework/src/Illuminate/Foundation/helpers.php
Lines 116 to 123 in 21e6d31
No tests were added.