diff --git a/SymfonyInstructions.md b/SymfonyInstructions.md index c4968e7..8cb9752 100644 --- a/SymfonyInstructions.md +++ b/SymfonyInstructions.md @@ -1,8 +1,10 @@ ## Raygun4PHP Symfony installation instructions -### Step 1: Install Raygun4PHP with Composer (see README.md) +### Step 1: Install Raygun4PHP with Composer (see [README.md](README.md)) -### Step 2: Create the file: `src/AppBundle/EventListener/RaygunExceptionListener` with the following content: +### Step 2: Create the file: `src/AppBundle/EventListener/RaygunExceptionListener` + +Populate with the following: ```php ``` + **Important:** Make sure you change *apiKey* to your Raygun API key. ### Step 3: Register the hook service in `app/config/services.yml` -``` + +```yaml app.exception_listener: class: AppBundle\EventListener\RaygunExceptionListener tags: - { name: kernel.event_listener, event: kernel.exception } ``` -## Further Information: +## Further Information + Information about the [Symfony Event Listeners can be located here](http://symfony.com/doc/current/cookbook/event_dispatcher/event_listener.html). diff --git a/UsageExampleV2.md b/UsageExampleV2.md index 91b9c01..8e92911 100644 --- a/UsageExampleV2.md +++ b/UsageExampleV2.md @@ -21,8 +21,8 @@ $client = new Raygun4php\RaygunClient($transport); // Create and register error handlers function error_handler($errno, $errstr, $errfile, $errline ) { - global $client; - $client->SendError($errno, $errstr, $errfile, $errline); + global $client; + $client->SendError($errno, $errstr, $errfile, $errline); } function exception_handler($exception) diff --git a/composer.json b/composer.json index 620c62b..0d963fc 100644 --- a/composer.json +++ b/composer.json @@ -8,15 +8,20 @@ "exceptions", "logging" ], - "homepage": "http://raygun.com", + "homepage": "https://raygun.com", "license": "MIT", "authors": [ { - "name": "Mindscape", - "email": "contact@mindscape.co.nz", - "homepage": "http://www.mindscapehq.com" + "name": "Raygun", + "homepage": "https://raygun.com" } ], + "support": { + "issues": "https://github.com/MindscapeHQ/raygun4php/issues", + "source": "https://github.com/MindscapeHQ/raygun4php", + "docs": "https://raygun.com/documentation/language-guides/php/crash-reporting/", + "chat": "https://raygun.com/about/contact" + }, "require": { "php": "^7.2|^8.0", "ext-json": "*", @@ -46,6 +51,8 @@ "preferred-install": "dist" }, "scripts": { - "test": ["phpunit"] + "test": [ + "phpunit" + ] } } diff --git a/src/Raygun4php/RaygunClient.php b/src/Raygun4php/RaygunClient.php index adf51e5..31f79b4 100644 --- a/src/Raygun4php/RaygunClient.php +++ b/src/Raygun4php/RaygunClient.php @@ -81,7 +81,7 @@ public function getDisableUserTracking() * Transmits an error to the Raygun API * * @param int $errno The error number - * @param string $errstr The error string + * @param string $errstr The error string (Used for error grouping. So don't include identifiers in $errstr. Use $userCustomData for, per instance, unique values) * @param string $errfile The file the error occurred in * @param int $errline The line the error occurred on * @param array $tags An optional array of string tags used to provide metadata for the message