Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Darcy/worm 246/improve clarity around $errstr param #159

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions SymfonyInstructions.md
Original file line number Diff line number Diff line change
@@ -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
<?php
Expand Down Expand Up @@ -32,15 +34,18 @@ class RaygunExceptionListener

?>
```

**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).
4 changes: 2 additions & 2 deletions UsageExampleV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 12 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@
"exceptions",
"logging"
],
"homepage": "http://raygun.com",
"homepage": "https://raygun.com",
"license": "MIT",
"authors": [
{
"name": "Mindscape",
"email": "[email protected]",
"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": "*",
Expand Down Expand Up @@ -46,6 +51,8 @@
"preferred-install": "dist"
},
"scripts": {
"test": ["phpunit"]
"test": [
"phpunit"
]
}
}
2 changes: 1 addition & 1 deletion src/Raygun4php/RaygunClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down