7.5 KiB
7.5 KiB
CHANGELOG
7.3
- Add
is_granted_for_user()Twig function - Add
field_id()Twig form helper function - Add a
Twigconstraint that validates Twig templates - Make
lint:twigcollect all deprecations instead of stopping at the first one - Add
nameargument toemail.imageto override the attachment file name being set as the file path
7.2
- Deprecate passing a tag to the constructor of
FormThemeNode
7.1
- Add
emojifyTwig filter
7.0
- Drop support for Twig 2
6.4
- Allow an array to be passed as the first argument to the
importmap()Twig function - Add
TemplatedEmail::locale()to set the locale for the email rendering - Add
AppVariable::getEnabledLocales()to retrieve the enabled locales - Add
impersonation_path()andimpersonation_url()Twig functions
6.3
- Add
AppVariable::getLocale()to retrieve the current locale when using theLocaleSwitcher
6.2
- Add
form_label_contentandform_help_contentblock to form themes - Add
#[Template()]to describe how to render arrays returned by controllers - Add support for toggle buttons in Bootstrap 5 form theme
- Add
app.current_routeandapp.current_route_parametersvariables
6.1
- Wrap help messages on form elements in
divinstead ofp
5.4
- Add
githubformat & autodetection to render errors as annotations when running the Twig linter command in a Github Actions environment.
5.3
- Add a new
markAsPublicmethod onNotificationEmailto change theimportancecontext option to null after creation - Add a new
fragment_uri()helper to generate the URI of a fragment - Add support of Bootstrap 5 for form theming
- Add a new
serializefilter to serialize objects using the Serializer component
5.2.0
- added the
impersonation_exit_url()andimpersonation_exit_path()functions. They return a URL that allows to switch back to the original user. - added the
workflow_transition()function to easily retrieve a specific transition object - added support for translating
TranslatableInterfaceobjects - added the
t()function to easily createTranslatableMessageobjects - Added support for extracting messages from the
t()function - Added
field_*Twig functions to access string values from Form fields - changed the
importancecontext option ofNotificationEmailto allownull
5.0.0
- removed
TwigEngineclass, use\Twig\Environmentinstead. - removed
transChoicefilter and token HttpFoundationExtensionrequires aUrlHelperon instantiation- removed support for implicit STDIN usage in the
lint:twigcommand, uselint:twig -(append a dash) instead to make it explicit. - added form theme for Foundation 6
- added support for Foundation 6 switches: add the
switch-inputclass to the attributes of aCheckboxType
4.4.0
- added a new
TwigErrorRendererforhtmlformat, integrated with theErrorHandlercomponent - marked all classes extending twig as
@final - deprecated to pass
$rootDirand$fileLinkFormatteras 5th and 6th argument respectively to theDebugCommand::__construct()method, swap the variables position. - the
LintCommandlints all the templates stored in all configured Twig paths if none argument is provided - deprecated accepting STDIN implicitly when using the
lint:twigcommand, uselint:twig -(append a dash) instead to make it explicit. - added
--show-deprecationsoption to thelint:twigcommand - added support for Bootstrap4 switches: add the
switch-customclass to the label attributes of aCheckboxType - Marked the
TwigDataCollectorclass as@final.
4.3.0
- added the
form_parent()function that allows to reliably retrieve the parent form in Twig templates - added the
workflow_transition_blockers()function - deprecated the
$requestStackand$requestContextarguments of theHttpFoundationExtension, pass aSymfony\Component\HttpFoundation\UrlHelperinstance as the only argument instead
4.2.0
- add bundle name suggestion on wrongly overridden templates paths
- added
nameargument indebug:twigcommand and changedfilterargument as--filteroption - deprecated the
transchoicetag and filter, use thetransones instead with a%count%parameter
4.1.0
- add a
workflow_metadatafunction
3.4.0
- added an
onlykeyword toform_themetag to disable usage of default themes when rendering a form - deprecated
Symfony\Bridge\Twig\Form\TwigRenderer - deprecated
DebugCommand::set/getTwigEnvironment. Pass an instance ofTwig\Environmentas first argument of the constructor instead - deprecated
LintCommand::set/getTwigEnvironment. Pass an instance ofTwig\Environmentas first argument of the constructor instead
3.3.0
- added a
workflow_has_marked_placefunction - added a
workflow_marked_placesfunction
3.2.0
-
added
AppVariable::getToken() -
Deprecated the possibility to inject the Form
TwigRendererinto theFormExtension. -
[BC BREAK] Registering the
FormExtensionwithout configuring a runtime loader for theTwigRendererdoesn't work anymore.Before:
use Symfony\Bridge\Twig\Extension\FormExtension; use Symfony\Bridge\Twig\Form\TwigRenderer; use Symfony\Bridge\Twig\Form\TwigRendererEngine; // ... $rendererEngine = new TwigRendererEngine(['form_div_layout.html.twig']); $rendererEngine->setEnvironment($twig); $twig->addExtension(new FormExtension(new TwigRenderer($rendererEngine, $csrfTokenManager)));After:
// ... $rendererEngine = new TwigRendererEngine(['form_div_layout.html.twig'], $twig); // require Twig 1.30+ $twig->addRuntimeLoader(new \Twig\RuntimeLoader\FactoryRuntimeLoader([ TwigRenderer::class => function () use ($rendererEngine, $csrfTokenManager) { return new TwigRenderer($rendererEngine, $csrfTokenManager); }, ])); $twig->addExtension(new FormExtension()); -
Deprecated the
TwigRendererEngineInterfaceinterface. -
added WorkflowExtension (provides
workflow_canandworkflow_transitions)
2.7.0
- added LogoutUrlExtension (provides
logout_urlandlogout_path) - added an HttpFoundation extension (provides the
absolute_urland therelative_pathfunctions) - added AssetExtension (provides the
assetandasset_versionfunctions) - Added possibility to extract translation messages from a file or files besides extracting from a directory
2.5.0
- moved command
twig:lintfromTwigBundle
2.4.0
- added stopwatch tag to time templates with the WebProfilerBundle
2.3.0
- added helpers form(), form_start() and form_end()
- deprecated form_enctype() in favor of form_start()
2.2.0
- added a
controllerfunction to help generating controller references - added a
render_esiand arender_hincludefunction - [BC BREAK] restricted the
rendertag to only accept URIs or ControllerReference instances (the signature changed) - added a
renderfunction to render a request - The
appglobal variable is now injected even when using the twig service directly. - Added an optional parameter to the
pathandurlfunction which allows to generate relative paths (e.g. "../parent-file") and scheme-relative URLs (e.g. "//example.com/dir/file").
2.1.0
- added global variables access in a form theme
- added TwigEngine
- added TwigExtractor
- added a csrf_token function
- added a way to specify a default domain for a Twig template (via the 'trans_default_domain' tag)