- removed
TwigEngine
class, use\Twig\Environment
instead. - removed
transChoice
filter and token HttpFoundationExtension
requires aUrlHelper
on instantiation
- deprecated to pass
$rootDir
and$fileLinkFormatter
as 5th and 6th argument respectively to theDebugCommand::__construct()
method, swap the variables position.
- added the
form_parent()
function that allows to reliably retrieve the parent form in Twig templates - added the
workflow_transition_blockers()
function - deprecated the
$requestStack
and$requestContext
arguments of theHttpFoundationExtension
, pass aSymfony\Component\HttpFoundation\UrlHelper
instance as the only argument instead
- add bundle name suggestion on wrongly overridden templates paths
- added
name
argument indebug:twig
command and changedfilter
argument as--filter
option - deprecated the
transchoice
tag and filter, use thetrans
ones instead with a%count%
parameter
- add a
workflow_metadata
function
- added an
only
keyword toform_theme
tag to disable usage of default themes when rendering a form - deprecated
Symfony\Bridge\Twig\Form\TwigRenderer
- deprecated
DebugCommand::set/getTwigEnvironment
. Pass an instance ofTwig\Environment
as first argument of the constructor instead - deprecated
LintCommand::set/getTwigEnvironment
. Pass an instance ofTwig\Environment
as first argument of the constructor instead
- added a
workflow_has_marked_place
function - added a
workflow_marked_places
function
-
added
AppVariable::getToken()
-
Deprecated the possibility to inject the Form
TwigRenderer
into theFormExtension
. -
[BC BREAK] Registering the
FormExtension
without configuring a runtime loader for theTwigRenderer
doesn'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
TwigRendererEngineInterface
interface. -
added WorkflowExtension (provides
workflow_can
andworkflow_transitions
)
- added LogoutUrlExtension (provides
logout_url
andlogout_path
) - added an HttpFoundation extension (provides the
absolute_url
and therelative_path
functions) - added AssetExtension (provides the
asset
andasset_version
functions) - Added possibility to extract translation messages from a file or files besides extracting from a directory
- moved command
twig:lint
fromTwigBundle
- added stopwatch tag to time templates with the WebProfilerBundle
- added helpers form(), form_start() and form_end()
- deprecated form_enctype() in favor of form_start()
- added a
controller
function to help generating controller references - added a
render_esi
and arender_hinclude
function - [BC BREAK] restricted the
render
tag to only accept URIs or ControllerReference instances (the signature changed) - added a
render
function to render a request - The
app
global variable is now injected even when using the twig service directly. - Added an optional parameter to the
path
andurl
function which allows to generate relative paths (e.g. "../parent-file") and scheme-relative URLs (e.g. "//example.com/dir/file").
- 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)