Skip to content

Commit

Permalink
Merge branch '4.14' of https://github.com/craftcms/cms into 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Nov 22, 2024
2 parents d4a7ad0 + 29cce1b commit 9789352
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@

### System
- Craft now keeps track of which site users registered from. When sending an email from the control panel, the current site is now set to the user’s affiliated site, if known. ([#16174](https://github.com/craftcms/cms/pull/16174))
- Updated Twig to 3.15.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"symfony/var-dumper": "^5.0|^6.0",
"symfony/yaml": "^5.2.3",
"theiconic/name-parser": "^1.2",
"twig/twig": "~3.14.0",
"twig/twig": "~3.15.0",
"voku/stringy": "^6.4.0",
"web-auth/webauthn-lib": "~4.9.0",
"webonyx/graphql-php": "~14.11.5",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

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

5 changes: 4 additions & 1 deletion src/web/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use craft\web\twig\SinglePreloaderExtension;
use craft\web\twig\TemplateLoader;
use LogicException;
use Stringable;
use Throwable;
use Twig\Error\LoaderError as TwigLoaderError;
use Twig\Error\RuntimeError as TwigRuntimeError;
Expand Down Expand Up @@ -393,7 +394,9 @@ public function createTwig(): Environment
$twig = new Environment(new TemplateLoader($this), $this->_getTwigOptions());

// Mark SafeHtml as a safe interface
$twig->getRuntime(EscaperRuntime::class)->addSafeClass(SafeHtml::class, ['html']);
/** @var class-string<Stringable> $safeClass */
$safeClass = SafeHtml::class;
$twig->getRuntime(EscaperRuntime::class)->addSafeClass($safeClass, ['html']);

$twig->addExtension(new StringLoaderExtension());
$twig->addExtension(new Extension($this, $twig));
Expand Down
1 change: 1 addition & 0 deletions src/web/twig/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ public function getTests(): array
/**
* @inheritdoc
*/
/** @phpstan-ignore-next-line */
public function getOperators(): array
{
return [
Expand Down

0 comments on commit 9789352

Please sign in to comment.