Page MenuHomeDevCentral

D198.diff
No OneTemporary

D198.diff

diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -3,9 +3,10 @@
namespace Nasqueron\Notifications\Exceptions;
use Exception;
+use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Illuminate\Foundation\Validation\ValidationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
@@ -16,8 +17,10 @@
* @var array
*/
protected $dontReport = [
+ AuthorizationException::class,
HttpException::class,
ModelNotFoundException::class,
+ ValidationException::class,
];
/**
@@ -30,7 +33,7 @@
*/
public function report(Exception $e)
{
- return parent::report($e);
+ parent::report($e);
}
/**
@@ -42,10 +45,6 @@
*/
public function render($request, Exception $e)
{
- if ($e instanceof ModelNotFoundException) {
- $e = new NotFoundHttpException($e->getMessage(), $e);
- }
-
return parent::render($request, $e);
}
}
diff --git a/app/Jobs/FireDockerHubNotification.php b/app/Jobs/FireDockerHubNotification.php
--- a/app/Jobs/FireDockerHubNotification.php
+++ b/app/Jobs/FireDockerHubNotification.php
@@ -2,7 +2,6 @@
namespace Nasqueron\Notifications\Jobs;
-use Illuminate\Contracts\Bus\SelfHandling;
use Nasqueron\Notifications\Notifications\DockerHubNotification;
use Nasqueron\Notifications\Events\DockerHubPayloadEvent;
use Nasqueron\Notifications\Events\NotificationEvent;
@@ -10,7 +9,7 @@
use Event;
-class FireDockerHubNotification extends Job implements SelfHandling {
+class FireDockerHubNotification extends Job {
/**
* @var DockerHubPayloadEvent;
diff --git a/app/Jobs/FireGitHubNotification.php b/app/Jobs/FireGitHubNotification.php
--- a/app/Jobs/FireGitHubNotification.php
+++ b/app/Jobs/FireGitHubNotification.php
@@ -2,7 +2,6 @@
namespace Nasqueron\Notifications\Jobs;
-use Illuminate\Contracts\Bus\SelfHandling;
use Nasqueron\Notifications\Notifications\GitHubNotification;
use Nasqueron\Notifications\Events\GitHubPayloadEvent;
use Nasqueron\Notifications\Events\NotificationEvent;
@@ -10,7 +9,7 @@
use Event;
-class FireGitHubNotification extends Job implements SelfHandling {
+class FireGitHubNotification extends Job {
/**
* @var GitHubPayloadEvent;
diff --git a/app/Jobs/FirePhabricatorNotification.php b/app/Jobs/FirePhabricatorNotification.php
--- a/app/Jobs/FirePhabricatorNotification.php
+++ b/app/Jobs/FirePhabricatorNotification.php
@@ -2,7 +2,6 @@
namespace Nasqueron\Notifications\Jobs;
-use Illuminate\Contracts\Bus\SelfHandling;
use Nasqueron\Notifications\Notifications\PhabricatorNotification;
use Nasqueron\Notifications\Events\PhabricatorPayloadEvent;
use Nasqueron\Notifications\Events\NotificationEvent;
@@ -10,7 +9,7 @@
use Event;
-class FirePhabricatorNotification extends Job implements SelfHandling {
+class FirePhabricatorNotification extends Job {
/**
* @var PhabricatorPayloadEvent;
diff --git a/app/Jobs/SendMessageToBroker.php b/app/Jobs/SendMessageToBroker.php
--- a/app/Jobs/SendMessageToBroker.php
+++ b/app/Jobs/SendMessageToBroker.php
@@ -2,7 +2,6 @@
namespace Nasqueron\Notifications\Jobs;
-use Illuminate\Contracts\Bus\SelfHandling;
use Nasqueron\Notifications\Actions\ActionError;
use Nasqueron\Notifications\Actions\AMQPAction;
use Nasqueron\Notifications\Events\ReportEvent;
@@ -11,7 +10,7 @@
use Broker;
use Event;
-class SendMessageToBroker extends Job implements SelfHandling {
+class SendMessageToBroker extends Job {
///
/// Private members
diff --git a/composer.json b/composer.json
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,7 @@
"type": "project",
"require": {
"php": ">=5.6.0",
- "laravel/framework": "5.1.*",
+ "laravel/framework": "5.2.*",
"keruald/github": ">=0.2.0",
"keruald/broker": ">=0.1.0",
"netresearch/jsonmapper": "~0.1.0"
@@ -22,7 +22,9 @@
"phpmd/phpmd" : "@stable",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
- "squizlabs/php_codesniffer": "2.*"
+ "squizlabs/php_codesniffer": "2.*",
+ "symfony/css-selector": "~3.0",
+ "symfony/dom-crawler": "~3.0"
},
"autoload": {
"psr-4": {
diff --git a/config/app.php b/config/app.php
--- a/config/app.php
+++ b/config/app.php
@@ -4,6 +4,19 @@
/*
|--------------------------------------------------------------------------
+ | Application Environment
+ |--------------------------------------------------------------------------
+ |
+ | This value determines the "environment" your application is currently
+ | running in. This may determine how you prefer to configure various
+ | services your application utilizes. Set this in your ".env" file.
+ |
+ */
+
+ 'env' => env('APP_ENV', 'production'),
+
+ /*
+ |--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
@@ -133,13 +146,11 @@
/*
* Laravel Framework Service Providers...
*/
- Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
- Illuminate\Routing\ControllerServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
diff --git a/config/auth.php b/config/auth.php
--- a/config/auth.php
+++ b/config/auth.php
@@ -4,64 +4,99 @@
/*
|--------------------------------------------------------------------------
- | Default Authentication Driver
+ | Authentication Defaults
|--------------------------------------------------------------------------
|
- | This option controls the authentication driver that will be utilized.
- | This driver manages the retrieval and authentication of the users
- | attempting to get access to protected areas of your application.
- |
- | Supported: "database", "eloquent"
+ | This option controls the default authentication "guard" and password
+ | reset options for your application. You may change these defaults
+ | as required, but they're a perfect start for most applications.
|
*/
- 'driver' => 'eloquent',
+ 'defaults' => [
+ 'guard' => 'web',
+ 'passwords' => 'users',
+ ],
/*
|--------------------------------------------------------------------------
- | Authentication Model
+ | Authentication Guards
|--------------------------------------------------------------------------
|
- | When using the "Eloquent" authentication driver, we need to know which
- | Eloquent model should be used to retrieve your users. Of course, it
- | is often just the "User" model but you may use whatever you like.
+ | Next, you may define every authentication guard for your application.
+ | Of course, a great default configuration has been defined for you
+ | here which uses session storage and the Eloquent user provider.
+ |
+ | All authentication drivers have a user provider. This defines how the
+ | users are actually retrieved out of your database or other storage
+ | mechanisms used by this application to persist your user's data.
+ |
+ | Supported: "session", "token"
|
*/
- 'model' => Nasqueron\Notifications\User::class,
+ 'guards' => [
+ 'web' => [
+ 'driver' => 'session',
+ 'provider' => 'users',
+ ],
+
+ 'api' => [
+ 'driver' => 'token',
+ 'provider' => 'users',
+ ],
+ ],
/*
|--------------------------------------------------------------------------
- | Authentication Table
+ | User Providers
|--------------------------------------------------------------------------
|
- | When using the "Database" authentication driver, we need to know which
- | table should be used to retrieve your users. We have chosen a basic
- | default value but you may easily change it to any table you like.
+ | All authentication drivers have a user provider. This defines how the
+ | users are actually retrieved out of your database or other storage
+ | mechanisms used by this application to persist your user's data.
+ |
+ | If you have multiple user tables or models you may configure multiple
+ | sources which represent each model / table. These sources may then
+ | be assigned to any extra authentication guards you have defined.
+ |
+ | Supported: "database", "eloquent"
|
*/
- 'table' => 'users',
+ 'providers' => [
+ 'users' => [
+ 'driver' => 'eloquent',
+ 'model' => Nasqueron\Notifications\User::class,
+ ]
+ ],
/*
|--------------------------------------------------------------------------
- | Password Reset Settings
+ | Resetting Passwords
|--------------------------------------------------------------------------
|
| Here you may set the options for resetting passwords including the view
- | that is your password reset e-mail. You can also set the name of the
+ | that is your password reset e-mail. You may also set the name of the
| table that maintains all of the reset tokens for your application.
|
+ | You may specify multiple password reset configurations if you have more
+ | than one user table or model in the application and you want to have
+ | separate password reset settings based on the specific user types.
+ |
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
- 'password' => [
- 'email' => 'emails.password',
- 'table' => 'password_resets',
- 'expire' => 60,
+ 'passwords' => [
+ 'users' => [
+ 'provider' => 'users',
+ 'email' => 'auth.emails.password',
+ 'table' => 'password_resets',
+ 'expire' => 60,
+ ],
],
];

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 13:59 (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2308132
Default Alt Text
D198.diff (10 KB)

Event Timeline