Skip to content

Commit

Permalink
Merge pull request #71 from o0h/4.x-readme
Browse files Browse the repository at this point in the history
Update readme for 4.x
  • Loading branch information
o0h authored May 30, 2021
2 parents 51734eb + 29cb14f commit a8dcac2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CakePHP integration for Sentry.
[![License](https://poser.pugx.org/connehito/cake-sentry/license)](https://packagist.org/packages/connehito/cake-sentry)

## Requirements
- PHP 7.2+
- PHP 7.2+ / PHP 8.0+
- CakePHP 4.0+
- and [Sentry](https://sentry.io) account

Expand All @@ -21,6 +21,23 @@ CakePHP integration for Sentry.
composer require connehito/cake-sentry:^3.0
```

If you do not have the ` php-http/async-client-implementation` package, you will need to install it together.
In that case, you will get a message like the following

```
Problem 1
- sentry/sentry[3.2.0, ... , 3.3.0] require php-http/async-client-implementation ^1.0 -> could not be found in any version, but the following packages provide it:
```

Then, you can use the following command to provide a package such as `symfony/http-client`.

```
composer require connehito/cake-sentry symfony/http-client
```

You can find the available packages on [Packagist](https://packagist.org/providers/php-http/async-client-implementation).


## Usage

### Set config files.
Expand Down
18 changes: 17 additions & 1 deletion tests/test_app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ Before do it, you must create Sentry PJ and get your DSN.
Please check Sentry's document about DSN
https://docs.sentry.io/error-reporting/quickstart/?platform=php#configure-the-sdk

1. `cp tests/test_app/app/config/.env.example tests/test_app/app/config/.env`.
1. `cp tests/test_app/app/config/.env.example tests/test_app/app/app.env`.
2. Set your DSN to `.env`.
3. `docker-compose run --rm test-app bash` to go into container.
4. `cd /app/tests/test_app & composer install` if vendor dir is not created.
5. exit container.
6. `docker-compose up` to run CakePHP built-in server.
7. Access bellow urls.

### On PHP7 container
You can use `test-app-php7` instead of `test-app`.

### To check error
`http://127.0.0.1:8080/error/:error_level`

Expand All @@ -49,3 +52,16 @@ Like:

If you add `?message` query, then set error message.
Like `http://127.0.0.1:8080/exception/method_not_allowed/400?message=you%20cant%20access%20here`

### To check log
`http://127.0.0.1:8080/log/:log_level_name`

Replace `:log_level_name` to log level's name.

Like:

* http://127.0.0.1:8080/log/info // log message as LOG_INFO
* http://127.0.0.1:8080/log/notice // log message as LOG_NOTICE

If you add `?message` query, then set error message.
Like `http://127.0.0.1:8080/log/warning?message=some-events-to-logging`

0 comments on commit a8dcac2

Please sign in to comment.