Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually forward any other view engine calls #395

Merged
merged 2 commits into from Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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

Expand Down
10 changes: 2 additions & 8 deletions src/Sentry/Laravel/Tracing/ViewEngineDecorator.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}