impersonation_exit_url()
and impersonation_exit_path()
functions. They return a URL that allows to switch back to the original user.workflow_transition()
function to easily retrieve a specific transition objectTranslatableInterface
objectst()
function to easily create TranslatableMessage
objectst()
functionfield_*
Twig functions to access string values from Form fieldsimportance
context option of NotificationEmail
to allow null
TwigEngine
class, use \Twig\Environment
instead.transChoice
filter and tokenHttpFoundationExtension
requires a UrlHelper
on instantiationlint:twig
command, use lint:twig -
(append a dash) instead to make it explicit.switch-input
class to the attributes of a CheckboxType
TwigErrorRenderer
for html
format, integrated with the ErrorHandler
component@final
$rootDir
and $fileLinkFormatter
as 5th and 6th argument respectively to the
DebugCommand::__construct()
method, swap the variables position.LintCommand
lints all the templates stored in all configured Twig paths if none argument is providedlint:twig
command, use lint:twig -
(append a dash) instead to make it explicit.--show-deprecations
option to the lint:twig
commandswitch-custom
class to the label attributes of a CheckboxType
TwigDataCollector
class as @final
.form_parent()
function that allows to reliably retrieve the parent form in Twig templatesworkflow_transition_blockers()
function$requestStack
and $requestContext
arguments of the
HttpFoundationExtension
, pass a Symfony\Component\HttpFoundation\UrlHelper
instance as the only argument insteadname
argument in debug:twig
command and changed filter
argument as --filter
optiontranschoice
tag and filter, use the trans
ones instead with a %count%
parameterworkflow_metadata
functiononly
keyword to form_theme
tag to disable usage of default themes when rendering a formSymfony\Bridge\Twig\Form\TwigRenderer
DebugCommand::set/getTwigEnvironment
. Pass an instance of
Twig\Environment
as first argument of the constructor insteadLintCommand::set/getTwigEnvironment
. Pass an instance of
Twig\Environment
as first argument of the constructor insteadworkflow_has_marked_place
functionworkflow_marked_places
functionAppVariable::getToken()
TwigRenderer
into the FormExtension
.FormExtension
without configuring a runtime loader for the TwigRenderer
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());
TwigRendererEngineInterface
interface.workflow_can
and workflow_transitions
)logout_url
and logout_path
)absolute_url
and the relative_path
functions)asset
and asset_version
functions)twig:lint
from TwigBundle
controller
function to help generating controller referencesrender_esi
and a render_hinclude
functionrender
tag to only accept URIs or ControllerReference instances (the signature changed)render
function to render a requestapp
global variable is now injected even when using the twig service directly.path
and url
function which allows to generate
relative paths (e.g. "../parent-file") and scheme-relative URLs (e.g. "//example.com/dir/file").