Skip to content
Snippets Groups Projects
Commit 6ed1d153 authored by catch's avatar catch
Browse files

Issue #3474692 by longwave, foxtrotcharlie, bbrala: Fix...

Issue #3474692 by longwave, foxtrotcharlie, bbrala: Fix "Twig\Node\Expression\FilterExpression" deprecation introduced in twig/twig 3.12.0

(cherry picked from commit 336ba833)
parent eaa70724
No related branches found
No related tags found
9 merge requests!10602Issue #3438769 by vinmayiswamy, antonnavi, michelle, amateescu: Sub workspace does not clear,!10301Issue #3469309 by mstrelan, smustgrave, moshe weitzman: Use one-time login...,!10187Issue #3487488 by dakwamine: ExtensionMimeTypeGuesser::guessMimeType must support file names with "0" (zero) like foo.0.zip,!9929Issue #3445469 by pooja_sharma, smustgrave: Add additional test coverage for...,!9787Resolve issue 3479427 - bootstrap barrio issue under Windows,!9742Issue #3463908 by catch, quietone: Split OptionsFieldUiTest into two,!6502Draft: Resolve #2938524 "Plach testing issue",!38582585169-10.1.x,!3226Issue #2987537: Custom menu link entity type should not declare "bundle" entity key
Pipeline #295258 passed with warnings
Pipeline: drupal

#295285

    Pipeline: drupal

    #295276

      Pipeline: drupal

      #295272

        +1
        ......@@ -64,13 +64,9 @@
        %The "Drupal\\Tests\\Core\\Utility\\MockContainerAware" class implements "Symfony\\Component\\DependencyInjection\\ContainerAwareInterface" that is deprecated since Symfony 6.4, use dependency injection instead.%
        # Twig 3.
        %Since twig/twig 3.11: Changing the value of a "filter" node in a NodeVisitor class is not supported anymore.%
        %Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "attach_library" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
        %Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "add_component_context" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
        %Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "render_var" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
        %Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "validate_component_props" function of type "Twig\\Node\\Expression\\FunctionExpression" is deprecated.%
        %Since twig/twig 3.12: Getting node "filter" on a "Twig\\Node\\Expression\\FilterExpression" class is deprecated.%
        %Since twig/twig 3.12: Getting node "filter" on a "Twig\\Node\\Expression\\Filter\\DefaultFilter" class is deprecated.%
        %Since twig/twig 3.12: Getting node "filter" on a "Twig\\Node\\Expression\\Filter\\RawFilter" class is deprecated.%
        %Since twig/twig 3.12: The "tag" constructor argument of the "Drupal\\Core\\Template\\TwigNodeTrans" class is deprecated and ignored%
        %Since twig/twig 3.12: Twig Filter "spaceless" is deprecated%
        ......@@ -145,7 +145,7 @@ protected function compileString(Node $body) {
        // @see TwigExtension::getFilters()
        $argPrefix = '@';
        while ($args instanceof FilterExpression) {
        switch ($args->getNode('filter')->getAttribute('value')) {
        switch ($args->getAttribute('twig_callable')->getName()) {
        case 'placeholder':
        $argPrefix = '%';
        break;
        ......
        ......@@ -53,10 +53,10 @@ public function leaveNode(Node $node, Environment $env): ?Node {
        }
        // Change the 'escape' filter to our own 'drupal_escape' filter.
        elseif ($node instanceof FilterExpression) {
        $name = $node->getNode('filter')->getAttribute('value');
        $name = $node->getAttribute('twig_callable')->getName();
        if ('escape' == $name || 'e' == $name) {
        // Use our own escape filter that is MarkupInterface aware.
        $node->getNode('filter')->setAttribute('value', 'drupal_escape');
        $node->setAttribute('twig_callable', $env->getFilter('drupal_escape'));
        // Store that we have a filter active already that knows
        // how to deal with render arrays.
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment