From 1854fa57629b8a32483e335e24d1d133eb7ad74f Mon Sep 17 00:00:00 2001 From: Daniel Polito Date: Wed, 24 Jun 2020 19:24:10 -0300 Subject: [PATCH 1/2] Add fwd reset-db | Add fwd.yaml --- app/Builder/Fwd.php | 11 + app/Commands/Install.php | 21 +- app/Commands/Reset.php | 39 +- app/Commands/ResetDb.php | 78 +++ app/Commands/Script.php | 61 ++ app/Environment.php | 11 +- composer.json | 3 +- composer.lock | 1054 +++++++++++++++++++++++++-------- fwd.yaml | 7 + tests/Feature/InstallTest.php | 57 +- tests/Feature/ResetDbTest.php | 28 + tests/Feature/ResetTest.php | 10 +- tests/Feature/ScriptTest.php | 39 ++ tests/fixtures/fwd.yaml | 8 + 14 files changed, 1130 insertions(+), 297 deletions(-) create mode 100644 app/Builder/Fwd.php create mode 100644 app/Commands/ResetDb.php create mode 100644 app/Commands/Script.php create mode 100644 fwd.yaml create mode 100644 tests/Feature/ResetDbTest.php create mode 100644 tests/Feature/ScriptTest.php create mode 100644 tests/fixtures/fwd.yaml diff --git a/app/Builder/Fwd.php b/app/Builder/Fwd.php new file mode 100644 index 0000000..e285ff3 --- /dev/null +++ b/app/Builder/Fwd.php @@ -0,0 +1,11 @@ +info('File ".fwd" copied.'); } else { - $this->warn('File ".fwd" already exists, skipping. (to override run again with --force)'); + $this->warn('File ".fwd" already exists, skipping. (to override run again with --force).'); } if ($this->option('force') || ! File::exists($this->environment->getContextDockerCompose())) { @@ -70,7 +70,24 @@ public function handle() $this->info('File "docker-compose.yml" copied.'); } else { - $this->warn('File "docker-compose.yml" already exists, skipping. (to override run again with --force)'); + $this->warn('File "docker-compose.yml" already exists, skipping. (to override run again with --force).'); + } + + if ($this->option('force') || ! File::exists($this->environment->getContextFile('fwd.yaml'))) { + $copied = File::copy( + $this->environment->getDefaultFile('fwd.yaml'), + $this->environment->getContextFile('fwd.yaml') + ); + + if (false === $copied) { + $this->error('Failed to write local "fwd.yaml" file.'); + + return 1; + } + + $this->info('File "fwd.yaml" copied.'); + } else { + $this->warn('File "fwd.yaml" already exists, skipping. (to override run again with --force).'); } $this->preset(); diff --git a/app/Commands/Reset.php b/app/Commands/Reset.php index 3828588..c5c05de 100644 --- a/app/Commands/Reset.php +++ b/app/Commands/Reset.php @@ -6,7 +6,7 @@ use App\Builder\Composer; use App\Builder\DockerComposeExec; use App\Builder\Escaped; -use App\Builder\Mysql; +use App\Builder\Fwd; use App\Builder\RedisCli; use App\Builder\Yarn; @@ -42,9 +42,7 @@ public function handle() : int $commands = [ [$this, 'composerInstall'], [$this, 'cacheFlushAll'], - [$this, 'datatabaseDropDatabase'], - [$this, 'databaseCreateDatabase'], - [$this, 'databaseGrantDatabase'], + [$this, 'databaseReset'], [$this, 'artisanMigrateFresh'], [$this, 'yarnInstall'], [$this, 'yarnDev'], @@ -79,35 +77,12 @@ protected function cacheFlushAll() : int }); } - protected function datatabaseDropDatabase() : int + protected function databaseReset() : int { - return $this->runTask('MySQL Drop Database', function () { - return $this->commandExecutor->runQuietly(Mysql::make( - '-e', - Escaped::make(sprintf('drop database if exists %s', env('DB_DATABASE'))) - )); - }); - } - - protected function databaseCreateDatabase() : int - { - return $this->runTask('MySQL Create Database', function () { - return $this->commandExecutor->runQuietly(Mysql::make( - '-e', - Escaped::make(sprintf('create database %s', env('DB_DATABASE'))) - )); - }); - } - - protected function databaseGrantDatabase() : int - { - return $this->runTask('MySQL Grant Privileges', function () { - return $this->commandExecutor->runQuietly(Mysql::make( - '-e', - Escaped::make(vsprintf('grant all on %s.* to %s@"%%"', [ - env('DB_DATABASE'), - env('DB_USERNAME'), - ])) + return $this->runTask('Database Reset', function () { + return $this->commandExecutor->runQuietly(Fwd::make( + 'reset-db', + $this->argument('envFile') )); }); } diff --git a/app/Commands/ResetDb.php b/app/Commands/ResetDb.php new file mode 100644 index 0000000..428478a --- /dev/null +++ b/app/Commands/ResetDb.php @@ -0,0 +1,78 @@ +argument('envFile')) { + $this->environment->overloadEnv( + $this->environment->getContextEnv($envFile) + ); + } + + $commands = [ + [$this, 'databaseDropDatabase'], + [$this, 'databaseCreateDatabase'], + [$this, 'databaseGrantDatabase'], + ]; + + return $this->runCommands($commands); + } + + protected function databaseDropDatabase() : int + { + return $this->runTask('MySQL Drop Database', function () { + return $this->commandExecutor->runQuietly(Mysql::make( + '-e', + Escaped::make(sprintf('drop database if exists %s', env('DB_DATABASE'))) + )); + }); + } + + protected function databaseCreateDatabase() : int + { + return $this->runTask('MySQL Create Database', function () { + return $this->commandExecutor->runQuietly(Mysql::make( + '-e', + Escaped::make(sprintf('create database %s', env('DB_DATABASE'))) + )); + }); + } + + protected function databaseGrantDatabase() : int + { + return $this->runTask('MySQL Grant Privileges', function () { + return $this->commandExecutor->runQuietly(Mysql::make( + '-e', + Escaped::make(vsprintf('grant all on %s.* to %s@"%%"', [ + env('DB_DATABASE'), + env('DB_USERNAME'), + ])) + )); + }); + } +} diff --git a/app/Commands/Script.php b/app/Commands/Script.php new file mode 100644 index 0000000..82756a9 --- /dev/null +++ b/app/Commands/Script.php @@ -0,0 +1,61 @@ +environment->getContextFile('fwd.yaml'), + Yaml::PARSE_OBJECT_FOR_MAP + ); + + if (! $script = object_get($fwdYaml, 'scripts.'.$this->argument('name'))) { + $this->error('Script not found.'); + + return 1; + } + + try { + collect($script) + ->each(function ($command) { + $exitCode = $this->runTask($command, function () use ($command) { + return $this->commandExecutor->runQuietly( + Builder::make($command) + ); + }); + + if ($exitCode) { + throw new \Exception("Command '{$command}' failed."); + } + }); + } catch (\Exception $exception) { + $this->error($exception->getMessage()); + + return 1; + } + } +} diff --git a/app/Environment.php b/app/Environment.php index e7bd075..e6a80d1 100644 --- a/app/Environment.php +++ b/app/Environment.php @@ -112,7 +112,9 @@ public function getContextPath(): string public function getDefaultDockerCompose(string $version): string { - return sprintf('%s/docker-compose-v%s.yml', $this->getDefaultPath(), $version); + return $this->getDefaultFile( + sprintf('docker-compose-v%s.yml', $version) + ); } public function getContextDockerCompose(): string @@ -122,7 +124,7 @@ public function getContextDockerCompose(): string public function getDefaultFwd(): string { - return sprintf('%s/.fwd', $this->getDefaultPath()); + return $this->getDefaultFile('.fwd'); } public function getHomeFwd(): string @@ -135,6 +137,11 @@ public function getContextEnv(string $env = '.env'): string return $this->getContextFile($env); } + public function getDefaultFile(string $file): string + { + return sprintf('%s/%s', $this->getDefaultPath(), $file); + } + public function getContextFile(string $file): string { return sprintf('%s/%s', $this->getContextPath(), $file); diff --git a/composer.json b/composer.json index 9018caa..6638f61 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,8 @@ "illuminate/http": "^7.0", "illuminate/view": "^7.0", "laravel-zero/framework": "^7.0", - "padraic/phar-updater": "^1.0.6" + "padraic/phar-updater": "^1.0.6", + "symfony/yaml": "^5.1" }, "require-dev": { "mockery/mockery": "1.3.*", diff --git a/composer.lock b/composer.lock index ab20336..c2c6980 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": "c24f4a7dcb4f8ada8b7d4b2701f8b551", + "content-hash": "4e41e910abd4bbc1d175503e1d41ce0b", "packages": [ { "name": "composer/ca-bundle", @@ -107,20 +107,20 @@ }, { "name": "doctrine/inflector", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7" + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7", - "reference": "18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^7.0", @@ -194,7 +194,7 @@ "type": "tidelift" } ], - "time": "2020-05-11T11:25:59+00:00" + "time": "2020-05-29T15:13:26+00:00" }, { "name": "dragonmantank/cron-expression", @@ -296,16 +296,16 @@ }, { "name": "filp/whoops", - "version": "2.7.2", + "version": "2.7.3", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a" + "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a", - "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a", + "url": "https://api.github.com/repos/filp/whoops/zipball/5d5fe9bb3d656b514d455645b3addc5f7ba7714d", + "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d", "shasum": "" }, "require": { @@ -353,20 +353,20 @@ "throwable", "whoops" ], - "time": "2020-05-05T12:28:07+00:00" + "time": "2020-06-14T09:00:00+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.5.3", + "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e" + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", "shasum": "" }, "require": { @@ -374,7 +374,7 @@ "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.11" + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { "ext-curl": "*", @@ -420,7 +420,7 @@ "rest", "web service" ], - "time": "2020-04-18T10:38:46+00:00" + "time": "2020-06-16T21:01:06+00:00" }, { "name": "guzzlehttp/promises", @@ -546,7 +546,7 @@ }, { "name": "illuminate/cache", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/cache.git", @@ -597,7 +597,7 @@ }, { "name": "illuminate/config", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/config.git", @@ -641,16 +641,16 @@ }, { "name": "illuminate/console", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/console.git", - "reference": "c95fc7f09c968ee346a0484cd82afc08f3d5499f" + "reference": "cac29d85d3fb915b452cda046d4d74370dfe4a0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/c95fc7f09c968ee346a0484cd82afc08f3d5499f", - "reference": "c95fc7f09c968ee346a0484cd82afc08f3d5499f", + "url": "https://api.github.com/repos/illuminate/console/zipball/cac29d85d3fb915b452cda046d4d74370dfe4a0d", + "reference": "cac29d85d3fb915b452cda046d4d74370dfe4a0d", "shasum": "" }, "require": { @@ -663,10 +663,10 @@ "suggest": { "dragonmantank/cron-expression": "Required to use scheduler (^2.0).", "guzzlehttp/guzzle": "Required to use the ping methods on schedules (^6.3.1|^7.0).", - "illuminate/bus": "Required to use the scheduled job dispatcher (^7.0)", - "illuminate/container": "Required to use the scheduler (^7.0)", - "illuminate/filesystem": "Required to use the generator command (^7.0)", - "illuminate/queue": "Required to use closures for scheduled jobs (^7.0)" + "illuminate/bus": "Required to use the scheduled job dispatcher (^7.0).", + "illuminate/container": "Required to use the scheduler (^7.0).", + "illuminate/filesystem": "Required to use the generator command (^7.0).", + "illuminate/queue": "Required to use closures for scheduled jobs (^7.0)." }, "type": "library", "extra": { @@ -691,20 +691,20 @@ ], "description": "The Illuminate Console package.", "homepage": "https://laravel.com", - "time": "2020-05-13T14:36:59+00:00" + "time": "2020-06-19T13:41:58+00:00" }, { "name": "illuminate/container", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "84ae2fba28994b1f6d0d01c0e646e9484f00d727" + "reference": "aaf1612f558d856975746cd3d0da4f230035ef55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/84ae2fba28994b1f6d0d01c0e646e9484f00d727", - "reference": "84ae2fba28994b1f6d0d01c0e646e9484f00d727", + "url": "https://api.github.com/repos/illuminate/container/zipball/aaf1612f558d856975746cd3d0da4f230035ef55", + "reference": "aaf1612f558d856975746cd3d0da4f230035ef55", "shasum": "" }, "require": { @@ -712,6 +712,9 @@ "php": "^7.2.5", "psr/container": "^1.0" }, + "provide": { + "psr/container-implementation": "1.0" + }, "type": "library", "extra": { "branch-alias": { @@ -735,11 +738,11 @@ ], "description": "The Illuminate Container package.", "homepage": "https://laravel.com", - "time": "2020-05-13T14:09:17+00:00" + "time": "2020-06-11T14:29:51+00:00" }, { "name": "illuminate/contracts", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -783,16 +786,16 @@ }, { "name": "illuminate/events", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "59f6074ff6b14b475c7c97021dcbcd2e2bce2ebd" + "reference": "14b21444c04c3052cffbd76e0862b23fdae5fc19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/59f6074ff6b14b475c7c97021dcbcd2e2bce2ebd", - "reference": "59f6074ff6b14b475c7c97021dcbcd2e2bce2ebd", + "url": "https://api.github.com/repos/illuminate/events/zipball/14b21444c04c3052cffbd76e0862b23fdae5fc19", + "reference": "14b21444c04c3052cffbd76e0862b23fdae5fc19", "shasum": "" }, "require": { @@ -824,20 +827,20 @@ ], "description": "The Illuminate Events package.", "homepage": "https://laravel.com", - "time": "2020-04-14T13:14:16+00:00" + "time": "2020-06-18T15:37:01+00:00" }, { "name": "illuminate/filesystem", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "43d0aafb620151b9c88331e13e1660564fc56244" + "reference": "9ab0b617e80d01a09fefcf596e5b355370e13175" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/43d0aafb620151b9c88331e13e1660564fc56244", - "reference": "43d0aafb620151b9c88331e13e1660564fc56244", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/9ab0b617e80d01a09fefcf596e5b355370e13175", + "reference": "9ab0b617e80d01a09fefcf596e5b355370e13175", "shasum": "" }, "require": { @@ -847,12 +850,14 @@ "symfony/finder": "^5.0" }, "suggest": { - "illuminate/http": "Required for handling uploaded files (^7.0)", - "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0).", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "illuminate/http": "Required for handling uploaded files (^7.0).", + "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0.34).", "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-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0)" + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "symfony/mime": "Required to enable support for guessing extensions (^5.0)." }, "type": "library", "extra": { @@ -877,20 +882,20 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "https://laravel.com", - "time": "2020-03-26T19:53:03+00:00" + "time": "2020-06-14T09:08:06+00:00" }, { "name": "illuminate/http", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/http.git", - "reference": "72968ebe3eff6d41c62842a7872f5083bbde1f36" + "reference": "3baddf17f0da33191813b4f5830500022d4eb09c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/72968ebe3eff6d41c62842a7872f5083bbde1f36", - "reference": "72968ebe3eff6d41c62842a7872f5083bbde1f36", + "url": "https://api.github.com/repos/illuminate/http/zipball/3baddf17f0da33191813b4f5830500022d4eb09c", + "reference": "3baddf17f0da33191813b4f5830500022d4eb09c", "shasum": "" }, "require": { @@ -929,20 +934,20 @@ ], "description": "The Illuminate Http package.", "homepage": "https://laravel.com", - "time": "2020-05-18T21:39:58+00:00" + "time": "2020-06-23T20:57:43+00:00" }, { "name": "illuminate/session", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/session.git", - "reference": "84433173ff3f68edf88ec4e33df4d5fed7f52d94" + "reference": "f18c8772d76928e54f65fdb8cbc90b723b9e1e7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/session/zipball/84433173ff3f68edf88ec4e33df4d5fed7f52d94", - "reference": "84433173ff3f68edf88ec4e33df4d5fed7f52d94", + "url": "https://api.github.com/repos/illuminate/session/zipball/f18c8772d76928e54f65fdb8cbc90b723b9e1e7e", + "reference": "f18c8772d76928e54f65fdb8cbc90b723b9e1e7e", "shasum": "" }, "require": { @@ -980,20 +985,20 @@ ], "description": "The Illuminate Session package.", "homepage": "https://laravel.com", - "time": "2020-05-04T21:09:16+00:00" + "time": "2020-06-15T14:06:36+00:00" }, { "name": "illuminate/support", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "c06d87c1f2126e32337239163a6ae98b06635aeb" + "reference": "68b0f13940bdea9e57b1c5485a1f498934e43a23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/c06d87c1f2126e32337239163a6ae98b06635aeb", - "reference": "c06d87c1f2126e32337239163a6ae98b06635aeb", + "url": "https://api.github.com/repos/illuminate/support/zipball/68b0f13940bdea9e57b1c5485a1f498934e43a23", + "reference": "68b0f13940bdea9e57b1c5485a1f498934e43a23", "shasum": "" }, "require": { @@ -1042,20 +1047,20 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2020-05-18T15:24:09+00:00" + "time": "2020-06-23T15:40:58+00:00" }, { "name": "illuminate/testing", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/testing.git", - "reference": "37b77199f9d7bf0ea46ab630bbafc257d6d4f68d" + "reference": "444fd70a3c56e5daeee1e3b4c8bf9bf8fa28b2c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/testing/zipball/37b77199f9d7bf0ea46ab630bbafc257d6d4f68d", - "reference": "37b77199f9d7bf0ea46ab630bbafc257d6d4f68d", + "url": "https://api.github.com/repos/illuminate/testing/zipball/444fd70a3c56e5daeee1e3b4c8bf9bf8fa28b2c5", + "reference": "444fd70a3c56e5daeee1e3b4c8bf9bf8fa28b2c5", "shasum": "" }, "require": { @@ -1094,20 +1099,20 @@ ], "description": "The Illuminate Testing package.", "homepage": "https://laravel.com", - "time": "2020-05-15T13:05:23+00:00" + "time": "2020-05-29T09:44:42+00:00" }, { "name": "illuminate/view", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "5100e8f18a94f145e7f076511b76966b3351431a" + "reference": "092b7a37a3d7fd3b509a0b35f3dfe40a69a67d32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/5100e8f18a94f145e7f076511b76966b3351431a", - "reference": "5100e8f18a94f145e7f076511b76966b3351431a", + "url": "https://api.github.com/repos/illuminate/view/zipball/092b7a37a3d7fd3b509a0b35f3dfe40a69a67d32", + "reference": "092b7a37a3d7fd3b509a0b35f3dfe40a69a67d32", "shasum": "" }, "require": { @@ -1142,7 +1147,7 @@ ], "description": "The Illuminate View package.", "homepage": "https://laravel.com", - "time": "2020-05-11T14:03:04+00:00" + "time": "2020-05-26T22:18:03+00:00" }, { "name": "jolicode/jolinotif", @@ -1203,16 +1208,16 @@ }, { "name": "laravel-zero/foundation", - "version": "v7.12.0", + "version": "v7.17.2", "source": { "type": "git", "url": "https://github.com/laravel-zero/foundation.git", - "reference": "751d4f5aa59744dd17790d4d2422e088ba3b229e" + "reference": "b8b6764d77d797b9fc36ed1ef5559a6b9ff3330d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel-zero/foundation/zipball/751d4f5aa59744dd17790d4d2422e088ba3b229e", - "reference": "751d4f5aa59744dd17790d4d2422e088ba3b229e", + "url": "https://api.github.com/repos/laravel-zero/foundation/zipball/b8b6764d77d797b9fc36ed1ef5559a6b9ff3330d", + "reference": "b8b6764d77d797b9fc36ed1ef5559a6b9ff3330d", "shasum": "" }, "require": { @@ -1241,7 +1246,7 @@ "framework", "laravel" ], - "time": "2020-05-20T08:44:25+00:00" + "time": "2020-06-24T16:14:03+00:00" }, { "name": "laravel-zero/framework", @@ -1421,16 +1426,16 @@ }, { "name": "nesbot/carbon", - "version": "2.34.2", + "version": "2.35.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "3e87404329b8072295ea11d548b47a1eefe5a162" + "reference": "4b9bd835261ef23d36397a46a76b496a458305e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/3e87404329b8072295ea11d548b47a1eefe5a162", - "reference": "3e87404329b8072295ea11d548b47a1eefe5a162", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4b9bd835261ef23d36397a46a76b496a458305e5", + "reference": "4b9bd835261ef23d36397a46a76b496a458305e5", "shasum": "" }, "require": { @@ -1500,7 +1505,7 @@ "type": "tidelift" } ], - "time": "2020-05-19T22:14:16+00:00" + "time": "2020-05-24T18:27:52+00:00" }, { "name": "nunomaduro/collision", @@ -1933,16 +1938,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.7.3", + "version": "1.7.4", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae" + "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae", - "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", + "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", "shasum": "" }, "require": { @@ -1984,7 +1989,17 @@ "php", "type" ], - "time": "2020-03-21T18:07:53+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2020-06-07T10:40:07+00:00" }, { "name": "psr/container", @@ -2355,26 +2370,29 @@ }, { "name": "symfony/console", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935" + "reference": "34ac555a3627e324b660e318daa07572e1140123" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", - "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935", + "url": "https://api.github.com/repos/symfony/console/zipball/34ac555a3627e324b660e318daa07572e1140123", + "reference": "34ac555a3627e324b660e318daa07572e1140123", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1|^2" + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" }, "conflict": { "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", "symfony/process": "<4.4" @@ -2400,7 +2418,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2441,35 +2459,97 @@ "type": "tidelift" } ], - "time": "2020-03-30T11:42:42+00:00" + "time": "2020-06-15T12:59:21+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", + "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "files": [ + "function.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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-27T08:34:37+00:00" }, { "name": "symfony/error-handler", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "949ffc17c3ac3a9f8e6232220e2da33913c04ea4" + "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/949ffc17c3ac3a9f8e6232220e2da33913c04ea4", - "reference": "949ffc17c3ac3a9f8e6232220e2da33913c04ea4", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896", + "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/log": "^1.0", + "symfony/polyfill-php80": "^1.15", "symfony/var-dumper": "^4.4|^5.0" }, "require-dev": { + "symfony/deprecation-contracts": "^2.1", "symfony/http-kernel": "^4.4|^5.0", "symfony/serializer": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2510,25 +2590,27 @@ "type": "tidelift" } ], - "time": "2020-03-30T14:14:32+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc" + "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/24f40d95385774ed5c71dbf014edd047e2f2f3dc", - "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc0d059e2e997e79ca34125a52f3e33de4424ac7", + "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7", "shasum": "" }, "require": { - "php": "^7.2.5", - "symfony/event-dispatcher-contracts": "^2" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/dependency-injection": "<4.4" @@ -2553,7 +2635,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2594,24 +2676,24 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.0.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" + "reference": "405952c4e90941a17e52ef7489a2bd94870bb290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", - "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/405952c4e90941a17e52ef7489a2bd94870bb290", + "reference": "405952c4e90941a17e52ef7489a2bd94870bb290", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/event-dispatcher": "^1" }, "suggest": { @@ -2620,7 +2702,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -2652,29 +2734,43 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/finder", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d" + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/600a52c29afc0d1caa74acbec8d3095ca7e9910d", - "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d", + "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187", + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2715,35 +2811,41 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d" + "reference": "f93055171b847915225bd5b0a5792888419d8d75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e47fdf8b24edc12022ba52923150ec6484d7f57d", - "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f93055171b847915225bd5b0a5792888419d8d75", + "reference": "f93055171b847915225bd5b0a5792888419d8d75", "shasum": "" }, "require": { - "php": "^7.2.5", - "symfony/mime": "^4.4|^5.0", - "symfony/polyfill-mbstring": "~1.1" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php80": "^1.15" }, "require-dev": { "predis/predis": "~1.0", - "symfony/expression-language": "^4.4|^5.0" + "symfony/cache": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2784,30 +2886,32 @@ "type": "tidelift" } ], - "time": "2020-04-18T20:50:06+00:00" + "time": "2020-06-15T06:52:54+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "3565e51eecd06106304baba5ccb7ba89db2d7d2b" + "reference": "a18c27ace1ef344ffcb129a5b089bad7643b387a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/3565e51eecd06106304baba5ccb7ba89db2d7d2b", - "reference": "3565e51eecd06106304baba5ccb7ba89db2d7d2b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a18c27ace1ef344ffcb129a5b089bad7643b387a", + "reference": "a18c27ace1ef344ffcb129a5b089bad7643b387a", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/log": "~1.0", + "symfony/deprecation-contracts": "^2.1", "symfony/error-handler": "^4.4|^5.0", "symfony/event-dispatcher": "^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9" + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/browser-kit": "<4.4", @@ -2854,7 +2958,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2895,26 +2999,27 @@ "type": "tidelift" } ], - "time": "2020-04-28T18:53:25+00:00" + "time": "2020-06-15T13:51:38+00:00" }, { "name": "symfony/mime", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b" + "reference": "c0c418f05e727606e85b482a8591519c4712cf45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b", - "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b", + "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45", + "reference": "c0c418f05e727606e85b482a8591519c4712cf45", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/mailer": "<4.4" @@ -2926,7 +3031,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2971,20 +3076,20 @@ "type": "tidelift" } ], - "time": "2020-04-17T03:29:44+00:00" + "time": "2020-06-09T15:07:35+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.17.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", "shasum": "" }, "require": { @@ -2997,6 +3102,10 @@ "extra": { "branch-alias": { "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3043,20 +3152,98 @@ "type": "tidelift" } ], - "time": "2020-05-12T16:14:59+00:00" + "time": "2020-06-06T08:46:27+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.17.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "6e4dbcf5e81eba86e36731f94fe56b1726835846" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/6e4dbcf5e81eba86e36731f94fe56b1726835846", + "reference": "6e4dbcf5e81eba86e36731f94fe56b1726835846", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "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 for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-06T08:46:27+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.17.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a" + "reference": "a57f8161502549a742a63c09f0a604997bf47027" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a", - "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a57f8161502549a742a63c09f0a604997bf47027", + "reference": "a57f8161502549a742a63c09f0a604997bf47027", "shasum": "" }, "require": { @@ -3071,6 +3258,10 @@ "extra": { "branch-alias": { "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3119,20 +3310,101 @@ "type": "tidelift" } ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-06-06T08:46:27+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.17.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "40309d1700e8f72447bb9e7b54af756eeea35620" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/40309d1700e8f72447bb9e7b54af756eeea35620", + "reference": "40309d1700e8f72447bb9e7b54af756eeea35620", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "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 for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-14T14:40:37+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.17.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fa79b11539418b02fc5e1897267673ba2c19419c" + "reference": "7110338d81ce1cbc3e273136e4574663627037a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c", - "reference": "fa79b11539418b02fc5e1897267673ba2c19419c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7", + "reference": "7110338d81ce1cbc3e273136e4574663627037a7", "shasum": "" }, "require": { @@ -3145,6 +3417,10 @@ "extra": { "branch-alias": { "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3192,7 +3468,7 @@ "type": "tidelift" } ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-06-06T08:46:27+00:00" }, { "name": "symfony/polyfill-php72", @@ -3265,16 +3541,16 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.17.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc" + "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc", - "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fa0837fe02d617d31fbb25f990655861bb27bd1a", + "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a", "shasum": "" }, "require": { @@ -3284,6 +3560,10 @@ "extra": { "branch-alias": { "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3333,29 +3613,110 @@ "type": "tidelift" } ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-06-06T08:46:27+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.17.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2", + "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-06T08:46:27+00:00" }, { "name": "symfony/process", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "3179f68dff5bad14d38c4114a1dab98030801fd7" + "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3179f68dff5bad14d38c4114a1dab98030801fd7", - "reference": "3179f68dff5bad14d38c4114a1dab98030801fd7", + "url": "https://api.github.com/repos/symfony/process/zipball/7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", + "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -3396,24 +3757,24 @@ "type": "tidelift" } ], - "time": "2020-04-15T15:59:10+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b", + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -3422,7 +3783,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -3454,25 +3815,125 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" + }, + { + "name": "symfony/string", + "version": "v5.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "ac70459db781108db7c6d8981dd31ce0e29e3298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/ac70459db781108db7c6d8981dd31ce0e29e3298", + "reference": "ac70459db781108db7c6d8981dd31ce0e29e3298", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 String component", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-06-11T12:16:36+00:00" }, { "name": "symfony/translation", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "c3879db7a68fe3e12b41263b05879412c87b27fd" + "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/c3879db7a68fe3e12b41263b05879412c87b27fd", - "reference": "c3879db7a68fe3e12b41263b05879412c87b27fd", + "url": "https://api.github.com/repos/symfony/translation/zipball/d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", + "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15", "symfony/translation-contracts": "^2" }, "conflict": { @@ -3504,7 +3965,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -3545,24 +4006,24 @@ "type": "tidelift" } ], - "time": "2020-04-12T16:45:47+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.0.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed" + "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/8cc682ac458d75557203b2f2f14b0b92e1c744ed", - "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e5ca07c8f817f865f618aa072c2fe8e0e637340e", + "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "suggest": { "symfony/translation-implementation": "" @@ -3570,7 +4031,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -3602,25 +4063,40 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.0.8", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "09de28632f16f81058a85fcf318397218272a07b" + "reference": "46a942903059b0b05e601f00eb64179e05578c0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/09de28632f16f81058a85fcf318397218272a07b", - "reference": "09de28632f16f81058a85fcf318397218272a07b", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46a942903059b0b05e601f00eb64179e05578c0f", + "reference": "46a942903059b0b05e601f00eb64179e05578c0f", "shasum": "" }, "require": { - "php": "^7.2.5", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "phpunit/phpunit": "<5.4.3", @@ -3643,7 +4119,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -3691,32 +4167,109 @@ "type": "tidelift" } ], - "time": "2020-04-12T16:45:47+00:00" + "time": "2020-05-30T20:35:19+00:00" + }, + { + "name": "symfony/yaml", + "version": "v5.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ea342353a3ef4f453809acc4ebc55382231d4d23", + "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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 Yaml Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-05-20T17:43:50+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v4.1.6", + "version": "v4.1.7", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "0b32505d67c1abbfa829283c86bfc0642a661bf6" + "reference": "db63b2ea280fdcf13c4ca392121b0b2450b51193" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/0b32505d67c1abbfa829283c86bfc0642a661bf6", - "reference": "0b32505d67c1abbfa829283c86bfc0642a661bf6", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/db63b2ea280fdcf13c4ca392121b0b2450b51193", + "reference": "db63b2ea280fdcf13c4ca392121b0b2450b51193", "shasum": "" }, "require": { "php": "^5.5.9 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.7.2", - "symfony/polyfill-ctype": "^1.9" + "phpoption/phpoption": "^1.7.3", + "symfony/polyfill-ctype": "^1.16" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.3", + "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", "ext-pcre": "*", - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" }, "suggest": { "ext-filter": "Required to use the boolean validator.", @@ -3765,20 +4318,20 @@ "type": "tidelift" } ], - "time": "2020-05-23T09:43:32+00:00" + "time": "2020-06-07T18:25:35+00:00" }, { "name": "voku/portable-ascii", - "version": "1.5.0", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "2d302cf7dc474d5f7f18b29b03e0e77d408922a4" + "reference": "618631dc601d8eb6ea0a9fbf654ec82f066c4e97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/2d302cf7dc474d5f7f18b29b03e0e77d408922a4", - "reference": "2d302cf7dc474d5f7f18b29b03e0e77d408922a4", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/618631dc601d8eb6ea0a9fbf654ec82f066c4e97", + "reference": "618631dc601d8eb6ea0a9fbf654ec82f066c4e97", "shasum": "" }, "require": { @@ -3831,26 +4384,26 @@ "type": "tidelift" } ], - "time": "2020-05-23T23:15:19+00:00" + "time": "2020-06-15T23:49:30+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -3889,7 +4442,21 @@ "constructor", "instantiate" ], - "time": "2019-10-21T16:45:58+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-05-29T17:27:14+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -4258,16 +4825,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" + "reference": "30441f2752e493c639526b215ed81d54f369d693" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30441f2752e493c639526b215ed81d54f369d693", + "reference": "30441f2752e493c639526b215ed81d54f369d693", "shasum": "" }, "require": { @@ -4281,7 +4848,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -4300,7 +4867,7 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-02-18T18:59:58+00:00" + "time": "2020-06-19T20:22:09+00:00" }, { "name": "phpspec/prophecy", @@ -4619,16 +5186,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.5", + "version": "8.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7" + "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/63dda3b212a0025d380a745f91bdb4d8c985adb7", - "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997", + "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997", "shasum": "" }, "require": { @@ -4708,7 +5275,7 @@ "type": "github" } ], - "time": "2020-05-22T13:51:52+00:00" + "time": "2020-06-22T07:06:58+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5367,16 +5934,16 @@ }, { "name": "webmozart/assert", - "version": "1.8.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" + "reference": "9dc4f203e36f2b486149058bade43c851dd97451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451", + "reference": "9dc4f203e36f2b486149058bade43c851dd97451", "shasum": "" }, "require": { @@ -5384,6 +5951,7 @@ "symfony/polyfill-ctype": "^1.8" }, "conflict": { + "phpstan/phpstan": "<0.12.20", "vimeo/psalm": "<3.9.1" }, "require-dev": { @@ -5411,7 +5979,7 @@ "check", "validate" ], - "time": "2020-04-18T12:12:48+00:00" + "time": "2020-06-16T10:16:42+00:00" } ], "aliases": [], diff --git a/fwd.yaml b/fwd.yaml new file mode 100644 index 0000000..cb8a5db --- /dev/null +++ b/fwd.yaml @@ -0,0 +1,7 @@ +scripts: + reset: + - fwd reset-db + - fwd composer install + - fwd artisan migrate:fresh --seed + - fwd yarn install + - fwd yarn dev diff --git a/tests/Feature/InstallTest.php b/tests/Feature/InstallTest.php index c077af6..5ab6fb1 100644 --- a/tests/Feature/InstallTest.php +++ b/tests/Feature/InstallTest.php @@ -12,10 +12,12 @@ public function testInstall() { $this->mockFwd(); $this->mockDockerCompose(); + $this->mockFwdYaml(); $this->artisan('install') ->expectsOutput('File ".fwd" copied.') - ->expectsOutput('File "docker-compose.yml" copied.'); + ->expectsOutput('File "docker-compose.yml" copied.') + ->expectsOutput('File "fwd.yaml" copied.'); $this->assertCommandCalled('install'); } @@ -24,10 +26,26 @@ public function testInstallAgain() { $this->mockFwd(true); $this->mockDockerCompose(true); + $this->mockFwdYaml(true); + + $this->artisan('install') + ->expectsOutput('File ".fwd" already exists, skipping. (to override run again with --force).') + ->expectsOutput('File "docker-compose.yml" already exists, skipping. (to override run again with --force).') + ->expectsOutput('File "fwd.yaml" already exists, skipping. (to override run again with --force).'); + + $this->assertCommandCalled('install'); + } + + public function testFwdExists() + { + $this->mockFwd(true); + $this->mockDockerCompose(); + $this->mockFwdYaml(); $this->artisan('install') - ->expectsOutput('File ".fwd" already exists, skipping. (to override run again with --force)') - ->expectsOutput('File "docker-compose.yml" already exists, skipping. (to override run again with --force)'); + ->expectsOutput('File ".fwd" already exists, skipping. (to override run again with --force).') + ->expectsOutput('File "docker-compose.yml" copied.') + ->expectsOutput('File "fwd.yaml" copied.'); $this->assertCommandCalled('install'); } @@ -36,22 +54,26 @@ public function testDockerComposeExists() { $this->mockFwd(); $this->mockDockerCompose(true); + $this->mockFwdYaml(); $this->artisan('install') ->expectsOutput('File ".fwd" copied.') - ->expectsOutput('File "docker-compose.yml" already exists, skipping. (to override run again with --force)'); + ->expectsOutput('File "docker-compose.yml" already exists, skipping. (to override run again with --force).') + ->expectsOutput('File "fwd.yaml" copied.'); $this->assertCommandCalled('install'); } - public function testFwdExists() + public function testFwdYamlExists() { - $this->mockFwd(true); + $this->mockFwd(); $this->mockDockerCompose(); + $this->mockFwdYaml(true); $this->artisan('install') - ->expectsOutput('File ".fwd" already exists, skipping. (to override run again with --force)') - ->expectsOutput('File "docker-compose.yml" copied.'); + ->expectsOutput('File ".fwd" copied.') + ->expectsOutput('File "docker-compose.yml" copied.') + ->expectsOutput('File "fwd.yaml" already exists, skipping. (to override run again with --force).'); $this->assertCommandCalled('install'); } @@ -60,11 +82,13 @@ public function testPresetLaravel() { $this->mockFwd(); $this->mockDockerCompose(); + $this->mockFwdYaml(); $this->mockLaravel(); $this->artisan('install --preset=laravel') ->expectsOutput('File ".fwd" copied.') ->expectsOutput('File "docker-compose.yml" copied.') + ->expectsOutput('File "fwd.yaml" copied.') ->expectsOutput('File ".env" updated.'); $this->assertCommandCalled('install --preset=laravel'); @@ -74,10 +98,12 @@ public function testForce() { $this->mockFwd(true); $this->mockDockerCompose(true); + $this->mockFwdYaml(true); $this->artisan('install --force') ->expectsOutput('File ".fwd" copied.') - ->expectsOutput('File "docker-compose.yml" copied.'); + ->expectsOutput('File "docker-compose.yml" copied.') + ->expectsOutput('File "fwd.yaml" copied.'); $this->assertCommandCalled('install --force'); } @@ -160,6 +186,19 @@ protected function mockDockerCompose($exists = false) ->andReturn(true); } + protected function mockFwdYaml($exists = false) + { + $environment = app(Environment::class); + + File::shouldReceive('exists') + ->with($environment->getContextFile('fwd.yaml')) + ->andReturn($exists); + + File::shouldReceive('copy') + ->with($environment->getDefaultFile('fwd.yaml'), $environment->getContextFile('fwd.yaml')) + ->andReturn(true); + } + protected function mockLaravel() { $environment = app(Environment::class); diff --git a/tests/Feature/ResetDbTest.php b/tests/Feature/ResetDbTest.php new file mode 100644 index 0000000..e9a8695 --- /dev/null +++ b/tests/Feature/ResetDbTest.php @@ -0,0 +1,28 @@ +artisan('reset-db')->assertExitCode(0); + + $this->setAsUser(null); + $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'drop database if exists docker'"); + $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'create database docker'"); + $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'grant all on docker.* to docker@\"%\"'"); + } + + public function testResetWithDusk() + { + $this->artisan('reset-db tests/fixtures/.env.dusk.local')->assertExitCode(0); + + $this->setAsUser(null); + $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'drop database if exists dusk'"); + $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'create database dusk'"); + $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'grant all on dusk.* to docker@\"%\"'"); + } +} diff --git a/tests/Feature/ResetTest.php b/tests/Feature/ResetTest.php index 9ce5301..6369389 100644 --- a/tests/Feature/ResetTest.php +++ b/tests/Feature/ResetTest.php @@ -51,10 +51,7 @@ public function testResetWithDusk() $this->artisan('reset tests/fixtures/.env.dusk.local')->assertExitCode(0); $this->asFwdUser()->assertDockerComposeExec('app composer install'); - $this->setAsUser(null); - $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'drop database if exists dusk'"); - $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'create database dusk'"); - $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'grant all on dusk.* to docker@\"%\"'"); + $this->assertCommandRun(['fwd', 'reset-db', 'tests/fixtures/.env.dusk.local']); $this->asFwdUser()->assertDockerComposeExec( '-e DB_PASSWORD=\'secret\'', @@ -71,10 +68,7 @@ protected function assertReset($noSeed = false) { $this->asFwdUser()->assertDockerComposeExec('app composer install'); $this->assertDockerComposeExec('cache redis-cli flushall'); - $this->setAsUser(null); - $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'drop database if exists docker'"); - $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'create database docker'"); - $this->assertDockerComposeExec("-e MYSQL_PWD='secret' database mysql -u root -e 'grant all on docker.* to docker@\"%\"'"); + $this->assertCommandRun(['fwd', 'reset-db']); $this->asFwdUser()->assertDockerComposeExec( '-e DB_PASSWORD=\'secret\'', diff --git a/tests/Feature/ScriptTest.php b/tests/Feature/ScriptTest.php new file mode 100644 index 0000000..22588fe --- /dev/null +++ b/tests/Feature/ScriptTest.php @@ -0,0 +1,39 @@ +mockFwdYaml(); + + $this->artisan('script script1')->assertExitCode(0); + + $this->assertCommandRun(['cmd1']); + $this->assertCommandRun(['cmd2']); + } + + public function testScript2() + { + $this->mockFwdYaml(); + + $this->artisan('script script2')->assertExitCode(0); + + $this->assertCommandRun(['cmd3']); + $this->assertCommandRun(['cmd4']); + } + + protected function mockFwdYaml() + { + $this->mock(Environment::class, function (MockInterface $mock) { + $mock->shouldReceive('getContextFile') + ->withArgs(['fwd.yaml']) + ->andReturn(base_path('tests/fixtures/fwd.yaml')); + }); + } +} diff --git a/tests/fixtures/fwd.yaml b/tests/fixtures/fwd.yaml new file mode 100644 index 0000000..feb7293 --- /dev/null +++ b/tests/fixtures/fwd.yaml @@ -0,0 +1,8 @@ +scripts: + script1: + - cmd1 + - cmd2 + + script2: + - cmd3 + - cmd4 From b358fb80f1fe20dce5d53ec29991b9ec20031a13 Mon Sep 17 00:00:00 2001 From: Daniel Polito Date: Thu, 25 Jun 2020 10:24:07 -0300 Subject: [PATCH 2/2] Fix lint --- app/Commands/Script.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Commands/Script.php b/app/Commands/Script.php index 82756a9..1d2e6a0 100644 --- a/app/Commands/Script.php +++ b/app/Commands/Script.php @@ -33,7 +33,7 @@ public function handle() Yaml::PARSE_OBJECT_FOR_MAP ); - if (! $script = object_get($fwdYaml, 'scripts.'.$this->argument('name'))) { + if (! $script = object_get($fwdYaml, 'scripts.' . $this->argument('name'))) { $this->error('Script not found.'); return 1;