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

3.0.3 #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "optimus/heimdal",
"name": "digitalroll/heimdal",
"description": "Laravel 9 support",
"autoload": {
"psr-4": {
"Optimus\\Heimdal\\": "src/"
"Digitalroll\\Heimdal\\": "src/"
}
},
"autoload-dev": {
Expand All @@ -11,7 +12,7 @@
]
},
"require": {
"laravel/framework": "~7.0|~8.0"
"laravel/framework": "~7.0|~8.0|~9.0"
},
"require-dev": {
"mockery/mockery": "1.3.*",
Expand Down
8 changes: 4 additions & 4 deletions src/ExceptionHandler.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace Optimus\Heimdal;
namespace Digitalroll\Heimdal;

use Throwable;
use ReflectionClass;
use InvalidArgumentException;
use Asm89\Stack\CorsService;
use Illuminate\Foundation\Exceptions\Handler as LaravelExceptionHandler;
use Optimus\Heimdal\Formatters\BaseFormatter;
use Optimus\Heimdal\Reporters\ReporterInterface;
use Digitalroll\Heimdal\Formatters\BaseFormatter;
use Digitalroll\Heimdal\Reporters\ReporterInterface;
use Illuminate\Contracts\Container\Container;

class ExceptionHandler extends LaravelExceptionHandler
Expand Down Expand Up @@ -93,7 +93,7 @@ public function render($request, Throwable $e)
if ($this->config['add_cors_headers']) {
if (!class_exists(CorsService::class)) {
throw new InvalidArgumentException(
'asm89/stack-cors has not been installed. Optimus\Heimdal needs it for adding CORS headers to response.'
'asm89/stack-cors has not been installed. Digitalroll\Heimdal needs it for adding CORS headers to response.'
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Formatters/BaseFormatter.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Optimus\Heimdal\Formatters;
namespace Digitalroll\Heimdal\Formatters;

use Throwable;
use Illuminate\Http\JsonResponse;
Expand Down
4 changes: 2 additions & 2 deletions src/Formatters/ExceptionFormatter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Optimus\Heimdal\Formatters;
namespace Digitalroll\Heimdal\Formatters;

use Throwable;
use Illuminate\Http\JsonResponse;
use Optimus\Heimdal\Formatters\BaseFormatter;
use Digitalroll\Heimdal\Formatters\BaseFormatter;

class ExceptionFormatter extends BaseFormatter
{
Expand Down
4 changes: 2 additions & 2 deletions src/Formatters/HttpExceptionFormatter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Optimus\Heimdal\Formatters;
namespace Digitalroll\Heimdal\Formatters;

use Throwable;
use Illuminate\Http\JsonResponse;
use Optimus\Heimdal\Formatters\ExceptionFormatter;
use Digitalroll\Heimdal\Formatters\ExceptionFormatter;

class HttpExceptionFormatter extends ExceptionFormatter
{
Expand Down
4 changes: 2 additions & 2 deletions src/Formatters/UnprocessableEntityHttpExceptionFormatter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Optimus\Heimdal\Formatters;
namespace Digitalroll\Heimdal\Formatters;

use Throwable;
use Illuminate\Http\JsonResponse;
use Optimus\Heimdal\Formatters\BaseFormatter;
use Digitalroll\Heimdal\Formatters\BaseFormatter;

class UnprocessableEntityHttpExceptionFormatter extends BaseFormatter
{
Expand Down
8 changes: 4 additions & 4 deletions src/Provider/LaravelServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Optimus\Heimdal\Provider;
namespace Digitalroll\Heimdal\Provider;

use Illuminate\Support\ServiceProvider as BaseProvider;
use Optimus\Heimdal\Reporters\BugsnagReporter;
use Optimus\Heimdal\Reporters\RollbarReporter;
use Optimus\Heimdal\Reporters\SentryReporter;
use Digitalroll\Heimdal\Reporters\BugsnagReporter;
use Digitalroll\Heimdal\Reporters\RollbarReporter;
use Digitalroll\Heimdal\Reporters\SentryReporter;

class LaravelServiceProvider extends BaseProvider {

Expand Down
2 changes: 1 addition & 1 deletion src/Reporters/BugsnagReporter.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Optimus\Heimdal\Reporters;
namespace Digitalroll\Heimdal\Reporters;

use Throwable;
use Bugsnag\Client;
Expand Down
2 changes: 1 addition & 1 deletion src/Reporters/ReporterInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Optimus\Heimdal\Reporters;
namespace Digitalroll\Heimdal\Reporters;

use Throwable;

Expand Down
2 changes: 1 addition & 1 deletion src/Reporters/RollbarReporter.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Optimus\Heimdal\Reporters;
namespace Digitalroll\Heimdal\Reporters;

use Throwable;
use Rollbar;
Expand Down
4 changes: 2 additions & 2 deletions src/Reporters/SentryReporter.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Optimus\Heimdal\Reporters;
namespace Digitalroll\Heimdal\Reporters;

use Throwable;
use InvalidArgumentException;
use Raven_Client;
use Optimus\Heimdal\Reporters\ReporterInterface;
use Digitalroll\Heimdal\Reporters\ReporterInterface;

class SentryReporter implements ReporterInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/ResponseFactory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Optimus\Heimdal;
namespace Digitalroll\Heimdal;

use Throwable;
use Illuminate\Http\JsonResponse;
Expand Down
6 changes: 3 additions & 3 deletions src/config/optimus.heimdal.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Symfony\Component\HttpKernel\Exception as SymfonyException;
use Optimus\Heimdal\Formatters;
use Digitalroll\Heimdal\Formatters;

return [
'add_cors_headers' => false,
Expand All @@ -13,11 +13,11 @@
Throwable::class => Formatters\ExceptionFormatter::class,
],

'response_factory' => \Optimus\Heimdal\ResponseFactory::class,
'response_factory' => \Digitalroll\Heimdal\ResponseFactory::class,

'reporters' => [
/*'sentry' => [
'class' => \Optimus\Heimdal\Reporters\SentryReporter::class,
'class' => \Digitalroll\Heimdal\Reporters\SentryReporter::class,
'config' => [
'dsn' => '',
// For extra options see https://docs.sentry.io/clients/php/config/
Expand Down
4 changes: 2 additions & 2 deletions tests/ExceptionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Optimus\Heimdal\ExceptionHandler;
use Optimus\Heimdal\Formatters\BaseFormatter;
use Digitalroll\Heimdal\ExceptionHandler;
use Digitalroll\Heimdal\Formatters\BaseFormatter;
use Orchestra\Testbench\TestCase;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Expand Down
4 changes: 2 additions & 2 deletions tests/Formatters/ExceptionFormatterTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Optimus\Heimdal\Formatters\ExceptionFormatter;
use Optimus\Heimdal\ResponseFactory;
use Digitalroll\Heimdal\Formatters\ExceptionFormatter;
use Digitalroll\Heimdal\ResponseFactory;
use Orchestra\Testbench\TestCase;

class ExceptionFormatterTest extends TestCase
Expand Down
6 changes: 3 additions & 3 deletions tests/Formatters/HttpExceptionFormatterTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Optimus\Heimdal\Formatters\ExceptionFormatter;
use Optimus\Heimdal\Formatters\HttpExceptionFormatter;
use Optimus\Heimdal\ResponseFactory;
use Digitalroll\Heimdal\Formatters\ExceptionFormatter;
use Digitalroll\Heimdal\Formatters\HttpExceptionFormatter;
use Digitalroll\Heimdal\ResponseFactory;
use Orchestra\Testbench\TestCase;
use Symfony\Component\HttpKernel\Exception\HttpException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Optimus\Heimdal\Formatters\UnprocessableEntityHttpExceptionFormatter;
use Optimus\Heimdal\ResponseFactory;
use Digitalroll\Heimdal\Formatters\UnprocessableEntityHttpExceptionFormatter;
use Digitalroll\Heimdal\ResponseFactory;
use Orchestra\Testbench\TestCase;
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;

Expand Down
2 changes: 1 addition & 1 deletion tests/Reporters/BugsnagReporterTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Bugsnag\Client;
use Optimus\Heimdal\Reporters\BugsnagReporter;
use Digitalroll\Heimdal\Reporters\BugsnagReporter;
use Orchestra\Testbench\TestCase;

class BugsnagReporterTest extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/ResponseFactoryTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Illuminate\Http\JsonResponse;
use Optimus\Heimdal\ResponseFactory;
use Digitalroll\Heimdal\ResponseFactory;
use Orchestra\Testbench\TestCase;

class ResponseFactoryTest extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Optimus\Heimdal\Reporters\ReporterInterface;
use Digitalroll\Heimdal\Reporters\ReporterInterface;

class TestReporter implements ReporterInterface
{
Expand Down