Skip to content

Commit f379e4d

Browse files
committed
chore(config): Update exception notify key prefix
- Update the key prefix for exception notify rate limit in the config file - Change 'EXCEPTION_NOTIFY_RATE_LIMIT_KEY_PREFIX' value from 'exception-notify-' to 'exception_notify_'
1 parent b7e3dd5 commit f379e4d

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

config/exception-notify.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
return [
2121
/**
22-
* Enable or disable exception notification report.
22+
* Enable or disable exception notify.
2323
*/
2424
'enabled' => (bool) env('EXCEPTION_NOTIFY_ENABLED', true),
2525

@@ -45,7 +45,7 @@
4545
* The rate limit of same exception.
4646
*/
4747
'rate_limit' => [
48-
'key_prefix' => env('EXCEPTION_NOTIFY_RATE_LIMIT_KEY_PREFIX', 'exception-notify-'),
48+
'key_prefix' => env('EXCEPTION_NOTIFY_RATE_LIMIT_KEY_PREFIX', 'exception_notify_'),
4949
'max_attempts' => (int) env('EXCEPTION_NOTIFY_RATE_LIMIT_MAX_ATTEMPTS', config('app.debug') ? 50 : 1),
5050
'decay_seconds' => (int) env('EXCEPTION_NOTIFY_RATE_LIMIT_DECAY_SECONDS', 300),
5151
],

src/Channels/NotifyChannel.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Guanguans\LaravelExceptionNotify\Exceptions\InvalidArgumentException;
1717
use Guanguans\Notify\Foundation\Client;
1818
use Guanguans\Notify\Foundation\Message;
19-
use Guanguans\Notify\Foundation\Response;
2019
use GuzzleHttp\Exception\GuzzleException;
2120
use Illuminate\Config\Repository;
2221
use Illuminate\Contracts\Container\BindingResolutionException;
@@ -62,8 +61,6 @@ public function __construct(Repository $config)
6261
/**
6362
* @throws BindingResolutionException
6463
* @throws GuzzleException
65-
*
66-
* @return Response|ResponseInterface
6764
*/
6865
public function report(string $report): ResponseInterface
6966
{

tests/ExceptionNotifyManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
config()->set('exception-notify.enabled', true);
4545
$mockApplication = Mockery::spy(Illuminate\Foundation\Application::class);
4646
// $mockApplication->allows()->make('config')->atLeast()->once()->andReturn(config());
47-
$mockApplication->allows()->runningInConsole()->atLeast()->once()->andReturnFalse();
47+
// $mockApplication->allows()->runningInConsole()->atLeast()->once()->andReturnFalse();
4848

4949
/** @noinspection PhpVoidFunctionResultUsedInspection */
5050
expect(new ExceptionNotifyManager($mockApplication))

0 commit comments

Comments
 (0)