-
-
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
Improved helper functions #1592
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
caendesilva
temporarily deployed
to
pr-documentation-1592
February 25, 2024 18:32 — with
GitHub Actions
Inactive
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1592 +/- ##
=============================================
Coverage 100.00% 100.00%
- Complexity 1748 3496 +1748
=============================================
Files 180 360 +180
Lines 4727 9460 +4733
=============================================
+ Hits 4727 9460 +4733 ☔ View full report in Codecov by Sentry. |
caendesilva
temporarily deployed
to
pr-documentation-1592
February 25, 2024 19:51 — with
GitHub Actions
Inactive
caendesilva
temporarily deployed
to
pr-documentation-1592
February 25, 2024 19:51 — with
GitHub Actions
Inactive
caendesilva
force-pushed
the
improved-helper-functions
branch
from
February 25, 2024 20:09
82d3863
to
08cc208
Compare
caendesilva
temporarily deployed
to
pr-documentation-1592
February 25, 2024 20:09 — with
GitHub Actions
Inactive
caendesilva
temporarily deployed
to
pr-documentation-1592
February 25, 2024 20:10 — with
GitHub Actions
Inactive
caendesilva
temporarily deployed
to
pr-documentation-1592
February 25, 2024 20:36 — with
GitHub Actions
Inactive
caendesilva
temporarily deployed
to
pr-documentation-1592
February 25, 2024 20:40 — with
GitHub Actions
Inactive
caendesilva
force-pushed
the
improved-helper-functions
branch
from
February 25, 2024 20:43
b405809
to
cca1aee
Compare
caendesilva
temporarily deployed
to
pr-documentation-1592
February 25, 2024 20:43 — with
GitHub Actions
Inactive
caendesilva
temporarily deployed
to
pr-documentation-1592
February 25, 2024 21:25 — with
GitHub Actions
Inactive
caendesilva
temporarily deployed
to
pr-documentation-1592
February 26, 2024 06:36 — with
GitHub Actions
Inactive
Reminder to people reading this: |
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.
Adds helper function documentation and adds a few new global helper functions:
asset()
helper functionroute()
helper functionurl()
helper functionDesign notes:
I debated weather these functions should be global or under the Hyde function namespace. I think making them global is the best. For the majority of users, this will be the most convenient, and for a small subset of users where there are conflicts (such as including Hyde in a Laravel application (which is not "officially" supported)), we can add a constant to disable these functions in case of function registration race conditions. TLDR: I think the small conflict risk is worth the major convenience of global functions.
Compatibility mode:
To disable the new global functions, define a constant called
HYDE_COMPATIBILITY_MODE
and set it totrue
, and the new functions will not be registered. The constant should be defined early on, for example in a bootstrap file.