From b2eed9a9c58c013fccb0f0daea5ab6a63b48564a Mon Sep 17 00:00:00 2001 From: shibafu Date: Tue, 4 Feb 2020 01:43:58 +0900 Subject: [PATCH 01/58] =?UTF-8?q?league/csv=E3=81=A8openpear/stream=5Ffilt?= =?UTF-8?q?er=5Fmbstring=E3=82=92=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82?= =?UTF-8?q?=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Providers/AppServiceProvider.php | 2 + composer.json | 8 ++ composer.lock | 116 ++++++++++++++++++++++++++- 3 files changed, 124 insertions(+), 2 deletions(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 675d30a..f952321 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -19,6 +19,8 @@ class AppServiceProvider extends ServiceProvider Blade::directive('parsedown', function ($expression) { return "text($expression); ?>"; }); + + stream_filter_register('convert.mbstring.*', 'Stream_Filter_Mbstring'); } /** diff --git a/composer.json b/composer.json index 3b89d39..9c5900a 100644 --- a/composer.json +++ b/composer.json @@ -4,6 +4,12 @@ "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/xcezx/Stream_Filter_Mbstring" + } + ], "require": { "php": ">=7.1.0", "anhskohbo/no-captcha": "^3.0", @@ -13,7 +19,9 @@ "jakeasmith/http_build_url": "^1.0", "laravel/framework": "5.5.*", "laravel/tinker": "~1.0", + "league/csv": "^9.5", "misd/linkify": "^1.1", + "openpear/stream_filter_mbstring": "dev-master", "staudenmeir/eloquent-eager-limit": "^1.0", "symfony/css-selector": "^4.3", "symfony/dom-crawler": "^4.3" diff --git a/composer.lock b/composer.lock index d21588d..e448a5d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b6dfb80c350a7276bb2513a1aeb3d602", + "content-hash": "a391908b8086044d943007dce1ff4f12", "packages": [ { "name": "anhskohbo/no-captcha", @@ -1190,6 +1190,75 @@ ], "time": "2019-08-07T15:10:45+00:00" }, + { + "name": "league/csv", + "version": "9.5.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/csv.git", + "reference": "b348d09d0d258a4f068efb50a2510dc63101c213" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/b348d09d0d258a4f068efb50a2510dc63101c213", + "reference": "b348d09d0d258a4f068efb50a2510dc63101c213", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=7.0.10" + }, + "require-dev": { + "ext-curl": "*", + "friendsofphp/php-cs-fixer": "^2.12", + "phpstan/phpstan": "^0.9.2", + "phpstan/phpstan-phpunit": "^0.9.4", + "phpstan/phpstan-strict-rules": "^0.9.0", + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-iconv": "Needed to ease transcoding CSV using iconv stream filters" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Csv\\": "src" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://github.com/nyamsprod/", + "role": "Developer" + } + ], + "description": "Csv data manipulation made easy in PHP", + "homepage": "http://csv.thephpleague.com", + "keywords": [ + "csv", + "export", + "filter", + "import", + "read", + "write" + ], + "time": "2019-12-15T19:51:41+00:00" + }, { "name": "league/flysystem", "version": "1.0.63", @@ -1555,6 +1624,47 @@ ], "time": "2019-11-08T13:50:10+00:00" }, + { + "name": "openpear/stream_filter_mbstring", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/xcezx/Stream_Filter_Mbstring.git", + "reference": "1c5ab27fd874e74d3d2bfdb9b74d3ebe017e6e14" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/xcezx/Stream_Filter_Mbstring/zipball/1c5ab27fd874e74d3d2bfdb9b74d3ebe017e6e14", + "reference": "1c5ab27fd874e74d3d2bfdb9b74d3ebe017e6e14", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Stream_Filter_Mbstring": "src/" + } + }, + "license": [ + "PHP-3.01" + ], + "authors": [ + { + "name": "hnw", + "role": "developer" + }, + { + "name": "MAEKAWA Tsuyoshi", + "email": "main.xcezx@gmail.com", + "role": "maintainer" + } + ], + "description": "mbstring を使って文字列変換を行う stream filter", + "support": { + "source": "https://github.com/xcezx/Stream_Filter_Mbstring/tree/master", + "issues": "https://github.com/xcezx/Stream_Filter_Mbstring/issues" + }, + "time": "2012-11-21T12:10:21+00:00" + }, { "name": "paragonie/random_compat", "version": "v9.99.99", @@ -6410,7 +6520,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "openpear/stream_filter_mbstring": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From 38ae540009cc4129c49efd0516dd4b222757ded3 Mon Sep 17 00:00:00 2001 From: shibafu Date: Tue, 4 Feb 2020 01:44:16 +0900 Subject: [PATCH 02/58] =?UTF-8?q?=E6=96=87=E5=AD=97=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E5=88=A4=E5=AE=9A=E3=81=A8=E5=BF=85=E9=A0=88=E5=88=97?= =?UTF-8?q?=E3=81=AE=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=81=BE=E3=81=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Exceptions/CsvImportException.php | 29 +++++++ app/Io/CheckinCsvImporter.php | 76 +++++++++++++++++++ tests/Unit/Io/CheckinCsvImporterTest.php | 37 +++++++++ .../Csv/incompatible-charset.eucjp.csv | 2 + tests/fixture/Csv/missing-time.sjis.csv | 1 + tests/fixture/Csv/missing-time.utf8.csv | 1 + 6 files changed, 146 insertions(+) create mode 100644 app/Exceptions/CsvImportException.php create mode 100644 app/Io/CheckinCsvImporter.php create mode 100644 tests/Unit/Io/CheckinCsvImporterTest.php create mode 100644 tests/fixture/Csv/incompatible-charset.eucjp.csv create mode 100644 tests/fixture/Csv/missing-time.sjis.csv create mode 100644 tests/fixture/Csv/missing-time.utf8.csv diff --git a/app/Exceptions/CsvImportException.php b/app/Exceptions/CsvImportException.php new file mode 100644 index 0000000..eee24cf --- /dev/null +++ b/app/Exceptions/CsvImportException.php @@ -0,0 +1,29 @@ +errors = $errors; + } + + /** + * @return string[] + */ + public function getErrors(): array + { + return $this->errors; + } +} diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php new file mode 100644 index 0000000..b02d309 --- /dev/null +++ b/app/Io/CheckinCsvImporter.php @@ -0,0 +1,76 @@ +filename = $filename; + } + + public function execute() + { + // Guess charset + $head = file_get_contents($this->filename, false, null, 0, 1024); + $charset = mb_detect_encoding($head, ['ASCII', 'UTF-8', 'SJIS-win'], true); + if (array_search($charset, ['UTF-8', 'SJIS-win'], true) === false) { + throw new CsvImportException(['文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。']); + } + + // Open CSV + $csv = Reader::createFromPath($this->filename, 'r'); + $csv->setHeaderOffset(0); + if ($charset === 'SJIS-win') { + $csv->addStreamFilter('convert.mbstring.encoding.SJIS-win:UTF-8'); + } + + // Import + DB::transaction(function () use ($csv) { + $errors = []; + + if (!in_array('日時', $csv->getHeader(), true)) { + $errors[] = '日時列は必須です。'; + throw new CsvImportException($errors); + } + + foreach ($csv->getRecords() as $offset => $record) { + $ejaculation = new Ejaculation(); + + $checkinAt = $record['日時'] ?? null; + if (empty($checkinAt)) { + $errors[] = "{$offset} 行 : 日時列は必須です。"; + continue; + } + if (preg_match('/\A20\d{2}[-/](1[0-2]|0?\d)[-/](0?\d|[1-2]\d|3[01]) (0?\d|1\d|2[0-4]):(0?\d|[1-5]\d)(?P:(0?\d|[1-5]\d))?\z/', $checkinAt, $checkinAtMatches) !== 1) { + $errors[] = "{$offset} 行 : 日時列の書式が正しくありません。"; + continue; + } + if (empty($checkinAtMatches['second'])) { + $checkinAt .= ':00'; + } + $checkinAt = str_replace('/', '-', $checkinAt); + try { + $ejaculation->ejaculated_date = Carbon::createFromFormat('Y-m-d H:i:s', $checkinAt); + } catch (\InvalidArgumentException $e) { + $errors[] = "{$offset} 行 : 日時列に不正な値が入力されています。"; + } + + $ejaculation->save(); + } + + if (!empty($errors)) { + throw new CsvImportException($errors); + } + }); + } +} diff --git a/tests/Unit/Io/CheckinCsvImporterTest.php b/tests/Unit/Io/CheckinCsvImporterTest.php new file mode 100644 index 0000000..a85935d --- /dev/null +++ b/tests/Unit/Io/CheckinCsvImporterTest.php @@ -0,0 +1,37 @@ +expectException(CsvImportException::class); + $this->expectExceptionMessage('文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。'); + + $importer = new CheckinCsvImporter(__DIR__ . '/../../fixture/Csv/incompatible-charset.eucjp.csv'); + $importer->execute(); + } + + public function testMissingTimeUTF8() + { + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('日時列は必須です。'); + + $importer = new CheckinCsvImporter(__DIR__ . '/../../fixture/Csv/missing-time.utf8.csv'); + $importer->execute(); + } + + public function testMissingTimeSJIS() + { + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('日時列は必須です。'); + + $importer = new CheckinCsvImporter(__DIR__ . '/../../fixture/Csv/missing-time.sjis.csv'); + $importer->execute(); + } +} diff --git a/tests/fixture/Csv/incompatible-charset.eucjp.csv b/tests/fixture/Csv/incompatible-charset.eucjp.csv new file mode 100644 index 0000000..866ed4d --- /dev/null +++ b/tests/fixture/Csv/incompatible-charset.eucjp.csv @@ -0,0 +1,2 @@ +,Ρ, +2019-01-01 00:01:02,ƥȥƥȤ,https://example.com/ diff --git a/tests/fixture/Csv/missing-time.sjis.csv b/tests/fixture/Csv/missing-time.sjis.csv new file mode 100644 index 0000000..99b9d73 --- /dev/null +++ b/tests/fixture/Csv/missing-time.sjis.csv @@ -0,0 +1 @@ +m[g,IJYN,^O1 diff --git a/tests/fixture/Csv/missing-time.utf8.csv b/tests/fixture/Csv/missing-time.utf8.csv new file mode 100644 index 0000000..b0bc641 --- /dev/null +++ b/tests/fixture/Csv/missing-time.utf8.csv @@ -0,0 +1 @@ +ノート,オカズリンク,タグ1 From 64065ce9e66092bdfe8f11f64f5a2264de3c3587 Mon Sep 17 00:00:00 2001 From: shibafu Date: Wed, 5 Feb 2020 00:52:13 +0900 Subject: [PATCH 03/58] =?UTF-8?q?=E3=81=96=E3=81=A3=E3=81=8F=E3=82=8A?= =?UTF-8?q?=E3=81=A8=E3=81=97=E3=81=9F=E5=87=A6=E7=90=86=E3=82=92=E6=9B=B8?= =?UTF-8?q?=E3=81=84=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Io/CheckinCsvImporter.php | 55 +++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index b02d309..1fd2f0d 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -4,6 +4,7 @@ namespace App\Io; use App\Ejaculation; use App\Exceptions\CsvImportException; +use App\Tag; use Carbon\Carbon; use Illuminate\Support\Facades\DB; use League\Csv\Reader; @@ -51,20 +52,64 @@ class CheckinCsvImporter $errors[] = "{$offset} 行 : 日時列は必須です。"; continue; } - if (preg_match('/\A20\d{2}[-/](1[0-2]|0?\d)[-/](0?\d|[1-2]\d|3[01]) (0?\d|1\d|2[0-4]):(0?\d|[1-5]\d)(?P:(0?\d|[1-5]\d))?\z/', $checkinAt, $checkinAtMatches) !== 1) { + if (preg_match('/\A20\d{2}[-/](1[0-2]|0?\d)[-/](0?\d|[1-2]\d|3[01]) (0?\d|1\d|2[0-4]):(0?\d|[1-5]\d)(:(0?\d|[1-5]\d))?\z/', $checkinAt) !== 1) { $errors[] = "{$offset} 行 : 日時列の書式が正しくありません。"; continue; } - if (empty($checkinAtMatches['second'])) { - $checkinAt .= ':00'; - } $checkinAt = str_replace('/', '-', $checkinAt); try { - $ejaculation->ejaculated_date = Carbon::createFromFormat('Y-m-d H:i:s', $checkinAt); + $ejaculation->ejaculated_date = Carbon::createFromFormat('!Y-m-d H:i+', $checkinAt); } catch (\InvalidArgumentException $e) { $errors[] = "{$offset} 行 : 日時列に不正な値が入力されています。"; + continue; } + if (!empty($record['ノート'])) { + $note = $record['ノート']; + + if (mb_strlen($note) > 500) { + $errors[] = "{$offset} 行 : ノート列は500文字以内にしてください。"; + continue; + } + + $ejaculation->note = $note; + } + + if (!empty($record['オカズリンク'])) { + $link = $record['オカズリンク']; + + if (mb_strlen($link) > 2000) { + $errors[] = "{$offset} 行 : オカズリンク列は500文字以内にしてください。"; + continue; + } + + // TODO: URL Validation + + $ejaculation->link = $link; + } + + $tagIds = []; + for ($i = 1; $i <= 32; $i++) { + $column = 'タグ' . $i; + if (empty($record[$column])) { + break; + } else { + $tag = trim($record[$column]); + + if (empty($tag)) { + break; + } + if (mb_strlen($tag) > 255) { + $errors[] = "{$offset} 行 : {$column}列は255文字以内にしてください。"; + continue 2; + } + + $tag = Tag::firstOrCreate(['name' => $tag]); + $tagIds[] = $tag->id; + } + } + $ejaculation->tags()->sync($tagIds); + $ejaculation->save(); } From 67b697a60032bc9a24574e2bf383b111fa697d8b Mon Sep 17 00:00:00 2001 From: shibafu Date: Thu, 13 Feb 2020 01:03:54 +0900 Subject: [PATCH 04/58] =?UTF-8?q?Validator=E3=82=92=E4=BD=BF=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=8F=E3=81=AA=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 日時のバリデーションが思うように動いていなかったので、カスタムルールを追加 --- app/Io/CheckinCsvImporter.php | 58 ++++++----------- app/Rules/CsvDateTime.php | 65 +++++++++++++++++++ tests/Unit/Io/CheckinCsvImporterTest.php | 62 +++++++++++++++++- tests/fixture/Csv/date-nosecond.utf8.csv | 2 + .../fixture/Csv/date-nozero-nosecond.utf8.csv | 2 + tests/fixture/Csv/date-nozero.utf8.csv | 2 + tests/fixture/Csv/date.utf8.csv | 2 + .../Csv/incompatible-charset.eucjp.csv | 2 +- 8 files changed, 153 insertions(+), 42 deletions(-) create mode 100644 app/Rules/CsvDateTime.php create mode 100644 tests/fixture/Csv/date-nosecond.utf8.csv create mode 100644 tests/fixture/Csv/date-nozero-nosecond.utf8.csv create mode 100644 tests/fixture/Csv/date-nozero.utf8.csv create mode 100644 tests/fixture/Csv/date.utf8.csv diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index 1fd2f0d..2a7bb91 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -4,18 +4,24 @@ namespace App\Io; use App\Ejaculation; use App\Exceptions\CsvImportException; +use App\Rules\CsvDateTime; use App\Tag; +use App\User; use Carbon\Carbon; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Validator; use League\Csv\Reader; class CheckinCsvImporter { + /** @var User Target user */ + private $user; /** @var string CSV filename */ private $filename; - public function __construct(string $filename) + public function __construct(User $user, string $filename) { + $this->user = $user; $this->filename = $filename; } @@ -45,48 +51,24 @@ class CheckinCsvImporter } foreach ($csv->getRecords() as $offset => $record) { - $ejaculation = new Ejaculation(); + $ejaculation = new Ejaculation(['user_id' => $this->user->id]); - $checkinAt = $record['日時'] ?? null; - if (empty($checkinAt)) { - $errors[] = "{$offset} 行 : 日時列は必須です。"; - continue; - } - if (preg_match('/\A20\d{2}[-/](1[0-2]|0?\d)[-/](0?\d|[1-2]\d|3[01]) (0?\d|1\d|2[0-4]):(0?\d|[1-5]\d)(:(0?\d|[1-5]\d))?\z/', $checkinAt) !== 1) { - $errors[] = "{$offset} 行 : 日時列の書式が正しくありません。"; - continue; - } - $checkinAt = str_replace('/', '-', $checkinAt); - try { - $ejaculation->ejaculated_date = Carbon::createFromFormat('!Y-m-d H:i+', $checkinAt); - } catch (\InvalidArgumentException $e) { - $errors[] = "{$offset} 行 : 日時列に不正な値が入力されています。"; - continue; - } + $validator = Validator::make($record, [ + '日時' => ['required', new CsvDateTime()], + 'ノート' => 'nullable|string|max:500', + 'オカズリンク' => 'nullable|url|max:2000', + ]); - if (!empty($record['ノート'])) { - $note = $record['ノート']; - - if (mb_strlen($note) > 500) { - $errors[] = "{$offset} 行 : ノート列は500文字以内にしてください。"; - continue; + if ($validator->fails()) { + foreach ($validator->errors()->all() as $message) { + $errors[] = "{$offset} 行 : {$message}"; } - - $ejaculation->note = $note; + continue; } - if (!empty($record['オカズリンク'])) { - $link = $record['オカズリンク']; - - if (mb_strlen($link) > 2000) { - $errors[] = "{$offset} 行 : オカズリンク列は500文字以内にしてください。"; - continue; - } - - // TODO: URL Validation - - $ejaculation->link = $link; - } + $ejaculation->ejaculated_date = Carbon::createFromFormat('!Y/m/d H:i+', $record['日時']); + $ejaculation->note = $record['ノート'] ?? ''; + $ejaculation->link = $record['オカズリンク'] ?? ''; $tagIds = []; for ($i = 1; $i <= 32; $i++) { diff --git a/app/Rules/CsvDateTime.php b/app/Rules/CsvDateTime.php new file mode 100644 index 0000000..118c5ba --- /dev/null +++ b/app/Rules/CsvDateTime.php @@ -0,0 +1,65 @@ +format($format) === $value) { + return true; + } + } + + return false; + } + + /** + * Get the validation error message. + * + * @return string + */ + public function message() + { + return ':attribute の形式は "年/月/日 時:分" にしてください。'; + } +} diff --git a/tests/Unit/Io/CheckinCsvImporterTest.php b/tests/Unit/Io/CheckinCsvImporterTest.php index a85935d..3a81ded 100644 --- a/tests/Unit/Io/CheckinCsvImporterTest.php +++ b/tests/Unit/Io/CheckinCsvImporterTest.php @@ -4,34 +4,90 @@ namespace Tests\Unit\Io; use App\Exceptions\CsvImportException; use App\Io\CheckinCsvImporter; +use App\User; +use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Support\Carbon; use Tests\TestCase; class CheckinCsvImporterTest extends TestCase { + use RefreshDatabase; + public function testIncompatibleCharsetEUCJP() { + $user = factory(User::class)->create(); $this->expectException(CsvImportException::class); $this->expectExceptionMessage('文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。'); - $importer = new CheckinCsvImporter(__DIR__ . '/../../fixture/Csv/incompatible-charset.eucjp.csv'); + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/incompatible-charset.eucjp.csv'); $importer->execute(); } public function testMissingTimeUTF8() { + $user = factory(User::class)->create(); $this->expectException(CsvImportException::class); $this->expectExceptionMessage('日時列は必須です。'); - $importer = new CheckinCsvImporter(__DIR__ . '/../../fixture/Csv/missing-time.utf8.csv'); + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/missing-time.utf8.csv'); $importer->execute(); } public function testMissingTimeSJIS() { + $user = factory(User::class)->create(); $this->expectException(CsvImportException::class); $this->expectExceptionMessage('日時列は必須です。'); - $importer = new CheckinCsvImporter(__DIR__ . '/../../fixture/Csv/missing-time.sjis.csv'); + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/missing-time.sjis.csv'); $importer->execute(); } + + public function testDateNoSecondUTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date-nosecond.utf8.csv'); + $importer->execute(); + $ejaculation = $user->ejaculations()->first(); + + $this->assertSame(1, $user->ejaculations()->count()); + $this->assertEquals(Carbon::create(2020, 1, 23, 6, 1, 0), $ejaculation->ejaculated_date); + } + + public function testDateNoZeroNoSecondUTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date-nozero-nosecond.utf8.csv'); + $importer->execute(); + $ejaculation = $user->ejaculations()->first(); + + $this->assertSame(1, $user->ejaculations()->count()); + $this->assertEquals(Carbon::create(2020, 1, 23, 6, 1, 0), $ejaculation->ejaculated_date); + } + + public function testDateUTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date.utf8.csv'); + $importer->execute(); + $ejaculation = $user->ejaculations()->first(); + + $this->assertSame(1, $user->ejaculations()->count()); + $this->assertEquals(Carbon::create(2020, 1, 23, 6, 1, 0), $ejaculation->ejaculated_date); + } + + public function testDateNoZeroUTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date-nozero.utf8.csv'); + $importer->execute(); + $ejaculation = $user->ejaculations()->first(); + + $this->assertSame(1, $user->ejaculations()->count()); + $this->assertEquals(Carbon::create(2020, 1, 23, 6, 1, 0), $ejaculation->ejaculated_date); + } } diff --git a/tests/fixture/Csv/date-nosecond.utf8.csv b/tests/fixture/Csv/date-nosecond.utf8.csv new file mode 100644 index 0000000..a100b02 --- /dev/null +++ b/tests/fixture/Csv/date-nosecond.utf8.csv @@ -0,0 +1,2 @@ +日時 +2020/01/23 06:01 diff --git a/tests/fixture/Csv/date-nozero-nosecond.utf8.csv b/tests/fixture/Csv/date-nozero-nosecond.utf8.csv new file mode 100644 index 0000000..60cb295 --- /dev/null +++ b/tests/fixture/Csv/date-nozero-nosecond.utf8.csv @@ -0,0 +1,2 @@ +日時 +2020/1/23 6:01 diff --git a/tests/fixture/Csv/date-nozero.utf8.csv b/tests/fixture/Csv/date-nozero.utf8.csv new file mode 100644 index 0000000..e0b3ede --- /dev/null +++ b/tests/fixture/Csv/date-nozero.utf8.csv @@ -0,0 +1,2 @@ +日時 +2020/1/23 6:01:02 diff --git a/tests/fixture/Csv/date.utf8.csv b/tests/fixture/Csv/date.utf8.csv new file mode 100644 index 0000000..24ee353 --- /dev/null +++ b/tests/fixture/Csv/date.utf8.csv @@ -0,0 +1,2 @@ +日時 +2020/01/23 06:01:02 diff --git a/tests/fixture/Csv/incompatible-charset.eucjp.csv b/tests/fixture/Csv/incompatible-charset.eucjp.csv index 866ed4d..62dcc8d 100644 --- a/tests/fixture/Csv/incompatible-charset.eucjp.csv +++ b/tests/fixture/Csv/incompatible-charset.eucjp.csv @@ -1,2 +1,2 @@ ,Ρ, -2019-01-01 00:01:02,ƥȥƥȤ,https://example.com/ +2019/1/01 0:01,ƥȥƥȤ,https://example.com/ From b29a82435cb695cb0b2e20fa53094f62d3866cf5 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 15 Feb 2020 22:53:10 +0900 Subject: [PATCH 05/58] =?UTF-8?q?DataProvider=E3=82=92=E4=BD=BF=E3=81=A3?= =?UTF-8?q?=E3=81=A6=E3=83=86=E3=82=B9=E3=83=88=E3=82=92=E6=9B=B8=E3=81=84?= =?UTF-8?q?=E3=81=A6=E3=81=BF=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/Unit/Io/CheckinCsvImporterTest.php | 68 +++++++++--------------- 1 file changed, 24 insertions(+), 44 deletions(-) diff --git a/tests/Unit/Io/CheckinCsvImporterTest.php b/tests/Unit/Io/CheckinCsvImporterTest.php index 3a81ded..5776838 100644 --- a/tests/Unit/Io/CheckinCsvImporterTest.php +++ b/tests/Unit/Io/CheckinCsvImporterTest.php @@ -23,71 +23,51 @@ class CheckinCsvImporterTest extends TestCase $importer->execute(); } - public function testMissingTimeUTF8() + /** + * @dataProvider provideMissingTime + */ + public function testMissingTime($filename) { $user = factory(User::class)->create(); $this->expectException(CsvImportException::class); $this->expectExceptionMessage('日時列は必須です。'); - $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/missing-time.utf8.csv'); + $importer = new CheckinCsvImporter($user, $filename); $importer->execute(); } - public function testMissingTimeSJIS() + public function provideMissingTime() { - $user = factory(User::class)->create(); - $this->expectException(CsvImportException::class); - $this->expectExceptionMessage('日時列は必須です。'); - - $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/missing-time.sjis.csv'); - $importer->execute(); + return [ + 'UTF8' => [__DIR__ . '/../../fixture/Csv/missing-time.utf8.csv'], + 'SJIS' => [__DIR__ . '/../../fixture/Csv/missing-time.sjis.csv'], + ]; } - public function testDateNoSecondUTF8() + /** + * @dataProvider provideDate + */ + public function testDate($expectedDate, $filename) { $user = factory(User::class)->create(); - $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date-nosecond.utf8.csv'); + $importer = new CheckinCsvImporter($user, $filename); $importer->execute(); $ejaculation = $user->ejaculations()->first(); $this->assertSame(1, $user->ejaculations()->count()); - $this->assertEquals(Carbon::create(2020, 1, 23, 6, 1, 0), $ejaculation->ejaculated_date); + $this->assertEquals($expectedDate, $ejaculation->ejaculated_date); } - public function testDateNoZeroNoSecondUTF8() + public function provideDate() { - $user = factory(User::class)->create(); + $date = Carbon::create(2020, 1, 23, 6, 1, 0, 'Asia/Tokyo'); - $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date-nozero-nosecond.utf8.csv'); - $importer->execute(); - $ejaculation = $user->ejaculations()->first(); - - $this->assertSame(1, $user->ejaculations()->count()); - $this->assertEquals(Carbon::create(2020, 1, 23, 6, 1, 0), $ejaculation->ejaculated_date); - } - - public function testDateUTF8() - { - $user = factory(User::class)->create(); - - $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date.utf8.csv'); - $importer->execute(); - $ejaculation = $user->ejaculations()->first(); - - $this->assertSame(1, $user->ejaculations()->count()); - $this->assertEquals(Carbon::create(2020, 1, 23, 6, 1, 0), $ejaculation->ejaculated_date); - } - - public function testDateNoZeroUTF8() - { - $user = factory(User::class)->create(); - - $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date-nozero.utf8.csv'); - $importer->execute(); - $ejaculation = $user->ejaculations()->first(); - - $this->assertSame(1, $user->ejaculations()->count()); - $this->assertEquals(Carbon::create(2020, 1, 23, 6, 1, 0), $ejaculation->ejaculated_date); + return [ + 'Zero, Second, UTF8' => [$date, __DIR__ . '/../../fixture/Csv/date.utf8.csv'], + 'NoZero, Second, UTF8' => [$date, __DIR__ . '/../../fixture/Csv/date-nozero.utf8.csv'], + 'Zero, NoSecond, UTF8' => [$date, __DIR__ . '/../../fixture/Csv/date-nosecond.utf8.csv'], + 'NoZero, NoSecond, UTF8' => [$date, __DIR__ . '/../../fixture/Csv/date-nozero-nosecond.utf8.csv'], + ]; } } From ea59bcf150bd5f59986906ea858555c94396f6ae Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 14:28:30 +0900 Subject: [PATCH 06/58] =?UTF-8?q?=E6=97=A5=E4=BB=98=E5=BD=A2=E5=BC=8F?= =?UTF-8?q?=E3=81=A8=E7=AF=84=E5=9B=B2=E3=81=AE=E3=83=81=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=82=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Io/CheckinCsvImporter.php | 5 ++-- app/Rules/CsvDateTime.php | 21 ++++++++++++++-- tests/Unit/Io/CheckinCsvImporterTest.php | 31 ++++++++++++++++++++++++ tests/fixture/Csv/invalid-date.utf8.csv | 17 +++++++++++++ 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 tests/fixture/Csv/invalid-date.utf8.csv diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index 2a7bb91..92a9ac6 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -51,6 +51,7 @@ class CheckinCsvImporter } foreach ($csv->getRecords() as $offset => $record) { + $line = $offset + 1; $ejaculation = new Ejaculation(['user_id' => $this->user->id]); $validator = Validator::make($record, [ @@ -61,7 +62,7 @@ class CheckinCsvImporter if ($validator->fails()) { foreach ($validator->errors()->all() as $message) { - $errors[] = "{$offset} 行 : {$message}"; + $errors[] = "{$line} 行 : {$message}"; } continue; } @@ -82,7 +83,7 @@ class CheckinCsvImporter break; } if (mb_strlen($tag) > 255) { - $errors[] = "{$offset} 行 : {$column}列は255文字以内にしてください。"; + $errors[] = "{$line} 行 : {$column}列は255文字以内にしてください。"; continue 2; } diff --git a/app/Rules/CsvDateTime.php b/app/Rules/CsvDateTime.php index 118c5ba..76159ef 100644 --- a/app/Rules/CsvDateTime.php +++ b/app/Rules/CsvDateTime.php @@ -17,6 +17,12 @@ class CsvDateTime implements Rule 'Y/n/j G:i', ]; + const MINIMUM_TIMESTAMP = 946652400; // 2000-01-01 00:00:00 JST + const MAXIMUM_TIMESTAMP = 4102412399; // 2099-12-31 23:59:59 JST + + /** @var string Validation error message */ + private $message = ':attribute の形式は "年/月/日 時:分" にしてください。'; + /** * Create a new rule instance. * @@ -44,8 +50,19 @@ class CsvDateTime implements Rule foreach (self::VALID_FORMATS as $format) { $date = \DateTime::createFromFormat('!' . $format, $value); + if (!$date) { + continue; + } - if ($date && $date->format($format) === $value) { + $timestamp = (int) $date->format('U'); + if ($timestamp < self::MINIMUM_TIMESTAMP || self::MAXIMUM_TIMESTAMP < $timestamp) { + $this->message = ':attribute は 2000/01/01 00:00 〜 2099/12/31 23:59 の間のみ対応しています。'; + + return false; + } + + $formatted = $date->format($format); + if ($formatted === $value) { return true; } } @@ -60,6 +77,6 @@ class CsvDateTime implements Rule */ public function message() { - return ':attribute の形式は "年/月/日 時:分" にしてください。'; + return $this->message; } } diff --git a/tests/Unit/Io/CheckinCsvImporterTest.php b/tests/Unit/Io/CheckinCsvImporterTest.php index 5776838..71256d0 100644 --- a/tests/Unit/Io/CheckinCsvImporterTest.php +++ b/tests/Unit/Io/CheckinCsvImporterTest.php @@ -70,4 +70,35 @@ class CheckinCsvImporterTest extends TestCase 'NoZero, NoSecond, UTF8' => [$date, __DIR__ . '/../../fixture/Csv/date-nozero-nosecond.utf8.csv'], ]; } + + public function testInvalidDate() + { + $user = factory(User::class)->create(); + + try { + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/invalid-date.utf8.csv'); + $importer->execute(); + } catch (CsvImportException $e) { + $this->assertSame('2 行 : 日時 は 2000/01/01 00:00 〜 2099/12/31 23:59 の間のみ対応しています。', $e->getErrors()[0]); + $this->assertSame('3 行 : 日時 は 2000/01/01 00:00 〜 2099/12/31 23:59 の間のみ対応しています。', $e->getErrors()[1]); + $this->assertSame('4 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[2]); + $this->assertSame('5 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[3]); + $this->assertSame('6 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[4]); + $this->assertSame('7 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[5]); + $this->assertSame('8 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[6]); + $this->assertSame('9 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[7]); + $this->assertSame('10 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[8]); + $this->assertSame('11 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[9]); + $this->assertSame('12 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[10]); + $this->assertSame('13 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[11]); + $this->assertSame('14 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[12]); + $this->assertSame('15 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[13]); + $this->assertSame('16 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[14]); + $this->assertSame('17 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[15]); + + return; + } + + $this->fail('期待する例外が発生していません'); + } } diff --git a/tests/fixture/Csv/invalid-date.utf8.csv b/tests/fixture/Csv/invalid-date.utf8.csv new file mode 100644 index 0000000..3c60935 --- /dev/null +++ b/tests/fixture/Csv/invalid-date.utf8.csv @@ -0,0 +1,17 @@ +日時,ノート +1999/12/31 23:59:59,最小境界 +2100/01/01 00:00:00,最大境界 +-1/01/01 00:00:00,存在しない日付 +2019/-1/01 00:00:00,存在しない日付 +2019/01/-1 00:00:00,存在しない日付 +2019/02/29 00:00:00,存在しない日付 +2019/00/01 00:00:00,存在しない日付 +2019/01/00 00:00:00,存在しない日付 +2019/01/32 00:00:00,存在しない日付 +2019/13/01 00:00:00,存在しない日付 +2019/01/01 00:60:00,存在しない時刻 +2019/01/01 24:00:00,存在しない時刻 +2019/01/01 00:00:60,存在しない時刻 +2019/01/01 -1:00:00,存在しない時刻 +2019/01/01 00:-1:00,存在しない時刻 +2019/01/01 00:00:-1,存在しない時刻 From cef69a1545e7eafa4fca1021d1f0f295f97ad314 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 14:49:55 +0900 Subject: [PATCH 07/58] =?UTF-8?q?=E3=83=8E=E3=83=BC=E3=83=88=E3=81=AE?= =?UTF-8?q?=E6=96=87=E5=AD=97=E6=95=B0,=E6=94=B9=E8=A1=8C=E3=81=AA?= =?UTF-8?q?=E3=81=A9=E3=81=AE=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/Unit/Io/CheckinCsvImporterTest.php | 35 +++++++++++++++++++ .../Csv/note-over-length.ascii.utf8.csv | 2 ++ .../fixture/Csv/note-over-length.jp.utf8.csv | 2 ++ tests/fixture/Csv/note.utf8.csv | 5 +++ 4 files changed, 44 insertions(+) create mode 100644 tests/fixture/Csv/note-over-length.ascii.utf8.csv create mode 100644 tests/fixture/Csv/note-over-length.jp.utf8.csv create mode 100644 tests/fixture/Csv/note.utf8.csv diff --git a/tests/Unit/Io/CheckinCsvImporterTest.php b/tests/Unit/Io/CheckinCsvImporterTest.php index 71256d0..b4cecfb 100644 --- a/tests/Unit/Io/CheckinCsvImporterTest.php +++ b/tests/Unit/Io/CheckinCsvImporterTest.php @@ -101,4 +101,39 @@ class CheckinCsvImporterTest extends TestCase $this->fail('期待する例外が発生していません'); } + + public function testNoteUTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/note.utf8.csv'); + $importer->execute(); + $ejaculations = $user->ejaculations()->orderBy('ejaculated_date')->get(); + + $this->assertCount(3, $ejaculations); + $this->assertEquals('The quick brown fox jumps over the lazy dog. 素早い茶色の狐はのろまな犬を飛び越える', $ejaculations[0]->note); + $this->assertEquals("The quick brown fox jumps over the lazy dog.\n素早い茶色の狐はのろまな犬を飛び越える", $ejaculations[1]->note); + $this->assertEquals('The quick brown fox jumps over the "lazy" dog.', $ejaculations[2]->note); + } + + /** + * @dataProvider provideNoteOverLength + */ + public function testNoteOverLength($filename) + { + $user = factory(User::class)->create(); + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('2 行 : ノートには500文字以下の文字列を指定してください。'); + + $importer = new CheckinCsvImporter($user, $filename); + $importer->execute(); + } + + public function provideNoteOverLength() + { + return [ + 'ASCII Only, UTF8' => [__DIR__ . '/../../fixture/Csv/note-over-length.ascii.utf8.csv'], + 'JP, UTF8' => [__DIR__ . '/../../fixture/Csv/note-over-length.jp.utf8.csv'], + ]; + } } diff --git a/tests/fixture/Csv/note-over-length.ascii.utf8.csv b/tests/fixture/Csv/note-over-length.ascii.utf8.csv new file mode 100644 index 0000000..33d1c37 --- /dev/null +++ b/tests/fixture/Csv/note-over-length.ascii.utf8.csv @@ -0,0 +1,2 @@ +日時,ノート +2020/01/23 06:01,oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooox diff --git a/tests/fixture/Csv/note-over-length.jp.utf8.csv b/tests/fixture/Csv/note-over-length.jp.utf8.csv new file mode 100644 index 0000000..47d4c4e --- /dev/null +++ b/tests/fixture/Csv/note-over-length.jp.utf8.csv @@ -0,0 +1,2 @@ +日時,ノート +2020/01/23 06:01,ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああい diff --git a/tests/fixture/Csv/note.utf8.csv b/tests/fixture/Csv/note.utf8.csv new file mode 100644 index 0000000..a585535 --- /dev/null +++ b/tests/fixture/Csv/note.utf8.csv @@ -0,0 +1,5 @@ +日時,ノート +2020/01/23 06:01,The quick brown fox jumps over the lazy dog. 素早い茶色の狐はのろまな犬を飛び越える +2020/01/23 06:02,"The quick brown fox jumps over the lazy dog. +素早い茶色の狐はのろまな犬を飛び越える" +2020/01/23 06:03,"The quick brown fox jumps over the ""lazy"" dog." From 3def26ddb96199cb1c6c35c3c0d05c06aa13b332 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 15:28:11 +0900 Subject: [PATCH 08/58] =?UTF-8?q?Fixture=E3=81=AE=E6=94=B9=E8=A1=8C?= =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92CRLF=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/fixture/Csv/date-nosecond.utf8.csv | 4 +-- .../fixture/Csv/date-nozero-nosecond.utf8.csv | 4 +-- tests/fixture/Csv/date-nozero.utf8.csv | 4 +-- tests/fixture/Csv/date.utf8.csv | 4 +-- .../Csv/incompatible-charset.eucjp.csv | 4 +-- tests/fixture/Csv/invalid-date.utf8.csv | 34 +++++++++---------- tests/fixture/Csv/missing-time.sjis.csv | 2 +- tests/fixture/Csv/missing-time.utf8.csv | 2 +- .../Csv/note-over-length.ascii.utf8.csv | 4 +-- .../fixture/Csv/note-over-length.jp.utf8.csv | 4 +-- tests/fixture/Csv/note.utf8.csv | 10 +++--- 11 files changed, 38 insertions(+), 38 deletions(-) diff --git a/tests/fixture/Csv/date-nosecond.utf8.csv b/tests/fixture/Csv/date-nosecond.utf8.csv index a100b02..5285a20 100644 --- a/tests/fixture/Csv/date-nosecond.utf8.csv +++ b/tests/fixture/Csv/date-nosecond.utf8.csv @@ -1,2 +1,2 @@ -日時 -2020/01/23 06:01 +日時 +2020/01/23 06:01 diff --git a/tests/fixture/Csv/date-nozero-nosecond.utf8.csv b/tests/fixture/Csv/date-nozero-nosecond.utf8.csv index 60cb295..436840f 100644 --- a/tests/fixture/Csv/date-nozero-nosecond.utf8.csv +++ b/tests/fixture/Csv/date-nozero-nosecond.utf8.csv @@ -1,2 +1,2 @@ -日時 -2020/1/23 6:01 +日時 +2020/1/23 6:01 diff --git a/tests/fixture/Csv/date-nozero.utf8.csv b/tests/fixture/Csv/date-nozero.utf8.csv index e0b3ede..769cda9 100644 --- a/tests/fixture/Csv/date-nozero.utf8.csv +++ b/tests/fixture/Csv/date-nozero.utf8.csv @@ -1,2 +1,2 @@ -日時 -2020/1/23 6:01:02 +日時 +2020/1/23 6:01:02 diff --git a/tests/fixture/Csv/date.utf8.csv b/tests/fixture/Csv/date.utf8.csv index 24ee353..6e72631 100644 --- a/tests/fixture/Csv/date.utf8.csv +++ b/tests/fixture/Csv/date.utf8.csv @@ -1,2 +1,2 @@ -日時 -2020/01/23 06:01:02 +日時 +2020/01/23 06:01:02 diff --git a/tests/fixture/Csv/incompatible-charset.eucjp.csv b/tests/fixture/Csv/incompatible-charset.eucjp.csv index 62dcc8d..050a68d 100644 --- a/tests/fixture/Csv/incompatible-charset.eucjp.csv +++ b/tests/fixture/Csv/incompatible-charset.eucjp.csv @@ -1,2 +1,2 @@ -,Ρ, -2019/1/01 0:01,ƥȥƥȤ,https://example.com/ +,Ρ, +2019/1/01 0:01,ƥȥƥȤ,https://example.com/ diff --git a/tests/fixture/Csv/invalid-date.utf8.csv b/tests/fixture/Csv/invalid-date.utf8.csv index 3c60935..2b542ba 100644 --- a/tests/fixture/Csv/invalid-date.utf8.csv +++ b/tests/fixture/Csv/invalid-date.utf8.csv @@ -1,17 +1,17 @@ -日時,ノート -1999/12/31 23:59:59,最小境界 -2100/01/01 00:00:00,最大境界 --1/01/01 00:00:00,存在しない日付 -2019/-1/01 00:00:00,存在しない日付 -2019/01/-1 00:00:00,存在しない日付 -2019/02/29 00:00:00,存在しない日付 -2019/00/01 00:00:00,存在しない日付 -2019/01/00 00:00:00,存在しない日付 -2019/01/32 00:00:00,存在しない日付 -2019/13/01 00:00:00,存在しない日付 -2019/01/01 00:60:00,存在しない時刻 -2019/01/01 24:00:00,存在しない時刻 -2019/01/01 00:00:60,存在しない時刻 -2019/01/01 -1:00:00,存在しない時刻 -2019/01/01 00:-1:00,存在しない時刻 -2019/01/01 00:00:-1,存在しない時刻 +日時,ノート +1999/12/31 23:59:59,最小境界 +2100/01/01 00:00:00,最大境界 +-1/01/01 00:00:00,存在しない日付 +2019/-1/01 00:00:00,存在しない日付 +2019/01/-1 00:00:00,存在しない日付 +2019/02/29 00:00:00,存在しない日付 +2019/00/01 00:00:00,存在しない日付 +2019/01/00 00:00:00,存在しない日付 +2019/01/32 00:00:00,存在しない日付 +2019/13/01 00:00:00,存在しない日付 +2019/01/01 00:60:00,存在しない時刻 +2019/01/01 24:00:00,存在しない時刻 +2019/01/01 00:00:60,存在しない時刻 +2019/01/01 -1:00:00,存在しない時刻 +2019/01/01 00:-1:00,存在しない時刻 +2019/01/01 00:00:-1,存在しない時刻 diff --git a/tests/fixture/Csv/missing-time.sjis.csv b/tests/fixture/Csv/missing-time.sjis.csv index 99b9d73..8c88d46 100644 --- a/tests/fixture/Csv/missing-time.sjis.csv +++ b/tests/fixture/Csv/missing-time.sjis.csv @@ -1 +1 @@ -m[g,IJYN,^O1 +m[g,IJYN,^O1 diff --git a/tests/fixture/Csv/missing-time.utf8.csv b/tests/fixture/Csv/missing-time.utf8.csv index b0bc641..b9176aa 100644 --- a/tests/fixture/Csv/missing-time.utf8.csv +++ b/tests/fixture/Csv/missing-time.utf8.csv @@ -1 +1 @@ -ノート,オカズリンク,タグ1 +ノート,オカズリンク,タグ1 diff --git a/tests/fixture/Csv/note-over-length.ascii.utf8.csv b/tests/fixture/Csv/note-over-length.ascii.utf8.csv index 33d1c37..02e0edf 100644 --- a/tests/fixture/Csv/note-over-length.ascii.utf8.csv +++ b/tests/fixture/Csv/note-over-length.ascii.utf8.csv @@ -1,2 +1,2 @@ -日時,ノート -2020/01/23 06:01,oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooox +日時,ノート +2020/01/23 06:01,oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooox diff --git a/tests/fixture/Csv/note-over-length.jp.utf8.csv b/tests/fixture/Csv/note-over-length.jp.utf8.csv index 47d4c4e..8daed63 100644 --- a/tests/fixture/Csv/note-over-length.jp.utf8.csv +++ b/tests/fixture/Csv/note-over-length.jp.utf8.csv @@ -1,2 +1,2 @@ -日時,ノート -2020/01/23 06:01,ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああい +日時,ノート +2020/01/23 06:01,ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああい diff --git a/tests/fixture/Csv/note.utf8.csv b/tests/fixture/Csv/note.utf8.csv index a585535..872008f 100644 --- a/tests/fixture/Csv/note.utf8.csv +++ b/tests/fixture/Csv/note.utf8.csv @@ -1,5 +1,5 @@ -日時,ノート -2020/01/23 06:01,The quick brown fox jumps over the lazy dog. 素早い茶色の狐はのろまな犬を飛び越える -2020/01/23 06:02,"The quick brown fox jumps over the lazy dog. -素早い茶色の狐はのろまな犬を飛び越える" -2020/01/23 06:03,"The quick brown fox jumps over the ""lazy"" dog." +日時,ノート +2020/01/23 06:01,The quick brown fox jumps over the lazy dog. 素早い茶色の狐はのろまな犬を飛び越える +2020/01/23 06:02,"The quick brown fox jumps over the lazy dog. +素早い茶色の狐はのろまな犬を飛び越える" +2020/01/23 06:03,"The quick brown fox jumps over the ""lazy"" dog." From 7259ee3647ad15838cf0f84bdde7e82edb9f9062 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 15:29:06 +0900 Subject: [PATCH 09/58] =?UTF-8?q?=E3=83=8E=E3=83=BC=E3=83=88=E3=81=AE?= =?UTF-8?q?=E6=94=B9=E8=A1=8C=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E6=AD=A3?= =?UTF-8?q?=E8=A6=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Io/CheckinCsvImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index 92a9ac6..6445f79 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -68,7 +68,7 @@ class CheckinCsvImporter } $ejaculation->ejaculated_date = Carbon::createFromFormat('!Y/m/d H:i+', $record['日時']); - $ejaculation->note = $record['ノート'] ?? ''; + $ejaculation->note = str_replace(["\r\n", "\r"], "\n", $record['ノート'] ?? ''); $ejaculation->link = $record['オカズリンク'] ?? ''; $tagIds = []; From 45eba305285af363c49f73b81af8f5801780dad3 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 17:01:16 +0900 Subject: [PATCH 10/58] =?UTF-8?q?=E6=96=87=E5=AD=97=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E5=88=A4=E5=AE=9A=E3=81=8C=E4=B8=8A=E6=89=8B=E3=81=8F?= =?UTF-8?q?=E8=A1=8C=E3=81=8B=E3=81=AA=E3=81=84=E3=82=B1=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7=E3=80=81?= =?UTF-8?q?=E3=82=82=E3=81=86=E5=B0=91=E3=81=97=E7=B2=98=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AA=E3=82=A2=E3=83=AB=E3=82=B4=E3=83=AA=E3=82=BA?= =?UTF-8?q?=E3=83=A0=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Io/CheckinCsvImporter.php | 53 +++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 5 deletions(-) diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index 6445f79..f91a063 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -28,11 +28,7 @@ class CheckinCsvImporter public function execute() { // Guess charset - $head = file_get_contents($this->filename, false, null, 0, 1024); - $charset = mb_detect_encoding($head, ['ASCII', 'UTF-8', 'SJIS-win'], true); - if (array_search($charset, ['UTF-8', 'SJIS-win'], true) === false) { - throw new CsvImportException(['文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。']); - } + $charset = $this->guessCharset($this->filename); // Open CSV $csv = Reader::createFromPath($this->filename, 'r'); @@ -101,4 +97,51 @@ class CheckinCsvImporter } }); } + + /** + * 指定されたファイルを読み込み、文字コードの判定を行います。 + * @param string $filename CSVファイル名 + * @param int $samplingLength ファイルの先頭から何バイトを判定に使用するかを指定 + * @return string 検出した文字コード (UTF-8, SJIS-win, ...) + * @throws CsvImportException ファイルの読み込みに失敗した、文字コードを判定できなかった、または非対応文字コードを検出した場合にスロー + */ + private function guessCharset(string $filename, int $samplingLength = 1024): string + { + $fp = fopen($filename, 'rb'); + if (!$fp) { + throw new CsvImportException(['CSVファイルの読み込み中にエラーが発生しました。']); + } + + try { + $head = fread($fp, $samplingLength); + if ($head === false) { + throw new CsvImportException(['CSVファイルの読み込み中にエラーが発生しました。']); + } + + for ($addition = 0; $addition < 4; $addition++) { + $charset = mb_detect_encoding($head, ['ASCII', 'UTF-8', 'SJIS-win'], true); + if ($charset) { + if (array_search($charset, ['UTF-8', 'SJIS-win'], true) === false) { + throw new CsvImportException(['文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。']); + } else { + return $charset; + } + } + + // 1バイト追加で読み込んだら、文字境界に到達して上手く判定できるかもしれない + if (feof($fp)) { + break; + } + $next = fread($fp, 1); + if ($next === false) { + throw new CsvImportException(['CSVファイルの読み込み中にエラーが発生しました。']); + } + $head .= $next; + } + + throw new CsvImportException(['文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。']); + } finally { + fclose($fp); + } + } } From 22845fe2791e38eed1642f96bc180d9e99508bcb Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 22:05:03 +0900 Subject: [PATCH 11/58] =?UTF-8?q?=E3=82=AA=E3=82=AB=E3=82=BA=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=AF=E3=81=AE=E5=88=A4=E5=AE=9A=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/Unit/Io/CheckinCsvImporterTest.php | 32 +++++++++++++++++++++ tests/fixture/Csv/link-not-url.utf8.csv | 3 ++ tests/fixture/Csv/link-over-length.utf8.csv | 3 ++ tests/fixture/Csv/link.utf8.csv | 2 ++ 4 files changed, 40 insertions(+) create mode 100644 tests/fixture/Csv/link-not-url.utf8.csv create mode 100644 tests/fixture/Csv/link-over-length.utf8.csv create mode 100644 tests/fixture/Csv/link.utf8.csv diff --git a/tests/Unit/Io/CheckinCsvImporterTest.php b/tests/Unit/Io/CheckinCsvImporterTest.php index b4cecfb..8a628f1 100644 --- a/tests/Unit/Io/CheckinCsvImporterTest.php +++ b/tests/Unit/Io/CheckinCsvImporterTest.php @@ -136,4 +136,36 @@ class CheckinCsvImporterTest extends TestCase 'JP, UTF8' => [__DIR__ . '/../../fixture/Csv/note-over-length.jp.utf8.csv'], ]; } + + public function testLinkUTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/link.utf8.csv'); + $importer->execute(); + $ejaculations = $user->ejaculations()->orderBy('ejaculated_date')->get(); + + $this->assertCount(1, $ejaculations); + $this->assertEquals('http://example.com', $ejaculations[0]->link); + } + + public function testLinkOverLengthUTF8() + { + $user = factory(User::class)->create(); + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('3 行 : オカズリンクには2000文字以下の文字列を指定してください。'); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/link-over-length.utf8.csv'); + $importer->execute(); + } + + public function testLinkIsNotUrlUTF8() + { + $user = factory(User::class)->create(); + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('2 行 : オカズリンクには正しい形式のURLを指定してください。'); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/link-not-url.utf8.csv'); + $importer->execute(); + } } diff --git a/tests/fixture/Csv/link-not-url.utf8.csv b/tests/fixture/Csv/link-not-url.utf8.csv new file mode 100644 index 0000000..9adb8c8 --- /dev/null +++ b/tests/fixture/Csv/link-not-url.utf8.csv @@ -0,0 +1,3 @@ +日時,オカズリンク +2020/01/23 06:01,example + diff --git a/tests/fixture/Csv/link-over-length.utf8.csv b/tests/fixture/Csv/link-over-length.utf8.csv new file mode 100644 index 0000000..45c33d0 --- /dev/null +++ b/tests/fixture/Csv/link-over-length.utf8.csv @@ -0,0 +1,3 @@ +日時,オカズリンク +2020/01/23 06:01,https://example.com/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/exam +2020/01/23 06:01,https://example.com/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/example/examp diff --git a/tests/fixture/Csv/link.utf8.csv b/tests/fixture/Csv/link.utf8.csv new file mode 100644 index 0000000..e7167fb --- /dev/null +++ b/tests/fixture/Csv/link.utf8.csv @@ -0,0 +1,2 @@ +日時,オカズリンク +2020/01/23 06:01,http://example.com From 272e7ecc61f9aae95697c4a5a21df7c5834c017e Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 22:06:12 +0900 Subject: [PATCH 12/58] =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=83=A1?= =?UTF-8?q?=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=81=AE=E7=B5=B1=E4=B8=80?= =?UTF-8?q?=E6=84=9F=E3=82=92=E9=AB=98=E3=82=81=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Rules/CsvDateTime.php | 4 +-- tests/Unit/Io/CheckinCsvImporterTest.php | 32 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/Rules/CsvDateTime.php b/app/Rules/CsvDateTime.php index 76159ef..02a5261 100644 --- a/app/Rules/CsvDateTime.php +++ b/app/Rules/CsvDateTime.php @@ -21,7 +21,7 @@ class CsvDateTime implements Rule const MAXIMUM_TIMESTAMP = 4102412399; // 2099-12-31 23:59:59 JST /** @var string Validation error message */ - private $message = ':attribute の形式は "年/月/日 時:分" にしてください。'; + private $message = ':attributeの形式は "年/月/日 時:分" にしてください。'; /** * Create a new rule instance. @@ -56,7 +56,7 @@ class CsvDateTime implements Rule $timestamp = (int) $date->format('U'); if ($timestamp < self::MINIMUM_TIMESTAMP || self::MAXIMUM_TIMESTAMP < $timestamp) { - $this->message = ':attribute は 2000/01/01 00:00 〜 2099/12/31 23:59 の間のみ対応しています。'; + $this->message = ':attributeは 2000/01/01 00:00 〜 2099/12/31 23:59 の間のみ対応しています。'; return false; } diff --git a/tests/Unit/Io/CheckinCsvImporterTest.php b/tests/Unit/Io/CheckinCsvImporterTest.php index 8a628f1..cf91770 100644 --- a/tests/Unit/Io/CheckinCsvImporterTest.php +++ b/tests/Unit/Io/CheckinCsvImporterTest.php @@ -79,22 +79,22 @@ class CheckinCsvImporterTest extends TestCase $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/invalid-date.utf8.csv'); $importer->execute(); } catch (CsvImportException $e) { - $this->assertSame('2 行 : 日時 は 2000/01/01 00:00 〜 2099/12/31 23:59 の間のみ対応しています。', $e->getErrors()[0]); - $this->assertSame('3 行 : 日時 は 2000/01/01 00:00 〜 2099/12/31 23:59 の間のみ対応しています。', $e->getErrors()[1]); - $this->assertSame('4 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[2]); - $this->assertSame('5 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[3]); - $this->assertSame('6 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[4]); - $this->assertSame('7 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[5]); - $this->assertSame('8 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[6]); - $this->assertSame('9 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[7]); - $this->assertSame('10 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[8]); - $this->assertSame('11 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[9]); - $this->assertSame('12 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[10]); - $this->assertSame('13 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[11]); - $this->assertSame('14 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[12]); - $this->assertSame('15 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[13]); - $this->assertSame('16 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[14]); - $this->assertSame('17 行 : 日時 の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[15]); + $this->assertSame('2 行 : 日時は 2000/01/01 00:00 〜 2099/12/31 23:59 の間のみ対応しています。', $e->getErrors()[0]); + $this->assertSame('3 行 : 日時は 2000/01/01 00:00 〜 2099/12/31 23:59 の間のみ対応しています。', $e->getErrors()[1]); + $this->assertSame('4 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[2]); + $this->assertSame('5 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[3]); + $this->assertSame('6 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[4]); + $this->assertSame('7 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[5]); + $this->assertSame('8 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[6]); + $this->assertSame('9 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[7]); + $this->assertSame('10 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[8]); + $this->assertSame('11 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[9]); + $this->assertSame('12 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[10]); + $this->assertSame('13 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[11]); + $this->assertSame('14 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[12]); + $this->assertSame('15 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[13]); + $this->assertSame('16 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[14]); + $this->assertSame('17 行 : 日時の形式は "年/月/日 時:分" にしてください。', $e->getErrors()[15]); return; } From 24a5017334249ff5511c9f56b446a7d14165d487 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 22:43:07 +0900 Subject: [PATCH 13/58] =?UTF-8?q?=E3=82=BF=E3=82=B0=E5=88=97=E3=81=AE?= =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Io/CheckinCsvImporter.php | 9 ++- tests/Unit/Io/CheckinCsvImporterTest.php | 63 ++++++++++++++++++++ tests/fixture/Csv/.editorconfig | 2 + tests/fixture/Csv/tag-jumped-column.utf8.csv | 2 + tests/fixture/Csv/tag-multiline.utf8.csv | 3 + tests/fixture/Csv/tag-over-length.utf8.csv | 3 + tests/fixture/Csv/tag1.utf8.csv | 2 + tests/fixture/Csv/tag2.utf8.csv | 2 + 8 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 tests/fixture/Csv/.editorconfig create mode 100644 tests/fixture/Csv/tag-jumped-column.utf8.csv create mode 100644 tests/fixture/Csv/tag-multiline.utf8.csv create mode 100644 tests/fixture/Csv/tag-over-length.utf8.csv create mode 100644 tests/fixture/Csv/tag1.utf8.csv create mode 100644 tests/fixture/Csv/tag2.utf8.csv diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index f91a063..364a007 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -79,7 +79,11 @@ class CheckinCsvImporter break; } if (mb_strlen($tag) > 255) { - $errors[] = "{$line} 行 : {$column}列は255文字以内にしてください。"; + $errors[] = "{$line} 行 : {$column}は255文字以内にしてください。"; + continue 2; + } + if (strpos($tag, "\n") !== false) { + $errors[] = "{$line} 行 : {$column}に改行を含めることはできません。"; continue 2; } @@ -87,9 +91,8 @@ class CheckinCsvImporter $tagIds[] = $tag->id; } } - $ejaculation->tags()->sync($tagIds); - $ejaculation->save(); + $ejaculation->tags()->sync($tagIds); } if (!empty($errors)) { diff --git a/tests/Unit/Io/CheckinCsvImporterTest.php b/tests/Unit/Io/CheckinCsvImporterTest.php index cf91770..f3ecfb3 100644 --- a/tests/Unit/Io/CheckinCsvImporterTest.php +++ b/tests/Unit/Io/CheckinCsvImporterTest.php @@ -168,4 +168,67 @@ class CheckinCsvImporterTest extends TestCase $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/link-not-url.utf8.csv'); $importer->execute(); } + + public function testTag1UTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/tag1.utf8.csv'); + $importer->execute(); + $ejaculation = $user->ejaculations()->first(); + $tags = $ejaculation->tags()->get(); + + $this->assertSame(1, $user->ejaculations()->count()); + $this->assertCount(1, $tags); + $this->assertEquals('貧乳', $tags[0]->name); + } + + public function testTag2UTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/tag2.utf8.csv'); + $importer->execute(); + $ejaculation = $user->ejaculations()->first(); + $tags = $ejaculation->tags()->get(); + + $this->assertSame(1, $user->ejaculations()->count()); + $this->assertCount(2, $tags); + $this->assertEquals('貧乳', $tags[0]->name); + $this->assertEquals('巨乳', $tags[1]->name); + } + + public function testTagOverLengthUTF8() + { + $user = factory(User::class)->create(); + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('3 行 : タグ1は255文字以内にしてください。'); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/tag-over-length.utf8.csv'); + $importer->execute(); + } + + public function testTagCantAcceptJumpedColumnUTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/tag-jumped-column.utf8.csv'); + $importer->execute(); + $ejaculation = $user->ejaculations()->first(); + $tags = $ejaculation->tags()->get(); + + $this->assertSame(1, $user->ejaculations()->count()); + $this->assertCount(1, $tags); + $this->assertEquals('貧乳', $tags[0]->name); + } + + public function testTagCantAcceptMultilineUTF8() + { + $user = factory(User::class)->create(); + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('2 行 : タグ1に改行を含めることはできません。'); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/tag-multiline.utf8.csv'); + $importer->execute(); + } } diff --git a/tests/fixture/Csv/.editorconfig b/tests/fixture/Csv/.editorconfig new file mode 100644 index 0000000..c9e4d60 --- /dev/null +++ b/tests/fixture/Csv/.editorconfig @@ -0,0 +1,2 @@ +[*.csv] +end_of_line = crlf diff --git a/tests/fixture/Csv/tag-jumped-column.utf8.csv b/tests/fixture/Csv/tag-jumped-column.utf8.csv new file mode 100644 index 0000000..773db36 --- /dev/null +++ b/tests/fixture/Csv/tag-jumped-column.utf8.csv @@ -0,0 +1,2 @@ +日時,タグ1,タグ3 +2020/01/23 06:01,貧乳,巨乳 diff --git a/tests/fixture/Csv/tag-multiline.utf8.csv b/tests/fixture/Csv/tag-multiline.utf8.csv new file mode 100644 index 0000000..ee1bd38 --- /dev/null +++ b/tests/fixture/Csv/tag-multiline.utf8.csv @@ -0,0 +1,3 @@ +日時,タグ1 +2020/01/23 06:01,"複数行の +タグ" diff --git a/tests/fixture/Csv/tag-over-length.utf8.csv b/tests/fixture/Csv/tag-over-length.utf8.csv new file mode 100644 index 0000000..891308e --- /dev/null +++ b/tests/fixture/Csv/tag-over-length.utf8.csv @@ -0,0 +1,3 @@ +日時,タグ1 +2020/01/23 06:01,ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo +2020/01/23 06:02,ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooox diff --git a/tests/fixture/Csv/tag1.utf8.csv b/tests/fixture/Csv/tag1.utf8.csv new file mode 100644 index 0000000..1d7561c --- /dev/null +++ b/tests/fixture/Csv/tag1.utf8.csv @@ -0,0 +1,2 @@ +日時,タグ1 +2020/01/23 06:01,貧乳 diff --git a/tests/fixture/Csv/tag2.utf8.csv b/tests/fixture/Csv/tag2.utf8.csv new file mode 100644 index 0000000..10e82fd --- /dev/null +++ b/tests/fixture/Csv/tag2.utf8.csv @@ -0,0 +1,2 @@ +日時,タグ1,タグ2 +2020/01/23 06:01,貧乳,巨乳 From 84b955b19522b7a73566013bdba43e9837ba8ba9 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 23:09:30 +0900 Subject: [PATCH 14/58] =?UTF-8?q?continue=202=E3=81=AF=E3=82=AD=E3=83=A2?= =?UTF-8?q?=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Io/CheckinCsvImporter.php | 67 ++++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index 364a007..e9b86ec 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -67,32 +67,17 @@ class CheckinCsvImporter $ejaculation->note = str_replace(["\r\n", "\r"], "\n", $record['ノート'] ?? ''); $ejaculation->link = $record['オカズリンク'] ?? ''; - $tagIds = []; - for ($i = 1; $i <= 32; $i++) { - $column = 'タグ' . $i; - if (empty($record[$column])) { - break; - } else { - $tag = trim($record[$column]); - - if (empty($tag)) { - break; - } - if (mb_strlen($tag) > 255) { - $errors[] = "{$line} 行 : {$column}は255文字以内にしてください。"; - continue 2; - } - if (strpos($tag, "\n") !== false) { - $errors[] = "{$line} 行 : {$column}に改行を含めることはできません。"; - continue 2; - } - - $tag = Tag::firstOrCreate(['name' => $tag]); - $tagIds[] = $tag->id; - } + try { + $tags = $this->parseTags($line, $record); + } catch (CsvImportException $e) { + $errors = array_merge($errors, $e->getErrors()); + continue; } + $ejaculation->save(); - $ejaculation->tags()->sync($tagIds); + if (!empty($tags)) { + $ejaculation->tags()->sync(collect($tags)->pluck('id')); + } } if (!empty($errors)) { @@ -147,4 +132,38 @@ class CheckinCsvImporter fclose($fp); } } + + /** + * タグ列をパースします。 + * @param int $line 現在の行番号 (1 origin) + * @param array $record 対象行のデータ + * @return Tag[] + * @throws CsvImportException バリデーションエラーが発生した場合にスロー + */ + private function parseTags(int $line, array $record): array + { + $tags = []; + for ($i = 1; $i <= 32; $i++) { + $column = 'タグ' . $i; + if (empty($record[$column])) { + break; + } else { + $tag = trim($record[$column]); + + if (empty($tag)) { + break; + } + if (mb_strlen($tag) > 255) { + throw new CsvImportException(["{$line} 行 : {$column}は255文字以内にしてください。"]); + } + if (strpos($tag, "\n") !== false) { + throw new CsvImportException(["{$line} 行 : {$column}に改行を含めることはできません。"]); + } + + $tags[] = Tag::firstOrCreate(['name' => $tag]); + } + } + + return $tags; + } } From 794cdf2be602cbfc8d5d94d896440348e37f70ad Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 23:17:07 +0900 Subject: [PATCH 15/58] =?UTF-8?q?argument=20unpacking=E3=81=AE=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E3=82=92=E6=80=9D=E3=81=84=E5=87=BA=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Exceptions/CsvImportException.php | 2 +- app/Io/CheckinCsvImporter.php | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/Exceptions/CsvImportException.php b/app/Exceptions/CsvImportException.php index eee24cf..5571dc6 100644 --- a/app/Exceptions/CsvImportException.php +++ b/app/Exceptions/CsvImportException.php @@ -13,7 +13,7 @@ class CsvImportException extends \RuntimeException * CsvImportException constructor. * @param string[] $errors */ - public function __construct(array $errors) + public function __construct(...$errors) { parent::__construct(array_first($errors)); $this->errors = $errors; diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index e9b86ec..5b41b6c 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -43,7 +43,10 @@ class CheckinCsvImporter if (!in_array('日時', $csv->getHeader(), true)) { $errors[] = '日時列は必須です。'; - throw new CsvImportException($errors); + } + + if (!empty($errors)) { + throw new CsvImportException(...$errors); } foreach ($csv->getRecords() as $offset => $record) { @@ -81,7 +84,7 @@ class CheckinCsvImporter } if (!empty($errors)) { - throw new CsvImportException($errors); + throw new CsvImportException(...$errors); } }); } @@ -97,20 +100,20 @@ class CheckinCsvImporter { $fp = fopen($filename, 'rb'); if (!$fp) { - throw new CsvImportException(['CSVファイルの読み込み中にエラーが発生しました。']); + throw new CsvImportException('CSVファイルの読み込み中にエラーが発生しました。'); } try { $head = fread($fp, $samplingLength); if ($head === false) { - throw new CsvImportException(['CSVファイルの読み込み中にエラーが発生しました。']); + throw new CsvImportException('CSVファイルの読み込み中にエラーが発生しました。'); } for ($addition = 0; $addition < 4; $addition++) { $charset = mb_detect_encoding($head, ['ASCII', 'UTF-8', 'SJIS-win'], true); if ($charset) { if (array_search($charset, ['UTF-8', 'SJIS-win'], true) === false) { - throw new CsvImportException(['文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。']); + throw new CsvImportException('文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。'); } else { return $charset; } @@ -122,12 +125,12 @@ class CheckinCsvImporter } $next = fread($fp, 1); if ($next === false) { - throw new CsvImportException(['CSVファイルの読み込み中にエラーが発生しました。']); + throw new CsvImportException('CSVファイルの読み込み中にエラーが発生しました。'); } $head .= $next; } - throw new CsvImportException(['文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。']); + throw new CsvImportException('文字コード判定に失敗しました。UTF-8 (BOM無し) または Shift_JIS をお使いください。'); } finally { fclose($fp); } @@ -154,10 +157,10 @@ class CheckinCsvImporter break; } if (mb_strlen($tag) > 255) { - throw new CsvImportException(["{$line} 行 : {$column}は255文字以内にしてください。"]); + throw new CsvImportException("{$line} 行 : {$column}は255文字以内にしてください。"); } if (strpos($tag, "\n") !== false) { - throw new CsvImportException(["{$line} 行 : {$column}に改行を含めることはできません。"]); + throw new CsvImportException("{$line} 行 : {$column}に改行を含めることはできません。"); } $tags[] = Tag::firstOrCreate(['name' => $tag]); From 0a53199399a7dab2cac543e0800573bfcb96b159 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 16 Feb 2020 23:21:17 +0900 Subject: [PATCH 16/58] =?UTF-8?q?=E3=83=8D=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E3=81=A1=E3=82=87=E3=81=A3=E3=81=A8=E6=B8=9B=E3=82=89=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Io/CheckinCsvImporter.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index 5b41b6c..30d13d4 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -150,21 +150,20 @@ class CheckinCsvImporter $column = 'タグ' . $i; if (empty($record[$column])) { break; - } else { - $tag = trim($record[$column]); - - if (empty($tag)) { - break; - } - if (mb_strlen($tag) > 255) { - throw new CsvImportException("{$line} 行 : {$column}は255文字以内にしてください。"); - } - if (strpos($tag, "\n") !== false) { - throw new CsvImportException("{$line} 行 : {$column}に改行を含めることはできません。"); - } - - $tags[] = Tag::firstOrCreate(['name' => $tag]); } + + $tag = trim($record[$column]); + if (empty($tag)) { + break; + } + if (mb_strlen($tag) > 255) { + throw new CsvImportException("{$line} 行 : {$column}は255文字以内にしてください。"); + } + if (strpos($tag, "\n") !== false) { + throw new CsvImportException("{$line} 行 : {$column}に改行を含めることはできません。"); + } + + $tags[] = Tag::firstOrCreate(['name' => $tag]); } return $tags; From 6387d4e8536dc3acaf66b5e8042861aa77953ad9 Mon Sep 17 00:00:00 2001 From: shibafu Date: Tue, 18 Feb 2020 02:03:49 +0900 Subject: [PATCH 17/58] =?UTF-8?q?=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=BC=E3=82=BF=E3=81=8CCSV?= =?UTF-8?q?=E3=81=A7=E6=8A=95=E5=85=A5=E3=81=95=E3=82=8C=E3=81=9F=E3=81=93?= =?UTF-8?q?=E3=81=A8=E3=82=92=E8=A8=98=E9=8C=B2=E3=81=A7=E3=81=8D=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Ejaculation.php | 3 ++ app/Io/CheckinCsvImporter.php | 1 + ...2_17_085327_add_source_to_ejaculations.php | 38 +++++++++++++++++++ database/seeds/DatabaseSeeder.php | 2 +- database/seeds/EjaculationSourcesSeeder.php | 19 ++++++++++ tests/Unit/Io/CheckinCsvImporterTest.php | 19 ++++++++++ 6 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2020_02_17_085327_add_source_to_ejaculations.php create mode 100644 database/seeds/EjaculationSourcesSeeder.php diff --git a/app/Ejaculation.php b/app/Ejaculation.php index 0f3522c..a270f40 100644 --- a/app/Ejaculation.php +++ b/app/Ejaculation.php @@ -12,6 +12,9 @@ class Ejaculation extends Model { use HasEagerLimit; + const SOURCE_WEB = 'web'; + const SOURCE_CSV = 'csv'; + protected $fillable = [ 'user_id', 'ejaculated_date', 'note', 'geo_latitude', 'geo_longitude', 'link', diff --git a/app/Io/CheckinCsvImporter.php b/app/Io/CheckinCsvImporter.php index 30d13d4..1239667 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Io/CheckinCsvImporter.php @@ -69,6 +69,7 @@ class CheckinCsvImporter $ejaculation->ejaculated_date = Carbon::createFromFormat('!Y/m/d H:i+', $record['日時']); $ejaculation->note = str_replace(["\r\n", "\r"], "\n", $record['ノート'] ?? ''); $ejaculation->link = $record['オカズリンク'] ?? ''; + $ejaculation->source = Ejaculation::SOURCE_CSV; try { $tags = $this->parseTags($line, $record); diff --git a/database/migrations/2020_02_17_085327_add_source_to_ejaculations.php b/database/migrations/2020_02_17_085327_add_source_to_ejaculations.php new file mode 100644 index 0000000..965e398 --- /dev/null +++ b/database/migrations/2020_02_17_085327_add_source_to_ejaculations.php @@ -0,0 +1,38 @@ +string('name'); + $table->primary('name'); + }); + Schema::table('ejaculations', function (Blueprint $table) { + $table->string('source')->nullable(); + $table->foreign('source')->references('name')->on('ejaculation_sources'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('ejaculations', function (Blueprint $table) { + $table->dropColumn('source'); + }); + Schema::drop('ejaculation_sources'); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index e119db6..3f0fc32 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -11,6 +11,6 @@ class DatabaseSeeder extends Seeder */ public function run() { - // $this->call(UsersTableSeeder::class); + $this->call(EjaculationSourcesSeeder::class); } } diff --git a/database/seeds/EjaculationSourcesSeeder.php b/database/seeds/EjaculationSourcesSeeder.php new file mode 100644 index 0000000..a762a08 --- /dev/null +++ b/database/seeds/EjaculationSourcesSeeder.php @@ -0,0 +1,19 @@ +insert(['name' => $source]); + } + } +} diff --git a/tests/Unit/Io/CheckinCsvImporterTest.php b/tests/Unit/Io/CheckinCsvImporterTest.php index f3ecfb3..a486760 100644 --- a/tests/Unit/Io/CheckinCsvImporterTest.php +++ b/tests/Unit/Io/CheckinCsvImporterTest.php @@ -2,6 +2,7 @@ namespace Tests\Unit\Io; +use App\Ejaculation; use App\Exceptions\CsvImportException; use App\Io\CheckinCsvImporter; use App\User; @@ -13,6 +14,12 @@ class CheckinCsvImporterTest extends TestCase { use RefreshDatabase; + protected function setUp() + { + parent::setUp(); + $this->seed(); + } + public function testIncompatibleCharsetEUCJP() { $user = factory(User::class)->create(); @@ -231,4 +238,16 @@ class CheckinCsvImporterTest extends TestCase $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/tag-multiline.utf8.csv'); $importer->execute(); } + + public function testSourceIsCsv() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date.utf8.csv'); + $importer->execute(); + $ejaculation = $user->ejaculations()->first(); + + $this->assertSame(1, $user->ejaculations()->count()); + $this->assertEquals(Ejaculation::SOURCE_CSV, $ejaculation->source); + } } From 41ce5229c74ae055948ef78b0c7aac9363ab6e62 Mon Sep 17 00:00:00 2001 From: shibafu Date: Tue, 18 Feb 2020 02:09:01 +0900 Subject: [PATCH 18/58] =?UTF-8?q?=E3=81=93=E3=82=8C=E3=81=AF=E3=81=84?= =?UTF-8?q?=E3=82=8F=E3=82=86=E3=82=8B=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9?= =?UTF-8?q?=E3=81=AA=E3=81=AE=E3=81=A7=E3=81=AF=E3=81=A8=E6=80=9D=E3=81=A3?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/{Io => Services}/CheckinCsvImporter.php | 2 +- tests/Unit/{Io => Services}/CheckinCsvImporterTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename app/{Io => Services}/CheckinCsvImporter.php (99%) rename tests/Unit/{Io => Services}/CheckinCsvImporterTest.php (99%) diff --git a/app/Io/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php similarity index 99% rename from app/Io/CheckinCsvImporter.php rename to app/Services/CheckinCsvImporter.php index 1239667..b4906f5 100644 --- a/app/Io/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -1,6 +1,6 @@ Date: Thu, 14 May 2020 00:27:09 +0900 Subject: [PATCH 19/58] =?UTF-8?q?=E3=82=BF=E3=82=B0=E5=88=97=E3=81=AE?= =?UTF-8?q?=E7=95=AA=E5=8F=B7=E9=A3=9B=E3=81=B3=E3=82=92=E8=A8=B1=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/CheckinCsvImporter.php | 12 +++++++----- .../Unit/Services/CheckinCsvImporterTest.php | 19 +++++++++++++++++-- tests/fixture/Csv/tag-33-column.utf8.csv | 2 ++ 3 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 tests/fixture/Csv/tag-33-column.utf8.csv diff --git a/app/Services/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php index b4906f5..d99f51a 100644 --- a/app/Services/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -147,15 +147,14 @@ class CheckinCsvImporter private function parseTags(int $line, array $record): array { $tags = []; - for ($i = 1; $i <= 32; $i++) { - $column = 'タグ' . $i; - if (empty($record[$column])) { - break; + foreach (array_keys($record) as $column) { + if (preg_match('/\Aタグ\d{1,2}\z/u', $column) !== 1) { + continue; } $tag = trim($record[$column]); if (empty($tag)) { - break; + continue; } if (mb_strlen($tag) > 255) { throw new CsvImportException("{$line} 行 : {$column}は255文字以内にしてください。"); @@ -165,6 +164,9 @@ class CheckinCsvImporter } $tags[] = Tag::firstOrCreate(['name' => $tag]); + if (count($tags) >= 32) { + break; + } } return $tags; diff --git a/tests/Unit/Services/CheckinCsvImporterTest.php b/tests/Unit/Services/CheckinCsvImporterTest.php index 0128267..51307da 100644 --- a/tests/Unit/Services/CheckinCsvImporterTest.php +++ b/tests/Unit/Services/CheckinCsvImporterTest.php @@ -215,7 +215,7 @@ class CheckinCsvImporterTest extends TestCase $importer->execute(); } - public function testTagCantAcceptJumpedColumnUTF8() + public function testTagCanAcceptJumpedColumnUTF8() { $user = factory(User::class)->create(); @@ -225,8 +225,9 @@ class CheckinCsvImporterTest extends TestCase $tags = $ejaculation->tags()->get(); $this->assertSame(1, $user->ejaculations()->count()); - $this->assertCount(1, $tags); + $this->assertCount(2, $tags); $this->assertEquals('貧乳', $tags[0]->name); + $this->assertEquals('巨乳', $tags[1]->name); } public function testTagCantAcceptMultilineUTF8() @@ -239,6 +240,20 @@ class CheckinCsvImporterTest extends TestCase $importer->execute(); } + public function testTagCanAccept32ColumnsUTF8() + { + $user = factory(User::class)->create(); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/tag-33-column.utf8.csv'); + $importer->execute(); + $ejaculation = $user->ejaculations()->first(); + $tags = $ejaculation->tags()->get(); + + $this->assertSame(1, $user->ejaculations()->count()); + $this->assertCount(32, $tags); + $this->assertEquals('み', $tags[31]->name); + } + public function testSourceIsCsv() { $user = factory(User::class)->create(); diff --git a/tests/fixture/Csv/tag-33-column.utf8.csv b/tests/fixture/Csv/tag-33-column.utf8.csv new file mode 100644 index 0000000..85670a2 --- /dev/null +++ b/tests/fixture/Csv/tag-33-column.utf8.csv @@ -0,0 +1,2 @@ +日時,タグ1,タグ2,タグ3,タグ4,タグ5,タグ6,タグ7,タグ8,タグ9,タグ10,タグ11,タグ12,タグ13,タグ14,タグ15,タグ16,タグ17,タグ18,タグ19,タグ20,タグ21,タグ22,タグ23,タグ24,タグ25,タグ26,タグ27,タグ28,タグ29,タグ30,タグ31,タグ32,タグ33 +2020/01/23 06:01,あ,い,う,え,お,か,き,く,け,こ,さ,し,す,せ,そ,た,ち,つ,て,と,な,に,ぬ,ね,の,は,ひ,ふ,へ,ほ,ま,み,む From cf9df74ed3be9e26c6f25b7df5506845d1af04e5 Mon Sep 17 00:00:00 2001 From: shibafu Date: Wed, 20 May 2020 01:50:34 +0900 Subject: [PATCH 20/58] Export checkin to CSV --- app/Http/Controllers/SettingController.php | 31 ++++++++++++ app/Services/CheckinCsvExporter.php | 57 ++++++++++++++++++++++ resources/views/setting/base.blade.php | 2 + resources/views/setting/export.blade.php | 23 +++++++++ routes/web.php | 2 + 5 files changed, 115 insertions(+) create mode 100644 app/Services/CheckinCsvExporter.php create mode 100644 resources/views/setting/export.blade.php diff --git a/app/Http/Controllers/SettingController.php b/app/Http/Controllers/SettingController.php index 78636a9..7ffcb25 100644 --- a/app/Http/Controllers/SettingController.php +++ b/app/Http/Controllers/SettingController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\DeactivatedUser; +use App\Services\CheckinCsvExporter; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; @@ -71,6 +72,36 @@ class SettingController extends Controller return redirect()->route('setting.privacy')->with('status', 'プライバシー設定を更新しました。'); } + public function export() + { + return view('setting.export'); + } + + public function exportToCsv(Request $request) + { + $validated = $request->validate([ + 'charset' => ['required', Rule::in(['utf8', 'sjis'])] + ]); + + $charsets = [ + 'utf8' => 'UTF-8', + 'sjis' => 'SJIS-win' + ]; + + $filename = tempnam(sys_get_temp_dir(), 'tissue_export_tmp_'); + try { + $exporter = new CheckinCsvExporter(Auth::user(), $filename, $charsets[$validated['charset']]); + $exporter->execute(); + } catch (\Throwable $e) { + unlink($filename); + throw $e; + } + + return response() + ->download($filename, 'TissueCheckin_' . date('Y-m-d_H-i-s') . '.csv') + ->deleteFileAfterSend(true); + } + public function deactivate() { return view('setting.deactivate'); diff --git a/app/Services/CheckinCsvExporter.php b/app/Services/CheckinCsvExporter.php new file mode 100644 index 0000000..ac38b56 --- /dev/null +++ b/app/Services/CheckinCsvExporter.php @@ -0,0 +1,57 @@ +user = $user; + $this->filename = $filename; + $this->charset = $charset; + } + + public function execute() + { + $csv = Writer::createFromPath($this->filename, 'wb'); + $csv->setNewline("\r\n"); + if ($this->charset === 'SJIS-win') { + $csv->addStreamFilter('convert.mbstring.encoding.UTF-8:SJIS-win'); + } + + $header = ['日時', 'ノート', 'オカズリンク']; + for ($i = 1; $i <= 32; $i++) { + $header[] = "タグ{$i}"; + } + $csv->insertOne($header); + + DB::transaction(function () use ($csv) { + // TODO: そんなに読み取り整合性を保つ努力はしていないのと、chunkの件数これでいいか分からない + $this->user->ejaculations()->with('tags')->orderBy('ejaculated_date') + ->chunk(1000, function ($ejaculations) use ($csv) { + foreach ($ejaculations as $ejaculation) { + $record = [ + $ejaculation->ejaculated_date->format('Y-m-d H:i'), + $ejaculation->note, + $ejaculation->link, + ]; + foreach ($ejaculation->tags as $tag) { + $record[] = $tag->name; + } + $csv->insertOne($record); + } + }); + }); + } +} diff --git a/resources/views/setting/base.blade.php b/resources/views/setting/base.blade.php index 2d53e94..1afa6b3 100644 --- a/resources/views/setting/base.blade.php +++ b/resources/views/setting/base.blade.php @@ -10,6 +10,8 @@ href="{{ route('setting') }}"> プロフィール プライバシー + データのエクスポート アカウントの削除 {{--データのエクスポート +
+

チェックインデータをCSVファイルとしてダウンロードすることができます。

+
+ {{ csrf_field() }} +
文字コード
+
+ +
+
+ +
+ +
+@endsection + +@push('script') +@endpush diff --git a/routes/web.php b/routes/web.php index 184bd18..7ee08fb 100644 --- a/routes/web.php +++ b/routes/web.php @@ -36,6 +36,8 @@ Route::middleware('auth')->group(function () { Route::post('/setting/profile', 'SettingController@updateProfile')->name('setting.profile.update'); Route::get('/setting/privacy', 'SettingController@privacy')->name('setting.privacy'); Route::post('/setting/privacy', 'SettingController@updatePrivacy')->name('setting.privacy.update'); + Route::get('/setting/export', 'SettingController@export')->name('setting.export'); + Route::get('/setting/export/csv', 'SettingController@exportToCsv')->name('setting.export.csv'); Route::get('/setting/deactivate', 'SettingController@deactivate')->name('setting.deactivate'); Route::post('/setting/deactivate', 'SettingController@destroyUser')->name('setting.deactivate.destroy'); // Route::get('/setting/password', 'SettingController@password')->name('setting.password'); From 8a764c756cb0d20d2506121b3cf36aedc1a52ba0 Mon Sep 17 00:00:00 2001 From: shibafu Date: Wed, 20 May 2020 21:07:11 +0900 Subject: [PATCH 21/58] use custom control style --- resources/views/setting/export.blade.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/resources/views/setting/export.blade.php b/resources/views/setting/export.blade.php index ff8c2fc..5a6a5b4 100644 --- a/resources/views/setting/export.blade.php +++ b/resources/views/setting/export.blade.php @@ -9,11 +9,15 @@
{{ csrf_field() }}
文字コード
-
- -
-
- +
+
+ + +
+
+ + +
From 5668296e7d7ebc867113a879e768726697c5fd3b Mon Sep 17 00:00:00 2001 From: shibafu Date: Wed, 20 May 2020 21:28:46 +0900 Subject: [PATCH 22/58] =?UTF-8?q?add=20=E6=B0=97=E4=BC=91=E3=82=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/SettingController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/SettingController.php b/app/Http/Controllers/SettingController.php index 7ffcb25..c1e8283 100644 --- a/app/Http/Controllers/SettingController.php +++ b/app/Http/Controllers/SettingController.php @@ -90,6 +90,9 @@ class SettingController extends Controller $filename = tempnam(sys_get_temp_dir(), 'tissue_export_tmp_'); try { + // 気休め + set_time_limit(0); + $exporter = new CheckinCsvExporter(Auth::user(), $filename, $charsets[$validated['charset']]); $exporter->execute(); } catch (\Throwable $e) { From 988ad9d992a545ab9bc46ae357ebcf819980a736 Mon Sep 17 00:00:00 2001 From: shibafu Date: Wed, 20 May 2020 21:42:22 +0900 Subject: [PATCH 23/58] =?UTF-8?q?=E3=82=BF=E3=82=B0=E5=87=BA=E5=8A=9B?= =?UTF-8?q?=E6=95=B0=E3=81=AE=E4=B8=8A=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/CheckinCsvExporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/CheckinCsvExporter.php b/app/Services/CheckinCsvExporter.php index ac38b56..7fe8dbf 100644 --- a/app/Services/CheckinCsvExporter.php +++ b/app/Services/CheckinCsvExporter.php @@ -46,7 +46,7 @@ class CheckinCsvExporter $ejaculation->note, $ejaculation->link, ]; - foreach ($ejaculation->tags as $tag) { + foreach ($ejaculation->tags->take(32) as $tag) { $record[] = $tag->name; } $csv->insertOne($record); From 03b05a48cd1e1f0b3b2620373e55a2eb82dc47f8 Mon Sep 17 00:00:00 2001 From: shibafu Date: Thu, 21 May 2020 22:28:34 +0900 Subject: [PATCH 24/58] =?UTF-8?q?CSV=E3=82=A8=E3=82=AF=E3=82=B9=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=AE=E6=97=A5=E4=BB=98=E6=9B=B8=E5=BC=8F?= =?UTF-8?q?=E3=81=8C=E4=BB=95=E6=A7=98=E3=81=A8=E9=81=95=E3=81=A3=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/CheckinCsvExporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/CheckinCsvExporter.php b/app/Services/CheckinCsvExporter.php index 7fe8dbf..a94ec32 100644 --- a/app/Services/CheckinCsvExporter.php +++ b/app/Services/CheckinCsvExporter.php @@ -42,7 +42,7 @@ class CheckinCsvExporter ->chunk(1000, function ($ejaculations) use ($csv) { foreach ($ejaculations as $ejaculation) { $record = [ - $ejaculation->ejaculated_date->format('Y-m-d H:i'), + $ejaculation->ejaculated_date->format('Y/m/d H:i'), $ejaculation->note, $ejaculation->link, ]; From fa4827f382cc999ce6fd5df3bc8d6455296cb93c Mon Sep 17 00:00:00 2001 From: shibafu Date: Thu, 21 May 2020 22:33:27 +0900 Subject: [PATCH 25/58] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E5=87=A6=E7=90=86=E3=81=AE=E3=82=B3=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=83=A9=E3=83=BC=E3=81=A8=E3=81=8B=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/SettingController.php | 32 ++++++++++++++++++ app/Utilities/Formatter.php | 39 ++++++++++++++++++++++ resources/views/setting/base.blade.php | 2 ++ resources/views/setting/import.blade.php | 32 ++++++++++++++++++ routes/web.php | 2 ++ 5 files changed, 107 insertions(+) create mode 100644 resources/views/setting/import.blade.php diff --git a/app/Http/Controllers/SettingController.php b/app/Http/Controllers/SettingController.php index c1e8283..6a975fd 100644 --- a/app/Http/Controllers/SettingController.php +++ b/app/Http/Controllers/SettingController.php @@ -3,7 +3,9 @@ namespace App\Http\Controllers; use App\DeactivatedUser; +use App\Exceptions\CsvImportException; use App\Services\CheckinCsvExporter; +use App\Services\CheckinCsvImporter; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; @@ -72,6 +74,36 @@ class SettingController extends Controller return redirect()->route('setting.privacy')->with('status', 'プライバシー設定を更新しました。'); } + public function import() + { + return view('setting.import'); + } + + public function storeImport(Request $request) + { + $validated = $request->validate([ + 'file' => 'required|file' + ], [], [ + 'file' => 'ファイル' + ]); + + $file = $request->file('file'); + if (!$file->isValid()) { + return redirect()->route('setting.import')->withErrors(['file' => 'ファイルのアップロードに失敗しました。']); + } + + try { + set_time_limit(0); + + $importer = new CheckinCsvImporter(Auth::user(), $file->path()); + $importer->execute(); + + return redirect()->route('setting.import')->with('status', 'インポートに性交しました。'); + } catch (CsvImportException $e) { + return redirect()->route('setting.import')->with('import_errors', $e->getErrors()); + } + } + public function export() { return view('setting.export'); diff --git a/app/Utilities/Formatter.php b/app/Utilities/Formatter.php index 6098388..c0401c9 100644 --- a/app/Utilities/Formatter.php +++ b/app/Utilities/Formatter.php @@ -92,4 +92,43 @@ class Formatter return implode(',', $srcset); } + + /** + * php.ini書式のデータサイズを正規化します。 + * @param mixed $val データサイズ + * @return string + */ + public function normalizeIniBytes($val) + { + $val = trim($val); + $last = strtolower(substr($val, -1, 1)); + if (ord($last) < 0x30 || ord($last) > 0x39) { + $bytes = substr($val, 0, -1); + switch ($last) { + case 'g': + $bytes *= 1024; + // fall through + // no break + case 'm': + $bytes *= 1024; + // fall through + // no break + case 'k': + $bytes *= 1024; + break; + } + } else { + $bytes = $val; + } + + if ($bytes >= (1 << 30)) { + return ($bytes >> 30) . 'GB'; + } elseif ($bytes >= (1 << 20)) { + return ($bytes >> 20) . 'MB'; + } elseif ($bytes >= (1 << 10)) { + return ($bytes >> 10) . 'KB'; + } + + return $bytes . 'B'; + } } diff --git a/resources/views/setting/base.blade.php b/resources/views/setting/base.blade.php index 1afa6b3..5ed6441 100644 --- a/resources/views/setting/base.blade.php +++ b/resources/views/setting/base.blade.php @@ -10,6 +10,8 @@ href="{{ route('setting') }}"> プロフィール
プライバシー + データのインポート データのエクスポート データのインポート +
+

外部で作成したチェックインデータをTissueに取り込むことができます。

+
+ {{ csrf_field() }} +
+ 取り込むファイルを選択してください。 + {{ Formatter::normalizeIniBytes(ini_get('upload_max_filesize')) }}までのCSVファイル、文字コードは Shift_JIS と UTF-8 (BOMなし) に対応しています。 + + @if ($errors->has('file')) +
{{ $errors->first('file') }}
+ @endif +
+ @if (session('import_errors')) +
+

インポートに失敗しました

+ @foreach (session('import_errors') as $err) +

{{ $err }}

+ @endforeach +
+ @endif + +
+@endsection + +@push('script') +@endpush diff --git a/routes/web.php b/routes/web.php index 7ee08fb..ca1affc 100644 --- a/routes/web.php +++ b/routes/web.php @@ -36,6 +36,8 @@ Route::middleware('auth')->group(function () { Route::post('/setting/profile', 'SettingController@updateProfile')->name('setting.profile.update'); Route::get('/setting/privacy', 'SettingController@privacy')->name('setting.privacy'); Route::post('/setting/privacy', 'SettingController@updatePrivacy')->name('setting.privacy.update'); + Route::get('/setting/import', 'SettingController@import')->name('setting.import'); + Route::post('/setting/import', 'SettingController@storeImport')->name('setting.import'); Route::get('/setting/export', 'SettingController@export')->name('setting.export'); Route::get('/setting/export/csv', 'SettingController@exportToCsv')->name('setting.export.csv'); Route::get('/setting/deactivate', 'SettingController@deactivate')->name('setting.deactivate'); From 8681c328d02a0f1cba055c7de27afe5179b91e69 Mon Sep 17 00:00:00 2001 From: shibafu Date: Thu, 21 May 2020 23:13:39 +0900 Subject: [PATCH 26/58] =?UTF-8?q?ejaculated=5Fdate=E3=81=AE=E9=87=8D?= =?UTF-8?q?=E8=A4=87=E3=82=A8=E3=83=A9=E3=83=BC=E3=82=92catch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/CheckinCsvImporter.php | 22 ++++++++++++++++--- .../Unit/Services/CheckinCsvImporterTest.php | 15 +++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/app/Services/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php index d99f51a..c424dd1 100644 --- a/app/Services/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -8,9 +8,11 @@ use App\Rules\CsvDateTime; use App\Tag; use App\User; use Carbon\Carbon; +use Illuminate\Database\QueryException; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Validator; use League\Csv\Reader; +use Throwable; class CheckinCsvImporter { @@ -78,9 +80,23 @@ class CheckinCsvImporter continue; } - $ejaculation->save(); - if (!empty($tags)) { - $ejaculation->tags()->sync(collect($tags)->pluck('id')); + DB::beginTransaction(); + try { + $ejaculation->save(); + if (!empty($tags)) { + $ejaculation->tags()->sync(collect($tags)->pluck('id')); + } + DB::commit(); + } catch (QueryException $e) { + DB::rollBack(); + if ($e->errorInfo[0] === '23505') { + $errors[] = "{$line} 行 : すでにこの日時のチェックインデータが存在します。"; + continue; + } + throw $e; + } catch (Throwable $e) { + DB::rollBack(); + throw $e; } } diff --git a/tests/Unit/Services/CheckinCsvImporterTest.php b/tests/Unit/Services/CheckinCsvImporterTest.php index 51307da..07c9be4 100644 --- a/tests/Unit/Services/CheckinCsvImporterTest.php +++ b/tests/Unit/Services/CheckinCsvImporterTest.php @@ -265,4 +265,19 @@ class CheckinCsvImporterTest extends TestCase $this->assertSame(1, $user->ejaculations()->count()); $this->assertEquals(Ejaculation::SOURCE_CSV, $ejaculation->source); } + + public function testDontThrowUniqueKeyViolation() + { + $user = factory(User::class)->create(); + factory(Ejaculation::class)->create([ + 'user_id' => $user->id, + 'ejaculated_date' => Carbon::create(2020, 1, 23, 6, 1, 0, 'Asia/Tokyo') + ]); + + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('2 行 : すでにこの日時のチェックインデータが存在します。'); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date.utf8.csv'); + $importer->execute(); + } } From 023446e0a87728727a787553ce2230219f58d65e Mon Sep 17 00:00:00 2001 From: shibafu Date: Thu, 21 May 2020 23:58:58 +0900 Subject: [PATCH 27/58] =?UTF-8?q?CSV=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=AE=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=81=AF=E3=81=8A=E6=83=A3=E8=8F=9C=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=8A=E3=83=BC=E3=81=AB=E8=A1=A8=E7=A4=BA=E3=81=97=E3=81=AA?= =?UTF-8?q?=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Ejaculation.php | 6 ++++++ app/Http/Controllers/HomeController.php | 1 + app/Http/Controllers/TimelineController.php | 1 + 3 files changed, 8 insertions(+) diff --git a/app/Ejaculation.php b/app/Ejaculation.php index a270f40..8392469 100644 --- a/app/Ejaculation.php +++ b/app/Ejaculation.php @@ -47,6 +47,12 @@ class Ejaculation extends Model return $this->hasMany(Like::class); } + public function scopeOnlyWebCheckin(Builder $query) + { + return $query->where('ejaculations.source', null) + ->orWhere('ejaculations.source', '<>', Ejaculation::SOURCE_CSV); + } + public function scopeWithLikes(Builder $query) { if (Auth::check()) { diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index f62f8e6..8619e49 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -70,6 +70,7 @@ SQL ->select('ejaculations.*') ->with('user', 'tags') ->withLikes() + ->onlyWebCheckin() ->take(21) ->get(); diff --git a/app/Http/Controllers/TimelineController.php b/app/Http/Controllers/TimelineController.php index 2f05b71..08e1d68 100644 --- a/app/Http/Controllers/TimelineController.php +++ b/app/Http/Controllers/TimelineController.php @@ -17,6 +17,7 @@ class TimelineController extends Controller ->select('ejaculations.*') ->with('user', 'tags') ->withLikes() + ->onlyWebCheckin() ->paginate(21); return view('timeline.public')->with(compact('ejaculations')); From 54b6ff2282205553c1c32da68f3f37fdfdc45564 Mon Sep 17 00:00:00 2001 From: shibafu Date: Fri, 22 May 2020 00:07:04 +0900 Subject: [PATCH 28/58] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=83=90=E3=83=83=E3=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/UserController.php | 2 ++ resources/views/components/ejaculation.blade.php | 5 ++++- resources/views/ejaculation/show.blade.php | 5 ++++- resources/views/user/profile.blade.php | 5 ++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 12c61c1..be151d4 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -32,6 +32,7 @@ note, is_private, is_too_sensitive, link, +source, to_char(lead(ejaculated_date, 1, NULL) OVER (ORDER BY ejaculated_date DESC), 'YYYY/MM/DD HH24:MI') AS before_date, to_char(ejaculated_date - (lead(ejaculated_date, 1, NULL) OVER (ORDER BY ejaculated_date DESC)), 'FMDDD日 FMHH24時間 FMMI分') AS ejaculated_span SQL @@ -154,6 +155,7 @@ note, is_private, is_too_sensitive, link, +source, to_char(lead(ejaculated_date, 1, NULL) OVER (ORDER BY ejaculated_date DESC), 'YYYY/MM/DD HH24:MI') AS before_date, to_char(ejaculated_date - (lead(ejaculated_date, 1, NULL) OVER (ORDER BY ejaculated_date DESC)), 'FMDDD日 FMHH24時間 FMMI分') AS ejaculated_span SQL diff --git a/resources/views/components/ejaculation.blade.php b/resources/views/components/ejaculation.blade.php index 3d17540..067aa9d 100644 --- a/resources/views/components/ejaculation.blade.php +++ b/resources/views/components/ejaculation.blade.php @@ -6,11 +6,14 @@
-@if ($ejaculation->is_private || $ejaculation->tags->isNotEmpty()) +@if ($ejaculation->is_private || $ejaculation->source === 'csv' || $ejaculation->tags->isNotEmpty())

@if ($ejaculation->is_private) 非公開 @endif + @if ($ejaculation->source === 'csv') + インポート + @endif @foreach ($ejaculation->tags as $tag) {{ $tag->name }} @endforeach diff --git a/resources/views/ejaculation/show.blade.php b/resources/views/ejaculation/show.blade.php index 1f7d3d7..5dea347 100644 --- a/resources/views/ejaculation/show.blade.php +++ b/resources/views/ejaculation/show.blade.php @@ -34,11 +34,14 @@

{{ $ejaculatedSpan ?? '精通' }} {{ $ejaculation->before_date }}{{ !empty($ejaculation->before_date) ? ' ~ ' : '' }}{{ $ejaculation->ejaculated_date->format('Y/m/d H:i') }}
- @if ($ejaculation->is_private || $ejaculation->tags->isNotEmpty()) + @if ($ejaculation->is_private || $ejaculation->source === 'csv' || $ejaculation->tags->isNotEmpty())

@if ($ejaculation->is_private) 非公開 @endif + @if ($ejaculation->source === 'csv') + インポート + @endif @foreach ($ejaculation->tags as $tag) {{ $tag->name }} @endforeach diff --git a/resources/views/user/profile.blade.php b/resources/views/user/profile.blade.php index 6a35eec..5823026 100644 --- a/resources/views/user/profile.blade.php +++ b/resources/views/user/profile.blade.php @@ -40,11 +40,14 @@

{{ $ejaculation->ejaculated_span ?? '精通' }} {{ $ejaculation->before_date }}{{ !empty($ejaculation->before_date) ? ' ~ ' : '' }}{{ $ejaculation->ejaculated_date->format('Y/m/d H:i') }}
- @if ($ejaculation->is_private || $ejaculation->tags->isNotEmpty()) + @if ($ejaculation->is_private || $ejaculation->source === 'csv' || $ejaculation->tags->isNotEmpty())

@if ($ejaculation->is_private) 非公開 @endif + @if ($ejaculation->source === 'csv') + インポート + @endif @foreach ($ejaculation->tags as $tag) {{ $tag->name }} @endforeach From 3a2d0e67aaf5cf5137c618ffe4b42b3d6b9aefd0 Mon Sep 17 00:00:00 2001 From: shibafu Date: Fri, 22 May 2020 00:27:32 +0900 Subject: [PATCH 29/58] =?UTF-8?q?=E5=8D=8A=E8=A7=92=E3=82=B9=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E3=82=92=E5=90=AB=E3=82=80=E3=82=BF=E3=82=B0?= =?UTF-8?q?=E3=81=AF=E5=8F=97=E3=81=91=E4=BB=98=E3=81=91=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/CheckinCsvImporter.php | 3 +++ tests/Unit/Services/CheckinCsvImporterTest.php | 10 ++++++++++ tests/fixture/Csv/tag-whitespace.utf8.csv | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 tests/fixture/Csv/tag-whitespace.utf8.csv diff --git a/app/Services/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php index c424dd1..834ca5f 100644 --- a/app/Services/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -178,6 +178,9 @@ class CheckinCsvImporter if (strpos($tag, "\n") !== false) { throw new CsvImportException("{$line} 行 : {$column}に改行を含めることはできません。"); } + if (strpos($tag, ' ') !== false) { + throw new CsvImportException("{$line} 行 : {$column}にスペースを含めることはできません。"); + } $tags[] = Tag::firstOrCreate(['name' => $tag]); if (count($tags) >= 32) { diff --git a/tests/Unit/Services/CheckinCsvImporterTest.php b/tests/Unit/Services/CheckinCsvImporterTest.php index 07c9be4..e3e9be3 100644 --- a/tests/Unit/Services/CheckinCsvImporterTest.php +++ b/tests/Unit/Services/CheckinCsvImporterTest.php @@ -240,6 +240,16 @@ class CheckinCsvImporterTest extends TestCase $importer->execute(); } + public function testTagCantAcceptWhitespaceUTF8() + { + $user = factory(User::class)->create(); + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('2 行 : タグ1にスペースを含めることはできません。'); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/tag-whitespace.utf8.csv'); + $importer->execute(); + } + public function testTagCanAccept32ColumnsUTF8() { $user = factory(User::class)->create(); diff --git a/tests/fixture/Csv/tag-whitespace.utf8.csv b/tests/fixture/Csv/tag-whitespace.utf8.csv new file mode 100644 index 0000000..2e5f0ce --- /dev/null +++ b/tests/fixture/Csv/tag-whitespace.utf8.csv @@ -0,0 +1,2 @@ +日時,タグ1 +2020/01/23 06:01,"空白を含む タグ" From 531067fb9cc3abcee2abdd839302be3cdbe7f32b Mon Sep 17 00:00:00 2001 From: shibafu Date: Fri, 22 May 2020 22:11:49 +0900 Subject: [PATCH 30/58] =?UTF-8?q?=E5=8F=96=E3=82=8A=E8=BE=BC=E3=81=BF?= =?UTF-8?q?=E4=BB=B6=E6=95=B0=E3=82=92=E5=87=BA=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/SettingController.php | 4 ++-- app/Services/CheckinCsvImporter.php | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/SettingController.php b/app/Http/Controllers/SettingController.php index 6a975fd..f888b6a 100644 --- a/app/Http/Controllers/SettingController.php +++ b/app/Http/Controllers/SettingController.php @@ -96,9 +96,9 @@ class SettingController extends Controller set_time_limit(0); $importer = new CheckinCsvImporter(Auth::user(), $file->path()); - $importer->execute(); + $imported = $importer->execute(); - return redirect()->route('setting.import')->with('status', 'インポートに性交しました。'); + return redirect()->route('setting.import')->with('status', "{$imported}件のインポートに性交しました。"); } catch (CsvImportException $e) { return redirect()->route('setting.import')->with('import_errors', $e->getErrors()); } diff --git a/app/Services/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php index 834ca5f..e03ae4d 100644 --- a/app/Services/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -27,7 +27,7 @@ class CheckinCsvImporter $this->filename = $filename; } - public function execute() + public function execute(): int { // Guess charset $charset = $this->guessCharset($this->filename); @@ -40,7 +40,7 @@ class CheckinCsvImporter } // Import - DB::transaction(function () use ($csv) { + return DB::transaction(function () use ($csv) { $errors = []; if (!in_array('日時', $csv->getHeader(), true)) { @@ -51,6 +51,7 @@ class CheckinCsvImporter throw new CsvImportException(...$errors); } + $imported = 0; foreach ($csv->getRecords() as $offset => $record) { $line = $offset + 1; $ejaculation = new Ejaculation(['user_id' => $this->user->id]); @@ -87,6 +88,7 @@ class CheckinCsvImporter $ejaculation->tags()->sync(collect($tags)->pluck('id')); } DB::commit(); + $imported++; } catch (QueryException $e) { DB::rollBack(); if ($e->errorInfo[0] === '23505') { @@ -103,6 +105,8 @@ class CheckinCsvImporter if (!empty($errors)) { throw new CsvImportException(...$errors); } + + return $imported; }); } From fb5b34b2399245fd4dba7d0aab937c7bbfd75efb Mon Sep 17 00:00:00 2001 From: shibafu Date: Fri, 22 May 2020 23:12:41 +0900 Subject: [PATCH 31/58] strict_types --- app/Services/CheckinCsvImporter.php | 1 + tests/Unit/Services/CheckinCsvImporterTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Services/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php index e03ae4d..f33785c 100644 --- a/app/Services/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -1,4 +1,5 @@ Date: Fri, 22 May 2020 23:53:14 +0900 Subject: [PATCH 32/58] =?UTF-8?q?=E6=9C=AA=E6=9D=A5=E3=81=AE=E3=82=AA?= =?UTF-8?q?=E3=82=AB=E3=82=BA=E3=81=AF=E3=81=8A=E6=83=A3=E8=8F=9C=E3=81=A8?= =?UTF-8?q?=E3=81=97=E3=81=A6=E5=87=BA=E3=81=95=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/HomeController.php | 1 + app/Http/Controllers/TimelineController.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index f62f8e6..1dbee73 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -66,6 +66,7 @@ SQL ->where('users.is_protected', false) ->where('ejaculations.is_private', false) ->where('ejaculations.link', '<>', '') + ->where('ejaculations.ejaculated_date', '<=', Carbon::now()) ->orderBy('ejaculations.ejaculated_date', 'desc') ->select('ejaculations.*') ->with('user', 'tags') diff --git a/app/Http/Controllers/TimelineController.php b/app/Http/Controllers/TimelineController.php index 2f05b71..db6ad72 100644 --- a/app/Http/Controllers/TimelineController.php +++ b/app/Http/Controllers/TimelineController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers; use App\Ejaculation; use Illuminate\Http\Request; +use Illuminate\Support\Carbon; class TimelineController extends Controller { @@ -13,6 +14,7 @@ class TimelineController extends Controller ->where('users.is_protected', false) ->where('ejaculations.is_private', false) ->where('ejaculations.link', '<>', '') + ->where('ejaculations.ejaculated_date', '<=', Carbon::now()) ->orderBy('ejaculations.ejaculated_date', 'desc') ->select('ejaculations.*') ->with('user', 'tags') From c0d62f51128b71f8bdeb1abe5dfc2898b8f45a1b Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 02:47:25 +0900 Subject: [PATCH 33/58] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=97=E3=81=9F=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92?= =?UTF-8?q?=E6=B6=88=E3=81=9B=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/SettingController.php | 11 +++++++++++ resources/assets/js/setting/import.js | 5 +++++ resources/views/setting/import.blade.php | 10 ++++++++++ routes/web.php | 1 + webpack.mix.js | 1 + 5 files changed, 28 insertions(+) create mode 100644 resources/assets/js/setting/import.js diff --git a/app/Http/Controllers/SettingController.php b/app/Http/Controllers/SettingController.php index f888b6a..45281b9 100644 --- a/app/Http/Controllers/SettingController.php +++ b/app/Http/Controllers/SettingController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\DeactivatedUser; +use App\Ejaculation; use App\Exceptions\CsvImportException; use App\Services\CheckinCsvExporter; use App\Services\CheckinCsvImporter; @@ -104,6 +105,16 @@ class SettingController extends Controller } } + public function destroyImport() + { + Auth::user() + ->ejaculations() + ->where('ejaculations.source', Ejaculation::SOURCE_CSV) + ->delete(); + + return redirect()->route('setting.import')->with('status', '削除が完了しました。'); + } + public function export() { return view('setting.export'); diff --git a/resources/assets/js/setting/import.js b/resources/assets/js/setting/import.js new file mode 100644 index 0000000..fcaf90e --- /dev/null +++ b/resources/assets/js/setting/import.js @@ -0,0 +1,5 @@ +$('#destroy-form').on('submit', function () { + if (!confirm('本当に削除してもよろしいですか?')) { + return false; + } +}); diff --git a/resources/views/setting/import.blade.php b/resources/views/setting/import.blade.php index ce2e182..cf66e0a 100644 --- a/resources/views/setting/import.blade.php +++ b/resources/views/setting/import.blade.php @@ -26,7 +26,17 @@ @endif +

インポートしたデータを一括削除

+
+

取り込んだチェックインデータをすべて削除することができます。データにミスがあってやり直したい場合などにお使いください。

+

ただし、インポート後に個別に手修正などしている場合、そのデータも失われてしまうことに注意してください!

+
+ {{ csrf_field() }} + {{ method_field('DELETE') }} + +
@endsection @push('script') + @endpush diff --git a/routes/web.php b/routes/web.php index ca1affc..503524c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -38,6 +38,7 @@ Route::middleware('auth')->group(function () { Route::post('/setting/privacy', 'SettingController@updatePrivacy')->name('setting.privacy.update'); Route::get('/setting/import', 'SettingController@import')->name('setting.import'); Route::post('/setting/import', 'SettingController@storeImport')->name('setting.import'); + Route::delete('/setting/import', 'SettingController@destroyImport')->name('setting.import.destroy'); Route::get('/setting/export', 'SettingController@export')->name('setting.export'); Route::get('/setting/export/csv', 'SettingController@exportToCsv')->name('setting.export.csv'); Route::get('/setting/deactivate', 'SettingController@deactivate')->name('setting.deactivate'); diff --git a/webpack.mix.js b/webpack.mix.js index bf24e44..59b6cee 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -16,6 +16,7 @@ mix.js('resources/assets/js/app.js', 'public/js') .js('resources/assets/js/home.js', 'public/js') .js('resources/assets/js/user/stats.js', 'public/js/user') .js('resources/assets/js/setting/privacy.js', 'public/js/setting') + .js('resources/assets/js/setting/import.js', 'public/js/setting') .js('resources/assets/js/setting/deactivate.js', 'public/js/setting') .ts('resources/assets/js/checkin.ts', 'public/js') .sass('resources/assets/sass/app.scss', 'public/css') From bd84effedcb8edbc078b6504e387f712c0b32c2d Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 15:35:17 +0900 Subject: [PATCH 34/58] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E5=8F=AF=E8=83=BD=E3=81=AA=E4=BB=B6=E6=95=B0=E3=81=AB?= =?UTF-8?q?=E4=B8=8A=E9=99=90=E3=82=92=E8=A8=AD=E3=81=91=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/CheckinCsvImporter.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Services/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php index f33785c..31ad354 100644 --- a/app/Services/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -17,6 +17,9 @@ use Throwable; class CheckinCsvImporter { + /** @var int 取り込み件数の上限 */ + private const IMPORT_LIMIT = 5000; + /** @var User Target user */ private $user; /** @var string CSV filename */ @@ -42,6 +45,7 @@ class CheckinCsvImporter // Import return DB::transaction(function () use ($csv) { + $alreadyImportedCount = $this->user->ejaculations()->where('ejaculation.source', Ejaculation::SOURCE_CSV)->count(); $errors = []; if (!in_array('日時', $csv->getHeader(), true)) { @@ -55,6 +59,12 @@ class CheckinCsvImporter $imported = 0; foreach ($csv->getRecords() as $offset => $record) { $line = $offset + 1; + if (self::IMPORT_LIMIT < $alreadyImportedCount + $imported) { + $limit = self::IMPORT_LIMIT; + $errors[] = "{$line} 行 : インポート機能で取り込めるデータは{$limit}件までに制限されています。これ以上取り込みできません。"; + throw new CsvImportException(...$errors); + } + $ejaculation = new Ejaculation(['user_id' => $this->user->id]); $validator = Validator::make($record, [ From 5af55fa6b4c1a5cbc7a282fefb927838098b58c0 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 15:39:28 +0900 Subject: [PATCH 35/58] fix typo --- app/Services/CheckinCsvImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php index 31ad354..ae90faf 100644 --- a/app/Services/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -45,7 +45,7 @@ class CheckinCsvImporter // Import return DB::transaction(function () use ($csv) { - $alreadyImportedCount = $this->user->ejaculations()->where('ejaculation.source', Ejaculation::SOURCE_CSV)->count(); + $alreadyImportedCount = $this->user->ejaculations()->where('ejaculations.source', Ejaculation::SOURCE_CSV)->count(); $errors = []; if (!in_array('日時', $csv->getHeader(), true)) { From cc0e0271b807a652f9d3fd7f19431b1d8306f9b5 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 15:56:51 +0900 Subject: [PATCH 36/58] add test --- app/Services/CheckinCsvImporter.php | 2 +- tests/Unit/Services/CheckinCsvImporterTest.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/Services/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php index ae90faf..542a9ad 100644 --- a/app/Services/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -59,7 +59,7 @@ class CheckinCsvImporter $imported = 0; foreach ($csv->getRecords() as $offset => $record) { $line = $offset + 1; - if (self::IMPORT_LIMIT < $alreadyImportedCount + $imported) { + if (self::IMPORT_LIMIT <= $alreadyImportedCount + $imported) { $limit = self::IMPORT_LIMIT; $errors[] = "{$line} 行 : インポート機能で取り込めるデータは{$limit}件までに制限されています。これ以上取り込みできません。"; throw new CsvImportException(...$errors); diff --git a/tests/Unit/Services/CheckinCsvImporterTest.php b/tests/Unit/Services/CheckinCsvImporterTest.php index 9ba29aa..d418e5d 100644 --- a/tests/Unit/Services/CheckinCsvImporterTest.php +++ b/tests/Unit/Services/CheckinCsvImporterTest.php @@ -291,4 +291,19 @@ class CheckinCsvImporterTest extends TestCase $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/date.utf8.csv'); $importer->execute(); } + + public function testRecordLimit() + { + $user = factory(User::class)->create(); + factory(Ejaculation::class, 5000)->create([ + 'user_id' => $user->id, + 'source' => Ejaculation::SOURCE_CSV + ]); + + $this->expectException(CsvImportException::class); + $this->expectExceptionMessage('2 行 : インポート機能で取り込めるデータは5000件までに制限されています。これ以上取り込みできません。'); + + $importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/link.utf8.csv'); + $importer->execute(); + } } From 948b517c4d50430ca859598a83be007241b8b7b8 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 16:26:07 +0900 Subject: [PATCH 37/58] add doc --- app/Services/CheckinCsvImporter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Services/CheckinCsvImporter.php b/app/Services/CheckinCsvImporter.php index 542a9ad..1a9572e 100644 --- a/app/Services/CheckinCsvImporter.php +++ b/app/Services/CheckinCsvImporter.php @@ -31,6 +31,10 @@ class CheckinCsvImporter $this->filename = $filename; } + /** + * インポート処理を実行します。 + * @return int 取り込んだ件数 + */ public function execute(): int { // Guess charset From 36a2ab5fe27b49bba4b212475fe013aae113eb91 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 17:33:58 +0900 Subject: [PATCH 38/58] =?UTF-8?q?=E3=83=96=E3=83=83=E3=82=AF=E3=83=9E?= =?UTF-8?q?=E3=83=BC=E3=82=AF=E3=83=AC=E3=83=83=E3=83=88=E7=AD=89=E3=81=AE?= =?UTF-8?q?=E6=A1=88=E5=86=85=E3=83=9A=E3=83=BC=E3=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/EjaculationController.php | 5 +++ resources/views/ejaculation/checkin.blade.php | 1 + resources/views/ejaculation/tools.blade.php | 38 +++++++++++++++++++ routes/web.php | 1 + 4 files changed, 45 insertions(+) create mode 100644 resources/views/ejaculation/tools.blade.php diff --git a/app/Http/Controllers/EjaculationController.php b/app/Http/Controllers/EjaculationController.php index c0d6277..ae130c0 100644 --- a/app/Http/Controllers/EjaculationController.php +++ b/app/Http/Controllers/EjaculationController.php @@ -184,4 +184,9 @@ class EjaculationController extends Controller return redirect()->route('user.profile', ['name' => $user->name])->with('status', '削除しました。'); } + + public function tools() + { + return view('ejaculation.tools'); + } } diff --git a/resources/views/ejaculation/checkin.blade.php b/resources/views/ejaculation/checkin.blade.php index e528674..611ae85 100644 --- a/resources/views/ejaculation/checkin.blade.php +++ b/resources/views/ejaculation/checkin.blade.php @@ -98,6 +98,7 @@ +

Tips: ブックマークレットや共有機能で、簡単にチェックインできます! 使い方はこちら

diff --git a/resources/views/ejaculation/tools.blade.php b/resources/views/ejaculation/tools.blade.php new file mode 100644 index 0000000..1c1860d --- /dev/null +++ b/resources/views/ejaculation/tools.blade.php @@ -0,0 +1,38 @@ +@extends('layouts.base') + +@section('title', 'ブックマークレットについて') + +@section('content') +
+

ブックマークレットと共有機能について

+
+
+
+

以下のブックマークレットを使うと、ブラウザで現在見ているページで簡単にチェックインすることができます。

+
+
+
javascript:location.href='{{ url('/') }}/checkin?link='+encodeURIComponent(location.href)
+
+
+

また、Web Share Target に対応しているブラウザでは、他のWebサイトやアプリからURLを「共有」することができます。

+
    +
  • Android版 Google Chrome の場合 +
      +
    • 画面下に出てくる「ホーム画面に Tissue を追加」、もしくは右上のメニューからインストール
    • +
    • 任意のアプリからURLを共有 → Tissue を選択 → チェックイン画面
    • +
    +
  • +
+

※ Web Share Target の仕様はまだドラフト段階で、今後仕様の変更により動かなくなる場合があります。

+
+
+

高度な使い方

+
+
+
+

チェックイン画面のURLにクエリパラメータを付加することで、各フィールドに値をセットした状態で開くことができます。

+

例: {{ url('checkin?date=1900/01/01&time=00:00&tags=blah+blur&link=hoge¬e=piyo') }}

+
+
+
+@endsection diff --git a/routes/web.php b/routes/web.php index 503524c..0b57d15 100644 --- a/routes/web.php +++ b/routes/web.php @@ -22,6 +22,7 @@ Route::get('/user/{name}/okazu', 'UserController@okazu')->name('user.okazu'); Route::get('/user/{name}/likes', 'UserController@likes')->name('user.likes'); Route::get('/checkin/{id}', 'EjaculationController@show')->name('checkin.show'); +Route::get('/checkin-tools', 'EjaculationController@tools')->name('checkin.tools'); Route::middleware('auth')->group(function () { Route::get('/checkin', 'EjaculationController@create')->name('checkin'); Route::post('/checkin', 'EjaculationController@store')->name('checkin'); From 015bcaa5632dd32189d1ea6e26af9c2a7e81785c Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 20:32:24 +0900 Subject: [PATCH 39/58] Laravel 5.6 --- .env.example | 6 +- .gitignore | 1 + app/Exceptions/Handler.php | 2 - .../Controllers/Auth/RegisterController.php | 3 +- app/Http/Kernel.php | 4 +- .../Middleware/CheckForMaintenanceMode.php | 17 + app/Http/Middleware/TrustProxies.php | 12 +- composer.json | 21 +- composer.lock | 1827 +++++++++-------- config/app.php | 17 - config/filesystems.php | 3 +- config/hashing.php | 52 + config/logging.php | 81 + config/queue.php | 19 +- config/services.php | 2 +- database/seeds/DatabaseSeeder.php | 2 +- phpunit.xml | 10 +- resources/lang/en/validation.php | 27 +- 18 files changed, 1200 insertions(+), 906 deletions(-) create mode 100644 app/Http/Middleware/CheckForMaintenanceMode.php create mode 100644 config/hashing.php create mode 100644 config/logging.php diff --git a/.env.example b/.env.example index 78ff0c5..7b0640d 100644 --- a/.env.example +++ b/.env.example @@ -2,9 +2,10 @@ APP_NAME=Tissue APP_ENV=local APP_KEY= APP_DEBUG=true -APP_LOG_LEVEL=debug APP_URL=http://localhost +LOG_CHANNEL=stack + # テストにモックを使用するか falseの場合は実際のHTML等を取得してテストする TEST_USE_HTTP_MOCK=true @@ -39,6 +40,9 @@ PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= +MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" + # (Optional) reCAPTCHA Key # https://www.google.com/recaptcha NOCAPTCHA_SECRET= diff --git a/.gitignore b/.gitignore index 323d21f..87cdc86 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ Homestead.yaml npm-debug.log yarn-error.log .env +.phpunit.result.cache *.iml .php_cs .php_cs.cache diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index a747e31..d5b210c 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -25,8 +25,6 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * This is a great spot to send exceptions to Sentry, Bugsnag, etc. - * * @param \Exception $exception * @return void */ diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 9fd7886..0e302d5 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use App\User; use Illuminate\Foundation\Auth\RegistersUsers; +use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; class RegisterController extends Controller @@ -78,7 +79,7 @@ class RegisterController extends Controller 'name' => $data['name'], 'display_name' => $data['name'], 'email' => $data['email'], - 'password' => bcrypt($data['password']), + 'password' => Hash::make($data['password']), 'is_protected' => $data['is_protected'] ?? false, 'accept_analytics' => $data['accept_analytics'] ?? false ]); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index dfa1743..13c5557 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -14,7 +14,7 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ - \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, + \App\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, @@ -60,8 +60,10 @@ class Kernel extends HttpKernel 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, + 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, ]; } diff --git a/app/Http/Middleware/CheckForMaintenanceMode.php b/app/Http/Middleware/CheckForMaintenanceMode.php new file mode 100644 index 0000000..35b9824 --- /dev/null +++ b/app/Http/Middleware/CheckForMaintenanceMode.php @@ -0,0 +1,17 @@ + 'FORWARDED', - Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', - Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', - Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', - Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', - ]; + protected $headers = Request::HEADER_X_FORWARDED_ALL; } diff --git a/composer.json b/composer.json index 9c5900a..6718838 100644 --- a/composer.json +++ b/composer.json @@ -11,14 +11,14 @@ } ], "require": { - "php": ">=7.1.0", + "php": "^7.1.3", "anhskohbo/no-captcha": "^3.0", "doctrine/dbal": "^2.9", - "fideloper/proxy": "~3.3", + "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "jakeasmith/http_build_url": "^1.0", - "laravel/framework": "5.5.*", - "laravel/tinker": "~1.0", + "laravel/framework": "5.6.*", + "laravel/tinker": "^1.0", "league/csv": "^9.5", "misd/linkify": "^1.1", "openpear/stream_filter_mbstring": "dev-master", @@ -29,11 +29,12 @@ "require-dev": { "barryvdh/laravel-debugbar": "^3.1", "barryvdh/laravel-ide-helper": "^2.5", - "filp/whoops": "~2.0", + "filp/whoops": "^2.0", "friendsofphp/php-cs-fixer": "^2.14", - "fzaninotto/faker": "~1.4", - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~6.0", + "fzaninotto/faker": "^1.4", + "mockery/mockery": "^1.0", + "nunomaduro/collision": "^2.0", + "phpunit/phpunit": "^7.0", "symfony/thanks": "^1.0" }, "autoload": { @@ -71,5 +72,7 @@ "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true - } + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/composer.lock b/composer.lock index e448a5d..3696733 100644 --- a/composer.lock +++ b/composer.lock @@ -4,25 +4,25 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a391908b8086044d943007dce1ff4f12", + "content-hash": "b441e891b65afad93592d31276507d01", "packages": [ { "name": "anhskohbo/no-captcha", - "version": "3.1.1", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/anhskohbo/no-captcha.git", - "reference": "3b2f7d461e1fc7153e0c724c3ccac7a2db156733" + "reference": "c14dd67024f30fd28f38ac9faa44cc47e1d4bddf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/anhskohbo/no-captcha/zipball/3b2f7d461e1fc7153e0c724c3ccac7a2db156733", - "reference": "3b2f7d461e1fc7153e0c724c3ccac7a2db156733", + "url": "https://api.github.com/repos/anhskohbo/no-captcha/zipball/c14dd67024f30fd28f38ac9faa44cc47e1d4bddf", + "reference": "c14dd67024f30fd28f38ac9faa44cc47e1d4bddf", "shasum": "" }, "require": { "guzzlehttp/guzzle": "^6.2", - "illuminate/support": "^5.0|^6.0", + "illuminate/support": "^5.0|^6.0|^7.0", "php": ">=5.5.5" }, "require-dev": { @@ -64,7 +64,7 @@ "no-captcha", "recaptcha" ], - "time": "2019-10-03T06:42:31+00:00" + "time": "2020-03-04T03:27:38+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -183,16 +183,16 @@ }, { "name": "doctrine/dbal", - "version": "v2.10.1", + "version": "2.10.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8" + "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", - "reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/aab745e7b6b2de3b47019da81e7225e14dcfdac8", + "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8", "shasum": "" }, "require": { @@ -204,9 +204,11 @@ "require-dev": { "doctrine/coding-standard": "^6.0", "jetbrains/phpstorm-stubs": "^2019.1", - "phpstan/phpstan": "^0.11.3", + "nikic/php-parser": "^4.4", + "phpstan/phpstan": "^0.12", "phpunit/phpunit": "^8.4.1", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0" + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "^3.11" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -271,7 +273,7 @@ "sqlserver", "sqlsrv" ], - "time": "2020-01-04T12:56:21+00:00" + "time": "2020-04-20T17:19:26+00:00" }, { "name": "doctrine/event-manager", @@ -351,33 +353,38 @@ }, { "name": "doctrine/inflector", - "version": "1.3.1", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" + "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3", + "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector", + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -406,15 +413,21 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "keywords": [ "inflection", - "pluralize", - "singularize", - "string" + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" ], - "time": "2019-10-30T19:59:35+00:00" + "time": "2020-05-09T15:09:09+00:00" }, { "name": "doctrine/lexer", @@ -479,22 +492,77 @@ "time": "2019-10-30T14:39:59+00:00" }, { - "name": "egulias/email-validator", - "version": "2.1.14", + "name": "dragonmantank/cron-expression", + "version": "v2.3.0", "source": { "type": "git", - "url": "https://github.com/egulias/EmailValidator.git", - "reference": "c4b8d12921999d8a561004371701dbc2e05b5ece" + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/c4b8d12921999d8a561004371701dbc2e05b5ece", - "reference": "c4b8d12921999d8a561004371701dbc2e05b5ece", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/72b6fbf76adb3cf5bc0db68559b33d41219aba27", + "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.4|^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "time": "2019-03-31T00:38:28+00:00" + }, + { + "name": "egulias/email-validator", + "version": "2.1.17", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ade6887fd9bd74177769645ab5c474824f8a418a", + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a", "shasum": "" }, "require": { "doctrine/lexer": "^1.0.1", - "php": ">=5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.10" }, "require-dev": { "dominicsayers/isemail": "^3.0.7", @@ -533,7 +601,7 @@ "validation", "validator" ], - "time": "2020-01-05T14:11:20+00:00" + "time": "2020-02-13T22:36:52+00:00" }, { "name": "erusev/parsedown", @@ -583,32 +651,29 @@ }, { "name": "fideloper/proxy", - "version": "3.3.4", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "9cdf6f118af58d89764249bbcc7bb260c132924f" + "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/9cdf6f118af58d89764249bbcc7bb260c132924f", - "reference": "9cdf6f118af58d89764249bbcc7bb260c132924f", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a", + "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a", "shasum": "" }, "require": { - "illuminate/contracts": "~5.0", + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", "php": ">=5.4.0" }, "require-dev": { - "illuminate/http": "~5.0", - "mockery/mockery": "~0.9.3", - "phpunit/phpunit": "^5.7" + "illuminate/http": "^5.0|^6.0|^7.0|^8.0", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - }, "laravel": { "providers": [ "Fideloper\\Proxy\\TrustedProxyServiceProvider" @@ -636,27 +701,28 @@ "proxy", "trusted proxy" ], - "time": "2017-06-15T17:19:42+00:00" + "time": "2020-02-22T01:51:47+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.5.2", + "version": "6.5.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" + "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e", + "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.11" }, "require-dev": { "ext-curl": "*", @@ -664,7 +730,6 @@ "psr/log": "^1.1" }, "suggest": { - "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", @@ -703,7 +768,7 @@ "rest", "web service" ], - "time": "2019-12-23T11:57:10+00:00" + "time": "2020-04-18T10:38:46+00:00" }, { "name": "guzzlehttp/promises", @@ -900,6 +965,7 @@ "email": "jakub.onderka@gmail.com" } ], + "abandoned": "php-parallel-lint/php-console-color", "time": "2018-09-29T17:23:10+00:00" }, { @@ -946,20 +1012,21 @@ } ], "description": "Highlight PHP code in terminal", + "abandoned": "php-parallel-lint/php-console-highlighter", "time": "2018-09-29T18:48:56+00:00" }, { "name": "kylekatarnls/update-helper", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/kylekatarnls/update-helper.git", - "reference": "5786fa188e0361b9adf9e8199d7280d1b2db165e" + "reference": "429be50660ed8a196e0798e5939760f168ec8ce9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/5786fa188e0361b9adf9e8199d7280d1b2db165e", - "reference": "5786fa188e0361b9adf9e8199d7280d1b2db165e", + "url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/429be50660ed8a196e0798e5939760f168ec8ce9", + "reference": "429be50660ed8a196e0798e5939760f168ec8ce9", "shasum": "" }, "require": { @@ -991,47 +1058,50 @@ } ], "description": "Update helper", - "time": "2019-07-29T11:03:54+00:00" + "time": "2020-04-07T20:44:10+00:00" }, { "name": "laravel/framework", - "version": "v5.5.48", + "version": "v5.6.40", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "e3e8d585dcfab5abe6261b060f4df0d48f9924bf" + "reference": "5ceadf91f13be89a3338c3d4166a4676272a23bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/e3e8d585dcfab5abe6261b060f4df0d48f9924bf", - "reference": "e3e8d585dcfab5abe6261b060f4df0d48f9924bf", + "url": "https://api.github.com/repos/laravel/framework/zipball/5ceadf91f13be89a3338c3d4166a4676272a23bf", + "reference": "5ceadf91f13be89a3338c3d4166a4676272a23bf", "shasum": "" }, "require": { "doctrine/inflector": "~1.1", + "dragonmantank/cron-expression": "~2.0", "erusev/parsedown": "~1.7", "ext-mbstring": "*", "ext-openssl": "*", "league/flysystem": "^1.0.8", "monolog/monolog": "~1.12", - "mtdowling/cron-expression": "~1.0", - "nesbot/carbon": "^1.26.0", - "php": ">=7.0", + "nesbot/carbon": "1.26.*", + "php": "^7.1.3", "psr/container": "~1.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "~3.0", + "ramsey/uuid": "^3.7", "swiftmailer/swiftmailer": "~6.0", - "symfony/console": "~3.3", - "symfony/debug": "~3.3", - "symfony/finder": "~3.3", - "symfony/http-foundation": "~3.3", - "symfony/http-kernel": "~3.3", - "symfony/process": "~3.3", - "symfony/routing": "~3.3", - "symfony/var-dumper": "~3.3", - "tijsverkoyen/css-to-inline-styles": "~2.2", + "symfony/console": "~4.0", + "symfony/debug": "~4.0", + "symfony/finder": "~4.0", + "symfony/http-foundation": "~4.0", + "symfony/http-kernel": "~4.0", + "symfony/process": "~4.0", + "symfony/routing": "~4.0", + "symfony/var-dumper": "~4.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.1", "vlucas/phpdotenv": "~2.2" }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, "replace": { "illuminate/auth": "self.version", "illuminate/broadcasting": "self.version", @@ -1060,44 +1130,46 @@ "illuminate/support": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", - "illuminate/view": "self.version", - "tightenco/collect": "<5.5.33" + "illuminate/view": "self.version" }, "require-dev": { "aws/aws-sdk-php": "~3.0", - "doctrine/dbal": "~2.5", + "doctrine/dbal": "~2.6", "filp/whoops": "^2.1.4", + "league/flysystem-cached-adapter": "~1.0", "mockery/mockery": "~1.0", - "orchestra/testbench-core": "3.5.*", + "moontoast/math": "^1.1", + "orchestra/testbench-core": "3.6.*", "pda/pheanstalk": "~3.0", - "phpunit/phpunit": "~6.0", + "phpunit/phpunit": "~7.0", "predis/predis": "^1.1.1", - "symfony/css-selector": "~3.3", - "symfony/dom-crawler": "~3.3" + "symfony/css-selector": "~4.0", + "symfony/dom-crawler": "~4.0" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.6).", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", "laravel/tinker": "Required to use the tinker console command (~1.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-cached-adapter": "Required to use Flysystem caching (~1.0).", + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0).", "nexmo/client": "Required to use the Nexmo transport (~1.0).", "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 (~3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.3).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.3).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (~4.0).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~4.0).", "symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -1125,7 +1197,7 @@ "framework", "laravel" ], - "time": "2019-08-20T15:46:40+00:00" + "time": "2020-04-14T14:16:50+00:00" }, { "name": "laravel/tinker", @@ -1192,33 +1264,33 @@ }, { "name": "league/csv", - "version": "9.5.0", + "version": "9.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/csv.git", - "reference": "b348d09d0d258a4f068efb50a2510dc63101c213" + "reference": "7351a74625601914409b42b32cabb91a93773b7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/csv/zipball/b348d09d0d258a4f068efb50a2510dc63101c213", - "reference": "b348d09d0d258a4f068efb50a2510dc63101c213", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/7351a74625601914409b42b32cabb91a93773b7b", + "reference": "7351a74625601914409b42b32cabb91a93773b7b", "shasum": "" }, "require": { - "ext-dom": "*", "ext-json": "*", "ext-mbstring": "*", - "php": ">=7.0.10" + "php": "^7.2.5" }, "require-dev": { "ext-curl": "*", - "friendsofphp/php-cs-fixer": "^2.12", - "phpstan/phpstan": "^0.9.2", - "phpstan/phpstan-phpunit": "^0.9.4", - "phpstan/phpstan-strict-rules": "^0.9.0", - "phpunit/phpunit": "^6.0" + "friendsofphp/php-cs-fixer": "^2.16", + "phpstan/phpstan": "^0.12.0", + "phpstan/phpstan-phpunit": "^0.12.0", + "phpstan/phpstan-strict-rules": "^0.12.0", + "phpunit/phpunit": "^8.0" }, "suggest": { + "ext-dom": "Required to use the XMLConverter and or the HTMLConverter classes", "ext-iconv": "Needed to ease transcoding CSV using iconv stream filters" }, "type": "library", @@ -1247,30 +1319,32 @@ "role": "Developer" } ], - "description": "Csv data manipulation made easy in PHP", + "description": "CSV data manipulation made easy in PHP", "homepage": "http://csv.thephpleague.com", "keywords": [ + "convert", "csv", "export", "filter", "import", "read", + "transform", "write" ], - "time": "2019-12-15T19:51:41+00:00" + "time": "2020-03-17T15:15:35+00:00" }, { "name": "league/flysystem", - "version": "1.0.63", + "version": "1.0.69", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6" + "reference": "7106f78428a344bc4f643c233a94e48795f10967" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6", - "reference": "8132daec326565036bc8e8d1876f77ec183a7bd6", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967", + "reference": "7106f78428a344bc4f643c233a94e48795f10967", "shasum": "" }, "require": { @@ -1282,7 +1356,7 @@ }, "require-dev": { "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" + "phpunit/phpunit": "^5.7.26" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -1341,7 +1415,7 @@ "sftp", "storage" ], - "time": "2020-01-04T16:30:31+00:00" + "time": "2020-05-18T15:13:39+00:00" }, { "name": "misd/linkify", @@ -1390,16 +1464,16 @@ }, { "name": "monolog/monolog", - "version": "1.25.3", + "version": "1.25.4", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "fa82921994db851a8becaf3787a9e73c5976b6f1" + "reference": "3022efff205e2448b560c833c6fbbf91c3139168" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1", - "reference": "fa82921994db851a8becaf3787a9e73c5976b6f1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/3022efff205e2448b560c833c6fbbf91c3139168", + "reference": "3022efff205e2448b560c833c6fbbf91c3139168", "shasum": "" }, "require": { @@ -1413,11 +1487,10 @@ "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", + "php-parallel-lint/php-parallel-lint": "^1.0", "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", "ruflin/elastica": ">=0.90 <3.0", "sentry/sentry": "^0.13", "swiftmailer/swiftmailer": "^5.3|^6.0" @@ -1464,65 +1537,20 @@ "logging", "psr-3" ], - "time": "2019-12-20T14:15:16+00:00" - }, - { - "name": "mtdowling/cron-expression", - "version": "v1.2.3", - "source": { - "type": "git", - "url": "https://github.com/mtdowling/cron-expression.git", - "reference": "9be552eebcc1ceec9776378f7dcc085246cacca6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/9be552eebcc1ceec9776378f7dcc085246cacca6", - "reference": "9be552eebcc1ceec9776378f7dcc085246cacca6", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cron\\": "src/Cron/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ], - "abandoned": "dragonmantank/cron-expression", - "time": "2019-12-28T04:23:06+00:00" + "time": "2020-05-22T07:31:27+00:00" }, { "name": "nesbot/carbon", - "version": "1.39.1", + "version": "1.26.6", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33" + "reference": "c6820f814496d71da7498d423427e6193d1f57c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4be0c005164249208ce1b5ca633cd57bdd42ff33", - "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c6820f814496d71da7498d423427e6193d1f57c9", + "reference": "c6820f814496d71da7498d423427e6193d1f57c9", "shasum": "" }, "require": { @@ -1540,12 +1568,7 @@ ], "type": "library", "extra": { - "update-helper": "Carbon\\Upgrade", - "laravel": { - "providers": [ - "Carbon\\Laravel\\ServiceProvider" - ] - } + "update-helper": "Carbon\\Upgrade" }, "autoload": { "psr-4": { @@ -1570,20 +1593,20 @@ "datetime", "time" ], - "time": "2019-10-14T05:51:36+00:00" + "time": "2019-06-03T15:42:58+00:00" }, { "name": "nikic/php-parser", - "version": "v4.3.0", + "version": "v4.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc" + "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120", + "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120", "shasum": "" }, "require": { @@ -1622,7 +1645,7 @@ "parser", "php" ], - "time": "2019-11-08T13:50:10+00:00" + "time": "2020-04-10T16:34:50+00:00" }, { "name": "openpear/stream_filter_mbstring", @@ -1811,16 +1834,16 @@ }, { "name": "psr/log", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -1854,7 +1877,7 @@ "psr", "psr-3" ], - "time": "2019-11-01T11:05:21+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "psr/simple-cache", @@ -2020,16 +2043,16 @@ }, { "name": "ramsey/uuid", - "version": "3.9.2", + "version": "3.9.3", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "7779489a47d443f845271badbdcedfe4df8e06fb" + "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/7779489a47d443f845271badbdcedfe4df8e06fb", - "reference": "7779489a47d443f845271badbdcedfe4df8e06fb", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/7e1633a6964b48589b142d60542f9ed31bd37a92", + "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92", "shasum": "" }, "require": { @@ -2103,7 +2126,7 @@ "identifier", "uuid" ], - "time": "2019-12-17T08:18:51+00:00" + "time": "2020-02-21T04:36:14+00:00" }, { "name": "staudenmeir/eloquent-eager-limit", @@ -2211,25 +2234,28 @@ }, { "name": "symfony/console", - "version": "v3.4.36", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "1ee23b3b659b06c622f2bd2492a229e416eb4586" + "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/1ee23b3b659b06c622f2bd2492a229e416eb4586", - "reference": "1ee23b3b659b06c622f2bd2492a229e416eb4586", + "url": "https://api.github.com/repos/symfony/console/zipball/10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", + "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/debug": "~2.8|~3.0|~4.0", - "symfony/polyfill-mbstring": "~1.0" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/service-contracts": "^1.1|^2" }, "conflict": { "symfony/dependency-injection": "<3.4", + "symfony/event-dispatcher": "<4.3|>=5", + "symfony/lock": "<4.4", "symfony/process": "<3.3" }, "provide": { @@ -2237,11 +2263,12 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.3|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.3|~4.0" + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/event-dispatcher": "^4.3", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/var-dumper": "^4.3|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -2252,7 +2279,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -2279,20 +2306,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-12-01T10:04:45+00:00" + "time": "2020-03-30T11:41:10+00:00" }, { "name": "symfony/css-selector", - "version": "v4.4.2", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "64acec7e0d67125e9f4656c68d4a38a42ab5a0b7" + "reference": "afc26133a6fbdd4f8842e38893e0ee4685c7c94b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/64acec7e0d67125e9f4656c68d4a38a42ab5a0b7", - "reference": "64acec7e0d67125e9f4656c68d4a38a42ab5a0b7", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/afc26133a6fbdd4f8842e38893e0ee4685c7c94b", + "reference": "afc26133a6fbdd4f8842e38893e0ee4685c7c94b", "shasum": "" }, "require": { @@ -2332,36 +2359,36 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2019-10-12T00:35:04+00:00" + "time": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/debug", - "version": "v3.4.36", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "f72e33fdb1170b326e72c3157f0cd456351dd086" + "reference": "346636d2cae417992ecfd761979b2ab98b339a45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/f72e33fdb1170b326e72c3157f0cd456351dd086", - "reference": "f72e33fdb1170b326e72c3157f0cd456351dd086", + "url": "https://api.github.com/repos/symfony/debug/zipball/346636d2cae417992ecfd761979b2ab98b339a45", + "reference": "346636d2cae417992ecfd761979b2ab98b339a45", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": "^7.1.3", "psr/log": "~1.0" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0|~4.0" + "symfony/http-kernel": "^3.4|^4.0|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -2388,20 +2415,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2019-10-24T15:33:53+00:00" + "time": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.4.2", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "36bbcab9369fc2f583220890efd43bf262d563fd" + "reference": "4d0fb3374324071ecdd94898367a3fa4b5563162" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/36bbcab9369fc2f583220890efd43bf262d563fd", - "reference": "36bbcab9369fc2f583220890efd43bf262d563fd", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4d0fb3374324071ecdd94898367a3fa4b5563162", + "reference": "4d0fb3374324071ecdd94898367a3fa4b5563162", "shasum": "" }, "require": { @@ -2449,20 +2476,76 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2019-10-29T11:38:30+00:00" + "time": "2020-03-29T19:12:22+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v4.4.2", + "name": "symfony/error-handler", + "version": "v4.4.8", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f" + "url": "https://github.com/symfony/error-handler.git", + "reference": "7e9828fc98aa1cf27b422fe478a84f5b0abb7358" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b3c3068a72623287550fe20b84a2b01dcba2686f", - "reference": "b3c3068a72623287550fe20b84a2b01dcba2686f", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/7e9828fc98aa1cf27b422fe478a84f5b0abb7358", + "reference": "7e9828fc98aa1cf27b422fe478a84f5b0abb7358", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/log": "~1.0", + "symfony/debug": "^4.4.5", + "symfony/var-dumper": "^4.4|^5.0" + }, + "require-dev": { + "symfony/http-kernel": "^4.4|^5.0", + "symfony/serializer": "^4.4|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony ErrorHandler Component", + "homepage": "https://symfony.com", + "time": "2020-03-30T14:07:33+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "abc8e3618bfdb55e44c8c6a00abd333f831bbfed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/abc8e3618bfdb55e44c8c6a00abd333f831bbfed", + "reference": "abc8e3618bfdb55e44c8c6a00abd333f831bbfed", "shasum": "" }, "require": { @@ -2519,7 +2602,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-11-28T13:33:56+00:00" + "time": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -2581,25 +2664,25 @@ }, { "name": "symfony/finder", - "version": "v3.4.36", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "290ae21279b37bfd287cdcce640d51204e84afdf" + "reference": "5729f943f9854c5781984ed4907bbb817735776b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/290ae21279b37bfd287cdcce640d51204e84afdf", - "reference": "290ae21279b37bfd287cdcce640d51204e84afdf", + "url": "https://api.github.com/repos/symfony/finder/zipball/5729f943f9854c5781984ed4907bbb817735776b", + "reference": "5729f943f9854c5781984ed4907bbb817735776b", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -2626,34 +2709,35 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-11-17T21:55:15+00:00" + "time": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.4.36", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "d2d0cfe8e319d9df44c4cca570710fcf221d4593" + "reference": "ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d2d0cfe8e319d9df44c4cca570710fcf221d4593", - "reference": "d2d0cfe8e319d9df44c4cca570710fcf221d4593", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2", + "reference": "ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php70": "~1.6" + "php": "^7.1.3", + "symfony/mime": "^4.3|^5.0", + "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { - "symfony/expression-language": "~2.8|~3.0|~4.0" + "predis/predis": "~1.0", + "symfony/expression-language": "^3.4|^4.0|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -2680,35 +2764,37 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-11-28T12:52:59+00:00" + "time": "2020-04-18T20:40:08+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.4.36", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "c42c8339acb28cfff0fb1786948db4d23d609ff7" + "reference": "1799a6c01f0db5851f399151abdb5d6393fec277" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c42c8339acb28cfff0fb1786948db4d23d609ff7", - "reference": "c42c8339acb28cfff0fb1786948db4d23d609ff7", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1799a6c01f0db5851f399151abdb5d6393fec277", + "reference": "1799a6c01f0db5851f399151abdb5d6393fec277", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": "^7.1.3", "psr/log": "~1.0", - "symfony/debug": "^3.3.3|~4.0", - "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/http-foundation": "~3.4.12|~4.0.12|^4.1.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php56": "~1.8" + "symfony/error-handler": "^4.4", + "symfony/event-dispatcher": "^4.4", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php73": "^1.9" }, "conflict": { - "symfony/config": "<2.8", - "symfony/dependency-injection": "<3.4.10|<4.0.10,>=4", - "symfony/var-dumper": "<3.3", + "symfony/browser-kit": "<4.3", + "symfony/config": "<3.4", + "symfony/console": ">=5", + "symfony/dependency-injection": "<4.3", + "symfony/translation": "<4.2", "twig/twig": "<1.34|<2.4,>=2" }, "provide": { @@ -2716,34 +2802,32 @@ }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "~2.8|~3.0|~4.0", - "symfony/class-loader": "~2.8|~3.0", - "symfony/config": "~2.8|~3.0|~4.0", - "symfony/console": "~2.8|~3.0|~4.0", - "symfony/css-selector": "~2.8|~3.0|~4.0", - "symfony/dependency-injection": "^3.4.10|^4.0.10", - "symfony/dom-crawler": "~2.8|~3.0|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/process": "~2.8|~3.0|~4.0", - "symfony/routing": "~3.4|~4.0", - "symfony/stopwatch": "~2.8|~3.0|~4.0", - "symfony/templating": "~2.8|~3.0|~4.0", - "symfony/translation": "~2.8|~3.0|~4.0", - "symfony/var-dumper": "~3.3|~4.0" + "symfony/browser-kit": "^4.3|^5.0", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/console": "^3.4|^4.0", + "symfony/css-selector": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^4.3|^5.0", + "symfony/dom-crawler": "^3.4|^4.0|^5.0", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/finder": "^3.4|^4.0|^5.0", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/routing": "^3.4|^4.0|^5.0", + "symfony/stopwatch": "^3.4|^4.0|^5.0", + "symfony/templating": "^3.4|^4.0|^5.0", + "symfony/translation": "^4.2|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "twig/twig": "^1.34|^2.4|^3.0" }, "suggest": { "symfony/browser-kit": "", "symfony/config": "", "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "", - "symfony/var-dumper": "" + "symfony/dependency-injection": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -2770,20 +2854,82 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2019-12-01T13:50:37+00:00" + "time": "2020-04-28T18:47:42+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "name": "symfony/mime", + "version": "v5.0.8", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "url": "https://github.com/symfony/mime.git", + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b", + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "symfony/mailer": "<4.4" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10", + "symfony/dependency-injection": "^4.4|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A library to manipulate MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "time": "2020-04-17T03:29:44+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.17.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", "shasum": "" }, "require": { @@ -2795,7 +2941,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2828,20 +2974,20 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-05-12T16:14:59+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.13.1", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "a019efccc03f1a335af6b4f20c30f5ea8060be36" + "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/a019efccc03f1a335af6b4f20c30f5ea8060be36", - "reference": "a019efccc03f1a335af6b4f20c30f5ea8060be36", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c4de7601eefbf25f9d47190abe07f79fe0a27424", + "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424", "shasum": "" }, "require": { @@ -2853,7 +2999,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2887,26 +3033,26 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a", + "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -2914,7 +3060,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2949,20 +3095,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "fa79b11539418b02fc5e1897267673ba2c19419c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c", + "reference": "fa79b11539418b02fc5e1897267673ba2c19419c", "shasum": "" }, "require": { @@ -2974,7 +3120,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -3008,135 +3154,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" - }, - { - "name": "symfony/polyfill-php56", - "version": "v1.13.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "53dd1cdf3cb986893ccf2b96665b25b3abb384f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/53dd1cdf3cb986893ccf2b96665b25b3abb384f4", - "reference": "53dd1cdf3cb986893ccf2b96665b25b3abb384f4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/polyfill-util": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php56\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2019-11-27T13:56:44+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.13.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "af23c7bb26a73b850840823662dda371484926c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/af23c7bb26a73b850840823662dda371484926c4", - "reference": "af23c7bb26a73b850840823662dda371484926c4", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "f048e612a3905f34931127360bdd2def19a5e582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", + "reference": "f048e612a3905f34931127360bdd2def19a5e582", "shasum": "" }, "require": { @@ -3145,7 +3176,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -3178,20 +3209,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { - "name": "symfony/polyfill-util", - "version": "v1.13.1", + "name": "symfony/polyfill-php73", + "version": "v1.17.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-util.git", - "reference": "964a67f293b66b95883a5ed918a65354fcd2258f" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/964a67f293b66b95883a5ed918a65354fcd2258f", - "reference": "964a67f293b66b95883a5ed918a65354fcd2258f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc", + "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc", "shasum": "" }, "require": { @@ -3200,13 +3231,19 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Util\\": "" - } + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3222,37 +3259,37 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony utilities for portability of PHP codes", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ - "compat", "compatibility", "polyfill", + "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/process", - "version": "v3.4.36", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "9a4545c01e1e4f473492bd52b71e574dcc401ca2" + "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/9a4545c01e1e4f473492bd52b71e574dcc401ca2", - "reference": "9a4545c01e1e4f473492bd52b71e574dcc401ca2", + "url": "https://api.github.com/repos/symfony/process/zipball/4b6a9a4013baa65d409153cbb5a895bf093dc7f4", + "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -3279,38 +3316,38 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-11-28T10:05:51+00:00" + "time": "2020-04-15T15:56:18+00:00" }, { "name": "symfony/routing", - "version": "v3.4.36", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "b689ccd48e234ea404806d94b07eeb45f9f6f06a" + "reference": "67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/b689ccd48e234ea404806d94b07eeb45f9f6f06a", - "reference": "b689ccd48e234ea404806d94b07eeb45f9f6f06a", + "url": "https://api.github.com/repos/symfony/routing/zipball/67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c", + "reference": "67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "conflict": { - "symfony/config": "<3.3.1", - "symfony/dependency-injection": "<3.3", + "symfony/config": "<4.2", + "symfony/dependency-injection": "<3.4", "symfony/yaml": "<3.4" }, "require-dev": { - "doctrine/annotations": "~1.0", + "doctrine/annotations": "~1.2", "psr/log": "~1.0", - "symfony/config": "^3.3.1|~4.0", - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/http-foundation": "~2.8|~3.0|~4.0", - "symfony/yaml": "~3.4|~4.0" + "symfony/config": "^4.2|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/yaml": "^3.4|^4.0|^5.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -3322,7 +3359,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -3355,30 +3392,89 @@ "uri", "url" ], - "time": "2019-12-01T08:33:36+00:00" + "time": "2020-04-21T19:59:53+00:00" }, { - "name": "symfony/translation", - "version": "v4.3.9", + "name": "symfony/service-contracts", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "73f86a49454d9477864ccbb6c06993e24a052a48" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "144c5e51266b281231e947b51223ba14acf1a749" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/73f86a49454d9477864ccbb6c06993e24a052a48", - "reference": "73f86a49454d9477864ccbb6c06993e24a052a48", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", + "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-11-18T17:27:11+00:00" + }, + { + "name": "symfony/translation", + "version": "v4.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "8272bbd2b7e220ef812eba2a2b30068a5c64b191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/8272bbd2b7e220ef812eba2a2b30068a5c64b191", + "reference": "8272bbd2b7e220ef812eba2a2b30068a5c64b191", "shasum": "" }, "require": { "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^1.1.6" + "symfony/translation-contracts": "^1.1.6|^2" }, "conflict": { "symfony/config": "<3.4", "symfony/dependency-injection": "<3.4", + "symfony/http-kernel": "<4.4", "symfony/yaml": "<3.4" }, "provide": { @@ -3386,15 +3482,14 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/http-kernel": "~3.4|~4.0", - "symfony/intl": "~3.4|~4.0", - "symfony/service-contracts": "^1.1.2", - "symfony/var-dumper": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/console": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/finder": "~2.8|~3.0|~4.0|^5.0", + "symfony/http-kernel": "^4.4", + "symfony/intl": "^3.4|^4.0|^5.0", + "symfony/service-contracts": "^1.1.2|^2", + "symfony/yaml": "^3.4|^4.0|^5.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -3404,7 +3499,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -3431,24 +3526,24 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2019-11-26T03:44:44+00:00" + "time": "2020-04-12T16:45:36+00:00" }, { "name": "symfony/translation-contracts", - "version": "v1.1.7", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "364518c132c95642e530d9b2d217acbc2ccac3e6" + "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/364518c132c95642e530d9b2d217acbc2ccac3e6", - "reference": "364518c132c95642e530d9b2d217acbc2ccac3e6", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/8cc682ac458d75557203b2f2f14b0b92e1c744ed", + "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "suggest": { "symfony/translation-implementation": "" @@ -3456,7 +3551,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -3488,42 +3583,49 @@ "interoperability", "standards" ], - "time": "2019-09-17T11:12:18+00:00" + "time": "2019-11-18T17:27:11+00:00" }, { "name": "symfony/var-dumper", - "version": "v3.4.36", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "569e261461600810845a8305ca3f64abd3e712c0" + "reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/569e261461600810845a8305ca3f64abd3e712c0", - "reference": "569e261461600810845a8305ca3f64abd3e712c0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c587e04ce5d1aa62d534a038f574d9a709e814cf", + "reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-mbstring": "~1.0" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5" }, "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/console": "<3.4" }, "require-dev": { "ext-iconv": "*", - "twig/twig": "~1.34|~2.4" + "symfony/console": "^3.4|^4.0|^5.0", + "symfony/process": "^4.4|^5.0", + "twig/twig": "^1.34|^2.4|^3.0" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", "ext-intl": "To show region name in time zone dump", - "ext-symfony_debug": "" + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, + "bin": [ + "Resources/bin/var-dump-server" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -3557,7 +3659,7 @@ "debug", "dump" ], - "time": "2019-10-10T11:03:19+00:00" + "time": "2020-04-12T16:14:02+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -3610,25 +3712,31 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.6.1", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5" + "reference": "67d472b1794c986381a8950e4958e1adb779d561" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2a7dcf7e3e02dc5e701004e51a6f304b713107d5", - "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67d472b1794c986381a8950e4958e1adb779d561", + "reference": "67d472b1794c986381a8950e4958e1adb779d561", "shasum": "" }, "require": { - "php": ">=5.3.9", + "php": "^5.3.9 || ^7.0 || ^8.0", "symfony/polyfill-ctype": "^1.9" }, "require-dev": { + "ext-filter": "*", + "ext-pcre": "*", "phpunit/phpunit": "^4.8.35 || ^5.0" }, + "suggest": { + "ext-filter": "Required to use the boolean validator.", + "ext-pcre": "Required to use most of the library." + }, "type": "library", "extra": { "branch-alias": { @@ -3645,10 +3753,15 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "homepage": "https://gjcampbell.co.uk/" + }, { "name": "Vance Lucas", "email": "vance@vancelucas.com", - "homepage": "http://www.vancelucas.com" + "homepage": "https://vancelucas.com/" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -3657,32 +3770,32 @@ "env", "environment" ], - "time": "2019-01-29T11:11:52+00:00" + "time": "2020-05-02T13:38:00+00:00" } ], "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v3.2.8", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "18208d64897ab732f6c04a19b319fe8f1d57a9c0" + "reference": "57f2219f6d9efe41ed1bc880d86701c52f261bf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/18208d64897ab732f6c04a19b319fe8f1d57a9c0", - "reference": "18208d64897ab732f6c04a19b319fe8f1d57a9c0", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/57f2219f6d9efe41ed1bc880d86701c52f261bf5", + "reference": "57f2219f6d9efe41ed1bc880d86701c52f261bf5", "shasum": "" }, "require": { - "illuminate/routing": "^5.5|^6", - "illuminate/session": "^5.5|^6", - "illuminate/support": "^5.5|^6", - "maximebf/debugbar": "~1.15.0", + "illuminate/routing": "^5.5|^6|^7", + "illuminate/session": "^5.5|^6|^7", + "illuminate/support": "^5.5|^6|^7", + "maximebf/debugbar": "^1.15.1", "php": ">=7.0", - "symfony/debug": "^3|^4", - "symfony/finder": "^3|^4" + "symfony/debug": "^3|^4|^5", + "symfony/finder": "^3|^4|^5" }, "require-dev": { "laravel/framework": "5.5.x" @@ -3727,37 +3840,37 @@ "profiler", "webprofiler" ], - "time": "2019-08-29T07:01:03+00:00" + "time": "2020-05-05T10:53:32+00:00" }, { "name": "barryvdh/laravel-ide-helper", - "version": "v2.6.6", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "b91b959364d97af658f268c733c75dccdbff197e" + "reference": "5f677edc14bdcfdcac36633e6eea71b2728a4dbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/b91b959364d97af658f268c733c75dccdbff197e", - "reference": "b91b959364d97af658f268c733c75dccdbff197e", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/5f677edc14bdcfdcac36633e6eea71b2728a4dbc", + "reference": "5f677edc14bdcfdcac36633e6eea71b2728a4dbc", "shasum": "" }, "require": { "barryvdh/reflection-docblock": "^2.0.6", "composer/composer": "^1.6", "doctrine/dbal": "~2.3", - "illuminate/console": "^5.5|^6", - "illuminate/filesystem": "^5.5|^6", - "illuminate/support": "^5.5|^6", - "php": ">=7" + "illuminate/console": "^5.5|^6|^7", + "illuminate/filesystem": "^5.5|^6|^7", + "illuminate/support": "^5.5|^6|^7", + "php": ">=7.2" }, "require-dev": { - "illuminate/config": "^5.5|^6", - "illuminate/view": "^5.5|^6", - "phpro/grumphp": "^0.14", - "phpunit/phpunit": "4.*", - "scrutinizer/ocular": "~1.1", + "illuminate/config": "^5.5|^6|^7", + "illuminate/view": "^5.5|^6|^7", + "mockery/mockery": "^1.3", + "orchestra/testbench": "^3|^4|^5", + "phpro/grumphp": "^0.17.1", "squizlabs/php_codesniffer": "^3" }, "type": "library", @@ -3798,7 +3911,7 @@ "phpstorm", "sublime" ], - "time": "2019-10-30T20:53:27+00:00" + "time": "2020-04-22T09:57:26+00:00" }, { "name": "barryvdh/reflection-docblock", @@ -3851,16 +3964,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.2.6", + "version": "1.2.7", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "47fe531de31fca4a1b997f87308e7d7804348f7e" + "reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/47fe531de31fca4a1b997f87308e7d7804348f7e", - "reference": "47fe531de31fca4a1b997f87308e7d7804348f7e", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/95c63ab2117a72f48f5a55da9740a3273d45b7fd", + "reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd", "shasum": "" }, "require": { @@ -3903,20 +4016,20 @@ "ssl", "tls" ], - "time": "2020-01-13T10:02:55+00:00" + "time": "2020-04-08T08:27:21+00:00" }, { "name": "composer/composer", - "version": "1.9.2", + "version": "1.10.6", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb" + "reference": "be81b9c4735362c26876bdbfd3b5bc7e7f711c88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb", - "reference": "7a04aa0201ddaa0b3cf64d41022bd8cdcd7fafeb", + "url": "https://api.github.com/repos/composer/composer/zipball/be81b9c4735362c26876bdbfd3b5bc7e7f711c88", + "reference": "be81b9c4735362c26876bdbfd3b5bc7e7f711c88", "shasum": "" }, "require": { @@ -3929,17 +4042,18 @@ "psr/log": "^1.0", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.0", - "symfony/console": "^2.7 || ^3.0 || ^4.0", - "symfony/filesystem": "^2.7 || ^3.0 || ^4.0", - "symfony/finder": "^2.7 || ^3.0 || ^4.0", - "symfony/process": "^2.7 || ^3.0 || ^4.0" + "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^2.7 || ^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^2.7 || ^3.0 || ^4.0 || ^5.0", + "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0" }, "conflict": { - "symfony/console": "2.8.38" + "symfony/console": "2.8.38", + "symfony/phpunit-bridge": "3.4.40" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7", - "phpunit/phpunit-mock-objects": "^2.3 || ^3.0" + "phpspec/prophecy": "^1.10", + "symfony/phpunit-bridge": "^3.4" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -3952,7 +4066,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.10-dev" } }, "autoload": { @@ -3983,7 +4097,7 @@ "dependency", "package" ], - "time": "2020-01-14T15:30:32+00:00" + "time": "2020-05-06T08:28:10+00:00" }, { "name": "composer/semver", @@ -4048,16 +4162,16 @@ }, { "name": "composer/spdx-licenses", - "version": "1.5.2", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5" + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7ac1e6aec371357df067f8a688c3d6974df68fa5", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae", + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae", "shasum": "" }, "require": { @@ -4104,20 +4218,20 @@ "spdx", "validator" ], - "time": "2019-07-29T10:31:59+00:00" + "time": "2020-02-14T07:44:31+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "cbe23383749496fe0f373345208b79568e4bc248" + "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/cbe23383749496fe0f373345208b79568e4bc248", - "reference": "cbe23383749496fe0f373345208b79568e4bc248", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7", + "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7", "shasum": "" }, "require": { @@ -4148,24 +4262,25 @@ "Xdebug", "performance" ], - "time": "2019-11-06T16:40:04+00:00" + "time": "2020-03-01T12:26:26+00:00" }, { "name": "doctrine/annotations", - "version": "v1.8.0", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc" + "reference": "b9d758e831c70751155c698c2f7df4665314a1cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/b9d758e831c70751155c698c2f7df4665314a1cb", + "reference": "b9d758e831c70751155c698c2f7df4665314a1cb", "shasum": "" }, "require": { "doctrine/lexer": "1.*", + "ext-tokenizer": "*", "php": "^7.1" }, "require-dev": { @@ -4175,7 +4290,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.9.x-dev" } }, "autoload": { @@ -4216,7 +4331,7 @@ "docblock", "parser" ], - "time": "2019-10-01T18:55:10+00:00" + "time": "2020-04-20T09:18:32+00:00" }, { "name": "doctrine/instantiator", @@ -4276,16 +4391,16 @@ }, { "name": "filp/whoops", - "version": "2.7.1", + "version": "2.7.2", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130" + "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130", - "reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130", + "url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a", + "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a", "shasum": "" }, "require": { @@ -4333,20 +4448,20 @@ "throwable", "whoops" ], - "time": "2020-01-15T10:00:00+00:00" + "time": "2020-05-05T12:28:07+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.16.1", + "version": "v2.16.3", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "c8afb599858876e95e8ebfcd97812d383fa23f02" + "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c8afb599858876e95e8ebfcd97812d383fa23f02", - "reference": "c8afb599858876e95e8ebfcd97812d383fa23f02", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/83baf823a33a1cbd5416c8626935cf3f843c10b0", + "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0", "shasum": "" }, "require": { @@ -4382,6 +4497,7 @@ "symfony/yaml": "^3.0 || ^4.0 || ^5.0" }, "suggest": { + "ext-dom": "For handling output formats in XML", "ext-mbstring": "For handling non-UTF8 characters in cache signature.", "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", @@ -4404,6 +4520,7 @@ "tests/Test/IntegrationCaseFactory.php", "tests/Test/IntegrationCaseFactoryInterface.php", "tests/Test/InternalIntegrationCaseFactory.php", + "tests/Test/IsIdenticalConstraint.php", "tests/TestCase.php" ] }, @@ -4422,7 +4539,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2019-11-25T22:10:32+00:00" + "time": "2020-04-15T18:51:10+00:00" }, { "name": "fzaninotto/faker", @@ -4590,22 +4707,22 @@ }, { "name": "maximebf/debugbar", - "version": "v1.15.1", + "version": "v1.16.3", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e" + "reference": "1a1605b8e9bacb34cc0c6278206d699772e1d372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6c4277f6117e4864966c9cb58fb835cee8c74a1e", - "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/1a1605b8e9bacb34cc0c6278206d699772e1d372", + "reference": "1a1605b8e9bacb34cc0c6278206d699772e1d372", "shasum": "" }, "require": { - "php": ">=5.6", + "php": "^7.1", "psr/log": "^1.0", - "symfony/var-dumper": "^2.6|^3|^4" + "symfony/var-dumper": "^2.6|^3|^4|^5" }, "require-dev": { "phpunit/phpunit": "^5" @@ -4618,7 +4735,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -4647,7 +4764,7 @@ "debug", "debugbar" ], - "time": "2019-09-24T14:55:42+00:00" + "time": "2020-05-06T07:06:27+00:00" }, { "name": "mockery/mockery", @@ -4716,16 +4833,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.4", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -4760,26 +4877,90 @@ "object", "object graph" ], - "time": "2019-12-15T19:12:40+00:00" + "time": "2020-01-17T21:11:47+00:00" }, { - "name": "phar-io/manifest", - "version": "1.0.1", + "name": "nunomaduro/collision", + "version": "v2.1.1", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "url": "https://github.com/nunomaduro/collision.git", + "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b5feb0c0d92978ec7169232ce5d70d6da6b29f63", + "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63", + "shasum": "" + }, + "require": { + "filp/whoops": "^2.1.4", + "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", + "php": "^7.1", + "symfony/console": "~2.8|~3.3|~4.0" + }, + "require-dev": { + "laravel/framework": "5.7.*", + "nunomaduro/larastan": "^0.3.0", + "phpstan/phpstan": "^0.10", + "phpunit/phpunit": "~7.3" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "time": "2018-11-21T21:40:54+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", + "phar-io/version": "^2.0", "php": "^5.6 || ^7.0" }, "type": "library", @@ -4815,20 +4996,20 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" + "time": "2018-07-08T19:23:20+00:00" }, { "name": "phar-io/version", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", "shasum": "" }, "require": { @@ -4862,7 +5043,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "time": "2018-07-08T19:19:57+00:00" }, { "name": "php-cs-fixer/diff", @@ -4917,24 +5098,21 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~6" - }, "type": "library", "extra": { "branch-alias": { @@ -4965,45 +5143,42 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-04-27T09:25:28+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -5014,33 +5189,36 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-12-28T18:55:12+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", + "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" }, "type": "library", "extra": { @@ -5064,28 +5242,28 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-02-18T18:59:58+00:00" }, { "name": "phpspec/prophecy", - "version": "1.10.1", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { "phpspec/phpspec": "^2.5 || ^3.2", @@ -5127,44 +5305,44 @@ "spy", "stub" ], - "time": "2019-12-22T21:05:45+00:00" + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.3.2", + "version": "6.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac" + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "^1.4.2", + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", + "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^3.1 || ^4.0", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -5190,29 +5368,32 @@ "testing", "xunit" ], - "time": "2018-04-06T15:36:58+00:00" + "time": "2018-10-31T16:06:48+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "050bedf145a257b1ff02746c31894800e5122946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -5227,7 +5408,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -5237,7 +5418,7 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "time": "2018-09-13T20:33:42+00:00" }, { "name": "phpunit/php-text-template", @@ -5282,28 +5463,28 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -5318,7 +5499,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -5327,33 +5508,33 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "time": "2019-06-07T04:22:29+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.2", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "791198a2c6254db10131eecfe8c06670700904db" + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", - "reference": "791198a2c6254db10131eecfe8c06670700904db", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -5376,57 +5557,57 @@ "keywords": [ "tokenizer" ], - "time": "2017-11-27T05:48:46+00:00" + "time": "2019-09-17T06:23:10+00:00" }, { "name": "phpunit/phpunit", - "version": "6.5.14", + "version": "7.5.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7" + "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7", - "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", + "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", + "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.3", - "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.9", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", - "sebastian/environment": "^3.1", + "phpunit/php-timer": "^2.1", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^4.0", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", + "sebastian/resource-operations": "^2.0", "sebastian/version": "^2.0.1" }, "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" + "phpunit/phpunit-mock-objects": "*" }, "require-dev": { "ext-pdo": "*" }, "suggest": { + "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -5434,7 +5615,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5.x-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -5460,67 +5641,7 @@ "testing", "xunit" ], - "time": "2019-02-01T05:22:47+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "5.0.10", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f", - "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.0", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "conflict": { - "phpunit/phpunit": "<6.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5.11" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "abandoned": true, - "time": "2018-08-09T05:50:03+00:00" + "time": "2020-01-08T08:45:45+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5569,30 +5690,30 @@ }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": "^7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -5629,32 +5750,33 @@ "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "time": "2018-07-12T15:12:46+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -5679,34 +5801,40 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-08-03T08:09:46+00:00" + "time": "2019-02-04T06:01:07+00:00" }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5731,7 +5859,7 @@ "environment", "hhvm" ], - "time": "2017-07-01T08:51:00+00:00" + "time": "2019-11-20T08:46:58+00:00" }, { "name": "sebastian/exporter", @@ -5998,25 +6126,25 @@ }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -6036,7 +6164,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "time": "2018-10-04T04:07:39+00:00" }, { "name": "sebastian/version", @@ -6083,20 +6211,20 @@ }, { "name": "seld/jsonlint", - "version": "1.7.2", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19" + "reference": "ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/e2e5d290e4d2a4f0eb449f510071392e00e10d19", - "reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1", + "reference": "ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1", "shasum": "" }, "require": { - "php": "^5.3 || ^7.0" + "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" @@ -6128,20 +6256,20 @@ "parser", "validator" ], - "time": "2019-10-24T14:27:39+00:00" + "time": "2020-04-30T19:05:18+00:00" }, { "name": "seld/phar-utils", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "84715761c35808076b00908a20317a3a8a67d17e" + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/84715761c35808076b00908a20317a3a8a67d17e", - "reference": "84715761c35808076b00908a20317a3a8a67d17e", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0", + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0", "shasum": "" }, "require": { @@ -6170,32 +6298,32 @@ ], "description": "PHAR file format utilities, for when PHP phars you up", "keywords": [ - "phra" + "phar" ], - "time": "2020-01-13T10:41:09+00:00" + "time": "2020-02-14T15:25:33+00:00" }, { "name": "symfony/filesystem", - "version": "v4.4.2", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "40c2606131d56eff6f193b6e2ceb92414653b591" + "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/40c2606131d56eff6f193b6e2ceb92414653b591", - "reference": "40c2606131d56eff6f193b6e2ceb92414653b591", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7cd0dafc4353a0f62e307df90b48466379c8cc91", + "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.2.5", "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -6222,20 +6350,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2019-11-26T23:16:41+00:00" + "time": "2020-04-12T14:40:17+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.0.2", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68" + "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68", - "reference": "1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/3707e3caeff2b797c0bfaadd5eba723dd44e6bf1", + "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1", "shasum": "" }, "require": { @@ -6276,39 +6404,42 @@ "configuration", "options" ], - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-04-06T10:40:56+00:00" }, { - "name": "symfony/service-contracts", - "version": "v2.0.1", + "name": "symfony/polyfill-php70", + "version": "v1.17.0", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "82225c2d7d23d7e70515496d249c0152679b468e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/82225c2d7d23d7e70515496d249c0152679b468e", + "reference": "82225c2d7d23d7e70515496d249c0152679b468e", "shasum": "" }, "require": { - "php": "^7.2.5", - "psr/container": "^1.0" - }, - "suggest": { - "symfony/service-implementation": "" + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.17-dev" } }, "autoload": { "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6324,30 +6455,28 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to writing services", + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "compatibility", + "polyfill", + "portable", + "shim" ], - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.0.2", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "d410282956706e0b08681a5527447a8e6b6f421e" + "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/d410282956706e0b08681a5527447a8e6b6f421e", - "reference": "d410282956706e0b08681a5527447a8e6b6f421e", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/a1d86d30d4522423afc998f32404efa34fcf5a73", + "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73", "shasum": "" }, "require": { @@ -6384,7 +6513,7 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-03-27T16:56:45+00:00" }, { "name": "symfony/thanks", @@ -6471,16 +6600,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", "shasum": "" }, "require": { @@ -6488,7 +6617,7 @@ "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "vimeo/psalm": "<3.6.0" + "vimeo/psalm": "<3.9.1" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" @@ -6515,18 +6644,18 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-04-18T12:12:48+00:00" } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": { "openpear/stream_filter_mbstring": 20 }, - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.1.0" + "php": "^7.1.3" }, "platform-dev": [] } diff --git a/config/app.php b/config/app.php index d1747e7..e8f2f52 100644 --- a/config/app.php +++ b/config/app.php @@ -107,23 +107,6 @@ return [ 'cipher' => 'AES-256-CBC', - /* - |-------------------------------------------------------------------------- - | Logging Configuration - |-------------------------------------------------------------------------- - | - | Here you may configure the log settings for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Settings: "single", "daily", "syslog", "errorlog" - | - */ - - 'log' => env('APP_LOG', 'single'), - - 'log_level' => env('APP_LOG_LEVEL', 'debug'), - /* |-------------------------------------------------------------------------- | Autoloaded Service Providers diff --git a/config/filesystems.php b/config/filesystems.php index 4544f60..84bad56 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -37,7 +37,7 @@ return [ | may even configure multiple disks of the same driver. Defaults have | been setup for each driver as an example of the required options. | - | Supported Drivers: "local", "ftp", "s3", "rackspace" + | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" | */ @@ -61,6 +61,7 @@ return [ 'secret' => env('AWS_SECRET'), 'region' => env('AWS_REGION'), 'bucket' => env('AWS_BUCKET'), + 'url' => env('AWS_URL'), ], ], diff --git a/config/hashing.php b/config/hashing.php new file mode 100644 index 0000000..d3c8e2f --- /dev/null +++ b/config/hashing.php @@ -0,0 +1,52 @@ + 'bcrypt', + + /* + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'bcrypt' => [ + 'rounds' => env('BCRYPT_ROUNDS', 10), + ], + + /* + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'argon' => [ + 'memory' => 1024, + 'threads' => 2, + 'time' => 2, + ], + +]; diff --git a/config/logging.php b/config/logging.php new file mode 100644 index 0000000..400bc7f --- /dev/null +++ b/config/logging.php @@ -0,0 +1,81 @@ + env('LOG_CHANNEL', 'stack'), + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | + */ + + 'channels' => [ + 'stack' => [ + 'driver' => 'stack', + 'channels' => ['single'], + ], + + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', + ], + + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', + 'days' => 7, + ], + + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => 'Laravel Log', + 'emoji' => ':boom:', + 'level' => 'critical', + ], + + 'stderr' => [ + 'driver' => 'monolog', + 'handler' => StreamHandler::class, + 'with' => [ + 'stream' => 'php://stderr', + ], + ], + + 'syslog' => [ + 'driver' => 'syslog', + 'level' => 'debug', + ], + + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => 'debug', + ], + ], + +]; diff --git a/config/queue.php b/config/queue.php index 4d83ebd..391304f 100644 --- a/config/queue.php +++ b/config/queue.php @@ -4,14 +4,12 @@ return [ /* |-------------------------------------------------------------------------- - | Default Queue Driver + | Default Queue Connection Name |-------------------------------------------------------------------------- | | Laravel's queue API supports an assortment of back-ends via a single | API, giving you convenient access to each back-end using the same - | syntax for each one. Here you may set the default queue driver. - | - | Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | syntax for every one. Here you may define a default connection. | */ @@ -26,6 +24,8 @@ return [ | is used by your application. A default configuration has been added | for each back-end shipped with Laravel. You are free to add more. | + | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | */ 'connections' => [ @@ -50,11 +50,11 @@ return [ 'sqs' => [ 'driver' => 'sqs', - 'key' => 'your-public-key', - 'secret' => 'your-secret-key', - 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', - 'queue' => 'your-queue-name', - 'region' => 'us-east-1', + 'key' => env('SQS_KEY', 'your-public-key'), + 'secret' => env('SQS_SECRET', 'your-secret-key'), + 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), + 'queue' => env('SQS_QUEUE', 'your-queue-name'), + 'region' => env('SQS_REGION', 'us-east-1'), ], 'redis' => [ @@ -62,6 +62,7 @@ return [ 'connection' => 'default', 'queue' => 'default', 'retry_after' => 90, + 'block_for' => null, ], ], diff --git a/config/services.php b/config/services.php index 4460f0e..aa1f7f8 100644 --- a/config/services.php +++ b/config/services.php @@ -22,7 +22,7 @@ return [ 'ses' => [ 'key' => env('SES_KEY'), 'secret' => env('SES_SECRET'), - 'region' => 'us-east-1', + 'region' => env('SES_REGION', 'us-east-1'), ], 'sparkpost' => [ diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 3f0fc32..c461d82 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -5,7 +5,7 @@ use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** - * Run the database seeds. + * Seed the application's database. * * @return void */ diff --git a/phpunit.xml b/phpunit.xml index e93e798..73a8266 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -9,14 +9,14 @@ processIsolation="false" stopOnFailure="false"> - - ./tests/Feature - - ./tests/Unit + + ./tests/Feature + + ./tests/Unit/MetadataResolver @@ -28,8 +28,10 @@ + + diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index edc036d..b163c42 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -18,7 +18,7 @@ return [ 'after' => 'The :attribute must be a date after :date.', 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', + 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', 'alpha_num' => 'The :attribute may only contain letters and numbers.', 'array' => 'The :attribute must be an array.', 'before' => 'The :attribute must be a date before :date.', @@ -42,6 +42,18 @@ return [ 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'numeric' => 'The :attribute must be greater than :value.', + 'file' => 'The :attribute must be greater than :value kilobytes.', + 'string' => 'The :attribute must be greater than :value characters.', + 'array' => 'The :attribute must have more than :value items.', + ], + 'gte' => [ + 'numeric' => 'The :attribute must be greater than or equal :value.', + 'file' => 'The :attribute must be greater than or equal :value kilobytes.', + 'string' => 'The :attribute must be greater than or equal :value characters.', + 'array' => 'The :attribute must have :value items or more.', + ], 'image' => 'The :attribute must be an image.', 'in' => 'The selected :attribute is invalid.', 'in_array' => 'The :attribute field does not exist in :other.', @@ -50,6 +62,18 @@ return [ 'ipv4' => 'The :attribute must be a valid IPv4 address.', 'ipv6' => 'The :attribute must be a valid IPv6 address.', 'json' => 'The :attribute must be a valid JSON string.', + 'lt' => [ + 'numeric' => 'The :attribute must be less than :value.', + 'file' => 'The :attribute must be less than :value kilobytes.', + 'string' => 'The :attribute must be less than :value characters.', + 'array' => 'The :attribute must have less than :value items.', + ], + 'lte' => [ + 'numeric' => 'The :attribute must be less than or equal :value.', + 'file' => 'The :attribute must be less than or equal :value kilobytes.', + 'string' => 'The :attribute must be less than or equal :value characters.', + 'array' => 'The :attribute must not have more than :value items.', + ], 'max' => [ 'numeric' => 'The :attribute may not be greater than :max.', 'file' => 'The :attribute may not be greater than :max kilobytes.', @@ -65,6 +89,7 @@ return [ 'array' => 'The :attribute must have at least :min items.', ], 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute format is invalid.', 'numeric' => 'The :attribute must be a number.', 'present' => 'The :attribute field must be present.', 'regex' => 'The :attribute format is invalid.', From 17ee20728115a0420ec6cff458653c08f40a7672 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 20:41:40 +0900 Subject: [PATCH 40/58] change pagination file name for La5.6 --- .../pagination/{default.blade.php => bootstrap-4.blade.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename resources/views/vendor/pagination/{default.blade.php => bootstrap-4.blade.php} (100%) diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/bootstrap-4.blade.php similarity index 100% rename from resources/views/vendor/pagination/default.blade.php rename to resources/views/vendor/pagination/bootstrap-4.blade.php From a531e5c9bb338ca0118cb85bb2c265e1ca3d37c1 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 21:34:49 +0900 Subject: [PATCH 41/58] Laravel 5.7 --- .../Auth/VerificationController.php | 41 + app/Http/Kernel.php | 19 +- app/Http/Middleware/Authenticate.php | 21 + app/Http/Middleware/VerifyCsrfToken.php | 7 + app/Providers/EventServiceProvider.php | 5 + app/User.php | 9 + bootstrap/app.php | 2 +- composer.json | 12 +- composer.lock | 729 ++++++++++++++++-- config/app.php | 15 + config/cache.php | 8 +- config/database.php | 15 +- config/hashing.php | 2 +- config/logging.php | 14 +- config/mail.php | 13 + config/queue.php | 2 +- config/services.php | 5 + config/session.php | 28 +- config/view.php | 5 +- database/factories/UserFactory.php | 4 +- resources/lang/en/validation.php | 173 +++-- storage/framework/cache/.gitignore | 1 + storage/framework/cache/data/.gitignore | 2 + 23 files changed, 974 insertions(+), 158 deletions(-) create mode 100644 app/Http/Controllers/Auth/VerificationController.php create mode 100644 app/Http/Middleware/Authenticate.php create mode 100644 storage/framework/cache/data/.gitignore diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php new file mode 100644 index 0000000..23a43a8 --- /dev/null +++ b/app/Http/Controllers/Auth/VerificationController.php @@ -0,0 +1,41 @@ +middleware('auth'); + $this->middleware('signed')->only('verify'); + $this->middleware('throttle:6,1')->only('verify', 'resend'); + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 13c5557..ff70b5a 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -57,7 +57,7 @@ class Kernel extends HttpKernel * @var array */ protected $routeMiddleware = [ - 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, + 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, @@ -65,5 +65,22 @@ class Kernel extends HttpKernel 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + ]; + + /** + * The priority-sorted list of middleware. + * + * This forces non-global middleware to always be in the given order. + * + * @var array + */ + protected $middlewarePriority = [ + \Illuminate\Session\Middleware\StartSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\Authenticate::class, + \Illuminate\Session\Middleware\AuthenticateSession::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + \Illuminate\Auth\Middleware\Authorize::class, ]; } diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php new file mode 100644 index 0000000..a4be5c5 --- /dev/null +++ b/app/Http/Middleware/Authenticate.php @@ -0,0 +1,21 @@ +expectsJson()) { + return route('login'); + } + } +} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index a2c3541..ba38f18 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -6,6 +6,13 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier; class VerifyCsrfToken extends BaseVerifier { + /** + * Indicates whether the XSRF-TOKEN cookie should be set on the response. + * + * @var bool + */ + protected $addHttpCookie = true; + /** * The URIs that should be excluded from CSRF verification. * diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 2993781..1b5b2c5 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -2,6 +2,8 @@ namespace App\Providers; +use Illuminate\Auth\Events\Registered; +use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Event; @@ -13,6 +15,9 @@ class EventServiceProvider extends ServiceProvider * @var array */ protected $listen = [ + Registered::class => [ + SendEmailVerificationNotification::class, + ], 'App\Events\LinkDiscovered' => [ 'App\Listeners\LinkCollector' ] diff --git a/app/User.php b/app/User.php index c82e5d0..6d6f09e 100644 --- a/app/User.php +++ b/app/User.php @@ -32,6 +32,15 @@ class User extends Authenticatable 'password', 'remember_token', ]; + /** + * The attributes that should be cast to native types. + * + * @var array + */ + protected $casts = [ + // 'email_verified_at' => 'datetime', + ]; + /** * このユーザのメールアドレスから、Gravatarの画像URLを生成します。 * @param int $size 画像サイズ diff --git a/bootstrap/app.php b/bootstrap/app.php index f2801ad..037e17d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -12,7 +12,7 @@ */ $app = new Illuminate\Foundation\Application( - realpath(__DIR__.'/../') + $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ); /* diff --git a/composer.json b/composer.json index 6718838..f0e5208 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "jakeasmith/http_build_url": "^1.0", - "laravel/framework": "5.6.*", + "laravel/framework": "5.7.*", "laravel/tinker": "^1.0", "league/csv": "^9.5", "misd/linkify": "^1.1", @@ -29,6 +29,7 @@ "require-dev": { "barryvdh/laravel-debugbar": "^3.1", "barryvdh/laravel-ide-helper": "^2.5", + "beyondcode/laravel-dump-server": "^1.0", "filp/whoops": "^2.0", "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "^1.4", @@ -55,11 +56,11 @@ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ - "@php artisan key:generate" + "@php artisan key:generate --ansi" ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", - "@php artisan package:discover" + "@php artisan package:discover --ansi" ], "fix": [ "php-cs-fixer fix --config=.php_cs.dist" @@ -73,6 +74,11 @@ "sort-packages": true, "optimize-autoloader": true }, + "extra": { + "laravel": { + "dont-discover": [] + } + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/composer.lock b/composer.lock index 3696733..0c2a231 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b441e891b65afad93592d31276507d01", + "content-hash": "2bdf14eca5656a5e32af355898866bc3", "packages": [ { "name": "anhskohbo/no-captcha", @@ -1062,42 +1062,45 @@ }, { "name": "laravel/framework", - "version": "v5.6.40", + "version": "v5.7.29", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "5ceadf91f13be89a3338c3d4166a4676272a23bf" + "reference": "2555bf6ef6e6739e5f49f4a5d40f6264c57abd56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/5ceadf91f13be89a3338c3d4166a4676272a23bf", - "reference": "5ceadf91f13be89a3338c3d4166a4676272a23bf", + "url": "https://api.github.com/repos/laravel/framework/zipball/2555bf6ef6e6739e5f49f4a5d40f6264c57abd56", + "reference": "2555bf6ef6e6739e5f49f4a5d40f6264c57abd56", "shasum": "" }, "require": { - "doctrine/inflector": "~1.1", - "dragonmantank/cron-expression": "~2.0", - "erusev/parsedown": "~1.7", + "doctrine/inflector": "^1.1", + "dragonmantank/cron-expression": "^2.0", + "erusev/parsedown": "^1.7", "ext-mbstring": "*", "ext-openssl": "*", + "laravel/nexmo-notification-channel": "^1.0", + "laravel/slack-notification-channel": "^1.0", "league/flysystem": "^1.0.8", - "monolog/monolog": "~1.12", - "nesbot/carbon": "1.26.*", + "monolog/monolog": "^1.12", + "nesbot/carbon": "^1.26.3", + "opis/closure": "^3.1", "php": "^7.1.3", - "psr/container": "~1.0", + "psr/container": "^1.0", "psr/simple-cache": "^1.0", "ramsey/uuid": "^3.7", - "swiftmailer/swiftmailer": "~6.0", - "symfony/console": "~4.0", - "symfony/debug": "~4.0", - "symfony/finder": "~4.0", - "symfony/http-foundation": "~4.0", - "symfony/http-kernel": "~4.0", - "symfony/process": "~4.0", - "symfony/routing": "~4.0", - "symfony/var-dumper": "~4.0", + "swiftmailer/swiftmailer": "^6.0", + "symfony/console": "^4.1", + "symfony/debug": "^4.1", + "symfony/finder": "^4.1", + "symfony/http-foundation": "^4.1", + "symfony/http-kernel": "^4.1", + "symfony/process": "^4.1", + "symfony/routing": "^4.1", + "symfony/var-dumper": "^4.1", "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "~2.2" + "vlucas/phpdotenv": "^2.2" }, "conflict": { "tightenco/collect": "<5.5.33" @@ -1133,43 +1136,47 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "~3.0", - "doctrine/dbal": "~2.6", + "aws/aws-sdk-php": "^3.0", + "doctrine/dbal": "^2.6", "filp/whoops": "^2.1.4", - "league/flysystem-cached-adapter": "~1.0", - "mockery/mockery": "~1.0", + "guzzlehttp/guzzle": "^6.3", + "league/flysystem-cached-adapter": "^1.0", + "mockery/mockery": "^1.0", "moontoast/math": "^1.1", - "orchestra/testbench-core": "3.6.*", - "pda/pheanstalk": "~3.0", - "phpunit/phpunit": "~7.0", + "orchestra/testbench-core": "3.7.*", + "pda/pheanstalk": "^3.0|^4.0", + "phpunit/phpunit": "^7.5", "predis/predis": "^1.1.1", - "symfony/css-selector": "~4.0", - "symfony/dom-crawler": "~4.0" + "symfony/css-selector": "^4.1", + "symfony/dom-crawler": "^4.1", + "true/punycode": "^2.1" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.6).", + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", - "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", - "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", - "laravel/tinker": "Required to use the tinker console command (~1.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", - "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0).", - "nexmo/client": "Required to use the Nexmo transport (~1.0).", - "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 (~3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (~4.0).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~4.0).", - "symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)." + "filp/whoops": "Required for friendly error pages in development (^2.1.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (^6.0).", + "laravel/tinker": "Required to use the tinker console command (^1.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", + "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "nexmo/client": "Required to use the Nexmo transport (^1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^3.0|^4.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 (^3.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.1).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.1).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (^1.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.6-dev" + "dev-master": "5.7-dev" } }, "autoload": { @@ -1197,7 +1204,121 @@ "framework", "laravel" ], - "time": "2020-04-14T14:16:50+00:00" + "time": "2020-04-14T14:16:19+00:00" + }, + { + "name": "laravel/nexmo-notification-channel", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/nexmo-notification-channel.git", + "reference": "03edd42a55b306ff980c9950899d5a2b03260d48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/nexmo-notification-channel/zipball/03edd42a55b306ff980c9950899d5a2b03260d48", + "reference": "03edd42a55b306ff980c9950899d5a2b03260d48", + "shasum": "" + }, + "require": { + "nexmo/client": "^1.0", + "php": "^7.1.3" + }, + "require-dev": { + "illuminate/notifications": "~5.7", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Illuminate\\Notifications\\NexmoChannelServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Notifications\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Nexmo Notification Channel for laravel.", + "keywords": [ + "laravel", + "nexmo", + "notifications" + ], + "time": "2018-12-04T12:57:08+00:00" + }, + { + "name": "laravel/slack-notification-channel", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/laravel/slack-notification-channel.git", + "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/6e164293b754a95f246faf50ab2bbea3e4923cc9", + "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": "^7.1.3" + }, + "require-dev": { + "illuminate/notifications": "~5.7", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Illuminate\\Notifications\\SlackChannelServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Notifications\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Slack Notification Channel for laravel.", + "keywords": [ + "laravel", + "notifications", + "slack" + ], + "time": "2018-12-12T13:12:06+00:00" }, { "name": "laravel/tinker", @@ -1262,6 +1383,61 @@ ], "time": "2019-08-07T15:10:45+00:00" }, + { + "name": "lcobucci/jwt", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/jwt.git", + "reference": "56f10808089e38623345e28af2f2d5e4eb579455" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/56f10808089e38623345e28af2f2d5e4eb579455", + "reference": "56f10808089e38623345e28af2f2d5e4eb579455", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-openssl": "*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "mikey179/vfsstream": "~1.5", + "phpmd/phpmd": "~2.2", + "phpunit/php-invoker": "~1.1", + "phpunit/phpunit": "^5.7 || ^7.3", + "squizlabs/php_codesniffer": "~2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Otávio Cobucci Oblonczyk", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "time": "2020-05-22T08:21:12+00:00" + }, { "name": "league/csv", "version": "9.6.0", @@ -1541,16 +1717,16 @@ }, { "name": "nesbot/carbon", - "version": "1.26.6", + "version": "1.39.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "c6820f814496d71da7498d423427e6193d1f57c9" + "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c6820f814496d71da7498d423427e6193d1f57c9", - "reference": "c6820f814496d71da7498d423427e6193d1f57c9", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4be0c005164249208ce1b5ca633cd57bdd42ff33", + "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33", "shasum": "" }, "require": { @@ -1568,7 +1744,12 @@ ], "type": "library", "extra": { - "update-helper": "Carbon\\Upgrade" + "update-helper": "Carbon\\Upgrade", + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + } }, "autoload": { "psr-4": { @@ -1593,7 +1774,100 @@ "datetime", "time" ], - "time": "2019-06-03T15:42:58+00:00" + "time": "2019-10-14T05:51:36+00:00" + }, + { + "name": "nexmo/client", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/Nexmo/nexmo-php-complete.git", + "reference": "c6d11d953c8c5594590bb9ebaba9616e76948f93" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Nexmo/nexmo-php-complete/zipball/c6d11d953c8c5594590bb9ebaba9616e76948f93", + "reference": "c6d11d953c8c5594590bb9ebaba9616e76948f93", + "shasum": "" + }, + "require": { + "nexmo/client-core": "^1.0", + "php": ">=5.6", + "php-http/guzzle6-adapter": "^1.0" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tim Lytle", + "email": "tim@nexmo.com", + "homepage": "http://twitter.com/tjlytle", + "role": "Developer" + }, + { + "name": "Michael Heap", + "email": "michael.heap@vonage.com", + "role": "Developer" + }, + { + "name": "Lorna Mitchell", + "email": "lorna.mitchell@vonage.com", + "role": "Developer" + } + ], + "description": "PHP Client for using Nexmo's API.", + "time": "2019-11-26T15:25:11+00:00" + }, + { + "name": "nexmo/client-core", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/Nexmo/nexmo-php.git", + "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/182d41a02ebd3e4be147baea45458ccfe2f528c4", + "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4", + "shasum": "" + }, + "require": { + "lcobucci/jwt": "^3.2", + "php": ">=5.6", + "php-http/client-implementation": "^1.0", + "php-http/guzzle6-adapter": "^1.0", + "zendframework/zend-diactoros": "^1.8.4 || ^2.0" + }, + "require-dev": { + "estahn/phpunit-json-assertions": "^1.0.0", + "php-http/mock-client": "^0.3.0", + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Nexmo\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tim Lytle", + "email": "tim@nexmo.com", + "homepage": "http://twitter.com/tjlytle", + "role": "Developer" + } + ], + "description": "PHP Client for using Nexmo's API.", + "time": "2019-05-13T20:27:43+00:00" }, { "name": "nikic/php-parser", @@ -1688,6 +1962,67 @@ }, "time": "2012-11-21T12:10:21+00:00" }, + { + "name": "opis/closure", + "version": "3.5.2", + "source": { + "type": "git", + "url": "https://github.com/opis/closure.git", + "reference": "2e3299cea6f485ca64d19c540f46d7896c512ace" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opis/closure/zipball/2e3299cea6f485ca64d19c540f46d7896c512ace", + "reference": "2e3299cea6f485ca64d19c540f46d7896c512ace", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0" + }, + "require-dev": { + "jeremeamia/superclosure": "^2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Opis\\Closure\\": "src/" + }, + "files": [ + "functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marius Sarca", + "email": "marius.sarca@gmail.com" + }, + { + "name": "Sorin Sarca", + "email": "sarca_sorin@hotmail.com" + } + ], + "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", + "homepage": "https://opis.io/closure", + "keywords": [ + "anonymous functions", + "closure", + "function", + "serializable", + "serialization", + "serialize" + ], + "time": "2020-05-21T20:09:36+00:00" + }, { "name": "paragonie/random_compat", "version": "v9.99.99", @@ -1733,6 +2068,172 @@ ], "time": "2018-07-02T15:55:56+00:00" }, + { + "name": "php-http/guzzle6-adapter", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-http/guzzle6-adapter.git", + "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", + "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": ">=5.5.0", + "php-http/httplug": "^1.0" + }, + "provide": { + "php-http/async-client-implementation": "1.0", + "php-http/client-implementation": "1.0" + }, + "require-dev": { + "ext-curl": "*", + "php-http/adapter-integration-tests": "^0.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Adapter\\Guzzle6\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "David de Boer", + "email": "david@ddeboer.nl" + } + ], + "description": "Guzzle 6 HTTP Adapter", + "homepage": "http://httplug.io", + "keywords": [ + "Guzzle", + "http" + ], + "time": "2016-05-10T06:13:32+00:00" + }, + { + "name": "php-http/httplug", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/httplug.git", + "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/httplug/zipball/1c6381726c18579c4ca2ef1ec1498fdae8bdf018", + "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "php-http/promise": "^1.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eric GELOEN", + "email": "geloen.eric@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTPlug, the HTTP client abstraction for PHP", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "http" + ], + "time": "2016-08-31T08:30:17+00:00" + }, + { + "name": "php-http/promise", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/promise.git", + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", + "shasum": "" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" + } + ], + "description": "Promise used for asynchronous HTTP requests", + "homepage": "http://httplug.io", + "keywords": [ + "promise" + ], + "time": "2016-01-26T13:27:02+00:00" + }, { "name": "psr/container", "version": "1.0.0", @@ -1782,6 +2283,58 @@ ], "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2019-04-30T12:38:16+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -3771,6 +4324,74 @@ "environment" ], "time": "2020-05-02T13:38:00+00:00" + }, + { + "name": "zendframework/zend-diactoros", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "de5847b068362a88684a55b0dbb40d85986cfa52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/de5847b068362a88684a55b0dbb40d85986cfa52", + "reference": "de5847b068362a88684a55b0dbb40d85986cfa52", + "shasum": "" + }, + "require": { + "php": "^7.1", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-curl": "*", + "ext-dom": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.5.0", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^7.0.2", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev", + "dev-develop": "2.2.x-dev", + "dev-release-1.8": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], + "psr-4": { + "Zend\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "keywords": [ + "http", + "psr", + "psr-7" + ], + "abandoned": "laminas/laminas-diactoros", + "time": "2019-11-13T19:16:13+00:00" } ], "packages-dev": [ diff --git a/config/app.php b/config/app.php index e8f2f52..3a39c17 100644 --- a/config/app.php +++ b/config/app.php @@ -53,6 +53,8 @@ return [ 'url' => env('APP_URL', 'http://localhost'), + 'asset_url' => env('ASSET_URL', null), + /* |-------------------------------------------------------------------------- | Application Timezone @@ -92,6 +94,19 @@ return [ 'fallback_locale' => 'en', + /* + |-------------------------------------------------------------------------- + | Faker Locale + |-------------------------------------------------------------------------- + | + | This locale will be used by the Faker PHP library when generating fake + | data for your database seeds. For example, this will be used to get + | localized telephone numbers, street address information and more. + | + */ + + 'faker_locale' => 'en_US', + /* |-------------------------------------------------------------------------- | Encryption Key diff --git a/config/cache.php b/config/cache.php index e87f032..4f0b3c4 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,5 +1,7 @@ [ - // Memcached::OPT_CONNECT_TIMEOUT => 2000, + // Memcached::OPT_CONNECT_TIMEOUT => 2000, ], 'servers' => [ [ @@ -70,7 +72,7 @@ return [ 'redis' => [ 'driver' => 'redis', - 'connection' => 'default', + 'connection' => 'cache', ], ], @@ -86,6 +88,6 @@ return [ | */ - 'prefix' => 'laravel', + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), ]; diff --git a/config/database.php b/config/database.php index cab5d06..22347a4 100644 --- a/config/database.php +++ b/config/database.php @@ -37,6 +37,7 @@ return [ 'driver' => 'sqlite', 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', + 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), ], 'mysql' => [ @@ -50,6 +51,7 @@ return [ 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', + 'prefix_indexes' => true, 'strict' => true, 'engine' => null, ], @@ -63,6 +65,7 @@ return [ 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', + 'prefix_indexes' => true, 'schema' => 'public', 'sslmode' => 'prefer', ], @@ -76,6 +79,7 @@ return [ 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', + 'prefix_indexes' => true, ], ], @@ -99,7 +103,7 @@ return [ |-------------------------------------------------------------------------- | | Redis is an open source, fast, and advanced key-value store that also - | provides a richer set of commands than a typical key-value systems + | provides a richer body of commands than a typical key-value system | such as APC or Memcached. Laravel makes it easy to dig right in. | */ @@ -112,7 +116,14 @@ return [ 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), - 'database' => 0, + 'database' => env('REDIS_DB', 0), + ], + + 'cache' => [ + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'password' => env('REDIS_PASSWORD', null), + 'port' => env('REDIS_PORT', 6379), + 'database' => env('REDIS_CACHE_DB', 1), ], ], diff --git a/config/hashing.php b/config/hashing.php index d3c8e2f..8425770 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -11,7 +11,7 @@ return [ | passwords for your application. By default, the bcrypt algorithm is | used; however, you remain free to modify this option if you wish. | - | Supported: "bcrypt", "argon" + | Supported: "bcrypt", "argon", "argon2id" | */ diff --git a/config/logging.php b/config/logging.php index 400bc7f..6608792 100644 --- a/config/logging.php +++ b/config/logging.php @@ -1,6 +1,7 @@ 'daily', 'path' => storage_path('logs/laravel.log'), 'level' => 'debug', - 'days' => 7, + 'days' => 14, ], 'slack' => [ @@ -59,9 +60,20 @@ return [ 'level' => 'critical', ], + 'papertrail' => [ + 'driver' => 'monolog', + 'level' => 'debug', + 'handler' => SyslogUdpHandler::class, + 'handler_with' => [ + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), + ], + ], + 'stderr' => [ 'driver' => 'monolog', 'handler' => StreamHandler::class, + 'formatter' => env('LOG_STDERR_FORMATTER'), 'with' => [ 'stream' => 'php://stderr', ], diff --git a/config/mail.php b/config/mail.php index bb92224..f400645 100644 --- a/config/mail.php +++ b/config/mail.php @@ -120,4 +120,17 @@ return [ ], ], + /* + |-------------------------------------------------------------------------- + | Log Channel + |-------------------------------------------------------------------------- + | + | If you are using the "log" driver, you may specify the logging channel + | if you prefer to keep mail messages separate from other log entries + | for simpler reading. Otherwise, the default channel will be used. + | + */ + + 'log_channel' => env('MAIL_LOG_CHANNEL'), + ]; diff --git a/config/queue.php b/config/queue.php index 391304f..6688397 100644 --- a/config/queue.php +++ b/config/queue.php @@ -37,7 +37,7 @@ return [ 'database' => [ 'driver' => 'database', 'table' => 'jobs', - 'queue' => 'default', + 'queue' => env('REDIS_QUEUE', 'default'), 'retry_after' => 90, ], diff --git a/config/services.php b/config/services.php index aa1f7f8..e7a78f5 100644 --- a/config/services.php +++ b/config/services.php @@ -17,12 +17,17 @@ return [ 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), + 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), ], 'ses' => [ 'key' => env('SES_KEY'), 'secret' => env('SES_SECRET'), 'region' => env('SES_REGION', 'us-east-1'), + 'webhook' => [ + 'secret' => env('STRIPE_WEBHOOK_SECRET'), + 'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300), + ], ], 'sparkpost' => [ diff --git a/config/session.php b/config/session.php index e2779ad..fae302a 100644 --- a/config/session.php +++ b/config/session.php @@ -1,5 +1,7 @@ 120, + 'lifetime' => env('SESSION_LIFETIME', 120), 'expire_on_close' => false, @@ -70,7 +72,7 @@ return [ | */ - 'connection' => null, + 'connection' => env('SESSION_CONNECTION', null), /* |-------------------------------------------------------------------------- @@ -96,7 +98,7 @@ return [ | */ - 'store' => null, + 'store' => env('SESSION_STORE', null), /* |-------------------------------------------------------------------------- @@ -122,7 +124,10 @@ return [ | */ - 'cookie' => 'laravel_session', + 'cookie' => env( + 'SESSION_COOKIE', + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' + ), /* |-------------------------------------------------------------------------- @@ -176,4 +181,19 @@ return [ 'http_only' => true, + /* + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | This option determines how your cookies behave when cross-site requests + | take place, and can be used to mitigate CSRF attacks. By default, we + | do not enable this as other CSRF protection services are in place. + | + | Supported: "lax", "strict" + | + */ + + 'same_site' => null, + ]; diff --git a/config/view.php b/config/view.php index 2acfd9c..22b8a18 100644 --- a/config/view.php +++ b/config/view.php @@ -28,6 +28,9 @@ return [ | */ - 'compiled' => realpath(storage_path('framework/views')), + 'compiled' => env( + 'VIEW_COMPILED_PATH', + realpath(storage_path('framework/views')) + ), ]; diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index fed18ec..bbb7a6b 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -1,6 +1,8 @@ define(App\User::class, function (Faker\Generator $faker) { static $password; @@ -8,7 +10,7 @@ $factory->define(App\User::class, function (Faker\Generator $faker) { 'name' => substr($faker->userName, 0, 15), 'email' => $faker->unique()->safeEmail, 'password' => $password ?: $password = bcrypt('secret'), - 'remember_token' => str_random(10), + 'remember_token' => Str::random(10), 'display_name' => substr($faker->name, 0, 20), 'is_protected' => false, 'accept_analytics' => false, diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index b163c42..8ab929c 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -13,105 +13,108 @@ return [ | */ - 'accepted' => 'The :attribute must be accepted.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', - 'between' => [ + 'accepted' => 'The :attribute must be accepted.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', + 'alpha' => 'The :attribute may only contain letters.', + 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', + 'alpha_num' => 'The :attribute may only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'before' => 'The :attribute must be a date before :date.', + 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'between' => [ 'numeric' => 'The :attribute must be between :min and :max.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'string' => 'The :attribute must be between :min and :max characters.', + 'array' => 'The :attribute must have between :min and :max items.', ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'date' => 'The :attribute is not a valid date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'email' => 'The :attribute must be a valid email address.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field must have a value.', - 'gt' => [ + 'boolean' => 'The :attribute field must be true or false.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'date' => 'The :attribute is not a valid date.', + 'date_equals' => 'The :attribute must be a date equal to :date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', + 'digits_between' => 'The :attribute must be between :min and :max digits.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'email' => 'The :attribute must be a valid email address.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ 'numeric' => 'The :attribute must be greater than :value.', - 'file' => 'The :attribute must be greater than :value kilobytes.', - 'string' => 'The :attribute must be greater than :value characters.', - 'array' => 'The :attribute must have more than :value items.', + 'file' => 'The :attribute must be greater than :value kilobytes.', + 'string' => 'The :attribute must be greater than :value characters.', + 'array' => 'The :attribute must have more than :value items.', ], - 'gte' => [ + 'gte' => [ 'numeric' => 'The :attribute must be greater than or equal :value.', - 'file' => 'The :attribute must be greater than or equal :value kilobytes.', - 'string' => 'The :attribute must be greater than or equal :value characters.', - 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal :value kilobytes.', + 'string' => 'The :attribute must be greater than or equal :value characters.', + 'array' => 'The :attribute must have :value items or more.', ], - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'lt' => [ + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'ipv4' => 'The :attribute must be a valid IPv4 address.', + 'ipv6' => 'The :attribute must be a valid IPv6 address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'lt' => [ 'numeric' => 'The :attribute must be less than :value.', - 'file' => 'The :attribute must be less than :value kilobytes.', - 'string' => 'The :attribute must be less than :value characters.', - 'array' => 'The :attribute must have less than :value items.', + 'file' => 'The :attribute must be less than :value kilobytes.', + 'string' => 'The :attribute must be less than :value characters.', + 'array' => 'The :attribute must have less than :value items.', ], - 'lte' => [ + 'lte' => [ 'numeric' => 'The :attribute must be less than or equal :value.', - 'file' => 'The :attribute must be less than or equal :value kilobytes.', - 'string' => 'The :attribute must be less than or equal :value characters.', - 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal :value kilobytes.', + 'string' => 'The :attribute must be less than or equal :value characters.', + 'array' => 'The :attribute must not have more than :value items.', ], - 'max' => [ + 'max' => [ 'numeric' => 'The :attribute may not be greater than :max.', - 'file' => 'The :attribute may not be greater than :max kilobytes.', - 'string' => 'The :attribute may not be greater than :max characters.', - 'array' => 'The :attribute may not have more than :max items.', + 'file' => 'The :attribute may not be greater than :max kilobytes.', + 'string' => 'The :attribute may not be greater than :max characters.', + 'array' => 'The :attribute may not have more than :max items.', ], - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ + 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'min' => [ 'numeric' => 'The :attribute must be at least :min.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', + 'file' => 'The :attribute must be at least :min kilobytes.', + 'string' => 'The :attribute must be at least :min characters.', + 'array' => 'The :attribute must have at least :min items.', ], - 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute format is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'present' => 'The :attribute field must be present.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_if' => 'The :attribute field is required when :other is :value.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values is present.', - 'required_without' => 'The :attribute field is required when :values is not present.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute format is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'present' => 'The :attribute field must be present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ + 'same' => 'The :attribute and :other must match.', + 'size' => [ 'numeric' => 'The :attribute must be :size.', - 'file' => 'The :attribute must be :size kilobytes.', - 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', + 'file' => 'The :attribute must be :size kilobytes.', + 'string' => 'The :attribute must be :size characters.', + 'array' => 'The :attribute must contain :size items.', ], - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid zone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute format is invalid.', + 'starts_with' => 'The :attribute must start with one of the following: :values', + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid zone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'url' => 'The :attribute format is invalid.', + 'uuid' => 'The :attribute must be a valid UUID.', /* |-------------------------------------------------------------------------- @@ -135,9 +138,9 @@ return [ | Custom Validation Attributes |-------------------------------------------------------------------------- | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. | */ diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore index d6b7ef3..01e4a6c 100644 --- a/storage/framework/cache/.gitignore +++ b/storage/framework/cache/.gitignore @@ -1,2 +1,3 @@ * +!data/ !.gitignore diff --git a/storage/framework/cache/data/.gitignore b/storage/framework/cache/data/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/framework/cache/data/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore From cb4dacdaf6fe4affb606c32b9edede76ae274765 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 21:36:22 +0900 Subject: [PATCH 42/58] =?UTF-8?q?composer=20update=E5=BF=98=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.lock | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 0c2a231..9d942d1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2bdf14eca5656a5e32af355898866bc3", + "content-hash": "fb41abd14b58e0380b2366dd85b1b53f", "packages": [ { "name": "anhskohbo/no-captcha", @@ -4583,6 +4583,67 @@ ], "time": "2018-12-13T10:34:14+00:00" }, + { + "name": "beyondcode/laravel-dump-server", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/beyondcode/laravel-dump-server.git", + "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/beyondcode/laravel-dump-server/zipball/fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", + "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", + "shasum": "" + }, + "require": { + "illuminate/console": "5.6.*|5.7.*|5.8.*|^6.0", + "illuminate/http": "5.6.*|5.7.*|5.8.*|^6.0", + "illuminate/support": "5.6.*|5.7.*|5.8.*|^6.0", + "php": "^7.1", + "symfony/var-dumper": "^4.1.1" + }, + "require-dev": { + "larapack/dd": "^1.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BeyondCode\\DumpServer\\DumpServerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BeyondCode\\DumpServer\\": "src" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marcel Pociot", + "email": "marcel@beyondco.de", + "homepage": "https://beyondco.de", + "role": "Developer" + } + ], + "description": "Symfony Var-Dump Server for Laravel", + "homepage": "https://github.com/beyondcode/laravel-dump-server", + "keywords": [ + "beyondcode", + "laravel-dump-server" + ], + "time": "2019-08-11T13:17:40+00:00" + }, { "name": "composer/ca-bundle", "version": "1.2.7", From a48fe596e197f237f00ffc09b54e9f910e905bd8 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 22:17:07 +0900 Subject: [PATCH 43/58] Laravel 5.8 --- .env.example | 5 + .gitignore | 1 + .../Controllers/Auth/RegisterController.php | 2 +- app/Http/Kernel.php | 2 +- app/Http/Middleware/TrustProxies.php | 2 +- composer.json | 6 +- composer.lock | 734 +++--------------- config/app.php | 2 + config/auth.php | 1 + config/broadcasting.php | 3 +- config/cache.php | 12 +- config/database.php | 18 +- config/mail.php | 2 +- config/queue.php | 13 +- config/services.php | 26 +- database/.gitignore | 1 + resources/lang/en/passwords.php | 2 +- resources/lang/en/validation.php | 1 + .../MetadataResolver/CienResolverTest.php | 2 +- .../MetadataResolver/DLsiteResolverTest.php | 2 +- .../DeviantArtResolverTest.php | 2 +- .../FC2ContentsResolverTest.php | 2 +- .../MetadataResolver/FantiaResolverTest.php | 2 +- .../MetadataResolver/FanzaResolverTest.php | 2 +- .../HentaiFoundryResolverTest.php | 2 +- .../MetadataResolver/IwaraResolverTest.php | 2 +- .../Kb10uyShortStoryServerResolverTest.php | 2 +- .../MetadataResolver/KomifloResolverTest.php | 2 +- .../NicoSeigaResolverTest.php | 2 +- .../MetadataResolver/NijieResolverTest.php | 2 +- .../MetadataResolver/PixivResolverTest.php | 2 +- .../MetadataResolver/PlurkResolverTest.php | 2 +- .../MetadataResolver/SteamResolverTest.php | 2 +- .../ToranoanaResolverTest.php | 2 +- .../MetadataResolver/XtubeResolverTest.php | 2 +- .../Unit/Services/CheckinCsvImporterTest.php | 2 +- 36 files changed, 189 insertions(+), 680 deletions(-) diff --git a/.env.example b/.env.example index 7b0640d..44d46ca 100644 --- a/.env.example +++ b/.env.example @@ -34,6 +34,11 @@ MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=support@mail.shikorism.net MAIL_FROM_NAME=Tissue +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= + SPARKPOST_SECRET= PUSHER_APP_ID= diff --git a/.gitignore b/.gitignore index 87cdc86..3aacc02 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ Homestead.yaml npm-debug.log yarn-error.log .env +.env.backup .phpunit.result.cache *.iml .php_cs diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 0e302d5..2cf23a0 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -51,7 +51,7 @@ class RegisterController extends Controller $rules = [ 'name' => 'required|string|regex:/^[a-zA-Z0-9_-]+$/u|max:15|unique:users|unique:deactivated_users', 'email' => 'required|string|email|max:255|unique:users', - 'password' => 'required|string|min:6|confirmed' + 'password' => 'required|string|min:8|confirmed' ]; // reCAPTCHAのキーが設定されている場合、判定を有効化 diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index ff70b5a..7abf46b 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -14,11 +14,11 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ + \App\Http\Middleware\TrustProxies::class, \App\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, - \App\Http\Middleware\TrustProxies::class, ]; /** diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 709ce25..fc420d9 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -10,7 +10,7 @@ class TrustProxies extends Middleware /** * The trusted proxies for this application. * - * @var array + * @var array|string */ protected $proxies = '**'; diff --git a/composer.json b/composer.json index f0e5208..5500b2e 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "jakeasmith/http_build_url": "^1.0", - "laravel/framework": "5.7.*", + "laravel/framework": "5.8.*", "laravel/tinker": "^1.0", "league/csv": "^9.5", "misd/linkify": "^1.1", @@ -34,8 +34,8 @@ "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", - "nunomaduro/collision": "^2.0", - "phpunit/phpunit": "^7.0", + "nunomaduro/collision": "^3.0", + "phpunit/phpunit": "^7.5", "symfony/thanks": "^1.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index 9d942d1..8b121b2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fb41abd14b58e0380b2366dd85b1b53f", + "content-hash": "8e40990be77020dd403c97219cfe111d", "packages": [ { "name": "anhskohbo/no-captcha", @@ -1015,92 +1015,47 @@ "abandoned": "php-parallel-lint/php-console-highlighter", "time": "2018-09-29T18:48:56+00:00" }, - { - "name": "kylekatarnls/update-helper", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/kylekatarnls/update-helper.git", - "reference": "429be50660ed8a196e0798e5939760f168ec8ce9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/429be50660ed8a196e0798e5939760f168ec8ce9", - "reference": "429be50660ed8a196e0798e5939760f168ec8ce9", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0.0", - "php": ">=5.3.0" - }, - "require-dev": { - "codeclimate/php-test-reporter": "dev-master", - "composer/composer": "2.0.x-dev || ^2.0.0-dev", - "phpunit/phpunit": ">=4.8.35 <6.0" - }, - "type": "composer-plugin", - "extra": { - "class": "UpdateHelper\\ComposerPlugin" - }, - "autoload": { - "psr-0": { - "UpdateHelper\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kyle", - "email": "kylekatarnls@gmail.com" - } - ], - "description": "Update helper", - "time": "2020-04-07T20:44:10+00:00" - }, { "name": "laravel/framework", - "version": "v5.7.29", + "version": "v5.8.38", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "2555bf6ef6e6739e5f49f4a5d40f6264c57abd56" + "reference": "78eb4dabcc03e189620c16f436358d41d31ae11f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/2555bf6ef6e6739e5f49f4a5d40f6264c57abd56", - "reference": "2555bf6ef6e6739e5f49f4a5d40f6264c57abd56", + "url": "https://api.github.com/repos/laravel/framework/zipball/78eb4dabcc03e189620c16f436358d41d31ae11f", + "reference": "78eb4dabcc03e189620c16f436358d41d31ae11f", "shasum": "" }, "require": { "doctrine/inflector": "^1.1", "dragonmantank/cron-expression": "^2.0", + "egulias/email-validator": "^2.0", "erusev/parsedown": "^1.7", + "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "laravel/nexmo-notification-channel": "^1.0", - "laravel/slack-notification-channel": "^1.0", "league/flysystem": "^1.0.8", "monolog/monolog": "^1.12", - "nesbot/carbon": "^1.26.3", + "nesbot/carbon": "^1.26.3 || ^2.0", "opis/closure": "^3.1", "php": "^7.1.3", "psr/container": "^1.0", "psr/simple-cache": "^1.0", "ramsey/uuid": "^3.7", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.1", - "symfony/debug": "^4.1", - "symfony/finder": "^4.1", - "symfony/http-foundation": "^4.1", - "symfony/http-kernel": "^4.1", - "symfony/process": "^4.1", - "symfony/routing": "^4.1", - "symfony/var-dumper": "^4.1", + "symfony/console": "^4.2", + "symfony/debug": "^4.2", + "symfony/finder": "^4.2", + "symfony/http-foundation": "^4.2", + "symfony/http-kernel": "^4.2", + "symfony/process": "^4.2", + "symfony/routing": "^4.2", + "symfony/var-dumper": "^4.2", "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "^2.2" + "vlucas/phpdotenv": "^3.3" }, "conflict": { "tightenco/collect": "<5.5.33" @@ -1143,17 +1098,18 @@ "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.0", "moontoast/math": "^1.1", - "orchestra/testbench-core": "3.7.*", - "pda/pheanstalk": "^3.0|^4.0", - "phpunit/phpunit": "^7.5", + "orchestra/testbench-core": "3.8.*", + "pda/pheanstalk": "^4.0", + "phpunit/phpunit": "^7.5|^8.0", "predis/predis": "^1.1.1", - "symfony/css-selector": "^4.1", - "symfony/dom-crawler": "^4.1", + "symfony/css-selector": "^4.2", + "symfony/dom-crawler": "^4.2", "true/punycode": "^2.1" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", "filp/whoops": "Required for friendly error pages in development (^2.1.4).", @@ -1166,17 +1122,18 @@ "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", "nexmo/client": "Required to use the Nexmo transport (^1.0).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (^3.0|^4.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.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 (^3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.1).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.1).", - "symfony/psr-http-message-bridge": "Required to psr7 bridging features (^1.0)." + "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.2).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.2).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.1).", + "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.7-dev" + "dev-master": "5.8-dev" } }, "autoload": { @@ -1204,121 +1161,7 @@ "framework", "laravel" ], - "time": "2020-04-14T14:16:19+00:00" - }, - { - "name": "laravel/nexmo-notification-channel", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/laravel/nexmo-notification-channel.git", - "reference": "03edd42a55b306ff980c9950899d5a2b03260d48" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/nexmo-notification-channel/zipball/03edd42a55b306ff980c9950899d5a2b03260d48", - "reference": "03edd42a55b306ff980c9950899d5a2b03260d48", - "shasum": "" - }, - "require": { - "nexmo/client": "^1.0", - "php": "^7.1.3" - }, - "require-dev": { - "illuminate/notifications": "~5.7", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Illuminate\\Notifications\\NexmoChannelServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Notifications\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Nexmo Notification Channel for laravel.", - "keywords": [ - "laravel", - "nexmo", - "notifications" - ], - "time": "2018-12-04T12:57:08+00:00" - }, - { - "name": "laravel/slack-notification-channel", - "version": "v1.0.3", - "source": { - "type": "git", - "url": "https://github.com/laravel/slack-notification-channel.git", - "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/6e164293b754a95f246faf50ab2bbea3e4923cc9", - "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": "^7.1.3" - }, - "require-dev": { - "illuminate/notifications": "~5.7", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Illuminate\\Notifications\\SlackChannelServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Notifications\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Slack Notification Channel for laravel.", - "keywords": [ - "laravel", - "notifications", - "slack" - ], - "time": "2018-12-12T13:12:06+00:00" + "time": "2020-04-14T14:14:36+00:00" }, { "name": "laravel/tinker", @@ -1383,61 +1226,6 @@ ], "time": "2019-08-07T15:10:45+00:00" }, - { - "name": "lcobucci/jwt", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "56f10808089e38623345e28af2f2d5e4eb579455" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/56f10808089e38623345e28af2f2d5e4eb579455", - "reference": "56f10808089e38623345e28af2f2d5e4eb579455", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-openssl": "*", - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "mikey179/vfsstream": "~1.5", - "phpmd/phpmd": "~2.2", - "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "^5.7 || ^7.3", - "squizlabs/php_codesniffer": "~2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Lcobucci\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Luís Otávio Cobucci Oblonczyk", - "email": "lcobucci@gmail.com", - "role": "Developer" - } - ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ], - "time": "2020-05-22T08:21:12+00:00" - }, { "name": "league/csv", "version": "9.6.0", @@ -1717,34 +1505,42 @@ }, { "name": "nesbot/carbon", - "version": "1.39.1", + "version": "2.34.2", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33" + "reference": "3e87404329b8072295ea11d548b47a1eefe5a162" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4be0c005164249208ce1b5ca633cd57bdd42ff33", - "reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/3e87404329b8072295ea11d548b47a1eefe5a162", + "reference": "3e87404329b8072295ea11d548b47a1eefe5a162", "shasum": "" }, "require": { - "kylekatarnls/update-helper": "^1.1", - "php": ">=5.3.9", - "symfony/translation": "~2.6 || ~3.0 || ~4.0" + "ext-json": "*", + "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { - "composer/composer": "^1.2", - "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "^4.8.35 || ^5.7" + "doctrine/orm": "^2.7", + "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "kylekatarnls/multi-tester": "^1.1", + "phpmd/phpmd": "^2.8", + "phpstan/phpstan": "^0.11", + "phpunit/phpunit": "^7.5 || ^8.0", + "squizlabs/php_codesniffer": "^3.4" }, "bin": [ - "bin/upgrade-carbon" + "bin/carbon" ], "type": "library", "extra": { - "update-helper": "Carbon\\Upgrade", + "branch-alias": { + "dev-master": "2.x-dev", + "dev-3.x": "3.x-dev" + }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -1753,7 +1549,7 @@ }, "autoload": { "psr-4": { - "": "src/" + "Carbon\\": "src/Carbon/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1765,109 +1561,20 @@ "name": "Brian Nesbitt", "email": "brian@nesbot.com", "homepage": "http://nesbot.com" + }, + { + "name": "kylekatarnls", + "homepage": "http://github.com/kylekatarnls" } ], - "description": "A simple API extension for DateTime.", + "description": "An API extension for DateTime that supports 281 different languages.", "homepage": "http://carbon.nesbot.com", "keywords": [ "date", "datetime", "time" ], - "time": "2019-10-14T05:51:36+00:00" - }, - { - "name": "nexmo/client", - "version": "1.9.1", - "source": { - "type": "git", - "url": "https://github.com/Nexmo/nexmo-php-complete.git", - "reference": "c6d11d953c8c5594590bb9ebaba9616e76948f93" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nexmo/nexmo-php-complete/zipball/c6d11d953c8c5594590bb9ebaba9616e76948f93", - "reference": "c6d11d953c8c5594590bb9ebaba9616e76948f93", - "shasum": "" - }, - "require": { - "nexmo/client-core": "^1.0", - "php": ">=5.6", - "php-http/guzzle6-adapter": "^1.0" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tim Lytle", - "email": "tim@nexmo.com", - "homepage": "http://twitter.com/tjlytle", - "role": "Developer" - }, - { - "name": "Michael Heap", - "email": "michael.heap@vonage.com", - "role": "Developer" - }, - { - "name": "Lorna Mitchell", - "email": "lorna.mitchell@vonage.com", - "role": "Developer" - } - ], - "description": "PHP Client for using Nexmo's API.", - "time": "2019-11-26T15:25:11+00:00" - }, - { - "name": "nexmo/client-core", - "version": "1.8.1", - "source": { - "type": "git", - "url": "https://github.com/Nexmo/nexmo-php.git", - "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/182d41a02ebd3e4be147baea45458ccfe2f528c4", - "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4", - "shasum": "" - }, - "require": { - "lcobucci/jwt": "^3.2", - "php": ">=5.6", - "php-http/client-implementation": "^1.0", - "php-http/guzzle6-adapter": "^1.0", - "zendframework/zend-diactoros": "^1.8.4 || ^2.0" - }, - "require-dev": { - "estahn/phpunit-json-assertions": "^1.0.0", - "php-http/mock-client": "^0.3.0", - "phpunit/phpunit": "^5.7", - "squizlabs/php_codesniffer": "^3.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Nexmo\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tim Lytle", - "email": "tim@nexmo.com", - "homepage": "http://twitter.com/tjlytle", - "role": "Developer" - } - ], - "description": "PHP Client for using Nexmo's API.", - "time": "2019-05-13T20:27:43+00:00" + "time": "2020-05-19T22:14:16+00:00" }, { "name": "nikic/php-parser", @@ -2069,170 +1776,59 @@ "time": "2018-07-02T15:55:56+00:00" }, { - "name": "php-http/guzzle6-adapter", - "version": "v1.1.1", + "name": "phpoption/phpoption", + "version": "1.7.3", "source": { "type": "git", - "url": "https://github.com/php-http/guzzle6-adapter.git", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae", + "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0", - "php-http/httplug": "^1.0" - }, - "provide": { - "php-http/async-client-implementation": "1.0", - "php-http/client-implementation": "1.0" + "php": "^5.5.9 || ^7.0 || ^8.0" }, "require-dev": { - "ext-curl": "*", - "php-http/adapter-integration-tests": "^0.4" + "bamarni/composer-bin-plugin": "^1.3", + "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.7-dev" } }, "autoload": { "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" + "PhpOption\\": "src/PhpOption/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" }, { - "name": "David de Boer", - "email": "david@ddeboer.nl" + "name": "Graham Campbell", + "email": "graham@alt-three.com" } ], - "description": "Guzzle 6 HTTP Adapter", - "homepage": "http://httplug.io", + "description": "Option Type for PHP", "keywords": [ - "Guzzle", - "http" + "language", + "option", + "php", + "type" ], - "time": "2016-05-10T06:13:32+00:00" - }, - { - "name": "php-http/httplug", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/httplug.git", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/1c6381726c18579c4ca2ef1ec1498fdae8bdf018", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "php-http/promise": "^1.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eric GELOEN", - "email": "geloen.eric@gmail.com" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "HTTPlug, the HTTP client abstraction for PHP", - "homepage": "http://httplug.io", - "keywords": [ - "client", - "http" - ], - "time": "2016-08-31T08:30:17+00:00" - }, - { - "name": "php-http/promise", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/promise.git", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", - "shasum": "" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "Joel Wurtz", - "email": "joel.wurtz@gmail.com" - } - ], - "description": "Promise used for asynchronous HTTP requests", - "homepage": "http://httplug.io", - "keywords": [ - "promise" - ], - "time": "2016-01-26T13:27:02+00:00" + "time": "2020-03-21T18:07:53+00:00" }, { "name": "psr/container", @@ -2283,58 +1879,6 @@ ], "time": "2017-02-14T16:28:37+00:00" }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "time": "2019-04-30T12:38:16+00:00" - }, { "name": "psr/http-message", "version": "1.0.1", @@ -2683,26 +2227,25 @@ }, { "name": "staudenmeir/eloquent-eager-limit", - "version": "v1.2.1", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/staudenmeir/eloquent-eager-limit.git", - "reference": "388fa4fa26911ba4be2f3076f79a489f276f7b5e" + "reference": "271c1a029fed9ba1e09718b2ce99c54c24643c7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/staudenmeir/eloquent-eager-limit/zipball/388fa4fa26911ba4be2f3076f79a489f276f7b5e", - "reference": "388fa4fa26911ba4be2f3076f79a489f276f7b5e", + "url": "https://api.github.com/repos/staudenmeir/eloquent-eager-limit/zipball/271c1a029fed9ba1e09718b2ce99c54c24643c7f", + "reference": "271c1a029fed9ba1e09718b2ce99c54c24643c7f", "shasum": "" }, "require": { - "illuminate/database": "~5.5.43|~5.6.34|5.7.*", - "illuminate/support": "^5.5.14", - "php": ">=7.0" + "illuminate/database": "5.8.*", + "php": "^7.1.3" }, "require-dev": { - "laravel/homestead": "^7.18", - "phpunit/phpunit": "~6.5" + "laravel/homestead": "^8.0", + "phpunit/phpunit": "^7.0" }, "type": "library", "autoload": { @@ -2721,7 +2264,7 @@ } ], "description": "Laravel Eloquent eager loading with limit", - "time": "2019-07-31T16:00:04+00:00" + "time": "2019-07-31T15:57:35+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -4265,26 +3808,27 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.6.4", + "version": "v3.6.4", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "67d472b1794c986381a8950e4958e1adb779d561" + "reference": "10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67d472b1794c986381a8950e4958e1adb779d561", - "reference": "67d472b1794c986381a8950e4958e1adb779d561", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5", + "reference": "10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5", "shasum": "" }, "require": { - "php": "^5.3.9 || ^7.0 || ^8.0", + "php": "^5.4 || ^7.0 || ^8.0", + "phpoption/phpoption": "^1.5", "symfony/polyfill-ctype": "^1.9" }, "require-dev": { "ext-filter": "*", "ext-pcre": "*", - "phpunit/phpunit": "^4.8.35 || ^5.0" + "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "ext-filter": "Required to use the boolean validator.", @@ -4293,7 +3837,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "3.6-dev" } }, "autoload": { @@ -4323,75 +3867,7 @@ "env", "environment" ], - "time": "2020-05-02T13:38:00+00:00" - }, - { - "name": "zendframework/zend-diactoros", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "de5847b068362a88684a55b0dbb40d85986cfa52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/de5847b068362a88684a55b0dbb40d85986cfa52", - "reference": "de5847b068362a88684a55b0dbb40d85986cfa52", - "shasum": "" - }, - "require": { - "php": "^7.1", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "ext-dom": "*", - "ext-libxml": "*", - "http-interop/http-factory-tests": "^0.5.0", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^7.0.2", - "zendframework/zend-coding-standard": "~1.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev", - "dev-develop": "2.2.x-dev", - "dev-release-1.8": "1.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php" - ], - "psr-4": { - "Zend\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR HTTP Message implementations", - "keywords": [ - "http", - "psr", - "psr-7" - ], - "abandoned": "laminas/laminas-diactoros", - "time": "2019-11-13T19:16:13+00:00" + "time": "2020-05-02T13:46:13+00:00" } ], "packages-dev": [ @@ -5563,16 +5039,16 @@ }, { "name": "nunomaduro/collision", - "version": "v2.1.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63" + "reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b5feb0c0d92978ec7169232ce5d70d6da6b29f63", - "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/af42d339fe2742295a54f6fdd42aaa6f8c4aca68", + "reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68", "shasum": "" }, "require": { @@ -5582,10 +5058,10 @@ "symfony/console": "~2.8|~3.3|~4.0" }, "require-dev": { - "laravel/framework": "5.7.*", + "laravel/framework": "5.8.*", "nunomaduro/larastan": "^0.3.0", - "phpstan/phpstan": "^0.10", - "phpunit/phpunit": "~7.3" + "phpstan/phpstan": "^0.11", + "phpunit/phpunit": "~8.0" }, "type": "library", "extra": { @@ -5623,7 +5099,7 @@ "php", "symfony" ], - "time": "2018-11-21T21:40:54+00:00" + "time": "2019-03-07T21:35:13+00:00" }, { "name": "phar-io/manifest", diff --git a/config/app.php b/config/app.php index 3a39c17..7024ed2 100644 --- a/config/app.php +++ b/config/app.php @@ -192,6 +192,7 @@ return [ 'aliases' => [ 'App' => Illuminate\Support\Facades\App::class, + 'Arr' => Illuminate\Support\Arr::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Auth' => Illuminate\Support\Facades\Auth::class, 'Blade' => Illuminate\Support\Facades\Blade::class, @@ -221,6 +222,7 @@ return [ 'Schema' => Illuminate\Support\Facades\Schema::class, 'Session' => Illuminate\Support\Facades\Session::class, 'Storage' => Illuminate\Support\Facades\Storage::class, + 'Str' => Illuminate\Support\Str::class, 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, diff --git a/config/auth.php b/config/auth.php index 7817501..897dc82 100644 --- a/config/auth.php +++ b/config/auth.php @@ -44,6 +44,7 @@ return [ 'api' => [ 'driver' => 'token', 'provider' => 'users', + 'hash' => false, ], ], diff --git a/config/broadcasting.php b/config/broadcasting.php index 5eecd2b..3bba110 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -36,7 +36,8 @@ return [ 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - // + 'cluster' => env('PUSHER_APP_CLUSTER'), + 'useTLS' => true, ], ], diff --git a/config/cache.php b/config/cache.php index 4f0b3c4..46751e6 100644 --- a/config/cache.php +++ b/config/cache.php @@ -13,7 +13,8 @@ return [ | 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" + | Supported: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb" | */ @@ -75,6 +76,15 @@ return [ 'connection' => 'cache', ], + 'dynamodb' => [ + 'driver' => 'dynamodb', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'endpoint' => env('DYNAMODB_ENDPOINT'), + ], + ], /* diff --git a/config/database.php b/config/database.php index 22347a4..921769c 100644 --- a/config/database.php +++ b/config/database.php @@ -1,5 +1,7 @@ [ 'driver' => 'sqlite', + 'url' => env('DATABASE_URL'), 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), @@ -42,6 +45,7 @@ return [ 'mysql' => [ 'driver' => 'mysql', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), @@ -54,10 +58,14 @@ return [ 'prefix_indexes' => true, 'strict' => true, 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], ], 'pgsql' => [ 'driver' => 'pgsql', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), @@ -72,6 +80,7 @@ return [ 'sqlsrv' => [ 'driver' => 'sqlsrv', + 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '1433'), 'database' => env('DB_DATABASE', 'forge'), @@ -110,9 +119,15 @@ return [ 'redis' => [ - 'client' => 'predis', + 'client' => env('REDIS_CLIENT', 'predis'), + + 'options' => [ + 'cluster' => env('REDIS_CLUSTER', 'predis'), + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), + ], 'default' => [ + 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), @@ -120,6 +135,7 @@ return [ ], 'cache' => [ + 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), diff --git a/config/mail.php b/config/mail.php index f400645..6f8469f 100644 --- a/config/mail.php +++ b/config/mail.php @@ -12,7 +12,7 @@ return [ | your application here. By default, Laravel is setup for SMTP mail. | | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses", - | "sparkpost", "log", "array" + | "sparkpost", "postmark", "log", "array" | */ diff --git a/config/queue.php b/config/queue.php index 6688397..07c7d2a 100644 --- a/config/queue.php +++ b/config/queue.php @@ -13,7 +13,7 @@ return [ | */ - 'default' => env('QUEUE_DRIVER', 'sync'), + 'default' => env('QUEUE_CONNECTION', 'sync'), /* |-------------------------------------------------------------------------- @@ -37,7 +37,7 @@ return [ 'database' => [ 'driver' => 'database', 'table' => 'jobs', - 'queue' => env('REDIS_QUEUE', 'default'), + 'queue' => 'default', 'retry_after' => 90, ], @@ -46,21 +46,22 @@ return [ 'host' => 'localhost', 'queue' => 'default', 'retry_after' => 90, + 'block_for' => 0, ], 'sqs' => [ 'driver' => 'sqs', - 'key' => env('SQS_KEY', 'your-public-key'), - 'secret' => env('SQS_SECRET', 'your-secret-key'), + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 'queue' => env('SQS_QUEUE', 'your-queue-name'), - 'region' => env('SQS_REGION', 'us-east-1'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', - 'queue' => 'default', + 'queue' => env('REDIS_QUEUE', 'default'), 'retry_after' => 90, 'block_for' => null, ], diff --git a/config/services.php b/config/services.php index e7a78f5..8ce6cc6 100644 --- a/config/services.php +++ b/config/services.php @@ -8,9 +8,9 @@ return [ |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such - | 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. + | as Mailgun, SparkPost and others. This file provides a sane default + | location for this type of information, allowing packages to have + | a conventional file to locate the various service credentials. | */ @@ -20,24 +20,18 @@ return [ 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), ], + 'postmark' => [ + 'token' => env('POSTMARK_TOKEN'), + ], + 'ses' => [ - 'key' => env('SES_KEY'), - 'secret' => env('SES_SECRET'), - 'region' => env('SES_REGION', 'us-east-1'), - 'webhook' => [ - 'secret' => env('STRIPE_WEBHOOK_SECRET'), - 'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300), - ], + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], 'sparkpost' => [ 'secret' => env('SPARKPOST_SECRET'), ], - 'stripe' => [ - 'model' => App\User::class, - 'key' => env('STRIPE_KEY'), - 'secret' => env('STRIPE_SECRET'), - ], - ]; diff --git a/database/.gitignore b/database/.gitignore index 9b1dffd..97fc976 100644 --- a/database/.gitignore +++ b/database/.gitignore @@ -1 +1,2 @@ *.sqlite +*.sqlite-journal diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php index e5544d2..bf6caf6 100644 --- a/resources/lang/en/passwords.php +++ b/resources/lang/en/passwords.php @@ -13,7 +13,7 @@ return [ | */ - 'password' => 'Passwords must be at least six characters and match the confirmation.', + 'password' => 'Passwords must be at least eight characters and match the confirmation.', 'reset' => 'Your password has been reset!', 'sent' => 'We have e-mailed your password reset link!', 'token' => 'This password reset token is invalid.', diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index 8ab929c..e1d879f 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -40,6 +40,7 @@ return [ 'dimensions' => 'The :attribute has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', 'email' => 'The :attribute must be a valid email address.', + 'ends_with' => 'The :attribute must end with one of the following: :values', 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', diff --git a/tests/Unit/MetadataResolver/CienResolverTest.php b/tests/Unit/MetadataResolver/CienResolverTest.php index ca6f8d1..080ec7b 100644 --- a/tests/Unit/MetadataResolver/CienResolverTest.php +++ b/tests/Unit/MetadataResolver/CienResolverTest.php @@ -9,7 +9,7 @@ class CienResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/DLsiteResolverTest.php b/tests/Unit/MetadataResolver/DLsiteResolverTest.php index ee15edb..c698e07 100644 --- a/tests/Unit/MetadataResolver/DLsiteResolverTest.php +++ b/tests/Unit/MetadataResolver/DLsiteResolverTest.php @@ -9,7 +9,7 @@ class DLsiteResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/DeviantArtResolverTest.php b/tests/Unit/MetadataResolver/DeviantArtResolverTest.php index 8e3f500..d85f6c5 100644 --- a/tests/Unit/MetadataResolver/DeviantArtResolverTest.php +++ b/tests/Unit/MetadataResolver/DeviantArtResolverTest.php @@ -9,7 +9,7 @@ class DeviantArtResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php b/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php index 3c2894c..1056f85 100644 --- a/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php +++ b/tests/Unit/MetadataResolver/FC2ContentsResolverTest.php @@ -9,7 +9,7 @@ class FC2ContentsResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/FantiaResolverTest.php b/tests/Unit/MetadataResolver/FantiaResolverTest.php index ae976e9..d607821 100644 --- a/tests/Unit/MetadataResolver/FantiaResolverTest.php +++ b/tests/Unit/MetadataResolver/FantiaResolverTest.php @@ -9,7 +9,7 @@ class FantiaResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/FanzaResolverTest.php b/tests/Unit/MetadataResolver/FanzaResolverTest.php index 919884f..9271676 100644 --- a/tests/Unit/MetadataResolver/FanzaResolverTest.php +++ b/tests/Unit/MetadataResolver/FanzaResolverTest.php @@ -9,7 +9,7 @@ class FanzaResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/HentaiFoundryResolverTest.php b/tests/Unit/MetadataResolver/HentaiFoundryResolverTest.php index f781bb1..31873a1 100644 --- a/tests/Unit/MetadataResolver/HentaiFoundryResolverTest.php +++ b/tests/Unit/MetadataResolver/HentaiFoundryResolverTest.php @@ -9,7 +9,7 @@ class HentaiFoundryResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/IwaraResolverTest.php b/tests/Unit/MetadataResolver/IwaraResolverTest.php index 453fdd7..f065bb5 100644 --- a/tests/Unit/MetadataResolver/IwaraResolverTest.php +++ b/tests/Unit/MetadataResolver/IwaraResolverTest.php @@ -9,7 +9,7 @@ class IwaraResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/Kb10uyShortStoryServerResolverTest.php b/tests/Unit/MetadataResolver/Kb10uyShortStoryServerResolverTest.php index 7407b9c..cd6127c 100644 --- a/tests/Unit/MetadataResolver/Kb10uyShortStoryServerResolverTest.php +++ b/tests/Unit/MetadataResolver/Kb10uyShortStoryServerResolverTest.php @@ -9,7 +9,7 @@ class Kb10uyShortStoryServerResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/KomifloResolverTest.php b/tests/Unit/MetadataResolver/KomifloResolverTest.php index 2c9ac0d..2850b9a 100644 --- a/tests/Unit/MetadataResolver/KomifloResolverTest.php +++ b/tests/Unit/MetadataResolver/KomifloResolverTest.php @@ -9,7 +9,7 @@ class KomifloResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/NicoSeigaResolverTest.php b/tests/Unit/MetadataResolver/NicoSeigaResolverTest.php index a96a35f..6df319b 100644 --- a/tests/Unit/MetadataResolver/NicoSeigaResolverTest.php +++ b/tests/Unit/MetadataResolver/NicoSeigaResolverTest.php @@ -10,7 +10,7 @@ class NicoSeigaResolverTest extends TestCase { use CreateMockedResolver, MyAsserts; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/NijieResolverTest.php b/tests/Unit/MetadataResolver/NijieResolverTest.php index f0e8d32..72ab264 100644 --- a/tests/Unit/MetadataResolver/NijieResolverTest.php +++ b/tests/Unit/MetadataResolver/NijieResolverTest.php @@ -9,7 +9,7 @@ class NijieResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/PixivResolverTest.php b/tests/Unit/MetadataResolver/PixivResolverTest.php index 5565b7c..fb6278b 100644 --- a/tests/Unit/MetadataResolver/PixivResolverTest.php +++ b/tests/Unit/MetadataResolver/PixivResolverTest.php @@ -9,7 +9,7 @@ class PixivResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/PlurkResolverTest.php b/tests/Unit/MetadataResolver/PlurkResolverTest.php index 182e143..8597db7 100644 --- a/tests/Unit/MetadataResolver/PlurkResolverTest.php +++ b/tests/Unit/MetadataResolver/PlurkResolverTest.php @@ -9,7 +9,7 @@ class PlurkResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/SteamResolverTest.php b/tests/Unit/MetadataResolver/SteamResolverTest.php index dadaf47..2590357 100644 --- a/tests/Unit/MetadataResolver/SteamResolverTest.php +++ b/tests/Unit/MetadataResolver/SteamResolverTest.php @@ -9,7 +9,7 @@ class SteamResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/ToranoanaResolverTest.php b/tests/Unit/MetadataResolver/ToranoanaResolverTest.php index 7c208d4..ccb5d2b 100644 --- a/tests/Unit/MetadataResolver/ToranoanaResolverTest.php +++ b/tests/Unit/MetadataResolver/ToranoanaResolverTest.php @@ -9,7 +9,7 @@ class ToranoanaResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/MetadataResolver/XtubeResolverTest.php b/tests/Unit/MetadataResolver/XtubeResolverTest.php index 24b55ac..94c95d8 100644 --- a/tests/Unit/MetadataResolver/XtubeResolverTest.php +++ b/tests/Unit/MetadataResolver/XtubeResolverTest.php @@ -9,7 +9,7 @@ class XtubeResolverTest extends TestCase { use CreateMockedResolver; - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Services/CheckinCsvImporterTest.php b/tests/Unit/Services/CheckinCsvImporterTest.php index d418e5d..8d208bf 100644 --- a/tests/Unit/Services/CheckinCsvImporterTest.php +++ b/tests/Unit/Services/CheckinCsvImporterTest.php @@ -15,7 +15,7 @@ class CheckinCsvImporterTest extends TestCase { use RefreshDatabase; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->seed(); From 74fee83f4e45703ed001202e61ce8ec7f1f260af Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 22:26:47 +0900 Subject: [PATCH 44/58] =?UTF-8?q?=E9=9D=9E=E6=8E=A8=E5=A5=A8=E3=81=AE?= =?UTF-8?q?=E3=83=98=E3=83=AB=E3=83=91=E9=96=A2=E6=95=B0=E3=81=AE=E5=88=A9?= =?UTF-8?q?=E7=94=A8=E3=82=92=E3=82=84=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Exceptions/CsvImportException.php | 3 ++- app/MetadataResolver/NijieResolver.php | 5 +++-- app/Utilities/Formatter.php | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/Exceptions/CsvImportException.php b/app/Exceptions/CsvImportException.php index 5571dc6..0682513 100644 --- a/app/Exceptions/CsvImportException.php +++ b/app/Exceptions/CsvImportException.php @@ -2,6 +2,7 @@ namespace App\Exceptions; +use Illuminate\Support\Arr; use Throwable; class CsvImportException extends \RuntimeException @@ -15,7 +16,7 @@ class CsvImportException extends \RuntimeException */ public function __construct(...$errors) { - parent::__construct(array_first($errors)); + parent::__construct(Arr::first($errors)); $this->errors = $errors; } diff --git a/app/MetadataResolver/NijieResolver.php b/app/MetadataResolver/NijieResolver.php index 4bbe5ca..879fdaf 100644 --- a/app/MetadataResolver/NijieResolver.php +++ b/app/MetadataResolver/NijieResolver.php @@ -3,6 +3,7 @@ namespace App\MetadataResolver; use GuzzleHttp\Client; +use Illuminate\Support\Str; use Symfony\Component\DomCrawler\Crawler; class NijieResolver implements Resolver @@ -50,8 +51,8 @@ class NijieResolver implements Resolver $metadata->description = '投稿者: ' . $data['author']['name'] . PHP_EOL . $data['description']; if ( isset($data['thumbnailUrl']) && - !ends_with($data['thumbnailUrl'], '.gif') && - !ends_with($data['thumbnailUrl'], '.mp4') + !Str::endsWith($data['thumbnailUrl'], '.gif') && + !Str::endsWith($data['thumbnailUrl'], '.mp4') ) { // サムネイルからメイン画像に $metadata->image = str_replace('__rs_l160x160/', '', $data['thumbnailUrl']); diff --git a/app/Utilities/Formatter.php b/app/Utilities/Formatter.php index c0401c9..7ac108b 100644 --- a/app/Utilities/Formatter.php +++ b/app/Utilities/Formatter.php @@ -2,6 +2,7 @@ namespace App\Utilities; +use Illuminate\Support\Str; use Misd\Linkify\Linkify; class Formatter @@ -55,10 +56,10 @@ class Formatter $parts = parse_url($url); if (!empty($parts['query'])) { // Remove query parameters - $url = str_replace_last('?' . $parts['query'], '', $url); + $url = Str::replaceFirst('?' . $parts['query'], '', $url); if (!empty($parts['fragment'])) { // Remove fragment identifier - $url = str_replace_last('#' . $parts['fragment'], '', $url); + $url = Str::replaceFirst('#' . $parts['fragment'], '', $url); } else { // "http://example.com/?query#" の場合 $parts['fragment'] は unset になるので、個別に判定して除去する必要がある $url = preg_replace('/#\z/u', '', $url); From 80590888dfa46997159c305c4d33b71e8ddc5a98 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 22:31:17 +0900 Subject: [PATCH 45/58] QUEUE_CONNECTION -> QUEUE_DRIVER (revert) --- config/queue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/queue.php b/config/queue.php index 07c7d2a..ef4720a 100644 --- a/config/queue.php +++ b/config/queue.php @@ -13,7 +13,7 @@ return [ | */ - 'default' => env('QUEUE_CONNECTION', 'sync'), + 'default' => env('QUEUE_DRIVER', 'sync'), /* |-------------------------------------------------------------------------- From 34c4f13376cd06374903e83742fbc26e8a7af543 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 23 May 2020 23:09:55 +0900 Subject: [PATCH 46/58] Laravel 6 --- app/Exceptions/Handler.php | 6 +- app/Http/Kernel.php | 4 +- app/Http/Middleware/Authenticate.php | 2 +- composer.json | 14 +- composer.lock | 1016 +++++++++++++++++--------- config/app.php | 2 +- config/auth.php | 14 + config/database.php | 12 +- config/filesystems.php | 3 +- config/logging.php | 9 + config/mail.php | 4 +- config/queue.php | 1 + config/services.php | 4 - config/session.php | 2 +- resources/lang/en/passwords.php | 2 +- resources/lang/en/validation.php | 5 +- 16 files changed, 719 insertions(+), 381 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index d5b210c..7718d01 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -27,6 +27,8 @@ class Handler extends ExceptionHandler * * @param \Exception $exception * @return void + * + * @throws \Exception */ public function report(Exception $exception) { @@ -38,7 +40,9 @@ class Handler extends ExceptionHandler * * @param \Illuminate\Http\Request $request * @param \Exception $exception - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response + * + * @throws \Exception */ public function render($request, Exception $exception) { diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 7abf46b..fd3fc57 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -45,7 +45,7 @@ class Kernel extends HttpKernel \Illuminate\Session\Middleware\StartSession::class, \App\Http\Middleware\VerifyCsrfToken::class, 'throttle:60,1', - 'bindings', + \Illuminate\Routing\Middleware\SubstituteBindings::class, ], ]; @@ -63,6 +63,7 @@ class Kernel extends HttpKernel 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, @@ -79,6 +80,7 @@ class Kernel extends HttpKernel \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\Authenticate::class, + \Illuminate\Routing\Middleware\ThrottleRequests::class, \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, \Illuminate\Auth\Middleware\Authorize::class, diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index a4be5c5..704089a 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -10,7 +10,7 @@ class Authenticate extends Middleware * Get the path the user should be redirected to when they are not authenticated. * * @param \Illuminate\Http\Request $request - * @return string + * @return string|null */ protected function redirectTo($request) { diff --git a/composer.json b/composer.json index 5500b2e..460ee77 100644 --- a/composer.json +++ b/composer.json @@ -11,14 +11,15 @@ } ], "require": { - "php": "^7.1.3", + "php": "^7.2", "anhskohbo/no-captcha": "^3.0", "doctrine/dbal": "^2.9", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "jakeasmith/http_build_url": "^1.0", - "laravel/framework": "5.8.*", - "laravel/tinker": "^1.0", + "laravel/framework": "^6.2", + "laravel/helpers": "^1.2", + "laravel/tinker": "^2.0", "league/csv": "^9.5", "misd/linkify": "^1.1", "openpear/stream_filter_mbstring": "dev-master", @@ -29,13 +30,12 @@ "require-dev": { "barryvdh/laravel-debugbar": "^3.1", "barryvdh/laravel-ide-helper": "^2.5", - "beyondcode/laravel-dump-server": "^1.0", - "filp/whoops": "^2.0", + "facade/ignition": "^1.4", "friendsofphp/php-cs-fixer": "^2.14", - "fzaninotto/faker": "^1.4", + "fzaninotto/faker": "^1.9.1", "mockery/mockery": "^1.0", "nunomaduro/collision": "^3.0", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^8.0", "symfony/thanks": "^1.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index 8b121b2..09367a8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8e40990be77020dd403c97219cfe111d", + "content-hash": "803d2a1293bf2c97bc118821acdb0216", "packages": [ { "name": "anhskohbo/no-captcha", @@ -353,16 +353,16 @@ }, { "name": "doctrine/inflector", - "version": "1.4.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3" + "reference": "18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3", - "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7", + "reference": "18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7", "shasum": "" }, "require": { @@ -383,7 +383,6 @@ }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector", "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, @@ -427,7 +426,7 @@ "uppercase", "words" ], - "time": "2020-05-09T15:09:09+00:00" + "time": "2020-05-11T11:25:59+00:00" }, { "name": "doctrine/lexer", @@ -603,52 +602,6 @@ ], "time": "2020-02-13T22:36:52+00:00" }, - { - "name": "erusev/parsedown", - "version": "1.7.4", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2019-12-30T22:54:17+00:00" - }, { "name": "fideloper/proxy", "version": "4.3.0", @@ -925,135 +878,46 @@ "description": "Provides functionality for http_build_url() to environments without pecl_http.", "time": "2017-05-01T15:36:40+00:00" }, - { - "name": "jakub-onderka/php-console-color", - "version": "v0.2", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "1.0", - "jakub-onderka/php-parallel-lint": "1.0", - "jakub-onderka/php-var-dump-check": "0.*", - "phpunit/phpunit": "~4.3", - "squizlabs/php_codesniffer": "1.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "JakubOnderka\\PhpConsoleColor\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com" - } - ], - "abandoned": "php-parallel-lint/php-console-color", - "time": "2018-09-29T17:23:10+00:00" - }, - { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.4", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "jakub-onderka/php-console-color": "~0.2", - "php": ">=5.4.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~1.0", - "jakub-onderka/php-var-dump-check": "~0.1", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "JakubOnderka\\PhpConsoleHighlighter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "acci@acci.cz", - "homepage": "http://www.acci.cz/" - } - ], - "description": "Highlight PHP code in terminal", - "abandoned": "php-parallel-lint/php-console-highlighter", - "time": "2018-09-29T18:48:56+00:00" - }, { "name": "laravel/framework", - "version": "v5.8.38", + "version": "v6.18.15", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "78eb4dabcc03e189620c16f436358d41d31ae11f" + "reference": "a1fa3ddc0bb5285cafa6844b443633f7627d75dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/78eb4dabcc03e189620c16f436358d41d31ae11f", - "reference": "78eb4dabcc03e189620c16f436358d41d31ae11f", + "url": "https://api.github.com/repos/laravel/framework/zipball/a1fa3ddc0bb5285cafa6844b443633f7627d75dc", + "reference": "a1fa3ddc0bb5285cafa6844b443633f7627d75dc", "shasum": "" }, "require": { - "doctrine/inflector": "^1.1", + "doctrine/inflector": "^1.4|^2.0", "dragonmantank/cron-expression": "^2.0", - "egulias/email-validator": "^2.0", - "erusev/parsedown": "^1.7", + "egulias/email-validator": "^2.1.10", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", + "league/commonmark": "^1.3", "league/flysystem": "^1.0.8", - "monolog/monolog": "^1.12", - "nesbot/carbon": "^1.26.3 || ^2.0", + "monolog/monolog": "^1.12|^2.0", + "nesbot/carbon": "^2.0", "opis/closure": "^3.1", - "php": "^7.1.3", + "php": "^7.2", "psr/container": "^1.0", "psr/simple-cache": "^1.0", "ramsey/uuid": "^3.7", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.2", - "symfony/debug": "^4.2", - "symfony/finder": "^4.2", - "symfony/http-foundation": "^4.2", - "symfony/http-kernel": "^4.2", - "symfony/process": "^4.2", - "symfony/routing": "^4.2", - "symfony/var-dumper": "^4.2", + "symfony/console": "^4.3.4", + "symfony/debug": "^4.3.4", + "symfony/finder": "^4.3.4", + "symfony/http-foundation": "^4.3.4", + "symfony/http-kernel": "^4.3.4", + "symfony/polyfill-php73": "^1.17", + "symfony/process": "^4.3.4", + "symfony/routing": "^4.3.4", + "symfony/var-dumper": "^4.3.4", "tijsverkoyen/css-to-inline-styles": "^2.2.1", "vlucas/phpdotenv": "^3.3" }, @@ -1093,47 +957,45 @@ "require-dev": { "aws/aws-sdk-php": "^3.0", "doctrine/dbal": "^2.6", - "filp/whoops": "^2.1.4", - "guzzlehttp/guzzle": "^6.3", + "filp/whoops": "^2.4", + "guzzlehttp/guzzle": "^6.3|^7.0", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.0", + "mockery/mockery": "^1.3.1", "moontoast/math": "^1.1", - "orchestra/testbench-core": "3.8.*", + "orchestra/testbench-core": "^4.0", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^7.5|^8.0", + "phpunit/phpunit": "^7.5.15|^8.4|^9.0", "predis/predis": "^1.1.1", - "symfony/css-selector": "^4.2", - "symfony/dom-crawler": "^4.2", - "true/punycode": "^2.1" + "symfony/cache": "^4.3.4" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", + "ext-memcached": "Required to use the memcache cache driver.", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", - "filp/whoops": "Required for friendly error pages in development (^2.1.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", - "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (^6.0).", - "laravel/tinker": "Required to use the tinker console command (^1.0).", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", + "filp/whoops": "Required for friendly error pages in development (^2.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", + "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.0|^7.0).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "nexmo/client": "Required to use the Nexmo transport (^1.0).", + "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.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 (^3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.2).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.2).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.1).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.8-dev" + "dev-master": "6.x-dev" } }, "autoload": { @@ -1161,40 +1023,94 @@ "framework", "laravel" ], - "time": "2020-04-14T14:14:36+00:00" + "time": "2020-05-19T17:03:02+00:00" }, { - "name": "laravel/tinker", - "version": "v1.0.10", + "name": "laravel/helpers", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/laravel/tinker.git", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7" + "url": "https://github.com/laravel/helpers.git", + "reference": "1f978fc5dad9f7f906b18242c654252615201de4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/ad571aacbac1539c30d480908f9d0c9614eaf1a7", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7", + "url": "https://api.github.com/repos/laravel/helpers/zipball/1f978fc5dad9f7f906b18242c654252615201de4", + "reference": "1f978fc5dad9f7f906b18242c654252615201de4", "shasum": "" }, "require": { - "illuminate/console": "~5.1|^6.0", - "illuminate/contracts": "~5.1|^6.0", - "illuminate/support": "~5.1|^6.0", - "php": ">=5.5.9", - "psy/psysh": "0.7.*|0.8.*|0.9.*", - "symfony/var-dumper": "~3.0|~4.0" + "illuminate/support": "~5.8.0|^6.0|^7.0", + "php": ">=7.1.3" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "suggest": { - "illuminate/database": "The Illuminate Database package (~5.1)." + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Dries Vints", + "email": "dries.vints@gmail.com" + } + ], + "description": "Provides backwards compatibility for helpers in the latest Laravel release.", + "keywords": [ + "helpers", + "laravel" + ], + "time": "2020-03-03T13:52:16+00:00" + }, + { + "name": "laravel/tinker", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "cde90a7335a2130a4488beb68f4b2141869241db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/cde90a7335a2130a4488beb68f4b2141869241db", + "reference": "cde90a7335a2130a4488beb68f4b2141869241db", + "shasum": "" + }, + "require": { + "illuminate/console": "^6.0|^7.0|^8.0", + "illuminate/contracts": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0", + "php": "^7.2", + "psy/psysh": "^0.10.3", + "symfony/var-dumper": "^4.3|^5.0" + }, + "require-dev": { + "mockery/mockery": "^1.3.1", + "phpunit/phpunit": "^8.4|^9.0" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" }, "laravel": { "providers": [ @@ -1224,7 +1140,81 @@ "laravel", "psysh" ], - "time": "2019-08-07T15:10:45+00:00" + "time": "2020-04-07T15:01:31+00:00" + }, + { + "name": "league/commonmark", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/412639f7cfbc0b31ad2455b2fe965095f66ae505", + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1" + }, + "conflict": { + "scrutinizer/ocular": "1.7.*" + }, + "require-dev": { + "cebe/markdown": "~1.0", + "commonmark/commonmark.js": "0.29.1", + "erusev/parsedown": "~1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "~1.4", + "mikehaertl/php-shellcommand": "^1.4", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5", + "scrutinizer/ocular": "^1.5", + "symfony/finder": "^4.2" + }, + "bin": [ + "bin/commonmark" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "time": "2020-05-04T22:15:21+00:00" }, { "name": "league/csv", @@ -1428,21 +1418,21 @@ }, { "name": "monolog/monolog", - "version": "1.25.4", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "3022efff205e2448b560c833c6fbbf91c3139168" + "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/3022efff205e2448b560c833c6fbbf91c3139168", - "reference": "3022efff205e2448b560c833c6fbbf91c3139168", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1", + "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1", "shasum": "" }, "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" + "php": ">=7.2", + "psr/log": "^1.0.1" }, "provide": { "psr/log-implementation": "1.0.0" @@ -1450,32 +1440,36 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", + "elasticsearch/elasticsearch": "^6.0", + "graylog2/gelf-php": "^1.4.2", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", "php-parallel-lint/php-parallel-lint": "^1.0", - "phpunit/phpunit": "~4.5", + "phpspec/prophecy": "^1.6.1", + "phpunit/phpunit": "^8.5", + "predis/predis": "^1.1", + "rollbar/rollbar": "^1.3", "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -1501,7 +1495,7 @@ "logging", "psr-3" ], - "time": "2020-05-22T07:31:27+00:00" + "time": "2020-05-22T08:12:19+00:00" }, { "name": "nesbot/carbon", @@ -2026,32 +2020,30 @@ }, { "name": "psy/psysh", - "version": "v0.9.12", + "version": "v0.10.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4" + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/90da7f37568aee36b116a030c5f99c915267edd4", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", "shasum": "" }, "require": { "dnoegel/php-xdg-base-dir": "0.1.*", "ext-json": "*", "ext-tokenizer": "*", - "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", - "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", - "php": ">=5.4.0", - "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0|~5.0", - "symfony/var-dumper": "~2.7|~3.0|~4.0|~5.0" + "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3", + "php": "^8.0 || ^7.0 || ^5.5.9", + "symfony/console": "~5.0|~4.0|~3.0|^2.4.2|~2.3.10", + "symfony/var-dumper": "~5.0|~4.0|~3.0|~2.7" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "~2.15|~3.16", - "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" + "hoa/console": "3.17.*" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", @@ -2066,7 +2058,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.9.x-dev" + "dev-master": "0.10.x-dev" } }, "autoload": { @@ -2096,7 +2088,7 @@ "interactive", "shell" ], - "time": "2019-12-06T14:19:43+00:00" + "time": "2020-05-03T19:32:03+00:00" }, { "name": "ralouphie/getallheaders", @@ -2227,25 +2219,25 @@ }, { "name": "staudenmeir/eloquent-eager-limit", - "version": "v1.3.1", + "version": "v1.4", "source": { "type": "git", "url": "https://github.com/staudenmeir/eloquent-eager-limit.git", - "reference": "271c1a029fed9ba1e09718b2ce99c54c24643c7f" + "reference": "c899c81213e86edc9654b90d3e243be8976cc352" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/staudenmeir/eloquent-eager-limit/zipball/271c1a029fed9ba1e09718b2ce99c54c24643c7f", - "reference": "271c1a029fed9ba1e09718b2ce99c54c24643c7f", + "url": "https://api.github.com/repos/staudenmeir/eloquent-eager-limit/zipball/c899c81213e86edc9654b90d3e243be8976cc352", + "reference": "c899c81213e86edc9654b90d3e243be8976cc352", "shasum": "" }, "require": { - "illuminate/database": "5.8.*", - "php": "^7.1.3" + "illuminate/database": "^6.0", + "php": "^7.2" }, "require-dev": { - "laravel/homestead": "^8.0", - "phpunit/phpunit": "^7.0" + "laravel/homestead": "^9.0", + "phpunit/phpunit": "^8.0" }, "type": "library", "autoload": { @@ -2264,7 +2256,7 @@ } ], "description": "Laravel Eloquent eager loading with limit", - "time": "2019-07-31T15:57:35+00:00" + "time": "2019-08-25T19:26:25+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -4059,67 +4051,6 @@ ], "time": "2018-12-13T10:34:14+00:00" }, - { - "name": "beyondcode/laravel-dump-server", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/beyondcode/laravel-dump-server.git", - "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/beyondcode/laravel-dump-server/zipball/fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", - "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", - "shasum": "" - }, - "require": { - "illuminate/console": "5.6.*|5.7.*|5.8.*|^6.0", - "illuminate/http": "5.6.*|5.7.*|5.8.*|^6.0", - "illuminate/support": "5.6.*|5.7.*|5.8.*|^6.0", - "php": "^7.1", - "symfony/var-dumper": "^4.1.1" - }, - "require-dev": { - "larapack/dd": "^1.0", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "BeyondCode\\DumpServer\\DumpServerServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "BeyondCode\\DumpServer\\": "src" - }, - "files": [ - "helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marcel Pociot", - "email": "marcel@beyondco.de", - "homepage": "https://beyondco.de", - "role": "Developer" - } - ], - "description": "Symfony Var-Dump Server for Laravel", - "homepage": "https://github.com/beyondcode/laravel-dump-server", - "keywords": [ - "beyondcode", - "laravel-dump-server" - ], - "time": "2019-08-11T13:17:40+00:00" - }, { "name": "composer/ca-bundle", "version": "1.2.7", @@ -4547,6 +4478,175 @@ ], "time": "2019-10-21T16:45:58+00:00" }, + { + "name": "facade/flare-client-php", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/facade/flare-client-php.git", + "reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/db1e03426e7f9472c9ecd1092aff00f56aa6c004", + "reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004", + "shasum": "" + }, + "require": { + "facade/ignition-contracts": "~1.0", + "illuminate/pipeline": "^5.5|^6.0|^7.0", + "php": "^7.1", + "symfony/http-foundation": "^3.3|^4.1|^5.0", + "symfony/var-dumper": "^3.4|^4.0|^5.0" + }, + "require-dev": { + "larapack/dd": "^1.1", + "phpunit/phpunit": "^7.5.16", + "spatie/phpunit-snapshot-assertions": "^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Facade\\FlareClient\\": "src" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Send PHP errors to Flare", + "homepage": "https://github.com/facade/flare-client-php", + "keywords": [ + "exception", + "facade", + "flare", + "reporting" + ], + "time": "2020-03-02T15:52:04+00:00" + }, + { + "name": "facade/ignition", + "version": "1.16.1", + "source": { + "type": "git", + "url": "https://github.com/facade/ignition.git", + "reference": "af05ac5ee8587395d7474ec0681c08776a2cb09d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facade/ignition/zipball/af05ac5ee8587395d7474ec0681c08776a2cb09d", + "reference": "af05ac5ee8587395d7474ec0681c08776a2cb09d", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "facade/flare-client-php": "^1.3", + "facade/ignition-contracts": "^1.0", + "filp/whoops": "^2.4", + "illuminate/support": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6.0", + "monolog/monolog": "^1.12 || ^2.0", + "php": "^7.1", + "scrivo/highlight.php": "^9.15", + "symfony/console": "^3.4 || ^4.0", + "symfony/var-dumper": "^3.4 || ^4.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.14", + "mockery/mockery": "^1.2", + "orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0" + }, + "suggest": { + "laravel/telescope": "^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "laravel": { + "providers": [ + "Facade\\Ignition\\IgnitionServiceProvider" + ], + "aliases": { + "Flare": "Facade\\Ignition\\Facades\\Flare" + } + } + }, + "autoload": { + "psr-4": { + "Facade\\Ignition\\": "src" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A beautiful error page for Laravel applications.", + "homepage": "https://github.com/facade/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "time": "2020-03-05T12:39:07+00:00" + }, + { + "name": "facade/ignition-contracts", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/facade/ignition-contracts.git", + "reference": "f445db0fb86f48e205787b2592840dd9c80ded28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/f445db0fb86f48e205787b2592840dd9c80ded28", + "reference": "f445db0fb86f48e205787b2592840dd9c80ded28", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Facade\\IgnitionContracts\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://flareapp.io", + "role": "Developer" + } + ], + "description": "Solution contracts for Ignition", + "homepage": "https://github.com/facade/ignition-contracts", + "keywords": [ + "contracts", + "flare", + "ignition" + ], + "time": "2019-08-30T14:06:08+00:00" + }, { "name": "filp/whoops", "version": "2.7.2", @@ -4797,6 +4897,96 @@ ], "time": "2016-01-20T08:20:44+00:00" }, + { + "name": "jakub-onderka/php-console-color", + "version": "v0.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "1.0", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "~4.3", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "JakubOnderka\\PhpConsoleColor\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com" + } + ], + "abandoned": "php-parallel-lint/php-console-color", + "time": "2018-09-29T17:23:10+00:00" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.4", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "jakub-onderka/php-console-color": "~0.2", + "php": ">=5.4.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~1.0", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "JakubOnderka\\PhpConsoleHighlighter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "description": "Highlight PHP code in terminal", + "abandoned": "php-parallel-lint/php-console-highlighter", + "time": "2018-09-29T18:48:56+00:00" + }, { "name": "justinrainbow/json-schema", "version": "5.2.9", @@ -4926,30 +5116,33 @@ }, { "name": "mockery/mockery", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be" + "reference": "6c6a7c533469873deacf998237e7649fc6b36223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", - "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", + "url": "https://api.github.com/repos/mockery/mockery/zipball/6c6a7c533469873deacf998237e7649fc6b36223", + "reference": "6c6a7c533469873deacf998237e7649fc6b36223", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", - "php": ">=5.6.0" + "php": "^7.3.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" + "phpunit/phpunit": "^8.0.0 || ^9.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -4987,7 +5180,7 @@ "test double", "testing" ], - "time": "2019-12-26T09:49:15+00:00" + "time": "2020-05-19T14:25:16+00:00" }, { "name": "myclabs/deep-copy", @@ -5467,40 +5660,40 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "7.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", + "php": "^7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", + "phpunit/php-token-stream": "^3.1.1", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", + "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -5526,7 +5719,7 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "time": "2019-11-20T13:55:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -5719,53 +5912,52 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.20", + "version": "8.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/63dda3b212a0025d380a745f91bdb4d8c985adb7", + "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.2.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.9.1", + "phar-io/manifest": "^1.0.3", + "phar-io/version": "^2.0.1", + "php": "^7.2", + "phpspec/prophecy": "^1.8.1", + "phpunit/php-code-coverage": "^7.0.7", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.2", + "sebastian/exporter": "^3.1.1", + "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -5773,7 +5965,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -5799,7 +5991,76 @@ "testing", "xunit" ], - "time": "2020-01-08T08:45:45+00:00" + "time": "2020-05-22T13:51:52+00:00" + }, + { + "name": "scrivo/highlight.php", + "version": "v9.18.1.1", + "source": { + "type": "git", + "url": "https://github.com/scrivo/highlight.php.git", + "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/52fc21c99fd888e33aed4879e55a3646f8d40558", + "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.7", + "sabberworm/php-css-parser": "^8.3", + "symfony/finder": "^2.8|^3.4", + "symfony/var-dumper": "^2.8|^3.4" + }, + "suggest": { + "ext-dom": "Needed to make use of the features in the utilities namespace" + }, + "type": "library", + "autoload": { + "psr-0": { + "Highlight\\": "", + "HighlightUtilities\\": "" + }, + "files": [ + "HighlightUtilities/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Geert Bergman", + "homepage": "http://www.scrivo.org/", + "role": "Project Author" + }, + { + "name": "Vladimir Jimenez", + "homepage": "https://allejo.io", + "role": "Maintainer" + }, + { + "name": "Martin Folkers", + "homepage": "https://twobrain.io", + "role": "Contributor" + } + ], + "description": "Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js", + "keywords": [ + "code", + "highlight", + "highlight.js", + "highlight.php", + "syntax" + ], + "time": "2020-03-02T05:59:21+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -6088,23 +6349,26 @@ }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -6112,7 +6376,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -6135,7 +6399,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2019-02-01T05:30:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -6324,6 +6588,52 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2018-10-04T04:07:39+00:00" }, + { + "name": "sebastian/type", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "time": "2019-07-02T08:10:15+00:00" + }, { "name": "sebastian/version", "version": "2.0.1", @@ -6813,7 +7123,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.1.3" + "php": "^7.2" }, "platform-dev": [] } diff --git a/config/app.php b/config/app.php index 7024ed2..0f6e725 100644 --- a/config/app.php +++ b/config/app.php @@ -38,7 +38,7 @@ return [ | */ - 'debug' => env('APP_DEBUG', false), + 'debug' => (bool) env('APP_DEBUG', false), /* |-------------------------------------------------------------------------- diff --git a/config/auth.php b/config/auth.php index 897dc82..aaf982b 100644 --- a/config/auth.php +++ b/config/auth.php @@ -97,7 +97,21 @@ return [ 'provider' => 'users', 'table' => 'password_resets', 'expire' => 60, + 'throttle' => 60, ], ], + /* + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ + + 'password_timeout' => 10800, + ]; diff --git a/config/database.php b/config/database.php index 921769c..b42d9b3 100644 --- a/config/database.php +++ b/config/database.php @@ -119,10 +119,10 @@ return [ 'redis' => [ - 'client' => env('REDIS_CLIENT', 'predis'), + 'client' => env('REDIS_CLIENT', 'phpredis'), 'options' => [ - 'cluster' => env('REDIS_CLUSTER', 'predis'), + 'cluster' => env('REDIS_CLUSTER', 'redis'), 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), ], @@ -130,16 +130,16 @@ return [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), - 'database' => env('REDIS_DB', 0), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_DB', '0'), ], 'cache' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), - 'port' => env('REDIS_PORT', 6379), - 'database' => env('REDIS_CACHE_DB', 1), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_CACHE_DB', '1'), ], ], diff --git a/config/filesystems.php b/config/filesystems.php index 84bad56..4448b0b 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -37,7 +37,7 @@ return [ | may even configure multiple disks of the same driver. Defaults have | been setup for each driver as an example of the required options. | - | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" + | Supported Drivers: "local", "ftp", "sftp", "s3" | */ @@ -62,6 +62,7 @@ return [ 'region' => env('AWS_REGION'), 'bucket' => env('AWS_BUCKET'), 'url' => env('AWS_URL'), + 'endpoint' => env('AWS_ENDPOINT'), ], ], diff --git a/config/logging.php b/config/logging.php index 6608792..0c70640 100644 --- a/config/logging.php +++ b/config/logging.php @@ -88,6 +88,15 @@ return [ 'driver' => 'errorlog', 'level' => 'debug', ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], ], ]; diff --git a/config/mail.php b/config/mail.php index 6f8469f..3c65eb3 100644 --- a/config/mail.php +++ b/config/mail.php @@ -11,8 +11,8 @@ return [ | sending of e-mail. You may specify which one you're using throughout | your application here. By default, Laravel is setup for SMTP mail. | - | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses", - | "sparkpost", "postmark", "log", "array" + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array" | */ diff --git a/config/queue.php b/config/queue.php index ef4720a..fd799e5 100644 --- a/config/queue.php +++ b/config/queue.php @@ -80,6 +80,7 @@ return [ */ 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], diff --git a/config/services.php b/config/services.php index 8ce6cc6..521785c 100644 --- a/config/services.php +++ b/config/services.php @@ -30,8 +30,4 @@ return [ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], - 'sparkpost' => [ - 'secret' => env('SPARKPOST_SECRET'), - ], - ]; diff --git a/config/session.php b/config/session.php index fae302a..d958f97 100644 --- a/config/session.php +++ b/config/session.php @@ -190,7 +190,7 @@ return [ | take place, and can be used to mitigate CSRF attacks. By default, we | do not enable this as other CSRF protection services are in place. | - | Supported: "lax", "strict" + | Supported: "lax", "strict", "none" | */ diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php index bf6caf6..724de4b 100644 --- a/resources/lang/en/passwords.php +++ b/resources/lang/en/passwords.php @@ -13,9 +13,9 @@ return [ | */ - 'password' => 'Passwords must be at least eight characters and match the confirmation.', 'reset' => 'Your password has been reset!', 'sent' => 'We have e-mailed your password reset link!', + 'throttled' => 'Please wait before retrying.', 'token' => 'This password reset token is invalid.', 'user' => "We can't find a user with that e-mail address.", diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index e1d879f..a65914f 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -40,7 +40,7 @@ return [ 'dimensions' => 'The :attribute has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute must end with one of the following: :values', + 'ends_with' => 'The :attribute must end with one of the following: :values.', 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', @@ -93,6 +93,7 @@ return [ 'not_in' => 'The selected :attribute is invalid.', 'not_regex' => 'The :attribute format is invalid.', 'numeric' => 'The :attribute must be a number.', + 'password' => 'The password is incorrect.', 'present' => 'The :attribute field must be present.', 'regex' => 'The :attribute format is invalid.', 'required' => 'The :attribute field is required.', @@ -109,7 +110,7 @@ return [ 'string' => 'The :attribute must be :size characters.', 'array' => 'The :attribute must contain :size items.', ], - 'starts_with' => 'The :attribute must start with one of the following: :values', + 'starts_with' => 'The :attribute must start with one of the following: :values.', 'string' => 'The :attribute must be a string.', 'timezone' => 'The :attribute must be a valid zone.', 'unique' => 'The :attribute has already been taken.', From ee7b7cf2749ded6ee4f803b3d80f8318ce5efd54 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 24 May 2020 00:28:19 +0900 Subject: [PATCH 47/58] add parsedown --- composer.json | 1 + composer.lock | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 460ee77..2682f02 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "php": "^7.2", "anhskohbo/no-captcha": "^3.0", "doctrine/dbal": "^2.9", + "erusev/parsedown": "^1.7", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "jakeasmith/http_build_url": "^1.0", diff --git a/composer.lock b/composer.lock index 09367a8..4019b0e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "803d2a1293bf2c97bc118821acdb0216", + "content-hash": "091ea06cd88482b4e6f802c04e01d839", "packages": [ { "name": "anhskohbo/no-captcha", @@ -602,6 +602,52 @@ ], "time": "2020-02-13T22:36:52+00:00" }, + { + "name": "erusev/parsedown", + "version": "1.7.4", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2019-12-30T22:54:17+00:00" + }, { "name": "fideloper/proxy", "version": "4.3.0", From 00f75f33cc9601b5d23ab261989591f951589ee2 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 24 May 2020 12:02:34 +0900 Subject: [PATCH 48/58] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f773c6b..4779648 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ a.k.a. shikorism.net ## 構成 -- Laravel 5.5 -- Bootstrap 4.3.1 +- Laravel 6 +- Bootstrap 4.4.1 ## 実行環境 From 019412c72aff187c52bde6fb4c1fc3d4da4b60d9 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 24 May 2020 17:27:42 +0900 Subject: [PATCH 49/58] =?UTF-8?q?=E3=82=B0=E3=83=A9=E3=83=95=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=82=92=E5=AF=BE=E8=B1=A1=E6=9C=9F=E9=96=93?= =?UTF-8?q?=E3=81=94=E3=81=A8=E3=81=AB=E6=8E=98=E3=82=8A=E4=B8=8B=E3=81=92?= =?UTF-8?q?=E3=82=8B=E5=BD=A2=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/UserController.php | 192 ++++++++++++------ resources/assets/js/user/stats.js | 78 +++---- .../views/components/profile-mini.blade.php | 14 ++ resources/views/user/base.blade.php | 15 +- resources/views/user/stats/all.blade.php | 20 ++ resources/views/user/stats/base.blade.php | 70 +++++++ resources/views/user/stats/monthly.blade.php | 17 ++ .../yearly.blade.php} | 22 +- routes/web.php | 5 +- 9 files changed, 302 insertions(+), 131 deletions(-) create mode 100644 resources/views/components/profile-mini.blade.php create mode 100644 resources/views/user/stats/all.blade.php create mode 100644 resources/views/user/stats/base.blade.php create mode 100644 resources/views/user/stats/monthly.blade.php rename resources/views/user/{stats.blade.php => stats/yearly.blade.php} (54%) diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index be151d4..8e12497 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers; use App\Ejaculation; use App\User; use Carbon\Carbon; +use Carbon\CarbonInterface; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; @@ -63,80 +64,56 @@ SQL return view('user.profile')->with(compact('user', 'ejaculations', 'tags')); } - public function stats($name) + public function statsAll($name) { $user = User::where('name', $name)->first(); if (empty($user)) { abort(404); } - $dateUntil = now()->addMonth()->startOfMonth(); + $availableMonths = $this->makeStatsAvailableMonths($user); + $graphData = $this->makeGraphData($user); - $groupByDay = Ejaculation::select(DB::raw( - <<<'SQL' -to_char(ejaculated_date, 'YYYY/MM/DD') AS "date", -count(*) AS "count" -SQL - )) - ->where('user_id', $user->id) - ->where('ejaculated_date', '<', $dateUntil) - ->groupBy(DB::raw("to_char(ejaculated_date, 'YYYY/MM/DD')")) - ->orderBy(DB::raw("to_char(ejaculated_date, 'YYYY/MM/DD')")) - ->get(); + return view('user.stats.all')->with(compact('user', 'graphData', 'availableMonths')); + } - $groupByHour = Ejaculation::select(DB::raw( - <<<'SQL' -to_char(ejaculated_date, 'HH24') AS "hour", -count(*) AS "count" -SQL - )) - ->where('user_id', $user->id) - ->where('ejaculated_date', '<', $dateUntil) - ->groupBy(DB::raw("to_char(ejaculated_date, 'HH24')")) - ->orderBy(DB::raw('1')) - ->get(); - - $dailySum = []; - $monthlySum = []; - $yearlySum = []; - $dowSum = array_fill(0, 7, 0); - $hourlySum = array_fill(0, 24, 0); - - // 年間グラフ用の配列初期化 - if ($groupByDay->first() !== null) { - $year = Carbon::createFromFormat('Y/m/d', $groupByDay->first()->date)->year; - $currentYear = date('Y'); - for (; $year <= $currentYear; $year++) { - $yearlySum[$year] = 0; - } + public function statsYearly($name, $year) + { + $user = User::where('name', $name)->first(); + if (empty($user)) { + abort(404); } - foreach ($groupByDay as $data) { - $date = Carbon::createFromFormat('Y/m/d', $data->date); - $yearAndMonth = $date->format('Y/m'); + $availableMonths = $this->makeStatsAvailableMonths($user); + $graphData = $this->makeGraphData( + $user, + Carbon::createFromDate($year, 1, 1, config('app.timezone'))->startOfDay(), + Carbon::createFromDate($year, 1, 1, config('app.timezone'))->addYear()->startOfDay() + ); - $dailySum[$date->timestamp] = $data->count; - $yearlySum[$date->year] += $data->count; - $dowSum[$date->dayOfWeek] += $data->count; - $monthlySum[$yearAndMonth] = ($monthlySum[$yearAndMonth] ?? 0) + $data->count; + return view('user.stats.yearly') + ->with(compact('user', 'graphData', 'availableMonths')) + ->with('currentYear', (int) $year); + } + + public function statsMonthly($name, $year, $month) + { + $user = User::where('name', $name)->first(); + if (empty($user)) { + abort(404); } - foreach ($groupByHour as $data) { - $hour = (int)$data->hour; - $hourlySum[$hour] += $data->count; - } + $availableMonths = $this->makeStatsAvailableMonths($user); + $graphData = $this->makeGraphData( + $user, + Carbon::createFromDate($year, $month, 1, config('app.timezone'))->startOfDay(), + Carbon::createFromDate($year, $month, 1, config('app.timezone'))->addMonth()->startOfDay() + ); - $graphData = [ - 'dailySum' => $dailySum, - 'dowSum' => $dowSum, - 'monthlySum' => $monthlySum, - 'yearlyKey' => array_keys($yearlySum), - 'yearlySum' => array_values($yearlySum), - 'hourlyKey' => array_keys($hourlySum), - 'hourlySum' => array_values($hourlySum), - ]; - - return view('user.stats')->with(compact('user', 'graphData')); + return view('user.stats.monthly') + ->with(compact('user', 'graphData', 'availableMonths')) + ->with('currentYear', (int) $year) + ->with('currentMonth', (int) $month); } public function okazu($name) @@ -191,4 +168,99 @@ SQL return view('user.likes')->with(compact('user', 'likes')); } + + private function makeStatsAvailableMonths(User $user): array + { + $availableMonths = []; + $oldest = $user->ejaculations()->orderBy('ejaculated_date')->first(); + if (isset($oldest)) { + $oldestMonth = $oldest->ejaculated_date->startOfMonth(); + $currentMonth = now()->startOfMonth(); + for ($month = $currentMonth; $oldestMonth <= $currentMonth; $month = $month->subMonth()) { + if (!isset($availableMonths[$month->year])) { + $availableMonths[$month->year] = []; + } + $availableMonths[$month->year][] = $month->month; + } + } + + return $availableMonths; + } + + private function makeGraphData(User $user, CarbonInterface $dateSince = null, CarbonInterface $dateUntil = null): array + { + if ($dateUntil === null) { + $dateUntil = now()->addMonth()->startOfMonth(); + } + $dateCondition = [ + ['ejaculated_date', '<', $dateUntil], + ]; + if ($dateSince !== null) { + $dateCondition[] = ['ejaculated_date', '>=', $dateSince]; + } + + $groupByDay = Ejaculation::select(DB::raw( + <<<'SQL' +to_char(ejaculated_date, 'YYYY/MM/DD') AS "date", +count(*) AS "count" +SQL + )) + ->where('user_id', $user->id) + ->where($dateCondition) + ->groupBy(DB::raw("to_char(ejaculated_date, 'YYYY/MM/DD')")) + ->orderBy(DB::raw("to_char(ejaculated_date, 'YYYY/MM/DD')")) + ->get(); + + $groupByHour = Ejaculation::select(DB::raw( + <<<'SQL' +to_char(ejaculated_date, 'HH24') AS "hour", +count(*) AS "count" +SQL + )) + ->where('user_id', $user->id) + ->where($dateCondition) + ->groupBy(DB::raw("to_char(ejaculated_date, 'HH24')")) + ->orderBy(DB::raw('1')) + ->get(); + + $dailySum = []; + $monthlySum = []; + $yearlySum = []; + $dowSum = array_fill(0, 7, 0); + $hourlySum = array_fill(0, 24, 0); + + // 年間グラフ用の配列初期化 + if ($groupByDay->first() !== null) { + $year = Carbon::createFromFormat('Y/m/d', $groupByDay->first()->date)->year; + $currentYear = date('Y'); + for (; $year <= $currentYear; $year++) { + $yearlySum[$year] = 0; + } + } + + foreach ($groupByDay as $data) { + $date = Carbon::createFromFormat('Y/m/d', $data->date); + $yearAndMonth = $date->format('Y/m'); + + $dailySum[$date->timestamp] = $data->count; + $yearlySum[$date->year] += $data->count; + $dowSum[$date->dayOfWeek] += $data->count; + $monthlySum[$yearAndMonth] = ($monthlySum[$yearAndMonth] ?? 0) + $data->count; + } + + foreach ($groupByHour as $data) { + $hour = (int)$data->hour; + $hourlySum[$hour] += $data->count; + } + + return [ + 'dailySum' => $dailySum, + 'dowSum' => $dowSum, + 'monthlySum' => $monthlySum, + 'yearlyKey' => array_keys($yearlySum), + 'yearlySum' => array_values($yearlySum), + 'hourlyKey' => array_keys($hourlySum), + 'hourlySum' => array_values($hourlySum), + ]; + } } diff --git a/resources/assets/js/user/stats.js b/resources/assets/js/user/stats.js index 2bc1c7c..d1fda72 100644 --- a/resources/assets/js/user/stats.js +++ b/resources/assets/js/user/stats.js @@ -1,6 +1,6 @@ import CalHeatMap from 'cal-heatmap'; import Chart from 'chart.js'; -import {addMonths, format, startOfMonth, subMonths} from 'date-fns'; +import {addMonths, format} from 'date-fns'; const graphData = JSON.parse(document.getElementById('graph-data').textContent); @@ -90,53 +90,35 @@ function createMonthlyGraphData(from) { return {keys, values}; } -new CalHeatMap().init({ - itemSelector: '#cal-heatmap', - domain: 'month', - subDomain: 'day', - domainLabelFormat: '%Y/%m', - weekStartOnMonday: false, - start: new Date().setMonth(new Date().getMonth() - 9), - range: 10, - data: graphData.dailySum, - legend: [1, 2, 3, 4] -}); - -// 直近1年の月間グラフのデータを準備 -const monthlyTermFrom = subMonths(startOfMonth(new Date()), 11); -const {keys: monthlyKey, values: monthlySum} = createMonthlyGraphData(monthlyTermFrom); - -const monthlyGraph = createLineGraph('monthly-graph', monthlyKey, monthlySum); -createLineGraph('yearly-graph', graphData.yearlyKey, graphData.yearlySum); -createBarGraph('hourly-graph', graphData.hourlyKey, graphData.hourlySum); -createBarGraph('dow-graph', ['日', '月', '火', '水', '木', '金', '土'], graphData.dowSum); - -// 月間グラフの期間セレクターを準備 -const monthlyTermSelector = document.getElementById('monthly-term'); -const earliestYear = [...new Set(Object.keys(graphData.monthlySum).map(v => v.substr(0, 4)))].shift(); -for (let year = earliestYear; year <= new Date().getFullYear(); year++) { - const opt = document.createElement('option'); - opt.setAttribute('value', year); - opt.textContent = `${year}年`; - monthlyTermSelector.insertBefore(opt, monthlyTermSelector.firstChild); -} -if (monthlyTermSelector.children.length) { - monthlyTermSelector.selectedIndex = 0; +function getCurrentYear() { + const year = location.pathname.split('/').pop(); + return /^(20[0-9]{2})$/.test(year) ? year : null; } -monthlyTermSelector.addEventListener('change', function (e) { - let monthlyTermFrom; - if (e.target.selectedIndex === 0) { - // 今年のデータを表示する時は、直近12ヶ月を表示 - monthlyTermFrom = subMonths(startOfMonth(new Date()), 11); - } else { - // 過去のデータを表示する時は、選択年の1〜12月を表示 - monthlyTermFrom = new Date(e.target.value, 0, 1); - } +if (document.getElementById('cal-heatmap')) { + new CalHeatMap().init({ + itemSelector: '#cal-heatmap', + domain: 'month', + subDomain: 'day', + domainLabelFormat: '%Y/%m', + weekStartOnMonday: false, + start: new Date(getCurrentYear(), 0, 1, 0, 0, 0, 0), + range: 12, + data: graphData.dailySum, + legend: [1, 2, 3, 4] + }); +} - const {keys, values} = createMonthlyGraphData(monthlyTermFrom); - - monthlyGraph.data.labels = keys; - monthlyGraph.data.datasets[0].data = values; - monthlyGraph.update(); -}); +if (document.getElementById('monthly-graph')) { + const {keys: monthlyKey, values: monthlySum} = createMonthlyGraphData(new Date(getCurrentYear(), 0, 1, 0, 0, 0, 0)); + createLineGraph('monthly-graph', monthlyKey, monthlySum); +} +if (document.getElementById('yearly-graph')) { + createLineGraph('yearly-graph', graphData.yearlyKey, graphData.yearlySum); +} +if (document.getElementById('hourly-graph')) { + createBarGraph('hourly-graph', graphData.hourlyKey, graphData.hourlySum); +} +if (document.getElementById('dow-graph')) { + createBarGraph('dow-graph', ['日', '月', '火', '水', '木', '金', '土'], graphData.dowSum); +} diff --git a/resources/views/components/profile-mini.blade.php b/resources/views/components/profile-mini.blade.php new file mode 100644 index 0000000..58e72b5 --- /dev/null +++ b/resources/views/components/profile-mini.blade.php @@ -0,0 +1,14 @@ +
+ +
+
+ {{ $user->display_name }} +
+
+ @{{ $user->name }} + @if ($user->is_protected) + + @endif +
+
+
diff --git a/resources/views/user/base.blade.php b/resources/views/user/base.blade.php index 49598ac..67c49ee 100644 --- a/resources/views/user/base.blade.php +++ b/resources/views/user/base.blade.php @@ -4,8 +4,17 @@
- @component('components.profile', ['user' => $user]) - @endcomponent + @if (Route::currentRouteName() === 'user.profile') + @component('components.profile', ['user' => $user]) + @endcomponent + @else +
+
+ @component('components.profile-mini', ['user' => $user]) + @endcomponent +
+
+ @endif @section('sidebar') @show
@@ -15,7 +24,7 @@ タイムライン - @if (Route::currentRouteName() === 'user.stats.all') + @if (Route::currentRouteName() === 'user.stats') From 8fb8677406dedca773c430553487a1e20c16a6d5 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 24 May 2020 19:03:15 +0900 Subject: [PATCH 55/58] =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=95=E3=82=A3?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=88=E3=83=83=E3=83=97=E3=81=AB=E6=9C=80?= =?UTF-8?q?=E8=BF=91=E3=81=AE=E3=82=B7=E3=82=B3=E8=8D=89=E3=82=92=E7=A7=BB?= =?UTF-8?q?=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/UserController.php | 36 ++++++++++++++++++------- resources/assets/js/user/profile.js | 15 +++++++++++ resources/views/user/profile.blade.php | 18 +++++++++++++ webpack.mix.js | 1 + 4 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 resources/assets/js/user/profile.js diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 3c51369..618997c 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -62,7 +62,18 @@ SQL ->limit(10) ->get(); - return view('user.profile')->with(compact('user', 'ejaculations', 'tags')); + // シコ草 + $countByDayQuery = $this->countEjaculationByDay($user) + ->where('ejaculated_date', '>=', now()->startOfMonth()->subMonths(9)) + ->where('ejaculated_date', '<', now()->addMonth()->startOfMonth()) + ->get(); + $countByDay = []; + foreach ($countByDayQuery as $data) { + $date = Carbon::createFromFormat('Y/m/d', $data->date); + $countByDay[$date->timestamp] = $data->count; + } + + return view('user.profile')->with(compact('user', 'ejaculations', 'tags', 'countByDay')); } public function stats($name) @@ -223,16 +234,8 @@ SQL $dateCondition[] = ['ejaculated_date', '>=', $dateSince]; } - $groupByDay = Ejaculation::select(DB::raw( - <<<'SQL' -to_char(ejaculated_date, 'YYYY/MM/DD') AS "date", -count(*) AS "count" -SQL - )) - ->where('user_id', $user->id) + $groupByDay = $this->countEjaculationByDay($user) ->where($dateCondition) - ->groupBy(DB::raw("to_char(ejaculated_date, 'YYYY/MM/DD')")) - ->orderBy(DB::raw("to_char(ejaculated_date, 'YYYY/MM/DD')")) ->get(); $groupByHour = Ejaculation::select(DB::raw( @@ -287,4 +290,17 @@ SQL 'hourlySum' => array_values($hourlySum), ]; } + + private function countEjaculationByDay(User $user) + { + return Ejaculation::select(DB::raw( + <<<'SQL' +to_char(ejaculated_date, 'YYYY/MM/DD') AS "date", +count(*) AS "count" +SQL + )) + ->where('user_id', $user->id) + ->groupBy(DB::raw("to_char(ejaculated_date, 'YYYY/MM/DD')")) + ->orderBy(DB::raw("to_char(ejaculated_date, 'YYYY/MM/DD')")); + } } diff --git a/resources/assets/js/user/profile.js b/resources/assets/js/user/profile.js new file mode 100644 index 0000000..24cba77 --- /dev/null +++ b/resources/assets/js/user/profile.js @@ -0,0 +1,15 @@ +import CalHeatMap from 'cal-heatmap'; + +if (document.getElementById('cal-heatmap')) { + new CalHeatMap().init({ + itemSelector: '#cal-heatmap', + domain: 'month', + subDomain: 'day', + domainLabelFormat: '%Y/%m', + weekStartOnMonday: false, + start: new Date().setMonth(new Date().getMonth() - 9), + range: 10, + data: JSON.parse(document.getElementById('count-by-day').textContent), + legend: [1, 2, 3, 4] + }); +} diff --git a/resources/views/user/profile.blade.php b/resources/views/user/profile.blade.php index 5823026..978a39a 100644 --- a/resources/views/user/profile.blade.php +++ b/resources/views/user/profile.blade.php @@ -2,6 +2,12 @@ @section('title', $user->display_name . ' (@' . $user->name . ')') +@push('head') + @if (Route::currentRouteName() === 'user.profile') + + @endif +@endpush + @section('sidebar') {{-- TODO: タイムラインとオカズのテンプレを分けたら条件外す --}} @if (Route::currentRouteName() === 'user.profile') @@ -32,6 +38,11 @@ このユーザはチェックイン履歴を公開していません。

@else + @if ($ejaculations->count() !== 0 && $ejaculations->currentPage() === 1) +
Shikontributions
+
+
+ @endif
    @forelse ($ejaculations as $ejaculation)
  • @@ -116,3 +127,10 @@ @endslot @endcomponent @endsection + +@push('script') + + + +@endpush + diff --git a/webpack.mix.js b/webpack.mix.js index 59b6cee..94f9909 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -14,6 +14,7 @@ require('laravel-mix-bundle-analyzer') mix.js('resources/assets/js/app.js', 'public/js') .js('resources/assets/js/home.js', 'public/js') + .js('resources/assets/js/user/profile.js', 'public/js/user') .js('resources/assets/js/user/stats.js', 'public/js/user') .js('resources/assets/js/setting/privacy.js', 'public/js/setting') .js('resources/assets/js/setting/import.js', 'public/js/setting') From e2f01561a893df7fac3f5d2f3065a8da1a03d20e Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 24 May 2020 19:39:24 +0900 Subject: [PATCH 56/58] =?UTF-8?q?ejaculations.source=E3=81=AFNULL=E9=9D=9E?= =?UTF-8?q?=E8=A8=B1=E5=AE=B9=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Ejaculation.php | 2 +- .../Controllers/EjaculationController.php | 1 + ...ke_non_nullable_source_on_ejaculations.php | 34 +++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2020_05_24_193301_make_non_nullable_source_on_ejaculations.php diff --git a/app/Ejaculation.php b/app/Ejaculation.php index 8392469..4fa0111 100644 --- a/app/Ejaculation.php +++ b/app/Ejaculation.php @@ -17,7 +17,7 @@ class Ejaculation extends Model protected $fillable = [ 'user_id', 'ejaculated_date', - 'note', 'geo_latitude', 'geo_longitude', 'link', + 'note', 'geo_latitude', 'geo_longitude', 'link', 'source', 'is_private', 'is_too_sensitive' ]; diff --git a/app/Http/Controllers/EjaculationController.php b/app/Http/Controllers/EjaculationController.php index c0d6277..b20f5f4 100644 --- a/app/Http/Controllers/EjaculationController.php +++ b/app/Http/Controllers/EjaculationController.php @@ -57,6 +57,7 @@ class EjaculationController extends Controller 'ejaculated_date' => Carbon::createFromFormat('Y/m/d H:i', $inputs['date'] . ' ' . $inputs['time']), 'note' => $inputs['note'] ?? '', 'link' => $inputs['link'] ?? '', + 'source' => Ejaculation::SOURCE_WEB, 'is_private' => $request->has('is_private') ?? false, 'is_too_sensitive' => $request->has('is_too_sensitive') ?? false ]); diff --git a/database/migrations/2020_05_24_193301_make_non_nullable_source_on_ejaculations.php b/database/migrations/2020_05_24_193301_make_non_nullable_source_on_ejaculations.php new file mode 100644 index 0000000..c644313 --- /dev/null +++ b/database/migrations/2020_05_24_193301_make_non_nullable_source_on_ejaculations.php @@ -0,0 +1,34 @@ +string('source')->nullable(false)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('ejaculations', function (Blueprint $table) { + $table->string('source')->nullable()->change(); + }); + } +} From f3a5644a3223aef0f42e9b376332a249e399c1ce Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 24 May 2020 19:42:16 +0900 Subject: [PATCH 57/58] =?UTF-8?q?=E3=82=B9=E3=82=B3=E3=83=BC=E3=83=97?= =?UTF-8?q?=E3=81=AE=E7=B0=A1=E7=95=A5=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Ejaculation.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Ejaculation.php b/app/Ejaculation.php index 4fa0111..a0e571a 100644 --- a/app/Ejaculation.php +++ b/app/Ejaculation.php @@ -49,8 +49,7 @@ class Ejaculation extends Model public function scopeOnlyWebCheckin(Builder $query) { - return $query->where('ejaculations.source', null) - ->orWhere('ejaculations.source', '<>', Ejaculation::SOURCE_CSV); + return $query->where('ejaculations.source', Ejaculation::SOURCE_WEB); } public function scopeWithLikes(Builder $query) From 1a3cead9327e828bd2e922fb9236a05d3e9cf91d Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 24 May 2020 19:50:51 +0900 Subject: [PATCH 58/58] fix test --- database/factories/EjaculationFactory.php | 1 + tests/Feature/SettingTest.php | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/database/factories/EjaculationFactory.php b/database/factories/EjaculationFactory.php index 65fbb6e..7beddc1 100644 --- a/database/factories/EjaculationFactory.php +++ b/database/factories/EjaculationFactory.php @@ -8,5 +8,6 @@ $factory->define(Ejaculation::class, function (Faker $faker) { return [ 'ejaculated_date' => $faker->date('Y-m-d H:i:s'), 'note' => $faker->text, + 'source' => Ejaculation::SOURCE_WEB, ]; }); diff --git a/tests/Feature/SettingTest.php b/tests/Feature/SettingTest.php index a7a79ec..85c1c9f 100644 --- a/tests/Feature/SettingTest.php +++ b/tests/Feature/SettingTest.php @@ -13,6 +13,14 @@ use Tests\TestCase; class SettingTest extends TestCase { + use RefreshDatabase; + + protected function setUp(): void + { + parent::setUp(); + $this->seed(); + } + public function testDestroyUser() { $user = factory(User::class)->create();