Skip to content
Snippets Groups Projects
Commit 08c899e0 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 c0a194b9
No related branches found
No related tags found
15 merge requests!10663Issue #3495778: Update phpdoc in FileSaveHtaccessLoggingTest,!10451Issue #3472458 by watergate, smustgrave: CKEditor 5 show blocks label is not translated,!103032838547 Fix punctuation rules for inline label suffix colon with CSS only,!10150Issue #3467294 by quietone, nod_, smustgrave, catch, longwave: Change string...,!10130Resolve #3480321 "Second level menu",!9936Issue #3483087: Check the module:// prefix in the translation server path and replace it with the actual module path,!9933Issue #3394728 by ankondrat4: Undefined array key "#prefix" and deprecated function: explode() in Drupal\file\Element\ManagedFile::uploadAjaxCallback(),!9914Issue #3451136 by quietone, gapple, ghost of drupal past: Improve...,!9882Draft: Issue #3481777 In bulk_form ensure the triggering element is the bulk_form button,!9839Issue #3445469 by pooja_sharma, smustgrave: Add additional test coverage for...,!9815Issue #3480025: There is no way to remove entity cache items,!9757Issue #3478869 Add "All" or overview links to parent links,!9752Issue #3439910 by pooja_sharma, vensires: Fix Toolbar tests that rely on UID1's super user behavior,!9749Issue #3439910 by pooja_sharma, vensires: Fix Toolbar tests that rely on UID1's super user behavior,!9678Issue #3465132 by catch, Spokje, nod_: Show test run time by class in run-tests.sh output
Pipeline #295625 passed
Pipeline: drupal

#295626

    ......@@ -28,13 +28,9 @@
    %The "PHPUnit\\Framework\\TestCase::__construct\(\)" method is considered internal.*You should not extend it from "Drupal\\[^"]+"%
    # 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