e9bc23b54a
This adds new Twig configuration options that make it possible to configure the format of both numbers and dates as well as timezones without the need to write custom code. For example, using the new configuration options can look like this: ```yaml twig: date: format: d.m.Y, H:i:s interval_format: %%d days timezone: Europe/Berlin number_format: decimals: 2 decimal_point: , thousands_separator: . ```
1.3 KiB
1.3 KiB
CHANGELOG
2.7.0
- made it possible to configure the default formats for both the
date
and thenumber_format
filter - added support for the new Asset component (from Twig bridge)
- deprecated the assets extension (use the one from the Twig bridge instead)
2.6.0
- [BC BREAK] changed exception.json.twig to match same structure as error.json.twig making clients independent of runtime environment.
2.3.0
- added option to configure a custom template escaping guesser (via
autoescape_service
andautoescape_service_method
)
2.2.0
- moved the exception controller to be a service (
twig.controller.exception:showAction
vsSymfony\\Bundle\\TwigBundle\\Controller\\ExceptionController::showAction
) - added support for multiple loaders via the "twig.loader" tag.
- added automatic registration of namespaced paths for registered bundles
- added support for namespaced paths
2.1.0
- added a new setting ("paths") to configure more paths for the Twig filesystem loader
- added contextual escaping based on the template file name (disabled if you explicitly pass an autoescape option)
- added a command that extracts translation messages from templates
- added the real template name when an error occurs in a Twig template
- added the twig:lint command that will validate a Twig template syntax.