Commit 4af2fc84 authored by catch's avatar catch
Browse files

task: #3641267 Update Twig to v3.31.1

By: xjm
By: godotislate
By: phenaproxima
By: longwave
parent 464469c4
Loading
Loading
Loading
Loading
Loading
+18 −16
Changes for composer.lock: 18 added lines, 16 removed lines.
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@
            "dist": {
                "type": "path",
                "url": "core",
                "reference": "17402cb2a5f9da4aecf6aca8ce833537c76dd3c1"
                "reference": "c3bf68739443555e1e11fc2abf67eaa637ae2af9"
            },
            "require": {
                "asm89/stack-cors": "^2.3",
@@ -419,7 +419,7 @@
                "symfony/validator": "^8.2",
                "symfony/yaml": "^8.2",
                "twig/html-extra": "^3.23",
                "twig/twig": "^3.28.0"
                "twig/twig": "^3.31.1"
            },
            "conflict": {
                "dealerdirect/phpcodesniffer-composer-installer": "1.1.0",
@@ -4860,16 +4860,16 @@
        },
        {
            "name": "twig/html-extra",
            "version": "v3.29.0",
            "version": "v3.31.1",
            "source": {
                "type": "git",
                "url": "https://github.com/twigphp/html-extra.git",
                "reference": "7147611979df81edb78baf7d003860b72e335c3f"
                "reference": "e25770102c1447ba769fedb76552864a7c82d900"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/twigphp/html-extra/zipball/7147611979df81edb78baf7d003860b72e335c3f",
                "reference": "7147611979df81edb78baf7d003860b72e335c3f",
                "url": "https://api.github.com/repos/twigphp/html-extra/zipball/e25770102c1447ba769fedb76552864a7c82d900",
                "reference": "e25770102c1447ba769fedb76552864a7c82d900",
                "shasum": ""
            },
            "require": {
@@ -4879,7 +4879,7 @@
                "twig/twig": "^3.13|^4.0"
            },
            "require-dev": {
                "symfony/phpunit-bridge": "^6.4|^7.0"
                "symfony/phpunit-bridge": "^7.4|^8.0"
            },
            "type": "library",
            "autoload": {
@@ -4912,7 +4912,7 @@
                "twig"
            ],
            "support": {
                "source": "https://github.com/twigphp/html-extra/tree/v3.29.0"
                "source": "https://github.com/twigphp/html-extra/tree/v3.31.1"
            },
            "funding": [
                {
@@ -4924,20 +4924,21 @@
                    "type": "tidelift"
                }
            ],
            "time": "2026-09-06T20:35:36+00:00"
            "time": "2026-11-24T11:48:58+00:00",
            "published-time": "2026-11-24T12:48:56+00:00"
        },
        {
            "name": "twig/twig",
            "version": "v3.30.0",
            "version": "v3.31.1",
            "source": {
                "type": "git",
                "url": "https://github.com/twigphp/Twig.git",
                "reference": "8c737079b726af72ff8ef3c595be9f6a810ea1ef"
                "reference": "6f6ec372231b53d1d564567a78beb8844cafa132"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/twigphp/Twig/zipball/8c737079b726af72ff8ef3c595be9f6a810ea1ef",
                "reference": "8c737079b726af72ff8ef3c595be9f6a810ea1ef",
                "url": "https://api.github.com/repos/twigphp/Twig/zipball/6f6ec372231b53d1d564567a78beb8844cafa132",
                "reference": "6f6ec372231b53d1d564567a78beb8844cafa132",
                "shasum": ""
            },
            "require": {
@@ -4992,7 +4993,7 @@
            ],
            "support": {
                "issues": "https://github.com/twigphp/Twig/issues",
                "source": "https://github.com/twigphp/Twig/tree/v3.30.0"
                "source": "https://github.com/twigphp/Twig/tree/v3.31.1"
            },
            "funding": [
                {
@@ -5004,7 +5005,8 @@
                    "type": "tidelift"
                }
            ],
            "time": "2026-09-25T13:20:01+00:00"
            "time": "2026-11-24T12:48:40+00:00",
            "published-time": "2026-11-24T12:48:53+00:00"
        }
    ],
    "packages-dev": [
@@ -10523,5 +10525,5 @@
    "platform-overrides": {
        "php": "8.5.0"
    },
    "plugin-api-version": "2.9.0"
    "plugin-api-version": "2.11.0"
}
+1 −1
Changes for core/composer.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
        "symfony/polyfill-php86": "^1.37",
        "symfony/yaml": "^8.2",
        "revolt/event-loop": "^1.0",
        "twig/twig": "^3.28.0",
        "twig/twig": "^3.31.1",
        "doctrine/lexer": "^3",
        "drupal/core-composer-scaffold": "self.version",
        "guzzlehttp/guzzle": "^8.0.1",
+2 −7
Changes for core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php: 2 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -62,14 +62,9 @@ public function __construct($paths, ModuleHandlerInterface $module_handler, Them
  }

  /**
   * Adds a path where templates are stored.
   *
   * @param string $path
   *   A path where to look for templates.
   * @param string $namespace
   *   (optional) A path name.
   * {@inheritdoc}
   */
  public function addPath(string $path, string $namespace = self::MAIN_NAMESPACE): void {
  public function addPath(string $path, string $namespace = self::MAIN_NAMESPACE, bool $check = TRUE): void {
    // Invalidate the cache.
    $this->cache = [];
    $this->paths[$namespace][] = rtrim($path, '/\\');