Skip to content

Commit

Permalink
Merge branch '4.14' of https://github.com/craftcms/cms into 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Dec 27, 2024
2 parents c09f290 + d8f0ee0 commit ce09b29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- The `duration` Twig filter now has a `language` argument. ([#16332](https://github.com/craftcms/cms/pull/16332))
- The `indexOf` Twig filter now has a `default` argument, which can be any integer or `null`. (`-1` by default for backwards compatibility.)
- It’s now possible to reference custom field handles in element queries’ `where` params. ([#16318](https://github.com/craftcms/cms/pull/16318))
- Deprecated the `ucfirst` Twig filter. `capitalize` should be used instead.

### Extensibility
- Added `craft\base\Element::EVENT_DEFINE_ALT_ACTIONS`. ([#16294](https://github.com/craftcms/cms/pull/16294))
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/plugins/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
{% switch issue %}
{% case 'wrong_edition' %}
{{ 'This license is for the {name} edition.'|t('app', {
name: config.licensedEdition|ucfirst
name: config.licensedEdition|capitalize,
}) }}
{% case 'no_trials' %}
{{ 'Plugin trials are not allowed on this domain.'|t('app') }}
Expand Down
3 changes: 3 additions & 0 deletions src/web/twig/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,11 @@ public function truncateFilter(string $string, int $length, string $suffix = '
*
* @param mixed $string The multibyte string.
* @return string The string with the first character converted to upercase.
* @deprecated in 5.6.0
*/
public function ucfirstFilter(mixed $string): string
{
Craft::$app->getDeprecator()->log('ucfirst', 'The `|ucfirst` filter has been deprecated. Use `|capitalize` instead.');
return StringHelper::upperCaseFirst((string)$string);
}

Expand All @@ -474,6 +476,7 @@ public function ucfirstFilter(mixed $string): string
* @param TwigEnvironment $env
* @param string $string
* @return string
* @deprecated in 3.5.0
*/
public function ucwordsFilter(TwigEnvironment $env, string $string): string
{
Expand Down

0 comments on commit ce09b29

Please sign in to comment.