scoutapp / scout-apm-php

ScoutAPM's Base PHP Agent - See README for Laravel, Symfony, and other framework support.
https://scoutapm.com
MIT License
16 stars 3 forks source link

Property Scoutapm\Laravel\View\Engine\ScoutViewEngineDecorator::$lastCompiled does not exist #273

Closed axelthat closed 2 years ago

axelthat commented 2 years ago

When I run $user->hasPaymentMethod(), I get the error,

Property Scoutapm\Laravel\View\Engine\ScoutViewEngineDecorator::$lastCompiled does not exist

The method hasPaymentMethod() is provided by Laravel Cashier.

Package Version
Laravel 9.11
Laravel Cashier ^13.5
ScoutAPM ^2.2
asgrim commented 2 years ago

@axelthat thanks for the report; do you have any more of the stack trace by any chance please?

axelthat commented 2 years ago

@asgrim https://flareapp.io/share/x7X6Ozgm#stack

asgrim commented 2 years ago

Thanks - looks like this is spatie/laravel-ignition making an assumption that lastCompiled is a property.

https://github.com/spatie/laravel-ignition/blob/d53075177ee0c710fbf588b8569f50435e1da054/src/Views/ViewExceptionMapper.php#L120-L145

Should be able to find a workaround for this, thanks for the report!

axelthat commented 2 years ago

Any updates? It's kinda' a blocker for us atm 😅.

asgrim commented 2 years ago

@axelthat I made a PR #276 which I believe fixes the issue, though I need to do some automated testing around it to confirm. Feel free to try out the PR if it fixes your issue! Thanks

axelthat commented 2 years ago

@asgrim Your PR fixes the issue :) Thank you so much. When do you think you can merge that PR?

asgrim commented 2 years ago

When do you think you can merge that PR?

I'll take a look Monday; I need to find a reasonable way to test it to ensure we stay compatible going forward :)

asgrim commented 2 years ago

@axelthat the fix has now been merged & released in 8.2.1 - thanks for reporting this!