diff --git a/app/Bus/Commands/Component/AddComponentCommand.php b/app/Bus/Commands/Component/AddComponentCommand.php index a50e725d79db..f5d94e3fbcc2 100644 --- a/app/Bus/Commands/Component/AddComponentCommand.php +++ b/app/Bus/Commands/Component/AddComponentCommand.php @@ -69,12 +69,12 @@ final class AddComponentCommand */ public $rules = [ 'name' => 'required|string', - 'description' => 'string', - 'status' => 'int|min:1|max:4', - 'link' => 'url', - 'order' => 'int', - 'group_id' => 'int', - 'enabled' => 'bool', + 'description' => 'required|string', + 'status' => 'required|int|min:1|max:4', + 'link' => 'nullable|url', + 'order' => 'nullable|int', + 'group_id' => 'nullable|int', + 'enabled' => 'nullable|bool', ]; /** diff --git a/app/Bus/Commands/Component/UpdateComponentCommand.php b/app/Bus/Commands/Component/UpdateComponentCommand.php index 17c5d12c4897..ac5bde0a2ea2 100644 --- a/app/Bus/Commands/Component/UpdateComponentCommand.php +++ b/app/Bus/Commands/Component/UpdateComponentCommand.php @@ -77,13 +77,13 @@ final class UpdateComponentCommand * @var string[] */ public $rules = [ - 'name' => 'string', - 'description' => 'string', - 'status' => 'int|min:1|max:4', - 'link' => 'url', - 'order' => 'int', - 'group_id' => 'int', - 'enabled' => 'bool', + 'name' => 'nullable|string', + 'description' => 'nullable|string', + 'status' => 'nullable|int|min:1|max:4', + 'link' => 'nullable|url', + 'order' => 'nullable|int', + 'group_id' => 'nullable|int', + 'enabled' => 'nullable|bool', ]; /** diff --git a/app/Bus/Commands/ComponentGroup/AddComponentGroupCommand.php b/app/Bus/Commands/ComponentGroup/AddComponentGroupCommand.php index 2982e495c18b..601370a0c1fa 100644 --- a/app/Bus/Commands/ComponentGroup/AddComponentGroupCommand.php +++ b/app/Bus/Commands/ComponentGroup/AddComponentGroupCommand.php @@ -53,9 +53,9 @@ final class AddComponentGroupCommand */ public $rules = [ 'name' => 'required|string', - 'order' => 'int', - 'collapsed' => 'int|between:0,3', - 'visible' => 'bool', + 'order' => 'required|int', + 'collapsed' => 'required|int|between:0,3', + 'visible' => 'required|bool', ]; /** diff --git a/app/Bus/Commands/ComponentGroup/UpdateComponentGroupCommand.php b/app/Bus/Commands/ComponentGroup/UpdateComponentGroupCommand.php index 9f1dbd96fa78..2565e2cd8dbf 100644 --- a/app/Bus/Commands/ComponentGroup/UpdateComponentGroupCommand.php +++ b/app/Bus/Commands/ComponentGroup/UpdateComponentGroupCommand.php @@ -61,10 +61,10 @@ final class UpdateComponentGroupCommand * @var string[] */ public $rules = [ - 'name' => 'string', - 'order' => 'int', - 'collapsed' => 'int|between:0,3', - 'visible' => 'bool', + 'name' => 'nullable|string', + 'order' => 'nullable|int', + 'collapsed' => 'nullable|int|between:0,3', + 'visible' => 'nullable|bool', ]; /** diff --git a/app/Bus/Commands/Incident/ReportIncidentCommand.php b/app/Bus/Commands/Incident/ReportIncidentCommand.php index bc42298b6e15..97ce4efbf72c 100644 --- a/app/Bus/Commands/Incident/ReportIncidentCommand.php +++ b/app/Bus/Commands/Incident/ReportIncidentCommand.php @@ -104,14 +104,14 @@ final class ReportIncidentCommand public $rules = [ 'name' => 'required|string', 'status' => 'required|int|min:0|max:4', - 'message' => 'string', - 'visible' => 'bool', - 'component_id' => 'int|required_with:component_status', - 'component_status' => 'int|min:1|max:4|required_with:component_id', - 'notify' => 'bool', - 'stickied' => 'bool', - 'incident_date' => 'string', - 'template' => 'string', + 'message' => 'required|string', + 'visible' => 'nullable|bool', + 'component_id' => 'nullable|required_with:component_status|int', + 'component_status' => 'nullable|required_with:component_id|int|min:1|max:4', + 'notify' => 'nullable|bool', + 'stickied' => 'required|bool', + 'incident_date' => 'nullable|string', + 'template' => 'nullable|string', ]; /** diff --git a/app/Bus/Commands/Incident/ReportMaintenanceCommand.php b/app/Bus/Commands/Incident/ReportMaintenanceCommand.php index 3b44aa106948..396f88b7278b 100644 --- a/app/Bus/Commands/Incident/ReportMaintenanceCommand.php +++ b/app/Bus/Commands/Incident/ReportMaintenanceCommand.php @@ -48,9 +48,9 @@ final class ReportMaintenanceCommand */ public $rules = [ 'name' => 'required|string', - 'message' => 'string', - 'notify' => 'bool', - 'timestamp' => 'string', + 'message' => 'required|string', + 'notify' => 'nullable|bool', + 'timestamp' => 'required|string', ]; /** diff --git a/app/Bus/Commands/Incident/UpdateIncidentCommand.php b/app/Bus/Commands/Incident/UpdateIncidentCommand.php index 3dcd47573bda..42ca40c831ae 100644 --- a/app/Bus/Commands/Incident/UpdateIncidentCommand.php +++ b/app/Bus/Commands/Incident/UpdateIncidentCommand.php @@ -105,15 +105,15 @@ final class UpdateIncidentCommand * @var string[] */ public $rules = [ - 'name' => 'string', - 'status' => 'int|min:0|max:4', - 'message' => 'string', - 'visible' => 'bool', - 'component_id' => 'int', - 'component_status' => 'int|min:1|max:4|required_with:component_id', - 'notify' => 'bool', - 'stickied' => 'bool', - 'template' => 'string', + 'name' => 'nullable|string', + 'status' => 'nullable|int|min:0|max:4', + 'message' => 'nullable|string', + 'visible' => 'nullable|bool', + 'component_id' => 'nullable|int', + 'component_status' => 'nullable|int|min:1|max:4|required_with:component_id', + 'notify' => 'nullable|bool', + 'stickied' => 'nullable|bool', + 'template' => 'nullable|string', ]; /** diff --git a/app/Bus/Commands/IncidentUpdate/UpdateIncidentUpdateCommand.php b/app/Bus/Commands/IncidentUpdate/UpdateIncidentUpdateCommand.php index 55370e2a6db8..12d363ad17ed 100644 --- a/app/Bus/Commands/IncidentUpdate/UpdateIncidentUpdateCommand.php +++ b/app/Bus/Commands/IncidentUpdate/UpdateIncidentUpdateCommand.php @@ -55,10 +55,8 @@ final class UpdateIncidentUpdateCommand * @var string[] */ public $rules = [ - 'update' => 'required', - 'status' => 'int|min:1|max:4', - 'message' => 'string', - 'user' => 'required', + 'status' => 'nullable|int|min:1|max:4', + 'message' => 'nullable|string', ]; /** diff --git a/app/Bus/Commands/Metric/AddMetricCommand.php b/app/Bus/Commands/Metric/AddMetricCommand.php index d1dd254696d8..04ac77a9784b 100644 --- a/app/Bus/Commands/Metric/AddMetricCommand.php +++ b/app/Bus/Commands/Metric/AddMetricCommand.php @@ -91,15 +91,15 @@ final class AddMetricCommand public $rules = [ 'name' => 'required|string', 'suffix' => 'required|string', - 'description' => 'string', - 'display_chart' => 'bool', - 'default_value' => 'int', - 'calc_type' => 'int', - 'display_chart' => 'int', - 'places' => 'int|between:0,4', - 'default_view' => 'int|between:0,3', - 'threshold' => 'numeric|between:0,10', - 'order' => 'int', + 'description' => 'nullable|string', + 'display_chart' => 'nullable|bool', + 'default_value' => 'required|int', + 'calc_type' => 'required|int', + 'display_chart' => 'nullable|int', + 'places' => 'nullable|int|between:0,4', + 'default_view' => 'required|int|between:0,3', + 'threshold' => 'nullable|numeric|between:0,10', + 'order' => 'nullable|int', ]; /** diff --git a/app/Bus/Commands/Metric/AddMetricPointCommand.php b/app/Bus/Commands/Metric/AddMetricPointCommand.php index ae339585ba30..74c50b3db08b 100644 --- a/app/Bus/Commands/Metric/AddMetricPointCommand.php +++ b/app/Bus/Commands/Metric/AddMetricPointCommand.php @@ -42,8 +42,8 @@ final class AddMetricPointCommand * @var string[] */ public $rules = [ - 'value' => 'numeric', - 'created_at' => 'string', + 'value' => 'required|numeric', + 'created_at' => 'required|string', ]; /** diff --git a/app/Bus/Commands/Metric/UpdateMetricCommand.php b/app/Bus/Commands/Metric/UpdateMetricCommand.php index 1bf6cd268813..5eb710390cef 100644 --- a/app/Bus/Commands/Metric/UpdateMetricCommand.php +++ b/app/Bus/Commands/Metric/UpdateMetricCommand.php @@ -98,17 +98,17 @@ final class UpdateMetricCommand * @var string[] */ public $rules = [ - 'name' => 'string', - 'suffix' => 'string', - 'description' => 'string', - 'display_chart' => 'bool', - 'default_value' => 'numeric', - 'calc_type' => 'int|in:0,1', - 'display_chart' => 'int', - 'places' => 'numeric|between:0,4', - 'default_view' => 'numeric|between:0,4', - 'threshold' => 'numeric|between:0,10', - 'order' => 'int', + 'name' => 'nullable|string', + 'suffix' => 'nullable|string', + 'description' => 'nullable|string', + 'display_chart' => 'nullable|bool', + 'default_value' => 'nullable|numeric', + 'calc_type' => 'nullable|int|in:0,1', + 'display_chart' => 'nullable|int', + 'places' => 'nullable|numeric|between:0,4', + 'default_view' => 'nullable|numeric|between:0,4', + 'threshold' => 'nullable|numeric|between:0,10', + 'order' => 'nullable|int', ]; /** diff --git a/app/Bus/Commands/Metric/UpdateMetricPointCommand.php b/app/Bus/Commands/Metric/UpdateMetricPointCommand.php index 34bff77270ca..0d976df94c7f 100644 --- a/app/Bus/Commands/Metric/UpdateMetricPointCommand.php +++ b/app/Bus/Commands/Metric/UpdateMetricPointCommand.php @@ -55,8 +55,8 @@ final class UpdateMetricPointCommand * @var string[] */ public $rules = [ - 'value' => 'numeric', - 'created_at' => 'string', + 'value' => 'nullable|numeric', + 'created_at' => 'nullable|string', ]; /** diff --git a/app/Bus/Commands/User/AddUserCommand.php b/app/Bus/Commands/User/AddUserCommand.php index a99ed99f9922..ef9ecdd69eee 100644 --- a/app/Bus/Commands/User/AddUserCommand.php +++ b/app/Bus/Commands/User/AddUserCommand.php @@ -53,8 +53,8 @@ final class AddUserCommand */ public $rules = [ 'username' => 'required|string', - 'password' => 'string', - 'level' => 'int', + 'password' => 'required|string', + 'level' => 'required|int', ]; /** diff --git a/app/Bus/Commands/User/SignupUserCommand.php b/app/Bus/Commands/User/SignupUserCommand.php index 7cbf782c63c4..cfba31f5d60d 100644 --- a/app/Bus/Commands/User/SignupUserCommand.php +++ b/app/Bus/Commands/User/SignupUserCommand.php @@ -48,9 +48,9 @@ final class SignupUserCommand */ public $rules = [ 'username' => 'required|string', - 'password' => 'string', + 'password' => 'required|string', 'email' => 'required|string|email', - 'level' => 'int', + 'level' => 'required|int', ]; /** diff --git a/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php b/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php index 424f42b66529..28271b72e5a2 100644 --- a/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php +++ b/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php @@ -63,7 +63,7 @@ public function handle(ReportIncidentCommand $command) 'stickied' => $command->stickied, ]; - if ($template = IncidentTemplate::where('slug', $command->template)->first()) { + if ($template = IncidentTemplate::where('slug', '=', $command->template)->first()) { $data['message'] = $this->parseTemplate($template, $command); } else { $data['message'] = $command->message; diff --git a/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php b/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php index 55d1323f9ecb..665e49a8c8cd 100644 --- a/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php +++ b/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php @@ -56,7 +56,7 @@ public function __construct(DateFactory $dates) */ public function handle(UpdateIncidentCommand $command) { - if ($template = IncidentTemplate::where('slug', $command->template)->first()) { + if ($template = IncidentTemplate::where('slug', '=', $command->template)->first()) { $command->message = $this->parseTemplate($template, $command); } diff --git a/app/Bus/Handlers/Commands/Metric/AddMetricPointCommandHandler.php b/app/Bus/Handlers/Commands/Metric/AddMetricPointCommandHandler.php index 17b6dadea897..90e2f5f0831b 100644 --- a/app/Bus/Handlers/Commands/Metric/AddMetricPointCommandHandler.php +++ b/app/Bus/Handlers/Commands/Metric/AddMetricPointCommandHandler.php @@ -63,7 +63,7 @@ public function handle(AddMetricPointCommand $command) protected function findOrCreatePoint(AddMetricPointCommand $command) { $buffer = Carbon::now()->subMinutes($command->metric->threshold); - $point = MetricPoint::where('metric_id', $command->metric->id)->where('value', $command->value)->where('created_at', '>=', $buffer)->first(); + $point = MetricPoint::where('metric_id', '=', $command->metric->id)->where('value', '=', $command->value)->where('created_at', '>=', $buffer)->first(); if ($point) { return $point; diff --git a/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php b/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php index c51ee01e01f8..dba6948f26de 100644 --- a/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php +++ b/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php @@ -36,7 +36,7 @@ class SubscribeSubscriberCommandHandler */ public function handle(SubscribeSubscriberCommand $command) { - if ($subscriber = Subscriber::where('email', $command->email)->first()) { + if ($subscriber = Subscriber::where('email', '=', $command->email)->first()) { return $subscriber; } diff --git a/app/Foundation/Providers/EventServiceProvider.php b/app/Foundation/Providers/EventServiceProvider.php index bf8084049ac2..0bdee120e895 100644 --- a/app/Foundation/Providers/EventServiceProvider.php +++ b/app/Foundation/Providers/EventServiceProvider.php @@ -16,7 +16,7 @@ class EventServiceProvider extends ServiceProvider { /** - * The event handler mappings for the application. + * The event listener mappings for the application. * * @var array */ diff --git a/app/Foundation/Providers/ModuleServiceProvider.php b/app/Foundation/Providers/ModuleServiceProvider.php index 895f3d58f175..b4181c6141eb 100644 --- a/app/Foundation/Providers/ModuleServiceProvider.php +++ b/app/Foundation/Providers/ModuleServiceProvider.php @@ -58,7 +58,7 @@ class ModuleServiceProvider extends ServiceProvider */ public function boot(BladeCompiler $blade) { - $blade->directive('modules', function ($group = null) { + $blade->directive('modules', function ($group) { return sprintf( 'call(\'%s@%s\', [ \'factory\' => $__env, @@ -68,7 +68,7 @@ public function boot(BladeCompiler $blade) ]); ?>', ModulesRenderer::class, 'renderModules', - $group === null ? 'null' : $group + empty($group) ? 'null' : $group ); }); } diff --git a/app/Foundation/Providers/RouteServiceProvider.php b/app/Foundation/Providers/RouteServiceProvider.php index ad91ca50ecb6..c78f873f4db5 100644 --- a/app/Foundation/Providers/RouteServiceProvider.php +++ b/app/Foundation/Providers/RouteServiceProvider.php @@ -11,8 +11,17 @@ namespace CachetHQ\Cachet\Foundation\Providers; +use Barryvdh\Cors\HandleCors; +use CachetHQ\Cachet\Http\Middleware\Acceptable; +use CachetHQ\Cachet\Http\Middleware\Timezone; +use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse; +use Illuminate\Cookie\Middleware\EncryptCookies; +use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; +use Illuminate\Routing\Middleware\SubstituteBindings; use Illuminate\Routing\Router; +use Illuminate\Session\Middleware\StartSession; +use Illuminate\View\Middleware\ShareErrorsFromSession; /** * This is the route service provider. @@ -35,34 +44,36 @@ class RouteServiceProvider extends ServiceProvider /** * Define the 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(); - $this->registerBindings(); + $this->app->call([$this, 'bind']); } /** - * Register model bindings. + * Define the bindings for the application. + * + * @param \Illuminate\Routing\Router $router * * @return void */ - protected function registerBindings() + public function bind(Router $router) { - $this->app->router->model('component', 'CachetHQ\Cachet\Models\Component'); - $this->app->router->model('component_group', 'CachetHQ\Cachet\Models\ComponentGroup'); - $this->app->router->model('incident', 'CachetHQ\Cachet\Models\Incident'); - $this->app->router->model('incident_template', 'CachetHQ\Cachet\Models\IncidentTemplate'); - $this->app->router->model('metric', 'CachetHQ\Cachet\Models\Metric'); - $this->app->router->model('metric_point', 'CachetHQ\Cachet\Models\MetricPoint'); - $this->app->router->model('setting', 'CachetHQ\Cachet\Models\Setting'); - $this->app->router->model('subscriber', 'CachetHQ\Cachet\Models\Subscriber'); - $this->app->router->model('subscription', 'CachetHQ\Cachet\Models\Subscription'); - $this->app->router->model('user', 'CachetHQ\Cachet\Models\User'); + $router->model('component', 'CachetHQ\Cachet\Models\Component'); + $router->model('component_group', 'CachetHQ\Cachet\Models\ComponentGroup'); + $router->model('incident', 'CachetHQ\Cachet\Models\Incident'); + $router->model('incident_template', 'CachetHQ\Cachet\Models\IncidentTemplate'); + $router->model('incident_update', 'CachetHQ\Cachet\Models\IncidentUpdate'); + $router->model('metric', 'CachetHQ\Cachet\Models\Metric'); + $router->model('metric_point', 'CachetHQ\Cachet\Models\MetricPoint'); + $router->model('setting', 'CachetHQ\Cachet\Models\Setting'); + $router->model('subscriber', 'CachetHQ\Cachet\Models\Subscriber'); + $router->model('subscription', 'CachetHQ\Cachet\Models\Subscription'); + $router->model('tag', 'CachetHQ\Cachet\Models\Tag'); + $router->model('user', 'CachetHQ\Cachet\Models\User'); } /** @@ -82,8 +93,60 @@ public function map(Router $router) $class = str_replace('/', '\\', $class); $class = substr($class, 0, -4); - $this->app->make("CachetHQ\\Cachet\\Http\\Routes${class}")->map($router); + $routes = $this->app->make("CachetHQ\\Cachet\\Http\\Routes${class}"); + + if ($routes::$browser) { + $this->mapForBrowser($router, $routes); + } else { + $this->mapOtherwise($router, $routes); + } } }); } + + /** + * Wrap the routes in the browser specific middleware. + * + * @param \Illuminate\Routing\Router $router + * @param object $routes + * + * @return void + */ + protected function mapForBrowser(Router $router, $routes) + { + $middleware = [ + EncryptCookies::class, + AddQueuedCookiesToResponse::class, + StartSession::class, + ShareErrorsFromSession::class, + VerifyCsrfToken::class, + SubstituteBindings::class, + ]; + + $router->group(['middleware' => $middleware], function (Router $router) use ($routes) { + $routes->map($router); + }); + } + + /** + * Wrap the routes in the basic middleware. + * + * @param \Illuminate\Routing\Router $router + * @param object $routes + * + * @return void + */ + protected function mapOtherwise(Router $router, $routes) + { + $middleware = [ + HandleCors::class, + SubstituteBindings::class, + Acceptable::class, + Timezone::class, + ]; + + $router->group(['middleware' => $middleware], function (Router $router) use ($routes) { + $routes->map($router); + }); + } } diff --git a/app/Http/Controllers/Dashboard/ApiController.php b/app/Http/Controllers/Dashboard/ApiController.php index 1c0d7989bc39..d838bad8f54f 100644 --- a/app/Http/Controllers/Dashboard/ApiController.php +++ b/app/Http/Controllers/Dashboard/ApiController.php @@ -119,7 +119,7 @@ public function getIncidentTemplate() { $templateSlug = Binput::get('slug'); - if ($template = IncidentTemplate::where('slug', $templateSlug)->first()) { + if ($template = IncidentTemplate::where('slug', '=', $templateSlug)->first()) { return $template; } diff --git a/app/Http/Controllers/Dashboard/IncidentController.php b/app/Http/Controllers/Dashboard/IncidentController.php index b1101603de89..3c3b44c9a2b4 100644 --- a/app/Http/Controllers/Dashboard/IncidentController.php +++ b/app/Http/Controllers/Dashboard/IncidentController.php @@ -100,7 +100,7 @@ public function showAddIncident() return View::make('dashboard.incidents.add') ->withPageTitle(trans('dashboard.incidents.add.title').' - '.trans('dashboard.dashboard')) ->withComponentsInGroups(ComponentGroup::with('components')->get()) - ->withComponentsOutGroups(Component::where('group_id', 0)->get()) + ->withComponentsOutGroups(Component::where('group_id', '=', 0)->get()) ->withIncidentTemplates(IncidentTemplate::all()); } @@ -236,7 +236,7 @@ public function showEditIncidentAction(Incident $incident) ->withPageTitle(trans('dashboard.incidents.edit.title').' - '.trans('dashboard.dashboard')) ->withIncident($incident) ->withComponentsInGroups(ComponentGroup::with('components')->get()) - ->withComponentsOutGroups(Component::where('group_id', 0)->get()); + ->withComponentsOutGroups(Component::where('group_id', '=', 0)->get()); } /** diff --git a/app/Http/Controllers/Dashboard/SettingsController.php b/app/Http/Controllers/Dashboard/SettingsController.php index 62f2ffe62f89..999a377ac585 100644 --- a/app/Http/Controllers/Dashboard/SettingsController.php +++ b/app/Http/Controllers/Dashboard/SettingsController.php @@ -200,7 +200,7 @@ public function showSecurityView() { $this->subMenu['security']['active'] = true; - $unsecureUsers = User::whereNull('google_2fa_secret')->orWhere('google_2fa_secret', '')->get(); + $unsecureUsers = User::whereNull('google_2fa_secret')->orWhere('google_2fa_secret', '=', '')->get(); Session::flash('redirect_to', $this->subMenu['security']['url']); diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index f1a4cdcd3a40..4bd69f552abe 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -298,7 +298,9 @@ protected function writeEnv($key, $value) $envValue = env($envKey) ?: 'null'; file_put_contents($path, str_replace( - $envKey.'='.$envValue, $envKey.'='.$value, file_get_contents($path) + $envKey.'='.$envValue, + $envKey.'='.$value, + file_get_contents($path) )); } catch (InvalidPathException $e) { // diff --git a/app/Http/Controllers/SubscribeController.php b/app/Http/Controllers/SubscribeController.php index 9498871d1e22..f630a2c55659 100644 --- a/app/Http/Controllers/SubscribeController.php +++ b/app/Http/Controllers/SubscribeController.php @@ -89,7 +89,7 @@ public function getVerify($code = null) throw new NotFoundHttpException(); } - $subscriber = Subscriber::where('verify_code', $code)->first(); + $subscriber = Subscriber::where('verify_code', '=', $code)->first(); if (!$subscriber) { throw new BadRequestHttpException(); @@ -149,7 +149,7 @@ public function showManage($code = null) $subscriber = Subscriber::where('verify_code', '=', $code)->first(); $usedComponentGroups = Component::enabled()->where('group_id', '>', 0)->groupBy('group_id')->pluck('group_id'); $componentGroups = ComponentGroup::whereIn('id', $usedComponentGroups)->orderBy('order')->get(); - $ungroupedComponents = Component::enabled()->where('group_id', 0)->orderBy('order')->orderBy('created_at')->get(); + $ungroupedComponents = Component::enabled()->where('group_id', '=', 0)->orderBy('order')->orderBy('created_at')->get(); if (!$subscriber) { throw new BadRequestHttpException(); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 9e0da573e602..1e8f7b16e147 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -25,26 +25,6 @@ class Kernel extends HttpKernel 'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode', ]; - /** - * The application's route middleware groups. - * - * @var array - */ - protected $middlewareGroups = [ - 'web' => [ - 'Illuminate\Cookie\Middleware\EncryptCookies', - 'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse', - 'Illuminate\Session\Middleware\StartSession', - 'Illuminate\View\Middleware\ShareErrorsFromSession', - 'Illuminate\Foundation\Http\Middleware\VerifyCsrfToken', - ], - 'api' => [ - 'Barryvdh\Cors\HandleCors', - 'CachetHQ\Cachet\Http\Middleware\Acceptable', - 'CachetHQ\Cachet\Http\Middleware\Timezone', - ], - ]; - /** * The application's route middleware. * @@ -52,7 +32,8 @@ class Kernel extends HttpKernel */ protected $routeMiddleware = [ 'admin' => 'CachetHQ\Cachet\Http\Middleware\Admin', - 'auth' => 'CachetHQ\Cachet\Http\Middleware\Authenticate', + 'can' => 'Illuminate\Auth\Middleware\Authorize', + 'auth' => 'Illuminate\Auth\Middleware\Authenticate', 'auth.api' => 'CachetHQ\Cachet\Http\Middleware\ApiAuthentication', 'guest' => 'CachetHQ\Cachet\Http\Middleware\RedirectIfAuthenticated', 'localize' => 'CachetHQ\Cachet\Http\Middleware\Localize', diff --git a/app/Http/Routes/ApiRoutes.php b/app/Http/Routes/ApiRoutes.php index 6bc32aa3789c..f255e317fd3f 100644 --- a/app/Http/Routes/ApiRoutes.php +++ b/app/Http/Routes/ApiRoutes.php @@ -20,6 +20,13 @@ */ class ApiRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = false; + /** * Define the api routes. * @@ -32,7 +39,6 @@ public function map(Registrar $router) $router->group([ 'namespace' => 'Api', 'prefix' => 'api/v1', - 'middleware' => ['api'], ], function (Registrar $router) { $router->group(['middleware' => ['auth.api']], function (Registrar $router) { $router->get('ping', 'GeneralController@ping'); diff --git a/app/Http/Routes/AuthRoutes.php b/app/Http/Routes/AuthRoutes.php index 0e9fdee5e018..f1dd7fa96bd9 100644 --- a/app/Http/Routes/AuthRoutes.php +++ b/app/Http/Routes/AuthRoutes.php @@ -20,6 +20,13 @@ */ class AuthRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the auth routes. * @@ -30,7 +37,7 @@ class AuthRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'ready'], + 'middleware' => ['ready'], 'prefix' => 'auth', ], function (Registrar $router) { $router->get('login', [ diff --git a/app/Http/Routes/Dashboard/ApiRoutes.php b/app/Http/Routes/Dashboard/ApiRoutes.php index 6b2567d5c9a8..a07f9c4aff07 100644 --- a/app/Http/Routes/Dashboard/ApiRoutes.php +++ b/app/Http/Routes/Dashboard/ApiRoutes.php @@ -21,6 +21,13 @@ */ class ApiRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard api routes. * @@ -31,7 +38,7 @@ class ApiRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/api', ], function (Registrar $router) { diff --git a/app/Http/Routes/Dashboard/BaseRoutes.php b/app/Http/Routes/Dashboard/BaseRoutes.php index cdb308f7eee2..61d7e742d8cf 100644 --- a/app/Http/Routes/Dashboard/BaseRoutes.php +++ b/app/Http/Routes/Dashboard/BaseRoutes.php @@ -21,6 +21,13 @@ */ class BaseRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard base routes. * @@ -31,7 +38,7 @@ class BaseRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', ], function (Registrar $router) { $router->get('admin', 'DashboardController@redirectAdmin'); diff --git a/app/Http/Routes/Dashboard/ComponentRoutes.php b/app/Http/Routes/Dashboard/ComponentRoutes.php index 6cdbcaaadb58..ed14f1e1af8b 100644 --- a/app/Http/Routes/Dashboard/ComponentRoutes.php +++ b/app/Http/Routes/Dashboard/ComponentRoutes.php @@ -21,6 +21,13 @@ */ class ComponentRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard component routes. * @@ -31,7 +38,7 @@ class ComponentRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/components', ], function (Registrar $router) { diff --git a/app/Http/Routes/Dashboard/IncidentRoutes.php b/app/Http/Routes/Dashboard/IncidentRoutes.php index d631f93bb3f4..c312bc0862cf 100644 --- a/app/Http/Routes/Dashboard/IncidentRoutes.php +++ b/app/Http/Routes/Dashboard/IncidentRoutes.php @@ -21,6 +21,13 @@ */ class IncidentRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard incident routes. * @@ -31,7 +38,7 @@ class IncidentRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/incidents', ], function (Registrar $router) { diff --git a/app/Http/Routes/Dashboard/MetricRoutes.php b/app/Http/Routes/Dashboard/MetricRoutes.php index 7d59c043e244..3f28899d8664 100644 --- a/app/Http/Routes/Dashboard/MetricRoutes.php +++ b/app/Http/Routes/Dashboard/MetricRoutes.php @@ -21,6 +21,13 @@ */ class MetricRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard metric routes. * @@ -31,7 +38,7 @@ class MetricRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/metrics', ], function (Registrar $router) { diff --git a/app/Http/Routes/Dashboard/ScheduleRoutes.php b/app/Http/Routes/Dashboard/ScheduleRoutes.php index 722ab8a03aa1..506fe51b6d75 100644 --- a/app/Http/Routes/Dashboard/ScheduleRoutes.php +++ b/app/Http/Routes/Dashboard/ScheduleRoutes.php @@ -21,6 +21,13 @@ */ class ScheduleRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard schedule routes. * @@ -31,7 +38,7 @@ class ScheduleRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/schedule', ], function (Registrar $router) { diff --git a/app/Http/Routes/Dashboard/SettingRoutes.php b/app/Http/Routes/Dashboard/SettingRoutes.php index c4050236a459..4370a750f6a3 100644 --- a/app/Http/Routes/Dashboard/SettingRoutes.php +++ b/app/Http/Routes/Dashboard/SettingRoutes.php @@ -21,6 +21,13 @@ */ class SettingRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard setting routes. * @@ -31,7 +38,7 @@ class SettingRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/settings', ], function (Registrar $router) { diff --git a/app/Http/Routes/Dashboard/SubscriberRoutes.php b/app/Http/Routes/Dashboard/SubscriberRoutes.php index 6e08e113844f..129d786f8bd8 100644 --- a/app/Http/Routes/Dashboard/SubscriberRoutes.php +++ b/app/Http/Routes/Dashboard/SubscriberRoutes.php @@ -21,6 +21,13 @@ */ class SubscriberRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard subscriber routes. * @@ -31,7 +38,7 @@ class SubscriberRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/subscribers', ], function (Registrar $router) { diff --git a/app/Http/Routes/Dashboard/TeamRoutes.php b/app/Http/Routes/Dashboard/TeamRoutes.php index db56141fcab6..8872859227a9 100644 --- a/app/Http/Routes/Dashboard/TeamRoutes.php +++ b/app/Http/Routes/Dashboard/TeamRoutes.php @@ -21,6 +21,13 @@ */ class TeamRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard team routes. * @@ -31,7 +38,7 @@ class TeamRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/team', ], function (Registrar $router) { diff --git a/app/Http/Routes/Dashboard/TemplateRoutes.php b/app/Http/Routes/Dashboard/TemplateRoutes.php index 338de8a35f14..289f975229be 100644 --- a/app/Http/Routes/Dashboard/TemplateRoutes.php +++ b/app/Http/Routes/Dashboard/TemplateRoutes.php @@ -21,6 +21,13 @@ */ class TemplateRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard template routes. * @@ -31,7 +38,7 @@ class TemplateRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/templates', ], function (Registrar $router) { diff --git a/app/Http/Routes/Dashboard/UserRoutes.php b/app/Http/Routes/Dashboard/UserRoutes.php index 6934a4a64113..15720a464461 100644 --- a/app/Http/Routes/Dashboard/UserRoutes.php +++ b/app/Http/Routes/Dashboard/UserRoutes.php @@ -21,6 +21,13 @@ */ class UserRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the dashboard user routes. * @@ -31,7 +38,7 @@ class UserRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'auth'], + 'middleware' => ['auth'], 'namespace' => 'Dashboard', 'prefix' => 'dashboard/user', ], function (Registrar $router) { diff --git a/app/Http/Routes/FeedRoutes.php b/app/Http/Routes/FeedRoutes.php index b2971c45798d..2a4f930efd7f 100644 --- a/app/Http/Routes/FeedRoutes.php +++ b/app/Http/Routes/FeedRoutes.php @@ -20,6 +20,13 @@ */ class FeedRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the status page routes. * @@ -30,7 +37,7 @@ class FeedRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'ready'], + 'middleware' => ['ready'], ], function (Registrar $router) { $router->get('/atom/{component_group?}', [ 'as' => 'get:feed.atom', diff --git a/app/Http/Routes/SetupRoutes.php b/app/Http/Routes/SetupRoutes.php index a0ed0249991e..2558237ce5c3 100644 --- a/app/Http/Routes/SetupRoutes.php +++ b/app/Http/Routes/SetupRoutes.php @@ -21,6 +21,13 @@ */ class SetupRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the setup routes. * @@ -31,7 +38,7 @@ class SetupRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'setup'], + 'middleware' => ['setup'], 'prefix' => 'setup', ], function (Registrar $router) { $router->get('/', [ diff --git a/app/Http/Routes/SignupRoutes.php b/app/Http/Routes/SignupRoutes.php index 1e0252ccc53c..8530726175a5 100644 --- a/app/Http/Routes/SignupRoutes.php +++ b/app/Http/Routes/SignupRoutes.php @@ -20,6 +20,13 @@ */ class SignupRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the signup routes. * @@ -30,7 +37,7 @@ class SignupRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'ready', 'guest'], + 'middleware' => ['ready', 'guest'], 'prefix' => 'signup', ], function (Registrar $router) { $router->get('invite/{code}', [ diff --git a/app/Http/Routes/StatusPageRoutes.php b/app/Http/Routes/StatusPageRoutes.php index d83527398974..05df54e7db7d 100644 --- a/app/Http/Routes/StatusPageRoutes.php +++ b/app/Http/Routes/StatusPageRoutes.php @@ -20,6 +20,13 @@ */ class StatusPageRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the status page routes. * @@ -30,7 +37,7 @@ class StatusPageRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'ready', 'localize'], + 'middleware' => ['ready', 'localize'], ], function (Registrar $router) { $router->get('/', [ 'as' => 'get:status-page', diff --git a/app/Http/Routes/SubscribeRoutes.php b/app/Http/Routes/SubscribeRoutes.php index 7eded56f9421..e844ba182364 100644 --- a/app/Http/Routes/SubscribeRoutes.php +++ b/app/Http/Routes/SubscribeRoutes.php @@ -20,6 +20,13 @@ */ class SubscribeRoutes { + /** + * Defines if these routes are for the browser. + * + * @var bool + */ + public static $browser = true; + /** * Define the subscribe routes. * @@ -30,7 +37,7 @@ class SubscribeRoutes public function map(Registrar $router) { $router->group([ - 'middleware' => ['web', 'ready', 'localize', 'subscribers'], + 'middleware' => ['ready', 'localize', 'subscribers'], ], function (Registrar $router) { $router->get('subscribe', [ 'as' => 'get:subscribe', diff --git a/app/Models/Component.php b/app/Models/Component.php index 98f5c899c28d..d488f9c324fc 100644 --- a/app/Models/Component.php +++ b/app/Models/Component.php @@ -75,9 +75,12 @@ class Component extends Model implements HasPresenter * @var string[] */ public $rules = [ - 'name' => 'required|string', - 'status' => 'int|required', - 'link' => 'url', + 'name' => 'required|string', + 'status' => 'required|int', + 'order' => 'nullable|int', + 'group_id' => 'nullable|int', + 'link' => 'nullable|url', + 'enabled' => 'required|bool', ]; /** @@ -148,7 +151,7 @@ public function tags() */ public function scopeStatus(Builder $query, $status) { - return $query->where('status', $status); + return $query->where('status', '=', $status); } /** @@ -173,7 +176,7 @@ public function scopeNotStatus(Builder $query, $status) */ public function scopeEnabled(Builder $query) { - return $query->where('enabled', true); + return $query->where('enabled', '=', true); } /** @@ -185,7 +188,7 @@ public function scopeEnabled(Builder $query) */ public function scopeDisabled(Builder $query) { - return $query->where('enabled', false); + return $query->where('enabled', '=', false); } /** @@ -198,7 +201,7 @@ public function scopeDisabled(Builder $query) public function scopeUngrouped(Builder $query) { return $query->enabled() - ->where('group_id', 0) + ->where('group_id', '=', 0) ->orderBy('order') ->orderBy('created_at'); } diff --git a/app/Models/ComponentGroup.php b/app/Models/ComponentGroup.php index 5f881dbda338..f6691f6379ce 100644 --- a/app/Models/ComponentGroup.php +++ b/app/Models/ComponentGroup.php @@ -75,9 +75,9 @@ class ComponentGroup extends Model implements HasPresenter */ public $rules = [ 'name' => 'required|string', - 'order' => 'int', - 'collapsed' => 'int', - 'visible' => 'bool', + 'order' => 'required|int', + 'collapsed' => 'required|int', + 'visible' => 'required|bool', ]; /** @@ -172,7 +172,7 @@ public function getPresenterClass() */ public function scopeVisible(Builder $query) { - return $query->where('visible', self::VISIBLE_GUEST); + return $query->where('visible', '=', self::VISIBLE_GUEST); } /** diff --git a/app/Models/Incident.php b/app/Models/Incident.php index bebf43163cb9..10ff79b133ff 100644 --- a/app/Models/Incident.php +++ b/app/Models/Incident.php @@ -69,7 +69,7 @@ class Incident extends Model implements HasPresenter */ protected $casts = [ 'visible' => 'int', - 'stickied' => 'int', + 'stickied' => 'bool', 'scheduled_at' => 'date', 'deleted_at' => 'date', ]; @@ -97,12 +97,12 @@ class Incident extends Model implements HasPresenter * @var string[] */ public $rules = [ - 'component_id' => 'int', - 'name' => 'required', + 'component_id' => 'nullable|int', + 'name' => 'required|string', 'status' => 'required|int', 'visible' => 'required|bool', - 'stickied' => 'bool', - 'message' => 'required', + 'stickied' => 'required|bool', + 'message' => 'required|string', ]; /** @@ -169,7 +169,7 @@ public function updates() */ public function scopeVisible(Builder $query) { - return $query->where('visible', 1); + return $query->where('visible', '=', 1); } /** @@ -181,7 +181,7 @@ public function scopeVisible(Builder $query) */ public function scopeStickied(Builder $query) { - return $query->where('stickied', true); + return $query->where('stickied', '=', true); } /** @@ -193,7 +193,7 @@ public function scopeStickied(Builder $query) */ public function scopeScheduled(Builder $query) { - return $query->where('status', 0)->where('scheduled_at', '>=', Carbon::now()); + return $query->where('status', '=', 0)->where('scheduled_at', '>=', Carbon::now()); } /** @@ -206,7 +206,7 @@ public function scopeScheduled(Builder $query) public function scopeNotScheduled(Builder $query) { return $query->where('status', '>', 0)->orWhere(function ($query) { - $query->where('status', 0)->where(function ($query) { + $query->where('status', '=', 0)->where(function ($query) { $query->whereNull('scheduled_at')->orWhere('scheduled_at', '<=', Carbon::now()); }); }); diff --git a/app/Models/IncidentTemplate.php b/app/Models/IncidentTemplate.php index b5b9bf51c101..b5ded4501292 100644 --- a/app/Models/IncidentTemplate.php +++ b/app/Models/IncidentTemplate.php @@ -44,7 +44,7 @@ class IncidentTemplate extends Model */ public $rules = [ 'name' => 'required|string', - 'slug' => 'string', + 'slug' => 'required|string', 'template' => 'required|string', ]; @@ -72,7 +72,7 @@ public static function boot() */ public static function forSlug($slug, $columns = ['*']) { - $template = static::where('slug', $slug)->firstOrFail($columns); + $template = static::where('slug', '=', $slug)->firstOrFail($columns); return $template; } diff --git a/app/Models/IncidentUpdate.php b/app/Models/IncidentUpdate.php index d905fb9ca8c5..207e129edc28 100644 --- a/app/Models/IncidentUpdate.php +++ b/app/Models/IncidentUpdate.php @@ -56,7 +56,7 @@ class IncidentUpdate extends Model implements HasPresenter * @var string[] */ public $rules = [ - 'incident_id' => 'int', + 'incident_id' => 'required|int', 'status' => 'required|int', 'message' => 'required|string', 'user_id' => 'required|int', diff --git a/app/Models/Metric.php b/app/Models/Metric.php index db594c358d13..1e46702847bb 100644 --- a/app/Models/Metric.php +++ b/app/Models/Metric.php @@ -94,12 +94,11 @@ class Metric extends Model implements HasPresenter public $rules = [ 'name' => 'required', 'suffix' => 'required', - 'display_chart' => 'bool', - 'default_value' => 'numeric', - 'places' => 'numeric|between:0,4', - 'default_view' => 'numeric|between:0,3', - 'threshold' => 'numeric|between:0,10', - 'threshold' => 'int', + 'display_chart' => 'required|bool', + 'default_value' => 'required|numeric', + 'places' => 'required|numeric|between:0,4', + 'default_view' => 'required|numeric|between:0,3', + 'threshold' => 'required|numeric|between:0,10', ]; /** @@ -135,7 +134,7 @@ public function points() */ public function scopeDisplayable(Builder $query) { - return $query->where('display_chart', 1); + return $query->where('display_chart', '=', true); } /** @@ -145,7 +144,7 @@ public function scopeDisplayable(Builder $query) */ public function getShouldDisplayAttribute() { - return $this->display_chart === 1; + return $this->display_chart; } /** diff --git a/app/Models/MetricPoint.php b/app/Models/MetricPoint.php index 2fbd024825ba..db0daf37d9a3 100644 --- a/app/Models/MetricPoint.php +++ b/app/Models/MetricPoint.php @@ -59,7 +59,7 @@ class MetricPoint extends Model implements HasPresenter * @var string[] */ public $rules = [ - 'value' => 'numeric|required', + 'value' => 'required|numeric', ]; /** diff --git a/app/Models/Subscriber.php b/app/Models/Subscriber.php index e2f3fe4bc4d5..b2ff5391af59 100644 --- a/app/Models/Subscriber.php +++ b/app/Models/Subscriber.php @@ -101,7 +101,7 @@ public function scopeIsVerified(Builder $query) */ public function scopeIsGlobal(Builder $query) { - return $query->where('global', true); + return $query->where('global', '=', true); } /** @@ -116,7 +116,7 @@ public function scopeForComponent(Builder $query, $component_id) { return $query->select('subscribers.*') ->join('subscriptions', 'subscribers.id', '=', 'subscriptions.subscriber_id') - ->where('subscriptions.component_id', $component_id); + ->where('subscriptions.component_id', '=', $component_id); } /** diff --git a/app/Models/Subscription.php b/app/Models/Subscription.php index fb7872a3bcaa..c878c3c2add2 100644 --- a/app/Models/Subscription.php +++ b/app/Models/Subscription.php @@ -45,8 +45,8 @@ class Subscription extends Model * @var string[] */ public $rules = [ - 'subscriber_id' => 'int|required', - 'component_id' => 'int', + 'subscriber_id' => 'required|int', + 'component_id' => 'nullable|int', ]; /** @@ -79,7 +79,7 @@ public function component() */ public function scopeForSubscriber(Builder $query, $subscriber_id) { - return $query->where('subscriber_id', $subscriber_id); + return $query->where('subscriber_id', '=', $subscriber_id); } /** @@ -92,7 +92,7 @@ public function scopeForSubscriber(Builder $query, $subscriber_id) */ public function scopeForComponent(Builder $query, $component_id) { - return $query->where('component_id', $component_id); + return $query->where('component_id', '=', $component_id); } /** @@ -108,7 +108,7 @@ public function scopeIsVerifiedForComponent(Builder $query, $component_id) return $query->select('subscriptions.*') ->join('subscribers', 'subscriptions.subscriber_id', '=', 'subscribers.id') ->where(function ($query) { - $query->where('subscriptions.component_id', $component_id) + $query->where('subscriptions.component_id', '=', $component_id) ->orWhere('subscribers.global'); }) ->whereNotNull('subscribers.verified_at'); diff --git a/app/Models/User.php b/app/Models/User.php index c8573d5bb0fc..d2807bac5277 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -12,12 +12,10 @@ namespace CachetHQ\Cachet\Models; use AltThree\Validator\ValidatingTrait; -use Illuminate\Auth\Authenticatable; -use Illuminate\Auth\Passwords\CanResetPassword; -use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; -use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; +use Illuminate\Foundation\Auth\User as Authenticatable; +use Illuminate\Notifications\Notifiable; use Illuminate\Support\Facades\Hash; /** @@ -25,9 +23,9 @@ * * @author James Brooks */ -class User extends Model implements AuthenticatableContract, CanResetPasswordContract +class User extends Authenticatable { - use Authenticatable, CanResetPassword, ValidatingTrait; + use Notifiable, ValidatingTrait; /** * The admin level of user. @@ -133,7 +131,7 @@ public static function boot() */ public function scopeAdmins(Builder $query) { - return $query->where('level', self::LEVEL_ADMIN); + return $query->where('level', '=', self::LEVEL_ADMIN); } /** @@ -145,7 +143,7 @@ public function scopeAdmins(Builder $query) */ public function scopeActive(Builder $query) { - return $query->where('active', true); + return $query->where('active', '=', true); } /** diff --git a/app/Presenters/ComponentPresenter.php b/app/Presenters/ComponentPresenter.php index af56214c5a4d..2159953383ab 100644 --- a/app/Presenters/ComponentPresenter.php +++ b/app/Presenters/ComponentPresenter.php @@ -29,10 +29,14 @@ class ComponentPresenter extends BasePresenter implements Arrayable public function status_color() { switch ($this->wrappedObject->status) { - case 1: return 'greens'; - case 2: return 'blues'; - case 3: return 'yellows'; - case 4: return 'reds'; + case 1: + return 'greens'; + case 2: + return 'blues'; + case 3: + return 'yellows'; + case 4: + return 'reds'; } } diff --git a/app/Presenters/IncidentPresenter.php b/app/Presenters/IncidentPresenter.php index 87ff36fb602d..a552f5784033 100644 --- a/app/Presenters/IncidentPresenter.php +++ b/app/Presenters/IncidentPresenter.php @@ -269,8 +269,6 @@ public function permalink() public function duration() { if ($update = $this->latest()) { - dd($update->created_at->diffInSeconds($this->wrappedObject->created_at)); - return $this->wrappedObject->created_at->diffInSeconds($update->created_at); } diff --git a/app/Presenters/MetricPresenter.php b/app/Presenters/MetricPresenter.php index 3a76abdd9ca6..f980e93d5c59 100644 --- a/app/Presenters/MetricPresenter.php +++ b/app/Presenters/MetricPresenter.php @@ -27,10 +27,14 @@ class MetricPresenter extends BasePresenter implements Arrayable public function view_name() { switch ($this->wrappedObject->default_view) { - case 0: return 'last_hour'; - case 1: return 'today'; - case 2: return 'week'; - case 3: return 'month'; + case 0: + return 'last_hour'; + case 1: + return 'today'; + case 2: + return 'week'; + case 3: + return 'month'; } } @@ -52,10 +56,14 @@ public function default_view_name() public function trans_string_name() { switch ($this->wrappedObject->default_view) { - case 0: return 'last_hour'; - case 1: return 'hourly'; - case 2: return 'weekly'; - case 3: return 'monthly'; + case 0: + return 'last_hour'; + case 1: + return 'hourly'; + case 2: + return 'weekly'; + case 3: + return 'monthly'; } } diff --git a/app/Settings/Repository.php b/app/Settings/Repository.php index 4f3fdcd9df43..35cf79e914b3 100644 --- a/app/Settings/Repository.php +++ b/app/Settings/Repository.php @@ -81,7 +81,7 @@ public function set($name, $value) $this->stale = true; if ($value === null) { - $this->model->where('name', $name)->delete(); + $this->model->where('name', '=', $name)->delete(); } else { $this->model->updateOrCreate(compact('name'), compact('value')); } @@ -97,7 +97,7 @@ public function set($name, $value) */ public function get($name, $default = null) { - if ($setting = $this->model->where('name', $name)->first()) { + if ($setting = $this->model->where('name', '=', $name)->first()) { return $this->castSetting($name, $setting->value); } @@ -115,7 +115,7 @@ public function delete($name) { $this->stale = true; - $this->model->where('name', $name)->delete(); + $this->model->where('name', '=', $name)->delete(); } /** diff --git a/bootstrap/app.php b/bootstrap/app.php index 524cdccff793..8223651ac393 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -26,7 +26,7 @@ $app->singleton('Illuminate\Contracts\Console\Kernel', 'CachetHQ\Cachet\Console\Kernel'); -$app->singleton('Illuminate\Contracts\Debug\ExceptionHandler', 'GrahamCampbell\Exceptions\ExceptionHandler'); +$app->singleton('Illuminate\Contracts\Debug\ExceptionHandler', 'GrahamCampbell\Exceptions\NewExceptionHandler'); /* |-------------------------------------------------------------------------- diff --git a/composer.json b/composer.json index 44047acc7c2c..a6bff1215542 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,13 @@ { "name": "cachethq/cachet", "description": "An open source status page system, for everyone.", - "keywords": ["laravel", "cachet", "alt-three", "status", "page"], + "keywords": [ + "laravel", + "cachet", + "alt-three", + "status", + "page" + ], "type": "project", "license": "BSD-3-Clause", "authors": [ @@ -19,10 +25,10 @@ } ], "require": { - "php": ">=5.5.9", + "php": ">=5.6.4", "ext-xml": "*", "alt-three/badger": "^3.1", - "alt-three/bus": "^1.1", + "alt-three/bus": "^2.0", "alt-three/emoji": "^3.1", "alt-three/throttle": "^1.0", "alt-three/validator": "^1.5", @@ -32,29 +38,29 @@ "doctrine/dbal": "^2.5", "fedeisas/laravel-mail-css-inliner": "^1.5", "fideloper/proxy": "^3.1", - "graham-campbell/binput": "^3.4", + "graham-campbell/binput": "^3.5", "graham-campbell/core": "^5.1", - "graham-campbell/exceptions": "^8.6", + "graham-campbell/exceptions": "^9.1", "graham-campbell/markdown": "^6.1", "guzzlehttp/guzzle": "^6.2.1", "jenssegers/date": "^3.2", - "laravel/framework": "5.2.45", + "laravel/framework": "5.3.*", "mccool/laravel-auto-presenter": "^4.3", "pragmarx/google2fa": "^0.7.1", "predis/predis": "^1.1", - "twig/twig": "^2.0.0", + "twig/twig": "^1.26.1", "roumen/feed": "^2.10.4" }, "require-dev": { - "alt-three/testbench": "^1.8", + "alt-three/testbench": "^1.9", "filp/whoops": "^2.1", "fzaninotto/faker": "^1.6", "graham-campbell/testbench-core": "^1.1", "mockery/mockery": "0.9.5", - "phpunit/phpunit": "4.8.21", - "symfony/css-selector": "^3.0", - "symfony/dom-crawler": "^3.0", - "tightenco/mailthief": "^0.2.3" + "phpunit/phpunit": "~5.0", + "symfony/css-selector": "^3.1", + "symfony/dom-crawler": "^3.1", + "tightenco/mailthief": "^0.3.2" }, "autoload": { "classmap": [ @@ -94,9 +100,6 @@ ] }, "config": { - "platform": { - "php": "5.5.9" - }, "preferred-install": "dist" }, "extra": { @@ -104,6 +107,6 @@ "dev-master": "2.4-dev" } }, - "minimum-stability": "dev", + "minimum-stability": "stable", "prefer-stable": true } diff --git a/composer.lock b/composer.lock index 686391bf3510..ad9ac7ec152a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "5b4008d015b0c722e137bd32d3b04054", - "content-hash": "72e88a7089a1b4f00cb2f25dcffbdd74", + "hash": "fca8fc5b2e78a82f98a0bfa85672b87f", + "content-hash": "d60fff17875690a829a28ad77b35e68d", "packages": [ { "name": "alt-three/badger", @@ -71,34 +71,35 @@ }, { "name": "alt-three/bus", - "version": "v1.1.0", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/AltThree/Bus.git", - "reference": "5c8399e0ca67ba6b499aa1e8db6a278711446090" + "reference": "cf98cf46654491c4f9f286ab32dd72fb6eb446cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/AltThree/Bus/zipball/5c8399e0ca67ba6b499aa1e8db6a278711446090", - "reference": "5c8399e0ca67ba6b499aa1e8db6a278711446090", + "url": "https://api.github.com/repos/AltThree/Bus/zipball/cf98cf46654491c4f9f286ab32dd72fb6eb446cc", + "reference": "cf98cf46654491c4f9f286ab32dd72fb6eb446cc", "shasum": "" }, "require": { - "illuminate/container": "5.2.*|5.3.*", - "illuminate/contracts": "5.2.*|5.3.*", - "illuminate/pipeline": "5.2.*|5.3.*", - "illuminate/support": "5.2.*|5.3.*", - "php": ">=5.5.9" + "illuminate/bus": "5.3.*", + "illuminate/container": "5.3.*", + "illuminate/contracts": "5.3.*", + "illuminate/pipeline": "5.3.*", + "illuminate/support": "5.3.*", + "php": ">=5.6.4" }, "require-dev": { - "graham-campbell/testbench-core": "^1.1", + "graham-campbell/testbench": "^3.1", "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.8|^5.0" + "phpunit/phpunit": "^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -136,7 +137,7 @@ "command bus", "job" ], - "time": "2016-04-22 17:24:19" + "time": "2016-08-25 10:38:17" }, { "name": "alt-three/emoji", @@ -325,16 +326,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.19.14", + "version": "3.19.18", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "2d0c88883dac2f8dd21825b51ef1f04e04073f8f" + "reference": "d9004dac4bd7f5405952f963da3bcf986295a4de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2d0c88883dac2f8dd21825b51ef1f04e04073f8f", - "reference": "2d0c88883dac2f8dd21825b51ef1f04e04073f8f", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d9004dac4bd7f5405952f963da3bcf986295a4de", + "reference": "d9004dac4bd7f5405952f963da3bcf986295a4de", "shasum": "" }, "require": { @@ -401,7 +402,7 @@ "s3", "sdk" ], - "time": "2016-10-12 21:32:40" + "time": "2016-10-20 20:21:56" }, { "name": "backup-manager/backup-manager", @@ -1335,16 +1336,16 @@ }, { "name": "graham-campbell/binput", - "version": "v3.4.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-Binput.git", - "reference": "814bcce1c012fbdf3a8275eef45e5d84ad01239d" + "reference": "2da3554abbb6585ed09183a68a09a2f3c8bfbfb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Binput/zipball/814bcce1c012fbdf3a8275eef45e5d84ad01239d", - "reference": "814bcce1c012fbdf3a8275eef45e5d84ad01239d", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Binput/zipball/2da3554abbb6585ed09183a68a09a2f3c8bfbfb1", + "reference": "2da3554abbb6585ed09183a68a09a2f3c8bfbfb1", "shasum": "" }, "require": { @@ -1362,7 +1363,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "3.5-dev" } }, "autoload": { @@ -1394,7 +1395,7 @@ "laravel", "security" ], - "time": "2016-04-26 14:18:44" + "time": "2016-10-21 10:11:30" }, { "name": "graham-campbell/core", @@ -1458,16 +1459,16 @@ }, { "name": "graham-campbell/exceptions", - "version": "v8.8.0", + "version": "v9.1.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-Exceptions.git", - "reference": "e93f725d3637625897fe6ec30dc454cb23adb331" + "reference": "8e106aba52f7ef69360035e872b5f7a0a94bf06b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Exceptions/zipball/e93f725d3637625897fe6ec30dc454cb23adb331", - "reference": "e93f725d3637625897fe6ec30dc454cb23adb331", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Exceptions/zipball/8e106aba52f7ef69360035e872b5f7a0a94bf06b", + "reference": "8e106aba52f7ef69360035e872b5f7a0a94bf06b", "shasum": "" }, "require": { @@ -1491,7 +1492,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.7-dev" + "dev-master": "9.1-dev" } }, "autoload": { @@ -1523,7 +1524,7 @@ "laravel", "whoops" ], - "time": "2016-07-31 14:54:35" + "time": "2016-08-19 08:58:30" }, { "name": "graham-campbell/markdown", @@ -2019,16 +2020,16 @@ }, { "name": "laravel/framework", - "version": "v5.2.45", + "version": "v5.3.19", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "2a79f920d5584ec6df7cf996d922a742d11095d1" + "reference": "f1a5bb417b3e0d1949fe84617eacd1a14d75d7f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/2a79f920d5584ec6df7cf996d922a742d11095d1", - "reference": "2a79f920d5584ec6df7cf996d922a742d11095d1", + "url": "https://api.github.com/repos/laravel/framework/zipball/f1a5bb417b3e0d1949fe84617eacd1a14d75d7f1", + "reference": "f1a5bb417b3e0d1949fe84617eacd1a14d75d7f1", "shasum": "" }, "require": { @@ -2041,20 +2042,20 @@ "monolog/monolog": "~1.11", "mtdowling/cron-expression": "~1.0", "nesbot/carbon": "~1.20", - "paragonie/random_compat": "~1.4", - "php": ">=5.5.9", + "paragonie/random_compat": "~1.4|~2.0", + "php": ">=5.6.4", "psy/psysh": "0.7.*", + "ramsey/uuid": "~3.0", "swiftmailer/swiftmailer": "~5.1", - "symfony/console": "2.8.*|3.0.*", - "symfony/debug": "2.8.*|3.0.*", - "symfony/finder": "2.8.*|3.0.*", - "symfony/http-foundation": "2.8.*|3.0.*", - "symfony/http-kernel": "2.8.*|3.0.*", - "symfony/polyfill-php56": "~1.0", - "symfony/process": "2.8.*|3.0.*", - "symfony/routing": "2.8.*|3.0.*", - "symfony/translation": "2.8.*|3.0.*", - "symfony/var-dumper": "2.8.*|3.0.*", + "symfony/console": "3.1.*", + "symfony/debug": "3.1.*", + "symfony/finder": "3.1.*", + "symfony/http-foundation": "3.1.*", + "symfony/http-kernel": "3.1.*", + "symfony/process": "3.1.*", + "symfony/routing": "3.1.*", + "symfony/translation": "3.1.*", + "symfony/var-dumper": "3.1.*", "vlucas/phpdotenv": "~2.2" }, "replace": { @@ -2076,6 +2077,7 @@ "illuminate/http": "self.version", "illuminate/log": "self.version", "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", "illuminate/pagination": "self.version", "illuminate/pipeline": "self.version", "illuminate/queue": "self.version", @@ -2092,10 +2094,10 @@ "aws/aws-sdk-php": "~3.0", "mockery/mockery": "~0.9.4", "pda/pheanstalk": "~3.0", - "phpunit/phpunit": "~4.1", + "phpunit/phpunit": "~5.4", "predis/predis": "~1.0", - "symfony/css-selector": "2.8.*|3.0.*", - "symfony/dom-crawler": "2.8.*|3.0.*" + "symfony/css-selector": "3.1.*", + "symfony/dom-crawler": "3.1.*" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", @@ -2107,20 +2109,17 @@ "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (2.8.*|3.0.*).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (2.8.*|3.0.*).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (3.1.*).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (3.1.*).", "symfony/psr-http-message-bridge": "Required to use psr7 bridging features (0.2.*)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.2-dev" + "dev-master": "5.3-dev" } }, "autoload": { - "classmap": [ - "src/Illuminate/Queue/IlluminateQueueClosure.php" - ], "files": [ "src/Illuminate/Foundation/helpers.php", "src/Illuminate/Support/helpers.php" @@ -2136,16 +2135,16 @@ "authors": [ { "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" + "email": "taylor@laravel.com" } ], "description": "The Laravel Framework.", - "homepage": "http://laravel.com", + "homepage": "https://laravel.com", "keywords": [ "framework", "laravel" ], - "time": "2016-08-26 11:44:52" + "time": "2016-10-17 19:35:14" }, { "name": "league/commonmark", @@ -2218,20 +2217,20 @@ }, { "name": "league/flysystem", - "version": "1.0.28", + "version": "1.0.32", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "a9663643ff2d16d7f66ed1e0d3212c5491bc9044" + "reference": "1b5c4a0031697f46e779a9d1b309c2e1b24daeab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a9663643ff2d16d7f66ed1e0d3212c5491bc9044", - "reference": "a9663643ff2d16d7f66ed1e0d3212c5491bc9044", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1b5c4a0031697f46e779a9d1b309c2e1b24daeab", + "reference": "1b5c4a0031697f46e779a9d1b309c2e1b24daeab", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=5.5.9" }, "conflict": { "league/flysystem-sftp": "<1.0.6" @@ -2297,7 +2296,7 @@ "sftp", "storage" ], - "time": "2016-10-07 12:20:37" + "time": "2016-10-19 20:38:46" }, { "name": "mccool/laravel-auto-presenter", @@ -2638,16 +2637,16 @@ }, { "name": "paragonie/random_compat", - "version": "v1.4.1", + "version": "v2.0.3", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "c7e26a21ba357863de030f0b9e701c7d04593774" + "reference": "c0125896dbb151380ab47e96c621741e79623beb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c7e26a21ba357863de030f0b9e701c7d04593774", - "reference": "c7e26a21ba357863de030f0b9e701c7d04593774", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c0125896dbb151380ab47e96c621741e79623beb", + "reference": "c0125896dbb151380ab47e96c621741e79623beb", "shasum": "" }, "require": { @@ -2682,7 +2681,7 @@ "pseudorandom", "random" ], - "time": "2016-03-18 20:34:03" + "time": "2016-10-17 15:23:22" }, { "name": "pragmarx/google2fa", @@ -2957,6 +2956,86 @@ ], "time": "2016-03-09 05:03:14" }, + { + "name": "ramsey/uuid", + "version": "3.5.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "a07797b986671b0dc823885a81d5e3516b931599" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/a07797b986671b0dc823885a81d5e3516b931599", + "reference": "a07797b986671b0dc823885a81d5e3516b931599", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "^1.0|^2.0", + "php": ">=5.4" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "apigen/apigen": "^4.1", + "codeception/aspect-mock": "1.0.0", + "goaop/framework": "1.0.0-alpha.2", + "ircmaxell/random-lib": "^1.1", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "mockery/mockery": "^0.9.4", + "moontoast/math": "^1.1", + "phpunit/phpunit": "^4.7|>=5.0 <5.4", + "satooshi/php-coveralls": "^0.6.1", + "squizlabs/php_codesniffer": "^2.3" + }, + "suggest": { + "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", + "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", + "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Thibaud Fabre", + "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "homepage": "https://github.com/ramsey/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "time": "2016-10-02 15:51:17" + }, { "name": "roumen/feed", "version": "v2.10.4", @@ -3114,20 +3193,21 @@ }, { "name": "symfony/console", - "version": "v3.0.9", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "926061e74229e935d3c5b4e9ba87237316c6693f" + "reference": "6cb0872fb57b38b3b09ff213c21ed693956b9eb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/926061e74229e935d3c5b4e9ba87237316c6693f", - "reference": "926061e74229e935d3c5b4e9ba87237316c6693f", + "url": "https://api.github.com/repos/symfony/console/zipball/6cb0872fb57b38b3b09ff213c21ed693956b9eb0", + "reference": "6cb0872fb57b38b3b09ff213c21ed693956b9eb0", "shasum": "" }, "require": { "php": ">=5.5.9", + "symfony/debug": "~2.8|~3.0", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { @@ -3143,7 +3223,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3170,7 +3250,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-07-30 07:22:48" + "time": "2016-09-28 00:11:12" }, { "name": "symfony/css-selector", @@ -3227,16 +3307,16 @@ }, { "name": "symfony/debug", - "version": "v3.0.9", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" + "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", - "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", + "url": "https://api.github.com/repos/symfony/debug/zipball/e2b3f74a67fc928adc3c1b9027f73e1bc01190a8", + "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8", "shasum": "" }, "require": { @@ -3253,7 +3333,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3280,7 +3360,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-07-30 07:22:48" + "time": "2016-09-06 11:02:40" }, { "name": "symfony/event-dispatcher", @@ -3344,16 +3424,16 @@ }, { "name": "symfony/finder", - "version": "v3.0.9", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9" + "reference": "205b5ffbb518a98ba2ae60a52656c4a31ab00c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9", - "reference": "3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9", + "url": "https://api.github.com/repos/symfony/finder/zipball/205b5ffbb518a98ba2ae60a52656c4a31ab00c6f", + "reference": "205b5ffbb518a98ba2ae60a52656c4a31ab00c6f", "shasum": "" }, "require": { @@ -3362,7 +3442,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3389,20 +3469,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:40:00" + "time": "2016-09-28 00:11:12" }, { "name": "symfony/http-foundation", - "version": "v3.0.9", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "49ba00f8ede742169cb6b70abe33243f4d673f82" + "reference": "5114f1becca9f29e3af94374f1689c83c1aa3d97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/49ba00f8ede742169cb6b70abe33243f4d673f82", - "reference": "49ba00f8ede742169cb6b70abe33243f4d673f82", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5114f1becca9f29e3af94374f1689c83c1aa3d97", + "reference": "5114f1becca9f29e3af94374f1689c83c1aa3d97", "shasum": "" }, "require": { @@ -3415,7 +3495,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3442,20 +3522,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-07-17 13:54:30" + "time": "2016-09-21 20:55:10" }, { "name": "symfony/http-kernel", - "version": "v3.0.9", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "d97ba4425e36e79c794e7d14ff36f00f081b37b3" + "reference": "dc339d6eebadfa6e39c52868b4d4a715eff13c69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d97ba4425e36e79c794e7d14ff36f00f081b37b3", - "reference": "d97ba4425e36e79c794e7d14ff36f00f081b37b3", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/dc339d6eebadfa6e39c52868b4d4a715eff13c69", + "reference": "dc339d6eebadfa6e39c52868b4d4a715eff13c69", "shasum": "" }, "require": { @@ -3497,7 +3577,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3524,7 +3604,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-07-30 09:10:37" + "time": "2016-10-03 19:01:06" }, { "name": "symfony/polyfill-mbstring", @@ -3695,16 +3775,16 @@ }, { "name": "symfony/process", - "version": "v3.0.9", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "768debc5996f599c4372b322d9061dba2a4bf505" + "reference": "66de154ae86b1a07001da9fbffd620206e4faf94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/768debc5996f599c4372b322d9061dba2a4bf505", - "reference": "768debc5996f599c4372b322d9061dba2a4bf505", + "url": "https://api.github.com/repos/symfony/process/zipball/66de154ae86b1a07001da9fbffd620206e4faf94", + "reference": "66de154ae86b1a07001da9fbffd620206e4faf94", "shasum": "" }, "require": { @@ -3713,7 +3793,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3740,20 +3820,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-07-28 11:13:34" + "time": "2016-09-29 14:13:09" }, { "name": "symfony/routing", - "version": "v3.0.9", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "9038984bd9c05ab07280121e9e10f61a7231457b" + "reference": "8edf62498a1a4c57ba317664a4b698339c10cdf6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/9038984bd9c05ab07280121e9e10f61a7231457b", - "reference": "9038984bd9c05ab07280121e9e10f61a7231457b", + "url": "https://api.github.com/repos/symfony/routing/zipball/8edf62498a1a4c57ba317664a4b698339c10cdf6", + "reference": "8edf62498a1a4c57ba317664a4b698339c10cdf6", "shasum": "" }, "require": { @@ -3782,7 +3862,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3815,20 +3895,20 @@ "uri", "url" ], - "time": "2016-06-29 05:40:00" + "time": "2016-08-16 14:58:24" }, { "name": "symfony/translation", - "version": "v3.0.9", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26" + "reference": "93013a18d272e59dab8e67f583155b78c68947eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/eee6c664853fd0576f21ae25725cfffeafe83f26", - "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26", + "url": "https://api.github.com/repos/symfony/translation/zipball/93013a18d272e59dab8e67f583155b78c68947eb", + "reference": "93013a18d272e59dab8e67f583155b78c68947eb", "shasum": "" }, "require": { @@ -3852,7 +3932,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3879,20 +3959,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-07-30 07:22:48" + "time": "2016-09-06 11:02:40" }, { "name": "symfony/var-dumper", - "version": "v3.0.9", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "1f7e071aafc6676fcb6e3f0497f87c2397247377" + "reference": "70bfe927b86ba9999aeebd829715b0bb2cd39a10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1f7e071aafc6676fcb6e3f0497f87c2397247377", - "reference": "1f7e071aafc6676fcb6e3f0497f87c2397247377", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/70bfe927b86ba9999aeebd829715b0bb2cd39a10", + "reference": "70bfe927b86ba9999aeebd829715b0bb2cd39a10", "shasum": "" }, "require": { @@ -3908,7 +3988,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3942,7 +4022,7 @@ "debug", "dump" ], - "time": "2016-07-26 08:03:56" + "time": "2016-09-29 14:13:09" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -3993,21 +4073,20 @@ }, { "name": "twig/twig", - "version": "dev-master", + "version": "v1.26.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "907366d05379156152bcb1862931a1687be71200" + "reference": "a09d8ee17ac1cfea29ed60c83960ad685c6a898d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/907366d05379156152bcb1862931a1687be71200", - "reference": "907366d05379156152bcb1862931a1687be71200", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/a09d8ee17ac1cfea29ed60c83960ad685c6a898d", + "reference": "a09d8ee17ac1cfea29ed60c83960ad685c6a898d", "shasum": "" }, "require": { - "php": ">=5.5", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=5.2.7" }, "require-dev": { "symfony/debug": "~2.7", @@ -4016,7 +4095,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.26-dev" } }, "autoload": { @@ -4051,7 +4130,7 @@ "keywords": [ "templating" ], - "time": "2016-10-05 18:16:59" + "time": "2016-10-05 18:57:41" }, { "name": "vlucas/phpdotenv", @@ -4500,6 +4579,48 @@ ], "time": "2016-05-22 21:52:33" }, + { + "name": "myclabs/deep-copy", + "version": "1.5.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "ea74994a3dc7f8d2f65a06009348f2d63c81e61f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/ea74994a3dc7f8d2f65a06009348f2d63c81e61f", + "reference": "ea74994a3dc7f8d2f65a06009348f2d63c81e61f", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2016-09-16 13:37:59" + }, { "name": "phpdocumentor/reflection-common", "version": "1.0", @@ -4710,39 +4831,40 @@ }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5f3f7e736d6319d5f1fc402aff8b026da26709a3", + "reference": "5f3f7e736d6319d5f1fc402aff8b026da26709a3", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": "^5.6 || ^7.0", "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "phpunit/php-token-stream": "^1.4.2", + "sebastian/code-unit-reverse-lookup": "~1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "~1.0|~2.0" }, "require-dev": { "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "^5.4" }, "suggest": { "ext-dom": "*", - "ext-xdebug": ">=2.2.1", + "ext-xdebug": ">=2.4.0", "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -4768,7 +4890,7 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2016-07-26 14:39:29" }, { "name": "phpunit/php-file-iterator", @@ -4953,40 +5075,50 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.21", + "version": "5.6.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea76b17bced0500a28098626b84eda12dbcf119c" + "reference": "60c32c5b5e79c2248001efa2560f831da11cc2d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea76b17bced0500a28098626b84eda12dbcf119c", - "reference": "ea76b17bced0500a28098626b84eda12dbcf119c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/60c32c5b5e79c2248001efa2560f831da11cc2d7", + "reference": "60c32c5b5e79c2248001efa2560f831da11cc2d7", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", + "phpunit/php-code-coverage": "^4.0.1", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", + "sebastian/environment": "^1.3 || ^2.0", "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", + "sebastian/object-enumerator": "~1.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", "symfony/yaml": "~2.1|~3.0" }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, "suggest": { + "ext-xdebug": "*", "phpunit/php-invoker": "~1.1" }, "bin": [ @@ -4995,7 +5127,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "5.6.x-dev" } }, "autoload": { @@ -5021,30 +5153,33 @@ "testing", "xunit" ], - "time": "2015-12-12 07:45:58" + "time": "2016-10-07 13:03:26" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "238d7a2723bce689c79eeac9c7d5e1d623bb9dc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/238d7a2723bce689c79eeac9c7d5e1d623bb9dc2", + "reference": "238d7a2723bce689c79eeac9c7d5e1d623bb9dc2", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^5.4" }, "suggest": { "ext-soap": "*" @@ -5052,7 +5187,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.2.x-dev" } }, "autoload": { @@ -5077,7 +5212,52 @@ "mock", "xunit" ], - "time": "2015-10-02 06:51:40" + "time": "2016-10-09 07:01:45" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2016-02-13 06:45:14" }, { "name": "sebastian/comparator", @@ -5363,6 +5543,52 @@ ], "time": "2015-10-12 03:26:01" }, + { + "name": "sebastian/object-enumerator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2016-01-28 13:25:10" + }, { "name": "sebastian/recursion-context", "version": "1.0.2", @@ -5416,21 +5642,71 @@ "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "time": "2015-11-11 19:50:13" }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28 20:34:47" + }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", "shasum": "" }, + "require": { + "php": ">=5.6" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -5449,7 +5725,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2016-02-04 12:56:52" }, { "name": "symfony/dom-crawler", @@ -5558,25 +5834,26 @@ }, { "name": "tightenco/mailthief", - "version": "v0.2.3", + "version": "v0.3.2", "source": { "type": "git", "url": "https://github.com/tightenco/mailthief.git", - "reference": "274d4129ad8ad80cd122ab5448f31f1bb554fa8a" + "reference": "a42277459092ae87f5ac11271f969625509f7f49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tightenco/mailthief/zipball/274d4129ad8ad80cd122ab5448f31f1bb554fa8a", - "reference": "274d4129ad8ad80cd122ab5448f31f1bb554fa8a", + "url": "https://api.github.com/repos/tightenco/mailthief/zipball/a42277459092ae87f5ac11271f969625509f7f49", + "reference": "a42277459092ae87f5ac11271f969625509f7f49", "shasum": "" }, "require": { - "illuminate/mail": "^5.1", - "illuminate/view": "^5.1" + "illuminate/mail": "^5.0", + "illuminate/view": "^5.0" }, "require-dev": { + "laravel/framework": "^5.1", "mockery/mockery": "^0.9.5", - "phpunit/phpunit": "^5.4" + "phpunit/phpunit": "^5.5" }, "type": "library", "autoload": { @@ -5595,7 +5872,7 @@ } ], "description": "A fake Mailer for Laravel applications that takes the pain out of testing mail.", - "time": "2016-08-03 17:38:40" + "time": "2016-10-12 22:32:47" }, { "name": "webmozart/assert", @@ -5649,16 +5926,13 @@ } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=5.5.9", + "php": ">=5.6.4", "ext-xml": "*" }, - "platform-dev": [], - "platform-overrides": { - "php": "5.5.9" - } + "platform-dev": [] } diff --git a/config/app.php b/config/app.php index 983b527ac60e..22316987e183 100644 --- a/config/app.php +++ b/config/app.php @@ -11,6 +11,18 @@ return [ + /* + |-------------------------------------------------------------------------- + | 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' => 'Cachet', + /* |-------------------------------------------------------------------------- | Application Environment @@ -147,6 +159,7 @@ 'Illuminate\Foundation\Providers\FoundationServiceProvider', 'Illuminate\Hashing\HashServiceProvider', 'Illuminate\Mail\MailServiceProvider', + Illuminate\Notifications\NotificationServiceProvider::class, 'Illuminate\Pagination\PaginationServiceProvider', 'Illuminate\Pipeline\PipelineServiceProvider', 'Illuminate\Queue\QueueServiceProvider', @@ -204,35 +217,36 @@ 'aliases' => [ - 'App' => 'Illuminate\Support\Facades\App', - 'Artisan' => 'Illuminate\Support\Facades\Artisan', - 'Auth' => 'Illuminate\Support\Facades\Auth', - 'Blade' => 'Illuminate\Support\Facades\Blade', - 'Cache' => 'Illuminate\Support\Facades\Cache', - 'Config' => 'Illuminate\Support\Facades\Config', - 'Cookie' => 'Illuminate\Support\Facades\Cookie', - 'Crypt' => 'Illuminate\Support\Facades\Crypt', - 'DB' => 'Illuminate\Support\Facades\DB', - 'Event' => 'Illuminate\Support\Facades\Event', - 'File' => 'Illuminate\Support\Facades\File', - 'Gate' => 'Illuminate\Support\Facades\Gate', - 'Hash' => 'Illuminate\Support\Facades\Hash', - 'Lang' => 'Illuminate\Support\Facades\Lang', - 'Log' => 'Illuminate\Support\Facades\Log', - 'Mail' => 'Illuminate\Support\Facades\Mail', - 'Password' => 'Illuminate\Support\Facades\Password', - 'Queue' => 'Illuminate\Support\Facades\Queue', - 'Redirect' => 'Illuminate\Support\Facades\Redirect', - 'Redis' => 'Illuminate\Support\Facades\Redis', - 'Request' => 'Illuminate\Support\Facades\Request', - 'Response' => 'Illuminate\Support\Facades\Response', - 'Route' => 'Illuminate\Support\Facades\Route', - 'Schema' => 'Illuminate\Support\Facades\Schema', - 'Session' => 'Illuminate\Support\Facades\Session', - 'Storage' => 'Illuminate\Support\Facades\Storage', - 'URL' => 'Illuminate\Support\Facades\URL', - 'Validator' => 'Illuminate\Support\Facades\Validator', - 'View' => 'Illuminate\Support\Facades\View', + 'App' => 'Illuminate\Support\Facades\App', + 'Artisan' => 'Illuminate\Support\Facades\Artisan', + 'Auth' => 'Illuminate\Support\Facades\Auth', + 'Blade' => 'Illuminate\Support\Facades\Blade', + 'Cache' => 'Illuminate\Support\Facades\Cache', + 'Config' => 'Illuminate\Support\Facades\Config', + 'Cookie' => 'Illuminate\Support\Facades\Cookie', + 'Crypt' => 'Illuminate\Support\Facades\Crypt', + 'DB' => 'Illuminate\Support\Facades\DB', + 'Event' => 'Illuminate\Support\Facades\Event', + 'File' => 'Illuminate\Support\Facades\File', + 'Gate' => 'Illuminate\Support\Facades\Gate', + 'Hash' => 'Illuminate\Support\Facades\Hash', + 'Lang' => 'Illuminate\Support\Facades\Lang', + 'Log' => 'Illuminate\Support\Facades\Log', + 'Mail' => 'Illuminate\Support\Facades\Mail', + 'Notification' => Illuminate\Support\Facades\Notification::class, + 'Password' => 'Illuminate\Support\Facades\Password', + 'Queue' => 'Illuminate\Support\Facades\Queue', + 'Redirect' => 'Illuminate\Support\Facades\Redirect', + 'Redis' => 'Illuminate\Support\Facades\Redis', + 'Request' => 'Illuminate\Support\Facades\Request', + 'Response' => 'Illuminate\Support\Facades\Response', + 'Route' => 'Illuminate\Support\Facades\Route', + 'Schema' => 'Illuminate\Support\Facades\Schema', + 'Session' => 'Illuminate\Support\Facades\Session', + 'Storage' => 'Illuminate\Support\Facades\Storage', + 'URL' => 'Illuminate\Support\Facades\URL', + 'Validator' => 'Illuminate\Support\Facades\Validator', + 'View' => 'Illuminate\Support\Facades\View', 'Binput' => 'GrahamCampbell\Binput\Facades\Binput', 'Str' => 'Illuminate\Support\Str', diff --git a/config/auth.php b/config/auth.php index 97aef242b077..a0697fac50ff 100644 --- a/config/auth.php +++ b/config/auth.php @@ -76,8 +76,13 @@ 'providers' => [ 'users' => [ 'driver' => 'eloquent', - 'model' => 'CachetHQ\Cachet\Models\User', + 'model' => \CachetHQ\Cachet\Models\User::class, ], + + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], ], /* @@ -85,10 +90,6 @@ | Resetting Passwords |-------------------------------------------------------------------------- | - | Here you may set the options for resetting passwords including the view - | 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. @@ -102,7 +103,6 @@ 'passwords' => [ 'users' => [ 'provider' => 'users', - 'email' => 'auth.emails.password', 'table' => 'password_resets', 'expire' => 60, ], diff --git a/config/cache.php b/config/cache.php index ce53b14c79c9..c10d17614d4f 100644 --- a/config/cache.php +++ b/config/cache.php @@ -10,7 +10,6 @@ */ return [ - /* |-------------------------------------------------------------------------- | Default Cache Store @@ -20,10 +19,10 @@ | using this caching library. This connection is used when another is | not explicitly specified when executing a given caching function. | + | Supported: "apc", "array", "database", "file", "memcached", "redis" + | */ - 'default' => env('CACHE_DRIVER', 'file'), - /* |-------------------------------------------------------------------------- | Cache Stores @@ -34,46 +33,45 @@ | same cache driver to group types of items stored in your caches. | */ - 'stores' => [ - 'apc' => [ 'driver' => 'apc', ], - 'array' => [ 'driver' => 'array', ], - 'database' => [ 'driver' => 'database', 'table' => 'cache', 'connection' => null, ], - 'file' => [ 'driver' => 'file', 'path' => storage_path('framework/cache'), ], - 'memcached' => [ - 'driver' => 'memcached', + 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], 'servers' => [ [ - 'host' => '127.0.0.1', - 'port' => 11211, + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), 'weight' => 100, ], ], ], - 'redis' => [ 'driver' => 'redis', 'connection' => 'default', ], - ], - /* |-------------------------------------------------------------------------- | Cache Key Prefix @@ -84,7 +82,5 @@ | value to get prefixed to all our keys so we can avoid collisions. | */ - 'prefix' => 'laravel', - ]; diff --git a/config/queue.php b/config/queue.php index 21cafd9c3986..dd53208027a6 100644 --- a/config/queue.php +++ b/config/queue.php @@ -44,17 +44,17 @@ ], 'database' => [ - 'driver' => 'database', - 'table' => 'jobs', - 'queue' => 'default', - 'expire' => 60, + 'driver' => 'database', + 'table' => 'jobs', + 'queue' => 'default', + 'retry_after' => 60, ], 'beanstalkd' => [ - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'ttr' => 60, + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', + 'retry_after' => 60, ], 'sqs' => [ @@ -67,10 +67,10 @@ ], 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - 'queue' => 'default', - 'expire' => 86400, + 'driver' => 'redis', + 'connection' => 'default', + 'queue' => 'default', + 'retry_after' => 86400, ], ], diff --git a/config/services.php b/config/services.php index f1a4e4c1b09c..c4d0f901299e 100644 --- a/config/services.php +++ b/config/services.php @@ -17,7 +17,7 @@ |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such - | as Stripe, Mailgun, Mandrill, and others. This file provides a sane + | as Stripe, Mailgun, SparkPost and others. This file provides a sane | default location for this type of information, allowing packages | to have a conventional place to find your various credentials. | diff --git a/config/session.php b/config/session.php index 12f49d0fe853..dd1c1ead62c9 100644 --- a/config/session.php +++ b/config/session.php @@ -94,6 +94,19 @@ 'table' => 'sessions', + /* + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | When using the "apc" or "memcached" session drivers, you may specify a + | cache store that should be used for these sessions. This value must + | correspond with one of the application's configured cache stores. + | + */ + + 'store' => null, + /* |-------------------------------------------------------------------------- | Session Sweeping Lottery @@ -144,7 +157,7 @@ | */ - 'domain' => null, + 'domain' => env('SESSION_DOMAIN', null), /* |-------------------------------------------------------------------------- @@ -157,7 +170,7 @@ | */ - 'secure' => false, + 'secure' => env('SESSION_SECURE_COOKIE', false), /* |-------------------------------------------------------------------------- diff --git a/routes/api.php b/routes/api.php new file mode 100755 index 000000000000..219b2cc49579 --- /dev/null +++ b/routes/api.php @@ -0,0 +1,27 @@ +user(); +})->middleware('auth:api'); diff --git a/routes/console.php b/routes/console.php new file mode 100755 index 000000000000..fb453727ea2b --- /dev/null +++ b/routes/console.php @@ -0,0 +1,27 @@ +comment(Inspiring::quote()); +})->describe('Display an inspiring quote'); diff --git a/routes/web.php b/routes/web.php new file mode 100755 index 000000000000..dd3ad4a46f8e --- /dev/null +++ b/routes/web.php @@ -0,0 +1,15 @@ +shouldReceive('groupModules')->once()->passthru(); - $grouped = $manager->groupModules($this->getModules(), $this->getGroups()); + $grouped = $manager->groupModules($this->getModules(), $this->getModuleGroups()); $this->assertSame($this->getGroupedModulesWithOrders(), $grouped); } @@ -84,7 +84,7 @@ protected function getModules() ]; } - protected function getGroups() + protected function getModuleGroups() { return [ 'one' => 1,