Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3716316
D2129.id5370.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D2129.id5370.diff
View Options
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -7,6 +7,8 @@
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Validation\ValidationException;
+use Illuminate\Session\TokenMismatchException;
+use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Exception\CommandNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
@@ -27,6 +29,7 @@
CommandNotFoundException::class,
HttpException::class,
ModelNotFoundException::class,
+ TokenMismatchException::class,
ValidationException::class,
];
@@ -46,7 +49,8 @@
$this->reportToSentry($e);
}
- $this->log->error((string)$e);
+ $log = $this->container->make(LoggerInterface::class);
+ $log->error((string)$e);
}
/**
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -9,15 +9,33 @@
/**
* The application's global HTTP middleware stack.
*
+ * These middleware are run during every request to your application.
+ *
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
- \Nasqueron\Notifications\Http\Middleware\EncryptCookies::class,
- \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
- \Illuminate\Session\Middleware\StartSession::class,
- \Illuminate\View\Middleware\ShareErrorsFromSession::class,
- \Nasqueron\Notifications\Http\Middleware\VerifyCsrfToken::class,
+ ];
+
+ /**
+ * The application's route middleware groups.
+ *
+ * @var array
+ */
+ protected $middlewareGroups = [
+ 'web' => [
+ \Nasqueron\Notifications\Http\Middleware\EncryptCookies::class,
+ \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
+ \Illuminate\Session\Middleware\StartSession::class,
+ \Illuminate\View\Middleware\ShareErrorsFromSession::class,
+ \Nasqueron\Notifications\Http\Middleware\VerifyCsrfToken::class,
+ \Illuminate\Routing\Middleware\SubstituteBindings::class,
+ ],
+
+ 'api' => [
+ 'throttle:60,1',
+ 'bindings',
+ ],
];
/**
@@ -26,5 +44,7 @@
* @var array
*/
protected $routeMiddleware = [
+ 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
+ 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
];
}
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -21,11 +21,10 @@
/**
* Register any other events for your application.
*
- * @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
- public function boot(DispatcherContract $events) {
+ public function boot() {
$this->subscribeListeners();
- parent::boot($events);
+ parent::boot();
}
}
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
--- a/app/Providers/RouteServiceProvider.php
+++ b/app/Providers/RouteServiceProvider.php
@@ -21,13 +21,12 @@
/**
* Define your route model bindings, pattern filters, etc.
*
- * @param \Illuminate\Routing\Router $router
* @return void
*/
- public function boot(Router $router) {
+ public function boot() {
//
- parent::boot($router);
+ parent::boot();
}
/**
diff --git a/composer.json b/composer.json
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,7 @@
"type": "project",
"require": {
"php": ">=7.1.0",
- "laravel/framework": "5.2.*",
+ "laravel/framework": "5.3.*",
"guzzlehttp/guzzle": "^6.2",
"keruald/dockerhub": "^0.0.3",
"keruald/github": "^0.2.1",
@@ -27,7 +27,7 @@
"pdepend/pdepend": "^2.4.1",
"phploc/phploc": "^3.0.1",
"phpmd/phpmd" : "@stable",
- "phpunit/phpunit": "~4.0",
+ "phpunit/phpunit": "~5.4",
"phpspec/phpspec": "~2.1",
"sebastian/phpcpd": "^2.0.4",
"squizlabs/php_codesniffer": "2.*",
diff --git a/config/app.php b/config/app.php
--- a/config/app.php
+++ b/config/app.php
@@ -4,6 +4,18 @@
/*
|--------------------------------------------------------------------------
+ | Application Name
+ |--------------------------------------------------------------------------
+ |
+ | This value is the name of your application. This value is used when the
+ | framework needs to place the application's name in a notification or
+ | any other location as required by the application or its packages.
+ */
+
+ 'name' => 'Notifications',
+
+ /*
+ |--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
diff --git a/tests/Exceptions/HandlerTest.php b/tests/Exceptions/HandlerTest.php
--- a/tests/Exceptions/HandlerTest.php
+++ b/tests/Exceptions/HandlerTest.php
@@ -25,8 +25,7 @@
public function setUp () {
parent::setUp();
- $logger = App::make('log');
- $this->handler = new Handler($logger);
+ $this->handler = new Handler(app());
$this->mockRavenClient();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 14:33 (21 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2231870
Default Alt Text
D2129.id5370.diff (5 KB)
Attached To
Mode
D2129: Upgrade to Laravel 5.3
Attached
Detach File
Event Timeline
Log In to Comment