Hi,
I am getting this error when trying to use with Laravel 5.8.
Symfony Component OptionsResolver Exception UndefinedOptionsException
The option "user_context" does not exist. Defined options are: "attach_stacktrace", "before_breadcrumb", "before_send", "capture_silenced_errors", "context_lines", "default_integrations", "dsn", "enable_compression", "environment", "error_types", "excluded_exceptions", "http_proxy", "in_app_exclude", "integrations", "logger", "max_breadcrumbs", "max_value_length", "prefixes", "project_root", "release", "sample_rate", "send_attempts", "send_default_pii", "server_name", "tags".
Then when trying to reinstall wi composer I am getting a similar error
In OptionsResolver.php line 747:
The option "user_context" does not exist. Defined options are: "attach_stac
ktrace", "before_breadcrumb", "before_send", "capture_silenced_errors", "co
ntext_lines", "default_integrations", "dsn", "enable_compression", "environ
ment", "error_types", "excluded_exceptions", "http_proxy", "in_app_exclude"
, "integrations", "logger", "max_breadcrumbs", "max_value_length", "prefixe
s", "project_root", "release", "sample_rate", "send_attempts", "send_defaul
t_pii", "server_name", "tags".
Thank you,
you need to remove this line from your config/sentry.php
'user_context' => false,
Jep that's right (thanks @sporchia), check out #203, #185 for some more context if needed.
(check out the docs in case you are missing the user context that config option provided).
Thank you. Actually the full process goes like this.
I had to manually remove the .../bootstrap/cache/config.php file, since artisan config:cache resulted in the same error.
For people coming here in the future:
Do not use php artisan config:cache when installing packages (or when developing locally). It will with 99.9% certainty cause issues, use it in production like environments only!
To make sure you don't have it active use php artisan config:clear to remove the cache file or remove the bootstrap/cache/config.php file manually.
I solve this:
rm config/sentry.php
php artisan vendor:publish --provider="Sentry\Laravel\ServiceProvider"
Most helpful comment
you need to remove this line from your config/sentry.php