Skip to content

Commit e34eb19

Browse files
author
Jérémie Broutier
authored
Fix compatibility issues with Twig >=3.4.0 (#628)
1 parent 6177d71 commit e34eb19

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Fix compatibility issue with Twig >= 3.4.0 (#628)
6+
57
## 4.2.9 (2022-05-03)
68

79
- Fix deprecation notice thrown when instrumenting the `PDOStatement::bindParam()` method and passing `$length = null` on DBAL `2.x` (#613)

src/Twig/SentryExtension.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ public function __construct(HubInterface $hub)
2929
public function getFunctions(): array
3030
{
3131
return [
32-
new TwigFunction('sentry_trace_meta', \Closure::fromCallable([$this, 'getTraceMeta']), ['is_safe' => ['html']]),
32+
new TwigFunction('sentry_trace_meta', [$this, 'getTraceMeta'], ['is_safe' => ['html']]),
3333
];
3434
}
3535

3636
/**
3737
* Returns an HTML meta tag named `sentry-trace`.
3838
*/
39-
private function getTraceMeta(): string
39+
public function getTraceMeta(): string
4040
{
4141
$span = $this->hub->getSpan();
4242

0 commit comments

Comments
 (0)