Skip to content

Commit

Permalink
Actually forward any other view engine calls (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive committed Oct 6, 2020
1 parent 83d7121 commit be93e34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
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);
}
}

0 comments on commit be93e34

Please sign in to comment.