Merge branch '2.4' into mysql_unix_socket_support

This commit is contained in:
James Brooks
2017-05-06 10:08:52 +01:00
committed by GitHub
8 changed files with 58 additions and 39 deletions

View File

@@ -92,7 +92,7 @@ class CreateScheduleCommandHandler
];
$availableParams = array_filter($params, function ($val) {
return $val !== null;
return $val !== null && $val !== '';
});
return $availableParams;

View File

@@ -322,6 +322,6 @@ class IncidentController extends Controller
}
return cachet_redirect('dashboard.incidents')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.delete.success')));
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.update.success')));
}
}

View File

@@ -19,6 +19,11 @@ use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use McCool\LaravelAutoPresenter\HasPresenter;
/**
* This is the schedule class.
*
* @author James Brooks <james@alt-three.com>
*/
class Schedule extends Model implements HasPresenter
{
use SearchableTrait, SortableTrait, ValidatingTrait;
@@ -44,6 +49,16 @@ class Schedule extends Model implements HasPresenter
*/
const COMPLETE = 2;
/**
* The model's attributes.
*
* @var string[]
*/
protected $attributes = [
'status' => self::UPCOMING,
'completed_at' => null,
];
/**
* The attributes that should be casted to native types.
*

View File

@@ -206,11 +206,13 @@ class SchedulePresenter extends BasePresenter implements Arrayable
/**
* Formats the completed_at time ready to be used by bootstrap-datetimepicker.
*
* @return string
* @return string|void
*/
public function completed_at_datetimepicker()
{
return $this->dates->make($this->wrappedObject->completed_at)->format('Y-m-d H:i');
if ($this->wrappedObject->completed_at) {
return $this->dates->make($this->wrappedObject->completed_at)->format('Y-m-d H:i');
}
}
/**

View File

@@ -105,7 +105,8 @@
]
},
"config": {
"preferred-install": "dist"
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"branch-alias": {

66
composer.lock generated
View File

@@ -449,16 +449,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.26.2",
"version": "3.27.0",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "05df1887d7b8cea9fba9ad59e1513c3815e883ae"
"reference": "23fd97c5bc4aaa923b994f8876c86574ed84f27d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/05df1887d7b8cea9fba9ad59e1513c3815e883ae",
"reference": "05df1887d7b8cea9fba9ad59e1513c3815e883ae",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/23fd97c5bc4aaa923b994f8876c86574ed84f27d",
"reference": "23fd97c5bc4aaa923b994f8876c86574ed84f27d",
"shasum": ""
},
"require": {
@@ -480,7 +480,7 @@
"ext-simplexml": "*",
"ext-spl": "*",
"nette/neon": "^2.3",
"phpunit/phpunit": "~4.0|~5.0",
"phpunit/phpunit": "^4.8.35|^5.4.0",
"psr/cache": "^1.0"
},
"suggest": {
@@ -525,7 +525,7 @@
"s3",
"sdk"
],
"time": "2017-04-21T20:25:16+00:00"
"time": "2017-05-04T22:43:46+00:00"
},
{
"name": "backup-manager/backup-manager",
@@ -2354,16 +2354,16 @@
},
{
"name": "league/flysystem",
"version": "1.0.38",
"version": "1.0.40",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "4ba6e13f5116204b21c3afdf400ecf2b9eb1c482"
"reference": "3828f0b24e2c1918bb362d57a53205d6dc8fde61"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4ba6e13f5116204b21c3afdf400ecf2b9eb1c482",
"reference": "4ba6e13f5116204b21c3afdf400ecf2b9eb1c482",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3828f0b24e2c1918bb362d57a53205d6dc8fde61",
"reference": "3828f0b24e2c1918bb362d57a53205d6dc8fde61",
"shasum": ""
},
"require": {
@@ -2433,7 +2433,7 @@
"sftp",
"storage"
],
"time": "2017-04-22T18:59:19+00:00"
"time": "2017-04-28T10:15:08+00:00"
},
{
"name": "mccool/laravel-auto-presenter",
@@ -3671,16 +3671,16 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v3.2.7",
"version": "v3.2.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca"
"reference": "b8a401f733b43251e1d088c589368b2a94155e40"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/154bb1ef7b0e42ccc792bd53edbce18ed73440ca",
"reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b8a401f733b43251e1d088c589368b2a94155e40",
"reference": "b8a401f733b43251e1d088c589368b2a94155e40",
"shasum": ""
},
"require": {
@@ -3727,7 +3727,7 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2017-04-04T07:26:27+00:00"
"time": "2017-05-01T14:58:48+00:00"
},
{
"name": "symfony/finder",
@@ -4833,12 +4833,12 @@
"version": "0.9.5",
"source": {
"type": "git",
"url": "https://github.com/padraic/mockery.git",
"url": "https://github.com/mockery/mockery.git",
"reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/padraic/mockery/zipball/4db079511a283e5aba1b3c2fb19037c645e70fc2",
"url": "https://api.github.com/repos/mockery/mockery/zipball/4db079511a283e5aba1b3c2fb19037c645e70fc2",
"reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2",
"shasum": ""
},
@@ -6049,16 +6049,16 @@
},
{
"name": "symfony/css-selector",
"version": "v3.2.7",
"version": "v3.2.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c"
"reference": "02983c144038e697c959e6b06ef6666de759ccbc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/a48f13dc83c168f1253a5d2a5a4fb46c36244c4c",
"reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/02983c144038e697c959e6b06ef6666de759ccbc",
"reference": "02983c144038e697c959e6b06ef6666de759ccbc",
"shasum": ""
},
"require": {
@@ -6098,20 +6098,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2017-02-21T09:12:04+00:00"
"time": "2017-05-01T14:55:58+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v3.2.7",
"version": "v3.2.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee"
"reference": "f1ad34e8af09ed17570e027cf0c58a12eddec286"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/403944e294cf4ceb3b8447f54cbad88ea7b99cee",
"reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/f1ad34e8af09ed17570e027cf0c58a12eddec286",
"reference": "f1ad34e8af09ed17570e027cf0c58a12eddec286",
"shasum": ""
},
"require": {
@@ -6154,20 +6154,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2017-02-21T09:12:04+00:00"
"time": "2017-04-12T14:13:17+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.2.7",
"version": "v3.2.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621"
"reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621",
"reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621",
"url": "https://api.github.com/repos/symfony/yaml/zipball/acec26fcf7f3031e094e910b94b002fa53d4e4d6",
"reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6",
"shasum": ""
},
"require": {
@@ -6209,7 +6209,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-03-20T09:45:15+00:00"
"time": "2017-05-01T14:55:58+00:00"
},
{
"name": "tightenco/mailthief",

View File

@@ -39,6 +39,7 @@ return [
'update' => [
'title' => 'Create new incident update',
'subtitle' => 'Add an update to <strong>:incident</strong>',
'success' => 'Update added.',
],
// Incident templates

View File

@@ -39,7 +39,7 @@ class ScheduleTest extends AbstractApiTestCase
$this->assertResponseOk();
$this->seeJson($schedule->toArray());
$this->seeJson(['name' => $schedule->name]);
}
public function testCreateSchedule()