Skip to content

Commit

Permalink
Add Symfony Flex recipe to Installation Instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Briones committed Feb 20, 2020
1 parent 2190ea7 commit 52cef5e
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions README.md
Expand Up @@ -21,8 +21,23 @@ Use sentry-symfony for:
- app path
- excluded paths (cache and vendor)

## Installation
## Installation for Symfony 4 or newest:
### Step 1: Install the sentry-symfony flex recipe:
You can install this recipe using Composer:

```bash
composer require sentry/sentry-symfony
```
This could show a message similar to this:
```
The recipe for this package comes from the "contrib" repository, which is open to community contributions.
Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/sentry/sentry-symfony/3.0
Do you want to execute this recipe?
```
Press `y` and return to allow the installation.

## Installation for Symfony 3.4:
### Step 1: Download the Bundle
You can install this bundle using Composer:

Expand Down Expand Up @@ -50,8 +65,6 @@ composer require sentry/sentry-symfony:^3.0 sentry/sentry:^2.0 php-http/guzzle6-
The `sentry/sentry` package is required directly to override `sentry/sdk`, and the other two packages are up to your choice;
in the current example, we're using both Guzzle's components (client and message factory).

> TODO: Flex recipe
### Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles
Expand Down Expand Up @@ -80,10 +93,10 @@ class AppKernel extends Kernel
Note that, unlike before in version 3, the bundle will be enabled in all environments; event reporting, instead, is enabled
only when providing a DSN (see the next step).

### Step 3: Configure the SDK
### Configuration of the SDK

Add your [Sentry DSN](https://docs.sentry.io/quickstart/#configure-the-dsn) value of your project to ``app/config/config_prod.yml``.
Leaving this value empty (or undeclared) in other environments will effectively disable Sentry reporting.
Add your [Sentry DSN](https://docs.sentry.io/quickstart/#configure-the-dsn) value of your project to ``app/config/config_prod.yml`` if you have Symfony 3.4 or to `config/packages/sentry.yaml` if you have Symfony 4 or newest.
Leaving the `dsn` value empty (or undeclared) in other environments will effectively disable Sentry reporting.

```yaml
sentry:
Expand Down

0 comments on commit 52cef5e

Please sign in to comment.