Skip to content

Commit

Permalink
Fix compatibility issues with Twig >=3.4.0 (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérémie Broutier authored May 16, 2022
1 parent 6177d71 commit e34eb19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Fix compatibility issue with Twig >= 3.4.0 (#628)

## 4.2.9 (2022-05-03)

- Fix deprecation notice thrown when instrumenting the `PDOStatement::bindParam()` method and passing `$length = null` on DBAL `2.x` (#613)
Expand Down
4 changes: 2 additions & 2 deletions src/Twig/SentryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ public function __construct(HubInterface $hub)
public function getFunctions(): array
{
return [
new TwigFunction('sentry_trace_meta', \Closure::fromCallable([$this, 'getTraceMeta']), ['is_safe' => ['html']]),
new TwigFunction('sentry_trace_meta', [$this, 'getTraceMeta'], ['is_safe' => ['html']]),
];
}

/**
* Returns an HTML meta tag named `sentry-trace`.
*/
private function getTraceMeta(): string
public function getTraceMeta(): string
{
$span = $this->hub->getSpan();

Expand Down

0 comments on commit e34eb19

Please # to comment.