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
+19-26Lines changed: 19 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -22,30 +22,28 @@ 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:
31
-
```
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
34
33
35
-
Do you want to execute this recipe?
36
-
```
37
-
Press `y` and return to allow the installation.
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:
38
35
39
-
## Installation without Symfony Flex:
40
-
### Step 1: Download the Bundle
41
-
You can install this bundle using Composer:
36
+
```
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
42
39
43
-
```bash
44
-
composer require sentry/sentry-symfony
40
+
Do you want to execute this recipe?
45
41
```
46
42
43
+
Just type `y`, press return, and the procedure will continue.
44
+
47
45
**Warning:** due to a bug in all versions lower than `6.0` of the [`SensioFrameworkExtra`](https://github.com/sensiolabs/SensioFrameworkExtraBundle) bundle,
48
-
if you have it installed you will likely get an error during the execution of the command above in regards to the missing `Nyholm\Psr7\Factory\Psr17Factory`
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`
49
47
class. To workaround the issue, if you are not using the PSR-7 bridge, please change the configuration of that bundle as follows:
50
48
51
49
```yaml
@@ -58,29 +56,24 @@ For more details about the issue see https://github.com/sensiolabs/SensioFramewo
58
56
59
57
### Step 2: Enable the Bundle
60
58
61
-
Then, enable the bundle by adding it to the list of registered bundles
62
-
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:
63
61
64
62
```php
65
-
<?php
66
-
// app/AppKernel.php
67
-
68
-
// ...
69
-
class AppKernel extends Kernel
63
+
class AppKernel extends \Symfony\Component\HttpKernel\Kernel
70
64
{
71
-
public function registerBundles()
65
+
public function registerBundles(): array
72
66
{
73
-
$bundles = [
67
+
return [
74
68
// ...
75
69
new \Sentry\SentryBundle\SentryBundle(),
76
70
];
77
-
78
-
// ...
79
71
}
80
72
81
73
// ...
82
74
}
83
75
```
76
+
84
77
Note that, unlike before in version 3, the bundle will be enabled in all environments; event reporting, instead, is enabled
0 commit comments