-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
[2.x] Includes facade improvements #1738
Merged
Merged
Conversation
This file contains 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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.x-dev #1738 +/- ##
==========================================
Coverage 99.95% 99.95%
- Complexity 1806 1810 +4
==========================================
Files 185 185
Lines 4786 4793 +7
==========================================
+ Hits 4784 4791 +7
Misses 2 2 ☔ View full report in Codecov by Sentry. |
caendesilva
force-pushed
the
includes-facade-improvements
branch
from
June 26, 2024 08:31
3f49a28
to
5bcb54d
Compare
caendesilva
force-pushed
the
includes-facade-improvements
branch
from
June 26, 2024 09:14
ee9fb6a
to
990a561
Compare
caendesilva
force-pushed
the
includes-facade-improvements
branch
from
June 26, 2024 09:15
990a561
to
45e59ce
Compare
Could we hook into the Blade |
Gets better IDE support and doesn't report the methods as unused
Matches the execution flow and documentation order
Will prevent recursion issue in upcoming change
This reverts commit 83b2480.
Also reduces unnecessary double qualification attempt in the get method
This means that nested directories are no longer supported, as you should use a data collection for that. See https://github.com/hydephp/develop/pull/1738/files#r1655369910
This was referenced Jun 27, 2024
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.
Includes
facade now returnHtmlString
objects instead ofstring
Includes::path()
andIncludes::get()
methods now normalizes paths to be basenames to match the behaviour of the other include method.Includes facade changes
The following methods in the
Includes
facade now returnHtmlString
objects instead ofstring
:Includes::html()
Includes::blade()
Includes::markdown()
Notes:
{!! !!}
to render the output of these methods in Blade templates, instead just use{{ }}
.For more information, see the RFC that proposed this change: #1734
The RFC was implemented in #1738
Remember to escape output if necessary
Note: Remember that this means that includes are no longer escaped by default, so make sure to escape the output if necessary, for example if the content is user-generated.
{{ e(Includes::html('foo')) }}
instead of{{ Includes::html('foo') }}
to escape the output, matching the previous behavior.)