You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Deprecate the `Sentry\SentryBundle\EventListener\ConsoleCommandListener` class in favor of its parent class `Sentry\SentryBundle\EventListener\ConsoleListener` (#429)
10
10
11
+
## 4.0.3 (2021-03-03)
12
+
- Fix regression from #454 for `null` value on DSN not disabling Sentry (#457)
13
+
14
+
## 4.0.2 (2021-03-03)
15
+
16
+
- Add `kernel.project_dir` to `prefixes` default value to trim paths to the project root (#434)
17
+
- Fix `null`, `false` or empty value not disabling Sentry (#454)
18
+
19
+
## 4.0.1 (2021-01-26)
20
+
21
+
- Add missing `capture-soft-fails` option to the XSD schema for the XML config (#417)
22
+
- Fix regression that send PII even when the `send_default_pii` option is off (#425)
23
+
- Fix capture of console errors when the `register_error_listener` option is disabled (#427)
24
+
11
25
## 4.0.0 (2021-01-19)
12
26
13
27
**Breaking Change**: This version uses the [envelope endpoint](https://develop.sentry.dev/sdk/envelopes/). If you are
@@ -38,7 +52,7 @@ using an on-premise installation it requires Sentry version `>= v20.6.0` to work
38
52
39
53
- Use `jean85/pretty-package-versions``^1.5` to leverage the new `getRootPackageVersion` method (c8799ac)
40
54
- Fix support for PHP preloading (#354, thanks to @annuh)
41
-
- Fix `capture_soft_fails: false` option for the Messenger (#353)
55
+
- Fix `capture_soft_fails: false` option for the Messenger (#353)
Copy file name to clipboardExpand all lines: README.md
+28-60Lines changed: 28 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,53 +22,58 @@ Use `sentry-symfony` for:
22
22
- app path
23
23
- excluded paths (cache and vendor)
24
24
25
-
## Installation with Symfony Flex (Symfony 4 or newer):
26
-
If you're using the [Symfony Flex](https://symfony.com/doc/current/setup/flex.html) Composer plugin, you can install this bundle in a single, easy step:
25
+
## Installation
26
+
27
+
To install the SDK you will need to be using [Composer]([https://getcomposer.org/)
28
+
in your project. To install it please see the [docs](https://getcomposer.org/download/).
29
+
27
30
```bash
28
31
composer require sentry/sentry-symfony
29
32
```
30
-
This could show a message similar to this:
33
+
34
+
If you're using the [Symfony Flex](https://symfony.com/doc/current/setup/flex.html) Composer plugin, it could show a message similar to this:
35
+
31
36
```
32
-
The recipe for this package comes from the "contrib" repository, which is open to community contributions.
33
-
Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/sentry/sentry-symfony/3.0
37
+
The recipe for this package comes from the "contrib" repository, which is open to community contributions.
38
+
Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/sentry/sentry-symfony/3.0
34
39
35
-
Do you want to execute this recipe?
40
+
Do you want to execute this recipe?
36
41
```
37
-
Press `y` and return to allow the installation.
38
42
39
-
## Installation without Symfony Flex:
40
-
### Step 1: Download the Bundle
41
-
You can install this bundle using Composer:
43
+
Just type `y`, press return, and the procedure will continue.
42
44
43
-
```bash
44
-
composer require sentry/sentry-symfony
45
+
**Warning:** due to a bug in all versions lower than `6.0` of the [`SensioFrameworkExtra`](https://github.com/sensiolabs/SensioFrameworkExtraBundle) bundle,
46
+
if you have it installed you will likely get an error during the execution of the commands above in regards to the missing `Nyholm\Psr7\Factory\Psr17Factory`
47
+
class. To workaround the issue, if you are not using the PSR-7 bridge, please change the configuration of that bundle as follows:
48
+
49
+
```yaml
50
+
sensio_framework_extra:
51
+
psr_message:
52
+
enabled: false
45
53
```
46
54
55
+
For more details about the issue see https://github.com/sensiolabs/SensioFrameworkExtraBundle/pull/710.
56
+
47
57
### Step 2: Enable the Bundle
48
58
49
-
Then, enable the bundle by adding it to the list of registered bundles
50
-
in the `app/AppKernel.php` file of your project:
59
+
If you installed the package using the Flex recipe, the bundle will be automatically enabled. Otherwise, enable it by adding it to the list
60
+
of registered bundles in the `Kernel.php` file of your project:
51
61
52
62
```php
53
-
<?php
54
-
// app/AppKernel.php
55
-
56
-
// ...
57
-
class AppKernel extends Kernel
63
+
class AppKernel extends \Symfony\Component\HttpKernel\Kernel
58
64
{
59
-
public function registerBundles()
65
+
public function registerBundles(): array
60
66
{
61
-
$bundles = [
67
+
return [
62
68
// ...
63
69
new \Sentry\SentryBundle\SentryBundle(),
64
70
];
65
-
66
-
// ...
67
71
}
68
72
69
73
// ...
70
74
}
71
75
```
76
+
72
77
Note that, unlike before in version 3, the bundle will be enabled in all environments; event reporting, instead, is enabled
73
78
only when providing a DSN (see the next step).
74
79
@@ -92,43 +97,6 @@ The parameter `options` allows to fine-tune exceptions. To discover more options
92
97
[the Unified APIs](https://docs.sentry.io/development/sdk-dev/unified-api/#options) options and
93
98
the [PHP specific](https://docs.sentry.io/platforms/php/#php-specific-options) ones.
94
99
95
-
#### Optional: use monolog handler provided by `sentry/sentry` (available since 3.2.0)
96
-
*Note: this step is optional*
97
-
98
-
If you're using `monolog` for logging e.g. in-app errors, you
99
-
can use this handler in order for them to show up in Sentry.
100
-
101
-
First, enable & configure the `Sentry\Monolog\Handler`; you'll also need
102
-
to disable the `Sentry\SentryBundle\EventListener\ErrorListener` to
103
-
avoid having duplicate events in Sentry:
104
-
105
-
```yaml
106
-
sentry:
107
-
register_error_listener: false # Disables the ErrorListener
108
-
monolog:
109
-
error_handler:
110
-
enabled: true
111
-
level: error
112
-
```
113
-
114
-
Then enable it in `monolog` config:
115
-
116
-
```yaml
117
-
monolog:
118
-
handlers:
119
-
sentry:
120
-
type: service
121
-
id: Sentry\Monolog\Handler
122
-
```
123
-
124
-
Additionally, you can register the `PsrLogMessageProcessor` to resolve PSR-3 placeholders in reported messages:
Copy file name to clipboardExpand all lines: UPGRADE-4.0.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,7 @@ using an on-premise installation it requires Sentry version `>= v20.6.0` to work
140
140
```yaml
141
141
sentry:
142
142
options:
143
-
before_send: 'app.sentry.before_breadcrumb'
143
+
before_breadcrumb: 'app.sentry.before_breadcrumb'
144
144
```
145
145
146
146
- Changed the type of the `sentry.options.class_serializers` configuration option from an array of `scalar` values to an array of `string` values. The value must always be the name of the container service to call without the `@` prefix.
0 commit comments