Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Str::template() callback support for 3.5.7 #3454

Merged
merged 4 commits into from
Jun 21, 2021

Conversation

lukasbestle
Copy link
Member

@lukasbestle lukasbestle commented Jun 21, 2021

Describe the PR

I've cherry-picked the original PR #3279 and made some improvements in the subsequent commits. Please see the commit descriptions for more details.

Release notes

Features

  • Support for custom callbacks for Str::template() (e.g. to escape query output)

Enhancements

  • Str::template() now supports an $options array that can contain fallback, callback, start, end attributes. We plan to deprecate the old $fallback, $start and $end arguments in 3.6.0.

Fixes

  • Toggle and checkbox field labels support HTML again

Breaking changes

None

Related issues/ideas

Ready?

  • Unit tests for fixed bug/feature
  • In-code documentation (wherever needed)
  • CI checks pass

When merging

bastianallgeier and others added 4 commits June 21, 2021 09:54
Supports HTML for toggle and checkbox field labels
Renaming the argument is a breaking change in PHP 8 because of named arguments (users could have explicitly passed a named `fallback` argument which would then fail).
Because of initial release in 3.5.7
@bastianallgeier bastianallgeier merged commit 0a78305 into release/3.5.7 Jun 21, 2021
@bastianallgeier bastianallgeier deleted the feature/str-template-callback-3.5.7 branch June 21, 2021 08:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants