Skip to content

Commit

Permalink
Upgrded twig/twig vendor to v3.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed May 11, 2024
1 parent 72111b8 commit 291d325
Show file tree
Hide file tree
Showing 27 changed files with 673 additions and 542 deletions.
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions upload/system/storage/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1368,17 +1368,17 @@
},
{
"name": "twig/twig",
"version": "v3.9.3",
"version_normalized": "3.9.3.0",
"version": "v3.10.0",
"version_normalized": "3.10.0.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58"
"reference": "34422f90043aba75e419dd77ee0a86e1688c28ee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58",
"reference": "a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/34422f90043aba75e419dd77ee0a86e1688c28ee",
"reference": "34422f90043aba75e419dd77ee0a86e1688c28ee",
"shasum": ""
},
"require": {
Expand All @@ -1392,7 +1392,7 @@
"psr/container": "^1.0|^2.0",
"symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0"
},
"time": "2024-04-18T11:59:33+00:00",
"time": "2024-05-11T07:44:16+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -1434,7 +1434,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.9.3"
"source": "https://github.com/twigphp/Twig/tree/v3.10.0"
},
"funding": [
{
Expand Down
6 changes: 3 additions & 3 deletions upload/system/storage/vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@
'dev_requirement' => false,
),
'twig/twig' => array(
'pretty_version' => 'v3.9.3',
'version' => '3.9.3.0',
'reference' => 'a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58',
'pretty_version' => 'v3.10.0',
'version' => '3.10.0.0',
'reference' => '34422f90043aba75e419dd77ee0a86e1688c28ee',
'type' => 'library',
'install_path' => __DIR__ . '/../twig/twig',
'aliases' => array(),
Expand Down
17 changes: 17 additions & 0 deletions upload/system/storage/vendor/twig/twig/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# 3.10.0 (2024-05-11)

* Make `CoreExtension::formatDate`, `CoreExtension::convertDate`, and
`CoreExtension::formatNumber` part of the public API
* Add `needs_charset` option for filters and functions
* Extract the escaping logic from the `EscaperExtension` class to a new
`EscaperRuntime` class.

The following methods from ``Twig\\Extension\\EscaperExtension`` are
deprecated: ``setEscaper()``, ``getEscapers()``, ``setSafeClasses``,
``addSafeClasses()``. Use the same methods on the
``Twig\\Runtime\\EscaperRuntime`` class instead.
* Fix capturing output from extensions that still use echo
* Fix a PHP warning in the Lexer on malformed templates
* Fix blocks not available under some circumstances
* Synchronize source context in templates when setting a Node on a Node

# 3.9.3 (2024-04-18)

* Add missing `twig_escape_filter_is_safe` deprecated function
Expand Down
18 changes: 14 additions & 4 deletions upload/system/storage/vendor/twig/twig/src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
use Twig\Node\ModuleNode;
use Twig\Node\Node;
use Twig\NodeVisitor\NodeVisitorInterface;
use Twig\Runtime\EscaperRuntime;
use Twig\RuntimeLoader\FactoryRuntimeLoader;
use Twig\RuntimeLoader\RuntimeLoaderInterface;
use Twig\TokenParser\TokenParserInterface;

Expand All @@ -41,11 +43,11 @@
*/
class Environment
{
public const VERSION = '3.9.3';
public const VERSION_ID = 30903;
public const VERSION = '3.10.0';
public const VERSION_ID = 301000;
public const MAJOR_VERSION = 3;
public const MINOR_VERSION = 9;
public const RELEASE_VERSION = 3;
public const MINOR_VERSION = 10;
public const RELEASE_VERSION = 0;
public const EXTRA_VERSION = '';

private $charset;
Expand All @@ -69,6 +71,7 @@ class Environment
private $optionsHash;
/** @var bool */
private $useYield;
private $defaultRuntimeLoader;

/**
* Constructor.
Expand Down Expand Up @@ -127,6 +130,9 @@ public function __construct(LoaderInterface $loader, $options = [])
$this->strictVariables = (bool) $options['strict_variables'];
$this->setCache($options['cache']);
$this->extensionSet = new ExtensionSet();
$this->defaultRuntimeLoader = new FactoryRuntimeLoader([
EscaperRuntime::class => function () { return new EscaperRuntime($this->charset); },
]);

$this->addExtension(new CoreExtension());
$this->addExtension(new EscaperExtension($options['autoescape']));
Expand Down Expand Up @@ -620,6 +626,10 @@ public function getRuntime(string $class)
}
}

if (null !== $runtime = $this->defaultRuntimeLoader->load($class)) {
return $this->runtimes[$class] = $runtime;
}

throw new RuntimeError(sprintf('Unable to load the "%s" runtime.', $class));
}

Expand Down
Loading

0 comments on commit 291d325

Please sign in to comment.