diff --git a/README.md b/README.md index 0a8db06..b2aef9a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. diff --git a/tests/test_app/README.md b/tests/test_app/README.md index d2088ee..7d22228 100644 --- a/tests/test_app/README.md +++ b/tests/test_app/README.md @@ -16,7 +16,7 @@ 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. @@ -24,6 +24,9 @@ https://docs.sentry.io/error-reporting/quickstart/?platform=php#configure-the-sd 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` @@ -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`