Skip to content

Commit

Permalink
feature twigphp#4066 Make some CoreExtension methods part of the publ…
Browse files Browse the repository at this point in the history
…ic API (fabpot)

This PR was merged into the 3.x branch.

Discussion
----------

Make some CoreExtension methods part of the public API

Closes twigphp#4040

Commits
-------

0a27594 Make some CoreExtension methods part of the public API
  • Loading branch information
fabpot committed May 1, 2024
2 parents 1e75ff9 + 0a27594 commit e5269cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 3.10.0 (2024-XX-XX)

* Make `CoreExtension::formatDate`, `CoreExtension::convertDate`, and
`CoreExtension::formatNumber` part of the public API
* Add `needs_charset` option for filters and functions
* Extract the escaping logic from the `EscapingExtension` class to a new
`EscapingRuntime` class.
Expand Down
6 changes: 0 additions & 6 deletions src/Extension/CoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,6 @@ public static function random(string $charset, $values = null, $max = null)
* @param \DateTimeInterface|\DateInterval|string $date A date
* @param string|null $format The target format, null to use the default
* @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged
*
* @internal
*/
public function formatDate($date, $format = null, $timezone = null): string
{
Expand Down Expand Up @@ -479,8 +477,6 @@ public static function dateConverter(Environment $env, $date, $format = null, $t
* @param \DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged
*
* @return \DateTime|\DateTimeImmutable
*
* @internal
*/
public function convertDate($date = null, $timezone = null)
{
Expand Down Expand Up @@ -583,8 +579,6 @@ public static function round($value, $precision = 0, $method = 'common')
* @param int|null $decimal the number of decimal points to display
* @param string|null $decimalPoint the character(s) to use for the decimal point
* @param string|null $thousandSep the character(s) to use for the thousands separator
*
* @internal
*/
public function formatNumber($number, $decimal = null, $decimalPoint = null, $thousandSep = null): string
{
Expand Down

0 comments on commit e5269cb

Please sign in to comment.