4.9 KiB
4.9 KiB
CHANGELOG
7.3
- Enable
#[AsTwigFilter],#[AsTwigFunction]and#[AsTwigTest]attributes to configure extensions on runtime classes - Add support for a
twigvalidator - Use
ChainCacheto store warmed-up cache inkernel.build_dirand runtime cache inkernel.cache_dir - Make
TemplateCacheWarmerusekernel.build_dirinstead ofkernel.cache_dir
7.1
- Mark class
TemplateCacheWarmerasfinal
7.0
- Remove the
Twig_Environmentautowiring alias, useTwig\Environmentinstead - Remove option
twig.autoescape; create a class that implements your escaping strategy (checkFileExtensionEscapingStrategy::guess()for inspiration) and reference it using thetwig.autoescape_serviceoption instead - Drop support for Twig 2
6.4
- Allow omitting the
autoescape_service_methodoption whenautoescape_serviceis set to an invokable service id
6.3
- Deprecate the
Twig_Environmentautowiring alias, useTwig\Environmentinstead
6.2
- Add the
twig.mailer.html_to_text_converteroption to allow configuring customHtmlToTextConverterInterfaceimplementations to be used by thetwig.mime_body_rendererservice
6.1
- Add option
twig.file_name_patternto restrict which files are compiled by cache warmer and linter - Deprecate option
twig.autoescape, usetwig.autoescape_service[_method]instead
6.0
- The
twigservice is now private
5.3
- Add support for the new
serializefilter (from Twig Bridge)
5.2.0
- deprecated the public
twigservice to private
5.0.0
- updated default value for the
strict_variablesoption to%kernel.debug%parameter - removed support to load templates from the legacy directories
src/Resources/views/andsrc/Resources/<BundleName>/views/ - removed
TwigEngineclass, useTwig\Environmentinstead - removed
FilesystemLoaderandNativeFilesystemLoader, use Twig notation for templates instead - removed
twig.exception_controllerconfiguration option, useframework.error_controlleroption instead - removed
ExceptionController,PreviewErrorControllerand all built-in error templates in favor of the new error renderer mechanism
4.4.0
- marked the
TemplateIteratorasinternal - added HTML comment to beginning and end of
exception_full.html.twig - deprecated
ExceptionControllerandPreviewErrorControllercontrollers, useErrorControllerfrom theHttpKernelcomponent instead - deprecated all built-in error templates in favor of the new error renderer mechanism
- deprecated
twig.exception_controllerconfiguration option, set it to "null" and useframework.error_controllerconfiguration instead
4.2.0
- deprecated support for legacy templates directories
src/Resources/views/andsrc/Resources/<BundleName>/views/, usetemplates/andtemplates/bundles/<BundleName>/instead.
4.1.0
- added priority to Twig extensions
- deprecated relying on the default value (
false) of thetwig.strict_variablesconfiguration option. The%kernel.debug%parameter will be the new default in 5.0
4.0.0
- removed
ContainerAwareRuntimeLoader
3.4.0
- added exclusive Twig namespace only for root bundles
- deprecated
Symfony\Bundle\TwigBundle\Command\DebugCommand, useSymfony\Bridge\Twig\Command\DebugCommandinstead - deprecated relying on the
ContainerAwareInterfaceimplementation forSymfony\Bundle\TwigBundle\Command\LintCommand - added option to configure default path templates (via
default_path)
3.3.0
- Deprecated
ContainerAwareRuntimeLoader
2.7.0
- made it possible to configure the default formats for both the
dateand thenumber_formatfilter - 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_serviceandautoescape_service_method)
2.2.0
- moved the exception controller to be a service (
twig.controller.exception:showActionvsSymfony\\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.