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
Copy file name to clipboardExpand all lines: README.md
+40-26
Original file line number
Diff line number
Diff line change
@@ -21,37 +21,28 @@ Use sentry-symfony for:
21
21
- app path
22
22
- excluded paths (cache and vendor)
23
23
24
-
## Installation
25
-
26
-
### Step 1: Download the Bundle
27
-
You can install this bundle using Composer:
28
-
24
+
## Installation with Symfony Flex (Symfony 4 or newer):
25
+
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:
29
26
```bash
30
-
composer require sentry/sentry-symfony:^3.0
27
+
composer require sentry/sentry-symfony
31
28
```
29
+
This could show a message similar to this:
30
+
```
31
+
The recipe for this package comes from the "contrib" repository, which is open to community contributions.
32
+
Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/sentry/sentry-symfony/3.0
32
33
33
-
#### Optional: use custom HTTP factory/transport
34
-
*Note: this step is optional*
35
-
36
-
Since SDK 2.0 uses HTTPlug to remain transport-agnostic, you need to have installed two packages that provides
The `sentry/sentry` package is required directly to override `sentry/sdk`, and the other two packages are up to your choice;
51
-
in the current example, we're using both Guzzle's components (client and message factory).
52
-
53
-
> TODO: Flex recipe
54
-
55
46
### Step 2: Enable the Bundle
56
47
57
48
Then, enable the bundle by adding it to the list of registered bundles
@@ -80,10 +71,10 @@ class AppKernel extends Kernel
80
71
Note that, unlike before in version 3, the bundle will be enabled in all environments; event reporting, instead, is enabled
81
72
only when providing a DSN (see the next step).
82
73
83
-
### Step 3: Configure the SDK
74
+
##Configuration of the SDK
84
75
85
-
Add your [Sentry DSN](https://docs.sentry.io/quickstart/#configure-the-dsn) value of your projectto ``app/config/config_prod.yml``.
86
-
Leaving this value empty (or undeclared) in other environments will effectively disable Sentry reporting.
76
+
Add your [Sentry DSN](https://docs.sentry.io/quickstart/#configure-the-dsn) value of your project, if you have Symfony 3.4 add it to ``app/config/config_prod.yml`` for Symfony 4 or newer add the value to `config/packages/sentry.yaml`.
77
+
Keep in mind that leaving the `dsn` value empty (or undeclared) in other environments will effectively disable Sentry reporting.
and [`http-message-implementation`](https://packagist.org/providers/psr/http-message-implementation).
136
+
137
+
This bundle depends on `sentry/sdk`, which is a metapackage that already solves this need, requiring our suggested HTTP
138
+
packages: the Curl client and Guzzle's message factories.
139
+
140
+
If instead you want to use a different HTTP client or message factory, you can override the ``sentry/sdk`` package adding the following to your ``composer.json`` after the ``require`` section:
141
+
```yaml
142
+
"replace": {
143
+
"sentry/sdk": "*"
144
+
}
145
+
```
146
+
This will prevent the installation of ``sentry/sdk`` package and will allow you to install through Composer the HTTP client or message factory of your choice.
0 commit comments