From 79b25f23b5d90536627743c6dedb2fcecf61382c Mon Sep 17 00:00:00 2001 From: Alex Bouma Date: Thu, 1 Oct 2020 22:24:38 +0200 Subject: [PATCH 1/2] Actually forward any other view engine calls --- src/Sentry/Laravel/Tracing/ViewEngineDecorator.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Sentry/Laravel/Tracing/ViewEngineDecorator.php b/src/Sentry/Laravel/Tracing/ViewEngineDecorator.php index 864cf590..e8eac542 100644 --- a/src/Sentry/Laravel/Tracing/ViewEngineDecorator.php +++ b/src/Sentry/Laravel/Tracing/ViewEngineDecorator.php @@ -3,7 +3,6 @@ namespace Sentry\Laravel\Tracing; use Illuminate\Contracts\View\Engine; -use Illuminate\View\Compilers\CompilerInterface; use Illuminate\View\Factory; use Sentry\Laravel\Integration; use Sentry\SentrySdk; @@ -54,13 +53,8 @@ public function get($path, array $data = []): string return $result; } - /** - * Laravel uses this function internally. - * - * @internal - */ - public function getCompiler(): CompilerInterface + public function __call($name, $arguments) { - return $this->engine->getCompiler(); + return call_user_func_array([$this->engine, $name], $arguments); } } From 1ffd1456ec92a9818ee237bcee66808ce8253be7 Mon Sep 17 00:00:00 2001 From: Alex Bouma Date: Thu, 1 Oct 2020 22:27:52 +0200 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 872cd4e1..0320cb93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Improve performance tracing by nesting `view.render` spans and adding a `app.handle` span showing how long the actual application code runs after Laravel bootstrapping (#387) - Improve UX of `sentry:publish` command +- Fix incompatibility with other packages that also decorate the view engine, like Livewire (#395) ## 2.0.0