From 9b0123b77414ef3ecb02bef37ae7b042023a0f4c Mon Sep 17 00:00:00 2001 From: Keoghan Litchfield Date: Tue, 6 Apr 2021 16:14:39 +0100 Subject: [PATCH] Swap to Laravel Zero 8, support PHP8 (#108) * Swap to Laravel Zero 8, support PHP8 on host machine --- app/Models/PhpVersion.php | 3 + app/Models/Setting.php | 3 + app/Models/Site.php | 3 + composer.json | 14 +- composer.lock | 1186 +++++++++++------ database/factories/PhpVersion.php | 16 - database/factories/PhpVersionFactory.php | 38 + database/factories/Setting.php | 10 - database/factories/SettingFactory.php | 29 + database/factories/Site.php | 14 - database/factories/SiteFactory.php | 34 + tests/Unit/Commands/MakeFilesTest.php | 4 +- tests/Unit/Commands/Ngrok/OpenTest.php | 6 +- .../Commands/Sites/RenewCertificatesTest.php | 2 +- tests/Unit/Commands/Valet/ProxyTest.php | 4 +- tests/Unit/Commands/Valet/UnproxyTest.php | 4 +- tests/Unit/PhpVersionTest.php | 28 +- tests/Unit/PorterTest.php | 2 +- tests/Unit/SiteTest.php | 44 +- tests/Unit/Ssl/CertificateBuilderBaseTest.php | 14 +- .../DockerCompose/CliCommandFactoryTest.php | 2 +- .../Support/DockerSync/DockerSyncTest.php | 4 +- tests/Unit/Support/Mutagen/MutagenTest.php | 8 +- tests/Unit/Support/Valet/ValetTest.php | 12 +- tests/Unit/Support/Xdebug/XdebugTest.php | 8 +- 25 files changed, 976 insertions(+), 516 deletions(-) delete mode 100644 database/factories/PhpVersion.php create mode 100644 database/factories/PhpVersionFactory.php delete mode 100644 database/factories/Setting.php create mode 100644 database/factories/SettingFactory.php delete mode 100644 database/factories/Site.php create mode 100644 database/factories/SiteFactory.php diff --git a/app/Models/PhpVersion.php b/app/Models/PhpVersion.php index 8d963af..6d1510f 100644 --- a/app/Models/PhpVersion.php +++ b/app/Models/PhpVersion.php @@ -2,11 +2,14 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Str; class PhpVersion extends Model { + use HasFactory; + protected $guarded = []; /** diff --git a/app/Models/Setting.php b/app/Models/Setting.php index 34bac3c..716281f 100644 --- a/app/Models/Setting.php +++ b/app/Models/Setting.php @@ -2,10 +2,13 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Setting extends Model { + use HasFactory; + protected $guarded = []; public static function updateOrCreate($name, $value) diff --git a/app/Models/Site.php b/app/Models/Site.php index ebe163e..0c6ef99 100644 --- a/app/Models/Site.php +++ b/app/Models/Site.php @@ -10,11 +10,14 @@ use App\Support\Contracts\Cli; use App\Support\Nginx\SiteConfBuilder; use App\Support\Ssl\CertificateBuilder; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Str; class Site extends Model { + use HasFactory; + protected $guarded = []; protected $casts = ['secure' => 'boolean']; diff --git a/composer.json b/composer.json index 15e93ce..d9db28f 100644 --- a/composer.json +++ b/composer.json @@ -23,14 +23,14 @@ "php": "^7.3", "ext-json": "*", "fzaninotto/faker": "^1.8", - "illuminate/database": "^7.0", - "illuminate/view": "^7.0", + "illuminate/database": "^8.0", + "illuminate/view": "^8.0", "intonate/tinker-zero": "^1.0", - "laravel-zero/framework": "^7.0", + "laravel-zero/framework": "^8.0", "league/flysystem": "^1.0", - "nunomaduro/laravel-console-menu": "^2.1", + "nunomaduro/laravel-console-menu": "^3.1", "symfony/yaml": "^5.0", - "vlucas/phpdotenv": "^4.0" + "vlucas/phpdotenv": "^5.0" }, "require-dev": { "dms/phpunit-arraysubset-asserts": "^0.2.1", @@ -39,7 +39,9 @@ }, "autoload": { "psr-4": { - "App\\": "app/" + "App\\": "app/", + "Database\\Factories\\": "database/factories/", + "Database\\Seeders\\": "database/seeders/" }, "files": ["app/Support/helpers.php"] }, diff --git a/composer.lock b/composer.lock index cf8e6d7..2eb47ac 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": "e25c63f6306938bf831a0a299d6f93a5", + "content-hash": "0905f7ad6f9cf72367df6a8bc0e31292", "packages": [ { "name": "beberlei/assert", @@ -72,6 +72,62 @@ }, "time": "2019-12-19T17:51:41+00:00" }, + { + "name": "brick/math", + "version": "0.9.2", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "reference": "dff976c2f3487d42c1db75a3b180e2b9f0e72ce0", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "vimeo/psalm": "4.3.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "support": { + "issues": "https://github.com/brick/math/issues", + "source": "https://github.com/brick/math/tree/0.9.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/brick/math", + "type": "tidelift" + } + ], + "time": "2021-01-20T22:51:39+00:00" + }, { "name": "dnoegel/php-xdg-base-dir", "version": "v0.1.1", @@ -206,30 +262,32 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v2.3.1", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2" + "reference": "7a8c6e56ab3ffcc538d05e8155bb42269abf1a0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/65b2d8ee1f10915efb3b55597da3404f096acba2", - "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/7a8c6e56ab3ffcc538d05e8155bb42269abf1a0c", + "reference": "7a8c6e56ab3ffcc538d05e8155bb42269abf1a0c", "shasum": "" }, "require": { - "php": "^7.0|^8.0" + "php": "^7.2|^8.0", + "webmozart/assert": "^1.7.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^6.4|^7.0|^8.0|^9.0" + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-webmozart-assert": "^0.12.7", + "phpunit/phpunit": "^7.0|^8.0|^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, "autoload": { "psr-4": { "Cron\\": "src/Cron/" @@ -240,11 +298,6 @@ "MIT" ], "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, { "name": "Chris Tankersley", "email": "chris@ctankersley.com", @@ -258,7 +311,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v2.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.1.0" }, "funding": [ { @@ -266,7 +319,7 @@ "type": "github" } ], - "time": "2020-10-13T00:52:37+00:00" + "time": "2020-11-24T19:55:57+00:00" }, { "name": "facade/ignition-contracts", @@ -447,36 +500,157 @@ "abandoned": true, "time": "2020-12-11T09:56:16+00:00" }, + { + "name": "graham-campbell/result-type", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/7e279d2cd5d7fbb156ce46daada972355cea27bb", + "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb", + "shasum": "" + }, + "require": { + "php": "^7.0|^8.0", + "phpoption/phpoption": "^1.7.3" + }, + "require-dev": { + "phpunit/phpunit": "^6.5|^7.5|^8.5|^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "graham@alt-three.com" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2020-04-13T13:17:36+00:00" + }, + { + "name": "illuminate/bus", + "version": "v8.35.1", + "source": { + "type": "git", + "url": "https://github.com/illuminate/bus.git", + "reference": "18b3d810cfe52a4fa040994e68da4f356a498e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/bus/zipball/18b3d810cfe52a4fa040994e68da4f356a498e8a", + "reference": "18b3d810cfe52a4fa040994e68da4f356a498e8a", + "shasum": "" + }, + "require": { + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/pipeline": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" + }, + "suggest": { + "illuminate/queue": "Required to use closures when chaining jobs (^7.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Bus\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Bus package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-01-30T19:50:02+00:00" + }, { "name": "illuminate/cache", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/cache.git", - "reference": "f9155c4827600ea3e0743eb03402f8048c04455c" + "reference": "a9766c63138ddc3fee045307dfe0f17e14c20f36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/f9155c4827600ea3e0743eb03402f8048c04455c", - "reference": "f9155c4827600ea3e0743eb03402f8048c04455c", + "url": "https://api.github.com/repos/illuminate/cache/zipball/a9766c63138ddc3fee045307dfe0f17e14c20f36", + "reference": "a9766c63138ddc3fee045307dfe0f17e14c20f36", "shasum": "" }, "require": { - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0" + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" }, "suggest": { "ext-memcached": "Required to use the memcache cache driver.", - "illuminate/database": "Required to use the database cache driver (^7.0).", - "illuminate/filesystem": "Required to use the file cache driver (^7.0).", - "illuminate/redis": "Required to use the redis cache driver (^7.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.0)." + "illuminate/database": "Required to use the database cache driver (^8.0).", + "illuminate/filesystem": "Required to use the file cache driver (^8.0).", + "illuminate/redis": "Required to use the redis cache driver (^8.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.1.4)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -500,31 +674,85 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-10-27T15:11:37+00:00" + "time": "2021-03-30T21:34:17+00:00" + }, + { + "name": "illuminate/collections", + "version": "v8.35.1", + "source": { + "type": "git", + "url": "https://github.com/illuminate/collections.git", + "reference": "0a7a96520928b61df1750b4e1909588f10ae2abe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/collections/zipball/0a7a96520928b61df1750b4e1909588f10ae2abe", + "reference": "0a7a96520928b61df1750b4e1909588f10ae2abe", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "php": "^7.3|^8.0" + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^5.1.4)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Collections package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-03-25T14:54:04+00:00" }, { "name": "illuminate/config", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/config.git", - "reference": "9d908793eceb04a8c8f74cfc6af3429ce140d2e2" + "reference": "8441c542312b4d57220b1f942b947b6517c05008" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/9d908793eceb04a8c8f74cfc6af3429ce140d2e2", - "reference": "9d908793eceb04a8c8f74cfc6af3429ce140d2e2", + "url": "https://api.github.com/repos/illuminate/config/zipball/8441c542312b4d57220b1f942b947b6517c05008", + "reference": "8441c542312b4d57220b1f942b947b6517c05008", "shasum": "" }, "require": { - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0" + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "php": "^7.3|^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -548,41 +776,43 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-10-27T15:11:37+00:00" + "time": "2020-10-27T15:20:30+00:00" }, { "name": "illuminate/console", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/console.git", - "reference": "7dd038f1729af6390654f065c3ada5dc275fb01a" + "reference": "dcc1fd330b7ea8fcf259bbf73243bfedc98e45a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/7dd038f1729af6390654f065c3ada5dc275fb01a", - "reference": "7dd038f1729af6390654f065c3ada5dc275fb01a", + "url": "https://api.github.com/repos/illuminate/console/zipball/dcc1fd330b7ea8fcf259bbf73243bfedc98e45a3", + "reference": "dcc1fd330b7ea8fcf259bbf73243bfedc98e45a3", "shasum": "" }, "require": { - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0", - "symfony/console": "^5.0", - "symfony/process": "^5.0" + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0", + "symfony/console": "^5.1.4", + "symfony/process": "^5.1.4" }, "suggest": { - "dragonmantank/cron-expression": "Required to use scheduler (^2.3.1).", - "guzzlehttp/guzzle": "Required to use the ping methods on schedules (^6.3.1|^7.0.1).", - "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)." + "dragonmantank/cron-expression": "Required to use scheduler (^3.0.2).", + "guzzlehttp/guzzle": "Required to use the ping methods on schedules (^6.5.5|^7.0.1).", + "illuminate/bus": "Required to use the scheduled job dispatcher (^8.0).", + "illuminate/container": "Required to use the scheduler (^8.0).", + "illuminate/filesystem": "Required to use the generator command (^8.0).", + "illuminate/queue": "Required to use closures for scheduled jobs (^8.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -606,25 +836,25 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-10-27T19:51:21+00:00" + "time": "2021-03-16T21:53:44+00:00" }, { "name": "illuminate/container", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "cf94ed8fbaeb26906bb42b24377dbb061b97a096" + "reference": "0e38ee1632d470e56aece0079e6e22d13e6bea8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/cf94ed8fbaeb26906bb42b24377dbb061b97a096", - "reference": "cf94ed8fbaeb26906bb42b24377dbb061b97a096", + "url": "https://api.github.com/repos/illuminate/container/zipball/0e38ee1632d470e56aece0079e6e22d13e6bea8e", + "reference": "0e38ee1632d470e56aece0079e6e22d13e6bea8e", "shasum": "" }, "require": { - "illuminate/contracts": "^7.0", - "php": "^7.2.5|^8.0", + "illuminate/contracts": "^8.0", + "php": "^7.3|^8.0", "psr/container": "^1.0" }, "provide": { @@ -633,7 +863,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -657,31 +887,31 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-10-27T16:17:28+00:00" + "time": "2021-03-16T19:42:20+00:00" }, { "name": "illuminate/contracts", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "7d964384f0283bd7525ae7b5baa7ad32e5503b8e" + "reference": "121cea1d8b8772bc7fee99c71ecf0f57c1d77b3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/7d964384f0283bd7525ae7b5baa7ad32e5503b8e", - "reference": "7d964384f0283bd7525ae7b5baa7ad32e5503b8e", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/121cea1d8b8772bc7fee99c71ecf0f57c1d77b3b", + "reference": "121cea1d8b8772bc7fee99c71ecf0f57c1d77b3b", "shasum": "" }, "require": { - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "psr/container": "^1.0", "psr/simple-cache": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -705,43 +935,45 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-12-18T14:19:44+00:00" + "time": "2021-03-12T14:45:30+00:00" }, { "name": "illuminate/database", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/database.git", - "reference": "c7a35698106b1ed6b50f7fd4c30ec8e9fc900e41" + "reference": "dc8033979aea3d471d2a37694b6ade00a299a0f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/c7a35698106b1ed6b50f7fd4c30ec8e9fc900e41", - "reference": "c7a35698106b1ed6b50f7fd4c30ec8e9fc900e41", + "url": "https://api.github.com/repos/illuminate/database/zipball/dc8033979aea3d471d2a37694b6ade00a299a0f1", + "reference": "dc8033979aea3d471d2a37694b6ade00a299a0f1", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/container": "^7.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0", - "symfony/console": "^5.0" + "illuminate/collections": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0", + "symfony/console": "^5.1.4" }, "suggest": { - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6|^3.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", - "illuminate/console": "Required to use the database commands (^7.0).", - "illuminate/events": "Required to use the observers with Eloquent (^7.0).", - "illuminate/filesystem": "Required to use the migrations (^7.0).", - "illuminate/pagination": "Required to paginate the result set (^7.0).", - "symfony/finder": "Required to use Eloquent model factories (^5.0)." + "illuminate/console": "Required to use the database commands (^8.0).", + "illuminate/events": "Required to use the observers with Eloquent (^8.0).", + "illuminate/filesystem": "Required to use the migrations (^8.0).", + "illuminate/pagination": "Required to paginate the result set (^8.0).", + "symfony/finder": "Required to use Eloquent model factories (^5.1.4)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -771,38 +1003,44 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-01-21T14:08:35+00:00" + "time": "2021-03-30T13:58:56+00:00" }, { "name": "illuminate/events", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "6f64db49dbfd490c6e30c983964543a054882faf" + "reference": "0160e896c1909fa961a245d0628685321a4d58f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/6f64db49dbfd490c6e30c983964543a054882faf", - "reference": "6f64db49dbfd490c6e30c983964543a054882faf", + "url": "https://api.github.com/repos/illuminate/events/zipball/0160e896c1909fa961a245d0628685321a4d58f5", + "reference": "0160e896c1909fa961a245d0628685321a4d58f5", "shasum": "" }, "require": { - "illuminate/container": "^7.0", - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0" + "illuminate/bus": "^8.0", + "illuminate/collections": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { "psr-4": { "Illuminate\\Events\\": "" - } + }, + "files": [ + "functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -820,27 +1058,29 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-10-27T15:11:37+00:00" + "time": "2021-03-11T13:55:37+00:00" }, { "name": "illuminate/filesystem", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "2013f94a3a7dff008be54884774548e3c222c3e8" + "reference": "25e31d4f114baf1f99110bb5fc7538f26b4367cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/2013f94a3a7dff008be54884774548e3c222c3e8", - "reference": "2013f94a3a7dff008be54884774548e3c222c3e8", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/25e31d4f114baf1f99110bb5fc7538f26b4367cb", + "reference": "25e31d4f114baf1f99110bb5fc7538f26b4367cb", "shasum": "" }, "require": { - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0", - "symfony/finder": "^5.0" + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0", + "symfony/finder": "^5.1.4" }, "suggest": { "ext-ftp": "Required to use the Flysystem FTP driver.", @@ -850,12 +1090,13 @@ "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).", - "symfony/mime": "Required to enable support for guessing extensions (^5.0)." + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.1.4).", + "symfony/mime": "Required to enable support for guessing extensions (^5.1.4)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -879,46 +1120,142 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-10-27T15:11:37+00:00" + "time": "2021-03-21T13:46:59+00:00" + }, + { + "name": "illuminate/macroable", + "version": "v8.35.1", + "source": { + "type": "git", + "url": "https://github.com/illuminate/macroable.git", + "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/300aa13c086f25116b5f3cde3ca54ff5c822fb05", + "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Macroable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2020-10-27T15:20:30+00:00" + }, + { + "name": "illuminate/pipeline", + "version": "v8.35.1", + "source": { + "type": "git", + "url": "https://github.com/illuminate/pipeline.git", + "reference": "23aeff5b26ae4aee3f370835c76bd0f4e93f71d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/pipeline/zipball/23aeff5b26ae4aee3f370835c76bd0f4e93f71d2", + "reference": "23aeff5b26ae4aee3f370835c76bd0f4e93f71d2", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Pipeline\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Pipeline package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-03-26T18:39:16+00:00" }, { "name": "illuminate/support", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "1c95b8f842308ff15a56d29d897d3bda29001f1c" + "reference": "8eee1bc181c87cfdac32b4d876ab44da9894771c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/1c95b8f842308ff15a56d29d897d3bda29001f1c", - "reference": "1c95b8f842308ff15a56d29d897d3bda29001f1c", + "url": "https://api.github.com/repos/illuminate/support/zipball/8eee1bc181c87cfdac32b4d876ab44da9894771c", + "reference": "8eee1bc181c87cfdac32b4d876ab44da9894771c", "shasum": "" }, "require": { "doctrine/inflector": "^1.4|^2.0", "ext-json": "*", "ext-mbstring": "*", - "illuminate/contracts": "^7.0", + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", "nesbot/carbon": "^2.31", - "php": "^7.2.5|^8.0", + "php": "^7.3|^8.0", "voku/portable-ascii": "^1.4.8" }, "conflict": { "tightenco/collect": "<5.5.33" }, "suggest": { - "illuminate/filesystem": "Required to use the composer class (^7.0).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "ramsey/uuid": "Required to use Str::uuid() (^3.7|^4.0).", - "symfony/process": "Required to use the composer class (^5.0).", - "symfony/var-dumper": "Required to use the dd function (^5.0).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^4.0)." + "illuminate/filesystem": "Required to use the composer class (^8.0).", + "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3).", + "ramsey/uuid": "Required to use Str::uuid() (^4.0).", + "symfony/process": "Required to use the composer class (^5.1.4).", + "symfony/var-dumper": "Required to use the dd function (^5.1.4).", + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -945,39 +1282,41 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-12-22T16:12:23+00:00" + "time": "2021-03-30T13:39:44+00:00" }, { "name": "illuminate/testing", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/testing.git", - "reference": "d7e365ded1a73298ec068dae2e9958378f71630d" + "reference": "01fd4b9b433039ff72112040c4b9360dfdef9b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/testing/zipball/d7e365ded1a73298ec068dae2e9958378f71630d", - "reference": "d7e365ded1a73298ec068dae2e9958378f71630d", + "url": "https://api.github.com/repos/illuminate/testing/zipball/01fd4b9b433039ff72112040c4b9360dfdef9b5d", + "reference": "01fd4b9b433039ff72112040c4b9360dfdef9b5d", "shasum": "" }, "require": { - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0", - "symfony/polyfill-php73": "^1.17" + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" }, "suggest": { - "illuminate/console": "Required to assert console commands (^7.0).", - "illuminate/database": "Required to assert databases (^7.0).", - "illuminate/http": "Required to assert responses (^7.0).", - "mockery/mockery": "Required to use mocking (~1.3.3|^1.4.2).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.3.3)." + "brianium/paratest": "Required to run tests in parallel (^6.0).", + "illuminate/console": "Required to assert console commands (^8.0).", + "illuminate/database": "Required to assert databases (^8.0).", + "illuminate/http": "Required to assert responses (^8.0).", + "mockery/mockery": "Required to use mocking (^1.4.2).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.5.8|^9.3.3)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -1001,35 +1340,37 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-10-31T18:35:25+00:00" + "time": "2021-03-30T13:48:41+00:00" }, { "name": "illuminate/view", - "version": "v7.30.4", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "5c2279062da803f36093108d09f4db1d54b302d5" + "reference": "696a1d6d2213be192429e97245a3d2bb4d6d1849" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/5c2279062da803f36093108d09f4db1d54b302d5", - "reference": "5c2279062da803f36093108d09f4db1d54b302d5", + "url": "https://api.github.com/repos/illuminate/view/zipball/696a1d6d2213be192429e97245a3d2bb4d6d1849", + "reference": "696a1d6d2213be192429e97245a3d2bb4d6d1849", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/container": "^7.0", - "illuminate/contracts": "^7.0", - "illuminate/events": "^7.0", - "illuminate/filesystem": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0" + "illuminate/collections": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/events": "^8.0", + "illuminate/filesystem": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -1053,7 +1394,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-10-27T15:11:37+00:00" + "time": "2020-11-02T14:01:41+00:00" }, { "name": "intonate/tinker-zero", @@ -1185,25 +1526,25 @@ }, { "name": "laravel-zero/foundation", - "version": "v7.28.1", + "version": "v8.35.1", "source": { "type": "git", "url": "https://github.com/laravel-zero/foundation.git", - "reference": "4f432d614e10a022f43880fd11be8536d5d6e349" + "reference": "50012f000dc650a3ebf0e6f3c5177a89fb64a8f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel-zero/foundation/zipball/4f432d614e10a022f43880fd11be8536d5d6e349", - "reference": "4f432d614e10a022f43880fd11be8536d5d6e349", + "url": "https://api.github.com/repos/laravel-zero/foundation/zipball/50012f000dc650a3ebf0e6f3c5177a89fb64a8f4", + "reference": "50012f000dc650a3ebf0e6f3c5177a89fb64a8f4", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": "^7.3|^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-7.x": "7.x-dev" + "dev-main": "8.x-dev" } }, "autoload": { @@ -1224,65 +1565,66 @@ "laravel" ], "support": { - "source": "https://github.com/laravel-zero/foundation/tree/v7.28.1" + "source": "https://github.com/laravel-zero/foundation/tree/v8.35.1" }, - "time": "2020-09-10T08:27:00+00:00" + "time": "2021-04-06T12:11:04+00:00" }, { "name": "laravel-zero/framework", - "version": "v7.2.1", + "version": "v8.6.0", "source": { "type": "git", "url": "https://github.com/laravel-zero/framework.git", - "reference": "1e417eebf7286a62f42bb23bbd628d33d0d485bb" + "reference": "e2bf0de399a8128cc1382eed2b28a3c8199ccc56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel-zero/framework/zipball/1e417eebf7286a62f42bb23bbd628d33d0d485bb", - "reference": "1e417eebf7286a62f42bb23bbd628d33d0d485bb", + "url": "https://api.github.com/repos/laravel-zero/framework/zipball/e2bf0de399a8128cc1382eed2b28a3c8199ccc56", + "reference": "e2bf0de399a8128cc1382eed2b28a3c8199ccc56", "shasum": "" }, "require": { - "dragonmantank/cron-expression": "^2.0", + "dragonmantank/cron-expression": "^3.0.2", "ext-json": "*", - "illuminate/cache": "^7.0", - "illuminate/config": "^7.0", - "illuminate/console": "^7.0", - "illuminate/container": "^7.0", - "illuminate/contracts": "^7.0", - "illuminate/events": "^7.0", - "illuminate/filesystem": "^7.0", - "illuminate/support": "^7.0", - "illuminate/testing": "^7.0", - "laravel-zero/foundation": "^7.0", - "league/flysystem": "^1.0.8", - "nunomaduro/collision": "^4.1", - "nunomaduro/laravel-console-summary": "^1.4", - "nunomaduro/laravel-console-task": "^1.4", - "nunomaduro/laravel-desktop-notifier": "^2.3", - "php": "^7.2.5", + "illuminate/cache": "^8.0", + "illuminate/config": "^8.0", + "illuminate/console": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/events": "^8.0", + "illuminate/filesystem": "^8.0", + "illuminate/support": "^8.0", + "illuminate/testing": "^8.0", + "laravel-zero/foundation": "^8.0", + "league/flysystem": "^1.1.3", + "nunomaduro/collision": "^5.1", + "nunomaduro/laravel-console-summary": "^1.7", + "nunomaduro/laravel-console-task": "^1.6", + "nunomaduro/laravel-desktop-notifier": "^2.5.1", + "php": "^7.3 || ^8.0", "psr/log": "^1.1", - "ramsey/uuid": "^3.7", - "symfony/console": "^5.0", - "symfony/error-handler": "^5.0", - "symfony/process": "^5.0", - "symfony/var-dumper": "^5.0", - "vlucas/phpdotenv": "^4.0" + "ramsey/uuid": "^4.0", + "symfony/console": "^5.1", + "symfony/error-handler": "^5.1", + "symfony/process": "^5.1", + "symfony/var-dumper": "^5.1", + "vlucas/phpdotenv": "^5.0" }, "require-dev": { - "guzzlehttp/guzzle": "^6.3.1", - "hmazter/laravel-schedule-list": "^2.1", - "illuminate/bus": "^7.0", - "illuminate/database": "^7.0", - "illuminate/http": "^7.0", - "illuminate/log": "^7.0", - "illuminate/queue": "^7.0", - "laminas/laminas-text": "^2.7", - "nunomaduro/laravel-console-dusk": "^1.6", - "nunomaduro/laravel-console-menu": "^2.3", + "guzzlehttp/guzzle": "^6.5.5|^7.0", + "hmazter/laravel-schedule-list": "^2.2.1", + "illuminate/bus": "^8.0", + "illuminate/database": "^8.0", + "illuminate/http": "^8.0", + "illuminate/log": "^8.0", + "illuminate/queue": "^8.0", + "illuminate/redis": "^8.0", + "laminas/laminas-text": "^2.8", + "nunomaduro/laravel-console-dusk": "^1.8", + "nunomaduro/laravel-console-menu": "^3.2", "padraic/phar-updater": "^1.0.6", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^8.5" + "pestphp/pest": "^1.0", + "phpstan/phpstan": "^0.12.65" }, "suggest": { "ext-pcntl": "Required to ensure that data is cleared when cancelling the build process." @@ -1316,7 +1658,7 @@ "issues": "https://github.com/laravel-zero/laravel-zero/issues", "source": "https://github.com/laravel-zero/laravel-zero" }, - "time": "2020-05-21T10:23:05+00:00" + "time": "2021-01-20T12:44:10+00:00" }, { "name": "laravel/tinker", @@ -1688,35 +2030,35 @@ }, { "name": "nunomaduro/collision", - "version": "v4.3.0", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "7c125dc2463f3e144ddc7e05e63077109508c94e" + "reference": "aca63581f380f63a492b1e3114604e411e39133a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/7c125dc2463f3e144ddc7e05e63077109508c94e", - "reference": "7c125dc2463f3e144ddc7e05e63077109508c94e", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/aca63581f380f63a492b1e3114604e411e39133a", + "reference": "aca63581f380f63a492b1e3114604e411e39133a", "shasum": "" }, "require": { "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.4", - "php": "^7.2.5 || ^8.0", + "filp/whoops": "^2.7.2", + "php": "^7.3 || ^8.0", "symfony/console": "^5.0" }, "require-dev": { - "facade/ignition": "^2.0", - "fideloper/proxy": "^4.2", - "friendsofphp/php-cs-fixer": "^2.16", - "fruitcake/laravel-cors": "^1.0", - "laravel/framework": "^7.0", - "laravel/tinker": "^2.0", - "nunomaduro/larastan": "^0.6", - "orchestra/testbench": "^5.0", - "phpstan/phpstan": "^0.12.3", - "phpunit/phpunit": "^8.5.1 || ^9.0" + "brianium/paratest": "^6.1", + "fideloper/proxy": "^4.4.1", + "friendsofphp/php-cs-fixer": "^2.17.3", + "fruitcake/laravel-cors": "^2.0.3", + "laravel/framework": "^9.0", + "nunomaduro/larastan": "^0.6.2", + "nunomaduro/mock-final-classes": "^1.0", + "orchestra/testbench": "^7.0", + "phpstan/phpstan": "^0.12.64", + "phpunit/phpunit": "^9.5.0" }, "type": "library", "extra": { @@ -1772,27 +2114,27 @@ "type": "patreon" } ], - "time": "2020-10-29T15:12:23+00:00" + "time": "2021-01-25T15:34:13+00:00" }, { "name": "nunomaduro/laravel-console-menu", - "version": "v2.3.0", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/laravel-console-menu.git", - "reference": "d5c349f5794c15f338bf2bc13d3a47e7de8e8ca4" + "reference": "90d656f6f91986b0339db7c7640cc74dbe78c6a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/laravel-console-menu/zipball/d5c349f5794c15f338bf2bc13d3a47e7de8e8ca4", - "reference": "d5c349f5794c15f338bf2bc13d3a47e7de8e8ca4", + "url": "https://api.github.com/repos/nunomaduro/laravel-console-menu/zipball/90d656f6f91986b0339db7c7640cc74dbe78c6a0", + "reference": "90d656f6f91986b0339db7c7640cc74dbe78c6a0", "shasum": "" }, "require": { - "illuminate/console": "5.6.*|5.7.*|5.8.*|^6.0|^7.0", - "illuminate/support": "5.6.*|5.7.*|5.8.*|^6.0|^7.0", - "php": "^7.1.3", - "php-school/cli-menu": "^3.0" + "illuminate/console": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0", + "php": "^7.2.5|^8.0", + "php-school/cli-menu": "^4.0" }, "type": "library", "extra": { @@ -1832,7 +2174,21 @@ "issues": "https://github.com/nunomaduro/laravel-console-menu/issues", "source": "https://github.com/nunomaduro/laravel-console-menu" }, - "time": "2020-01-15T14:01:23+00:00" + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2020-10-30T15:08:40+00:00" }, { "name": "nunomaduro/laravel-console-summary", @@ -2025,86 +2381,40 @@ }, "time": "2020-10-30T15:41:03+00:00" }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" - }, - "time": "2018-07-02T15:55:56+00:00" - }, { "name": "php-school/cli-menu", - "version": "3.2.0", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/php-school/cli-menu.git", - "reference": "2b24d576338c5add84c9515a766c6d12337ff2b8" + "reference": "d25ae866d86b1ac95f026e7147c0e30ef4996dcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-school/cli-menu/zipball/2b24d576338c5add84c9515a766c6d12337ff2b8", - "reference": "2b24d576338c5add84c9515a766c6d12337ff2b8", + "url": "https://api.github.com/repos/php-school/cli-menu/zipball/d25ae866d86b1ac95f026e7147c0e30ef4996dcd", + "reference": "d25ae866d86b1ac95f026e7147c0e30ef4996dcd", "shasum": "" }, "require": { "beberlei/assert": "^2.4 | ^3", + "ext-mbstring": "*", "ext-posix": "*", "php": ">=7.1", - "php-school/terminal": "^0.2" + "php-school/terminal": "^0.2.1" }, "require-dev": { - "phpstan/phpstan": "^0.11", - "phpunit/phpunit": "^7.1", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^8.0 | ^9.0", "squizlabs/php_codesniffer": "^3.2" }, "type": "library", "autoload": { "psr-4": { "PhpSchool\\CliMenu\\": "src" - } + }, + "files": [ + "src/Util/ArrayUtils.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2131,9 +2441,9 @@ ], "support": { "issues": "https://github.com/php-school/cli-menu/issues", - "source": "https://github.com/php-school/cli-menu/tree/master" + "source": "https://github.com/php-school/cli-menu/tree/4.1.0" }, - "time": "2019-04-30T14:39:32+00:00" + "time": "2020-10-24T09:18:48+00:00" }, { "name": "php-school/terminal", @@ -2486,55 +2796,141 @@ }, "time": "2021-03-14T02:14:56+00:00" }, + { + "name": "ramsey/collection", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", + "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8" + }, + "require-dev": { + "captainhook/captainhook": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "ergebnis/composer-normalize": "^2.6", + "fakerphp/faker": "^1.5", + "hamcrest/hamcrest-php": "^2", + "jangregor/phpstan-prophecy": "^0.8", + "mockery/mockery": "^1.3", + "phpstan/extension-installer": "^1", + "phpstan/phpstan": "^0.12.32", + "phpstan/phpstan-mockery": "^0.12.5", + "phpstan/phpstan-phpunit": "^0.12.11", + "phpunit/phpunit": "^8.5 || ^9", + "psy/psysh": "^0.10.4", + "slevomat/coding-standard": "^6.3", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP 7.2+ library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/1.1.3" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" + } + ], + "time": "2021-01-21T17:40:04+00:00" + }, { "name": "ramsey/uuid", - "version": "3.9.3", + "version": "4.1.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92" + "reference": "cd4032040a750077205918c86049aa0f43d22947" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/7e1633a6964b48589b142d60542f9ed31bd37a92", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/cd4032040a750077205918c86049aa0f43d22947", + "reference": "cd4032040a750077205918c86049aa0f43d22947", "shasum": "" }, "require": { + "brick/math": "^0.8 || ^0.9", "ext-json": "*", - "paragonie/random_compat": "^1 | ^2 | 9.99.99", - "php": "^5.4 | ^7 | ^8", + "php": "^7.2 || ^8", + "ramsey/collection": "^1.0", "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^1 | ^2", - "doctrine/annotations": "^1.2", - "goaop/framework": "1.0.0-alpha.2 | ^1 | ^2.1", - "jakub-onderka/php-parallel-lint": "^1", - "mockery/mockery": "^0.9.11 | ^1", + "codeception/aspect-mock": "^3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7.0", + "doctrine/annotations": "^1.8", + "goaop/framework": "^2", + "mockery/mockery": "^1.3", "moontoast/math": "^1.1", "paragonie/random-lib": "^2", - "php-mock/php-mock-phpunit": "^0.3 | ^1.1", - "phpunit/phpunit": "^4.8 | ^5.4 | ^6.5", - "squizlabs/php_codesniffer": "^3.5" + "php-mock/php-mock-mockery": "^1.3", + "php-mock/php-mock-phpunit": "^2.5", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^0.17.1", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "psy/psysh": "^0.10.0", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "3.9.4" }, "suggest": { - "ext-ctype": "Provides support for PHP Ctype functions", - "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", - "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator", - "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -2549,22 +2945,7 @@ "license": [ "MIT" ], - "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - }, - { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" - } - ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", "homepage": "https://github.com/ramsey/uuid", "keywords": [ "guid", @@ -2574,10 +2955,15 @@ "support": { "issues": "https://github.com/ramsey/uuid/issues", "rss": "https://github.com/ramsey/uuid/releases.atom", - "source": "https://github.com/ramsey/uuid", - "wiki": "https://github.com/ramsey/uuid/wiki" + "source": "https://github.com/ramsey/uuid" }, - "time": "2020-02-21T04:36:14+00:00" + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + } + ], + "time": "2020-08-18T17:17:46+00:00" }, { "name": "symfony/console", @@ -3919,37 +4305,39 @@ }, { "name": "vlucas/phpdotenv", - "version": "v4.2.0", + "version": "v5.3.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "da64796370fc4eb03cc277088f6fede9fde88482" + "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/da64796370fc4eb03cc277088f6fede9fde88482", - "reference": "da64796370fc4eb03cc277088f6fede9fde88482", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", + "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.7.3", - "symfony/polyfill-ctype": "^1.17" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.1", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.7.4", + "symfony/polyfill-ctype": "^1.17", + "symfony/polyfill-mbstring": "^1.17", + "symfony/polyfill-php80": "^1.17" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "ext-pcre": "*", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20" + "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5.1" }, "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." + "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "5.3-dev" } }, "autoload": { @@ -3981,7 +4369,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v4.2.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.0" }, "funding": [ { @@ -3993,7 +4381,7 @@ "type": "tidelift" } ], - "time": "2021-01-20T15:11:48+00:00" + "time": "2021-01-20T15:23:13+00:00" }, { "name": "voku/portable-ascii", @@ -4068,6 +4456,64 @@ } ], "time": "2020-11-12T00:07:28+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" } ], "packages-dev": [ @@ -6136,64 +6582,6 @@ } ], "time": "2020-07-12T23:59:07+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], diff --git a/database/factories/PhpVersion.php b/database/factories/PhpVersion.php deleted file mode 100644 index c581a91..0000000 --- a/database/factories/PhpVersion.php +++ /dev/null @@ -1,16 +0,0 @@ -define(\App\Models\PhpVersion::class, function (Faker $faker) { - return [ - 'version_number' => $faker->randomElement(['5.6', '7.0', '7.1', '7.2']), - 'default' => 'false', - ]; -}); - -$factory->state(\App\Models\PhpVersion::class, 'default', function () { - return [ - 'default' => true, - ]; -}); diff --git a/database/factories/PhpVersionFactory.php b/database/factories/PhpVersionFactory.php new file mode 100644 index 0000000..969a299 --- /dev/null +++ b/database/factories/PhpVersionFactory.php @@ -0,0 +1,38 @@ + $this->faker->randomElement(['5.6', '7.0', '7.1', '7.2']), + 'default' => 'false', + ]; + } + + public function default() + { + return $this->state(function (array $attributes) { + return [ + 'default' => true, + ]; + }); + } +} diff --git a/database/factories/Setting.php b/database/factories/Setting.php deleted file mode 100644 index e6db07b..0000000 --- a/database/factories/Setting.php +++ /dev/null @@ -1,10 +0,0 @@ -define(\App\Models\Setting::class, function (Faker $faker) { - return [ - 'name' => $faker->word, - 'value' => $faker->word, - ]; -}); diff --git a/database/factories/SettingFactory.php b/database/factories/SettingFactory.php new file mode 100644 index 0000000..a1589ef --- /dev/null +++ b/database/factories/SettingFactory.php @@ -0,0 +1,29 @@ + $this->faker->word, + 'value' => $this->faker->word, + ]; + } +} diff --git a/database/factories/Site.php b/database/factories/Site.php deleted file mode 100644 index 87e745d..0000000 --- a/database/factories/Site.php +++ /dev/null @@ -1,14 +0,0 @@ -define(\App\Models\Site::class, function (Faker $faker) { - return [ - 'name' => $faker->word, - 'nginx_conf' => 'default', - 'php_version_id' => function () { - return factory(\App\Models\PhpVersion::class)->create()->id; - }, - 'secure' => false, - ]; -}); diff --git a/database/factories/SiteFactory.php b/database/factories/SiteFactory.php new file mode 100644 index 0000000..0d5e6a4 --- /dev/null +++ b/database/factories/SiteFactory.php @@ -0,0 +1,34 @@ + $this->faker->word, + 'nginx_conf' => 'default', + 'php_version_id' => function () { + return PhpVersion::factory()->create()->id; + }, + 'secure' => false, + ]; + } +} diff --git a/tests/Unit/Commands/MakeFilesTest.php b/tests/Unit/Commands/MakeFilesTest.php index 76c0bd9..1532875 100644 --- a/tests/Unit/Commands/MakeFilesTest.php +++ b/tests/Unit/Commands/MakeFilesTest.php @@ -25,7 +25,7 @@ public function it_will_remake_the_files() $conf = $this->mockSiteConfigBuilder(); $cert = $this->mockCertificateBuilder(); - factory(Site::class, 2)->create([]); + Site::factory(2)->create([]); $this->porter->shouldReceive('isUp')->once()->andReturn(false); $this->porter->shouldReceive('compose')->once(); @@ -45,7 +45,7 @@ public function it_will_remake_the_files_and_restart_porter() $conf = $this->mockSiteConfigBuilder(); $cert = $this->mockCertificateBuilder(); - factory(Site::class, 2)->create([]); + Site::factory(2)->create([]); $this->porter->shouldReceive('isUp')->once()->andReturn(true); $this->porter->shouldReceive('compose')->once(); diff --git a/tests/Unit/Commands/Ngrok/OpenTest.php b/tests/Unit/Commands/Ngrok/OpenTest.php index c337bbb..916ab1e 100644 --- a/tests/Unit/Commands/Ngrok/OpenTest.php +++ b/tests/Unit/Commands/Ngrok/OpenTest.php @@ -38,7 +38,7 @@ public function it_checks_if_the_site_exists() public function it_checks_that_the_alternative_loopback_is_being_used() { Setting::updateOrCreate('home', __DIR__); - $site = factory(Site::class)->create(); + $site = Site::factory()->create(); $this->mockUsingStandardLoopback(); @@ -51,7 +51,7 @@ public function it_checks_that_the_alternative_loopback_is_being_used() public function it_will_remove_ssl_and_replace_it() { Setting::updateOrCreate('home', __DIR__); - $site = factory(Site::class)->create(['secure' => true]); + $site = Site::factory()->create(['secure' => true]); $this->mockUsingAlternativeLoopback(); @@ -78,7 +78,7 @@ public function it_will_remove_ssl_and_replace_it() public function it_will_run_ngrok() { Setting::updateOrCreate('home', __DIR__); - $site = factory(Site::class)->create(['secure' => false]); + $site = Site::factory()->create(['secure' => false]); $this->mockUsingAlternativeLoopback(); diff --git a/tests/Unit/Commands/Sites/RenewCertificatesTest.php b/tests/Unit/Commands/Sites/RenewCertificatesTest.php index 660684d..ebf2b8b 100644 --- a/tests/Unit/Commands/Sites/RenewCertificatesTest.php +++ b/tests/Unit/Commands/Sites/RenewCertificatesTest.php @@ -12,7 +12,7 @@ class RenewCertificatesTest extends BaseTestCase /** @test */ public function it_renews_the_certificates() { - factory(Site::class)->create(['secure' => true]); + Site::factory()->create(['secure' => true]); $builder = $this->mockCertificateBuilder(); $builder->shouldReceive('clearCertificates')->with(false)->once(); diff --git a/tests/Unit/Commands/Valet/ProxyTest.php b/tests/Unit/Commands/Valet/ProxyTest.php index e8290c8..f836efa 100644 --- a/tests/Unit/Commands/Valet/ProxyTest.php +++ b/tests/Unit/Commands/Valet/ProxyTest.php @@ -13,7 +13,7 @@ public function it_will_do_all_site_proxies() { app()->instance(Valet::class, $valet = \Mockery::mock(Valet::class)); - factory(Site::class, 2)->create(['secure' => true]); + Site::factory(2)->create(['secure' => true]); $valet->shouldReceive('addSite')->times(2); @@ -26,7 +26,7 @@ public function it_will_proxy_a_single_site() $this->withoutExceptionHandling(); app()->instance(Valet::class, $valet = \Mockery::mock(Valet::class)); - $site = factory(Site::class)->create(['secure' => true, 'name' => 'dummy']); + $site = Site::factory()->create(['secure' => true, 'name' => 'dummy']); $valet->shouldReceive('addSite')->once()->with( \Mockery::on(function ($arg) use ($site) { diff --git a/tests/Unit/Commands/Valet/UnproxyTest.php b/tests/Unit/Commands/Valet/UnproxyTest.php index 5711077..cf29110 100644 --- a/tests/Unit/Commands/Valet/UnproxyTest.php +++ b/tests/Unit/Commands/Valet/UnproxyTest.php @@ -13,7 +13,7 @@ public function it_will_unproxy_all_sites() { app()->instance(Valet::class, $valet = \Mockery::mock(Valet::class)); - factory(Site::class, 2)->create(['secure' => true]); + Site::factory(2)->create(['secure' => true]); $valet->shouldReceive('removeSite')->times(2); @@ -26,7 +26,7 @@ public function it_will_unproxy_a_single_site() $this->withoutExceptionHandling(); app()->instance(Valet::class, $valet = \Mockery::mock(Valet::class)); - $site = factory(Site::class)->create(['secure' => true, 'name' => 'dummy']); + $site = Site::factory()->create(['secure' => true, 'name' => 'dummy']); $valet->shouldReceive('removeSite')->once()->with( \Mockery::on(function ($arg) use ($site) { diff --git a/tests/Unit/PhpVersionTest.php b/tests/Unit/PhpVersionTest.php index 191d41a..0e83b09 100644 --- a/tests/Unit/PhpVersionTest.php +++ b/tests/Unit/PhpVersionTest.php @@ -11,7 +11,7 @@ class PhpVersionTest extends BaseTestCase /** @test */ public function it_returns_a_safe_version_number() { - $version = factory(PhpVersion::class)->create([ + $version = PhpVersion::factory()->create([ 'version_number' => '7.2', ]); @@ -21,7 +21,7 @@ public function it_returns_a_safe_version_number() /** @test */ public function it_returns_a_major_version_number() { - $version = factory(PhpVersion::class)->create([ + $version = PhpVersion::factory()->create([ 'version_number' => '7.2', ]); @@ -31,7 +31,7 @@ public function it_returns_a_major_version_number() /** @test */ public function it_returns_a_short_form_version_number() { - $version = factory(PhpVersion::class)->create([ + $version = PhpVersion::factory()->create([ 'version_number' => '7.2', ]); @@ -41,7 +41,7 @@ public function it_returns_a_short_form_version_number() /** @test */ public function it_returns_the_cli_container_name() { - $version = factory(PhpVersion::class)->create([ + $version = PhpVersion::factory()->create([ 'version_number' => '7.2', ]); @@ -51,7 +51,7 @@ public function it_returns_the_cli_container_name() /** @test */ public function it_returns_the_fpm_container_name() { - $version = factory(PhpVersion::class)->create([ + $version = PhpVersion::factory()->create([ 'version_number' => '7.2', ]); @@ -61,7 +61,7 @@ public function it_returns_the_fpm_container_name() /** @test */ public function we_can_set_the_default_version() { - factory(PhpVersion::class, 4)->create(); + PhpVersion::factory(4)->create(); PhpVersion::setDefaultVersion(2); @@ -74,7 +74,7 @@ public function we_can_set_the_default_version() /** @test */ public function it_finds_a_version_with_user_input() { - factory(PhpVersion::class)->create([ + PhpVersion::factory()->create([ 'version_number' => '7.2', ]); @@ -84,12 +84,12 @@ public function it_finds_a_version_with_user_input() /** @test */ public function it_returns_the_active_versions() { - $v5 = factory(PhpVersion::class)->create(['version_number' => '5.6']); + $v5 = PhpVersion::factory()->create(['version_number' => '5.6']); - $v7 = factory(PhpVersion::class)->states(['default']) + $v7 = PhpVersion::factory()->default() ->create(['version_number' => '7.0']); - factory(Site::class)->create(['php_version_id' => $v5->id]); + Site::factory()->create(['php_version_id' => $v5->id]); $active = PhpVersion::active()->get(); @@ -101,9 +101,9 @@ public function it_returns_the_active_versions() /** @test */ public function it_returns_a_list_of_versions() { - $v5 = factory(PhpVersion::class)->create(['version_number' => '5.6']); + $v5 = PhpVersion::factory()->create(['version_number' => '5.6']); - $v7 = factory(PhpVersion::class)->states(['default']) + $v7 = PhpVersion::factory()->default() ->create(['version_number' => '7.0']); $this->assertEquals([ @@ -115,9 +115,9 @@ public function it_returns_a_list_of_versions() /** @test */ public function it_returns_a_list_of_versions_and_highlights_one() { - $v5 = factory(PhpVersion::class)->create(['version_number' => '5.6']); + $v5 = PhpVersion::factory()->create(['version_number' => '5.6']); - $v7 = factory(PhpVersion::class)->states(['default']) + $v7 = PhpVersion::factory()->default() ->create(['version_number' => '7.0']); $this->assertEquals([ diff --git a/tests/Unit/PorterTest.php b/tests/Unit/PorterTest.php index 62dae2a..b327cd9 100644 --- a/tests/Unit/PorterTest.php +++ b/tests/Unit/PorterTest.php @@ -112,7 +112,7 @@ public function it_restarts_serving() { Event::fake(); - factory(PhpVersion::class)->create([ + PhpVersion::factory()->create([ 'version_number' => '7.2', 'default' => true, ]); diff --git a/tests/Unit/SiteTest.php b/tests/Unit/SiteTest.php index 06898db..19a503b 100644 --- a/tests/Unit/SiteTest.php +++ b/tests/Unit/SiteTest.php @@ -19,7 +19,7 @@ class SiteTest extends BaseTestCase /** @test */ public function it_builds_nginx_config() { - $site = factory(Site::class)->create(['name' => 'klever']); + $site = Site::factory()->create(['name' => 'klever']); $site->buildFiles(); @@ -29,13 +29,13 @@ public function it_builds_nginx_config() /** @test */ public function it_returns_additional_attributes() { - factory(Setting::class)->create(['name' => 'domain', 'value' => 'test']); + Setting::factory()->create(['name' => 'domain', 'value' => 'test']); - $site = factory(Site::class)->create(['name' => 'klever']); + $site = Site::factory()->create(['name' => 'klever']); $this->assertEquals('klever.test', $site->url); $this->assertEquals('http://', $site->scheme); - $this->assertRegExp('/klever.conf/', $site->nginx_conf_path); + $this->assertMatchesRegularExpression('/klever.conf/', $site->nginx_conf_path); $this->assertEquals('nginx.default.domain', $site->nginx_conf_template); $site->secure = true; @@ -43,7 +43,7 @@ public function it_returns_additional_attributes() $this->assertEquals('klever.test', $site->url); $this->assertEquals('https://', $site->scheme); - $this->assertRegExp('/klever.conf/', $site->nginx_conf_path); + $this->assertMatchesRegularExpression('/klever.conf/', $site->nginx_conf_path); $this->assertEquals('nginx.default.domain_secure', $site->nginx_conf_template); } @@ -53,7 +53,7 @@ public function it_sets_the_nginx_type() $this->shouldBuildNginxFiles(); $this->shouldRestartServing(); - $site = factory(Site::class)->create(); + $site = Site::factory()->create(); $site->setNginxType('my type'); $this->assertSame('my type', $site->nginx_conf); @@ -70,7 +70,7 @@ public function it_destroys_the_site_config_files() return $mock; }); - $site = factory(Site::class)->create(); + $site = Site::factory()->create(); $site->destroyFiles(); } @@ -80,8 +80,8 @@ public function it_sets_the_php_version() $this->shouldBuildNginxFiles(); $this->shouldRestartServing(); - $site = factory(Site::class)->create(); - $version = factory(PhpVersion::class)->create(); + $site = Site::factory()->create(); + $version = PhpVersion::factory()->create(); $site->setPhpVersion($version->id); $this->assertEquals($version->fresh(), $site->php_version); @@ -93,8 +93,8 @@ public function it_uses_the_default_php_version_if_not_specified() $this->shouldBuildNginxFiles(); $this->shouldRestartServing(); - $site = factory(Site::class)->create(); - $defaultVersion = factory(PhpVersion::class)->create(['default' => true]); + $site = Site::factory()->create(); + $defaultVersion = PhpVersion::factory()->create(['default' => true]); $site->setPhpVersion(); $this->assertEquals($defaultVersion->fresh(), $site->php_version); @@ -143,7 +143,7 @@ public function it_will_resolve_a_site_from_a_simple_name() { Setting::updateOrCreate('home', '/Users/keoghan/Code'); - $site = factory(Site::class)->create(['name' => 'sample']); + $site = Site::factory()->create(['name' => 'sample']); $this->assertEquals( $site->getKey(), @@ -156,7 +156,7 @@ public function it_will_resolve_a_site_from_a_path() { Setting::updateOrCreate('home', '/Users/keoghan/Code'); - $site = factory(Site::class)->create(['name' => 'sample']); + $site = Site::factory()->create(['name' => 'sample']); $this->assertEquals( $site->getKey(), @@ -179,7 +179,7 @@ public function it_will_resolve_a_site_from_the_current_working_directory() { Setting::updateOrCreate('home', '/Users/keoghan/Code'); - $site = factory(Site::class)->create(['name' => 'sample']); + $site = Site::factory()->create(['name' => 'sample']); app()->instance(Cli::class, \Mockery::mock(Cli::class)); @@ -198,7 +198,7 @@ public function resolving_sites_or_failing_works() { Setting::updateOrCreate('home', '/Users/keoghan/Code'); - $site = factory(Site::class)->create(['name' => 'sample']); + $site = Site::factory()->create(['name' => 'sample']); $this->assertEquals( $site->getKey(), @@ -216,7 +216,7 @@ public function resolving_sites_or_failing_works() /** @test */ public function it_will_create_a_site_from_only_a_name() { - $version = factory(PhpVersion::class)->state('default')->create(); + $version = PhpVersion::factory()->default()->create(); $site = Site::createForName('sample'); @@ -231,7 +231,7 @@ public function it_will_create_a_site_from_only_a_name() /** @test */ public function it_will_create_a_site_from_a_name_if_it_doesnt_exist() { - $version = factory(PhpVersion::class)->state('default')->create(); + $version = PhpVersion::factory()->default()->create(); $site = Site::firstOrCreateForName('sample'); @@ -252,7 +252,7 @@ public function it_builds_a_certificate() { Setting::updateOrCreate('domain', 'test'); - $site = factory(Site::class)->create(['name' => 'sample']); + $site = Site::factory()->create(['name' => 'sample']); $this->shouldAddCertificate('sample.test'); @@ -264,7 +264,7 @@ public function it_removes_a_certificate() { Setting::updateOrCreate('domain', 'test'); - $site = factory(Site::class)->create(['name' => 'sample']); + $site = Site::factory()->create(['name' => 'sample']); $this->shouldRemoveCertificate('sample.test'); @@ -276,7 +276,7 @@ public function it_secures_a_site() { Setting::updateOrCreate('domain', 'test'); - $site = factory(Site::class)->create(['name' => 'sample']); + $site = Site::factory()->create(['name' => 'sample']); $this->shouldAddCertificate('sample.test'); $this->shouldBuildNginxFiles(); @@ -292,7 +292,7 @@ public function it_unsecures_a_site() { Setting::updateOrCreate('domain', 'test'); - $site = factory(Site::class)->create(['name' => 'sample', 'secure' => true]); + $site = Site::factory()->create(['name' => 'sample', 'secure' => true]); $this->shouldRemoveCertificate('sample.test'); $this->shouldBuildNginxFiles(); @@ -308,7 +308,7 @@ public function it_removes_a_site() { Setting::updateOrCreate('domain', 'test'); - $site = factory(Site::class)->create(['name' => 'sample', 'secure' => true]); + $site = Site::factory()->create(['name' => 'sample', 'secure' => true]); $this->shouldRemoveCertificate('sample.test'); $this->shouldRemoveNginxFiles(); diff --git a/tests/Unit/Ssl/CertificateBuilderBaseTest.php b/tests/Unit/Ssl/CertificateBuilderBaseTest.php index e14c8d1..305a433 100644 --- a/tests/Unit/Ssl/CertificateBuilderBaseTest.php +++ b/tests/Unit/Ssl/CertificateBuilderBaseTest.php @@ -111,10 +111,10 @@ protected function assertHasCertificates($url = 'klever.test') protected function assertNoCertificates($url = 'klever.test') { - $this->assertFileNotExists($this->dir."/{$url}.conf"); - $this->assertFileNotExists($this->dir."/{$url}.crt"); - $this->assertFileNotExists($this->dir."/{$url}.csr"); - $this->assertFileNotExists($this->dir."/{$url}.key"); + $this->assertFileDoesNotExist($this->dir."/{$url}.conf"); + $this->assertFileDoesNotExist($this->dir."/{$url}.crt"); + $this->assertFileDoesNotExist($this->dir."/{$url}.csr"); + $this->assertFileDoesNotExist($this->dir."/{$url}.key"); } protected function assertHasCaCertificates() @@ -126,8 +126,8 @@ protected function assertHasCaCertificates() protected function assertNoCaCertificates() { - $this->assertFileNotExists($this->dir.'/KleverPorterCASelfSigned.key'); - $this->assertFileNotExists($this->dir.'/KleverPorterCASelfSigned.pem'); - $this->assertFileNotExists($this->dir.'/KleverPorterCASelfSigned.srl'); + $this->assertFileDoesNotExist($this->dir.'/KleverPorterCASelfSigned.key'); + $this->assertFileDoesNotExist($this->dir.'/KleverPorterCASelfSigned.pem'); + $this->assertFileDoesNotExist($this->dir.'/KleverPorterCASelfSigned.srl'); } } diff --git a/tests/Unit/Support/Console/DockerCompose/CliCommandFactoryTest.php b/tests/Unit/Support/Console/DockerCompose/CliCommandFactoryTest.php index 342921b..67cd74b 100644 --- a/tests/Unit/Support/Console/DockerCompose/CliCommandFactoryTest.php +++ b/tests/Unit/Support/Console/DockerCompose/CliCommandFactoryTest.php @@ -67,7 +67,7 @@ public function it_will_create_a_run_container_command() /** @test */ public function it_will_create_a_run_container_command_for_a_specific_site() { - factory(Site::class)->create(['name' => 'site']); + Site::factory()->create(['name' => 'site']); Setting::updateOrCreate('home', '/home'); $this->cli->shouldReceive('currentWorkingDirectory')->andReturn('/home/site'); $command = $this->cf->runContainer('mysql'); diff --git a/tests/Unit/Support/DockerSync/DockerSyncTest.php b/tests/Unit/Support/DockerSync/DockerSyncTest.php index 47552bd..62c08cd 100644 --- a/tests/Unit/Support/DockerSync/DockerSyncTest.php +++ b/tests/Unit/Support/DockerSync/DockerSyncTest.php @@ -100,8 +100,8 @@ public function it_adjusts_the_docker_compose_yaml() Setting::updateOrCreate('use_docker-sync', 'on'); Setting::updateOrCreate('home', 'volume1'); - $v = factory(PhpVersion::class)->create(['version_number' => '7.1']); - factory(Site::class)->create(['php_version_id' => $v->id]); + $v = PhpVersion::factory()->create(['version_number' => '7.1']); + Site::factory()->create(['php_version_id' => $v->id]); $files->shouldReceive('get')->with('dcdir/dc.yaml')->andReturn( <<<'EOB' diff --git a/tests/Unit/Support/Mutagen/MutagenTest.php b/tests/Unit/Support/Mutagen/MutagenTest.php index 191eb62..fc096a9 100644 --- a/tests/Unit/Support/Mutagen/MutagenTest.php +++ b/tests/Unit/Support/Mutagen/MutagenTest.php @@ -89,8 +89,8 @@ public function it_removes_the_volumes_from_docker_compose_yaml() $files = Mockery::mock(Filesystem::class); $mutagen = new Mutagen(app(MacOs::class), $this->cli, $files); Setting::updateOrCreate('use_mutagen', 'on'); - $v = factory(PhpVersion::class)->create(['version_number' => '7.1']); - factory(Site::class)->create(['php_version_id' => $v->id]); + $v = PhpVersion::factory()->create(['version_number' => '7.1']); + Site::factory()->create(['php_version_id' => $v->id]); $files->shouldReceive('get')->with('dc.yaml')->andReturn( <<<'EOB' @@ -134,8 +134,8 @@ public function it_creates_sync_processes_for_the_volumes() $files = Mockery::mock(Filesystem::class); $mutagen = new Mutagen(app(MacOs::class), $this->cli, $files); - $v = factory(PhpVersion::class)->create(['version_number' => '7.1']); - factory(Site::class)->create(['php_version_id' => $v->id]); + $v = PhpVersion::factory()->create(['version_number' => '7.1']); + Site::factory()->create(['php_version_id' => $v->id]); $this->cli->shouldNotReceive('passthru'); $mutagen->syncVolumes(); diff --git a/tests/Unit/Support/Valet/ValetTest.php b/tests/Unit/Support/Valet/ValetTest.php index b2bd184..7aba93a 100644 --- a/tests/Unit/Support/Valet/ValetTest.php +++ b/tests/Unit/Support/Valet/ValetTest.php @@ -29,7 +29,7 @@ public function setUp(): void /** @test */ public function it_will_turn_on_valet_compat() { - factory(Site::class)->create(['name' => 'dummy']); + Site::factory()->create(['name' => 'dummy']); $valet = new Valet($this->porter, $this->cli, $this->writer); @@ -98,7 +98,7 @@ public function it_will_turn_off_valet_compat() { Setting::updateOrCreate('use_valet', 'on'); - factory(Site::class)->create(['name' => 'dummy']); + Site::factory()->create(['name' => 'dummy']); $valet = new Valet($this->porter, $this->cli, $this->writer); @@ -137,7 +137,7 @@ public function it_will_turn_off_valet_compat() /** @test */ public function it_will_add_a_secure_site() { - $site = factory(Site::class)->create(['name' => 'dummy', 'secure' => 1]); + $site = Site::factory()->create(['name' => 'dummy', 'secure' => 1]); $valet = new Valet($this->porter, $this->cli, $this->writer); @@ -163,7 +163,7 @@ public function it_will_add_a_secure_site() /** @test */ public function it_will_remove_an_existing_proxy_when_adding_a_site() { - $site = factory(Site::class)->create(['name' => 'dummy', 'secure' => 1]); + $site = Site::factory()->create(['name' => 'dummy', 'secure' => 1]); $valet = new Valet($this->porter, $this->cli, $this->writer); @@ -198,7 +198,7 @@ public function it_will_remove_an_existing_proxy_when_adding_a_site() /** @test */ public function it_will_remove_a_proxy() { - $site = factory(Site::class)->create(['name' => 'dummy', 'secure' => 1]); + $site = Site::factory()->create(['name' => 'dummy', 'secure' => 1]); $valet = new Valet($this->porter, $this->cli, $this->writer); @@ -237,7 +237,7 @@ public function it_will_list_sites_that_are_proxied_with_valet() /** @test */ public function it_can_check_if_a_site_is_proxied() { - $site = factory(Site::class)->create(['name' => 'dummy', 'secure' => 1]); + $site = Site::factory()->create(['name' => 'dummy', 'secure' => 1]); $valet = new Valet($this->porter, $this->cli, $this->writer); $this->writer->shouldReceive('info') diff --git a/tests/Unit/Support/Xdebug/XdebugTest.php b/tests/Unit/Support/Xdebug/XdebugTest.php index a42927a..1f247cd 100644 --- a/tests/Unit/Support/Xdebug/XdebugTest.php +++ b/tests/Unit/Support/Xdebug/XdebugTest.php @@ -24,7 +24,7 @@ public function setUp(): void /** @test */ public function it_turns_xdebug_on() { - $version = factory(PhpVersion::class) + $version = PhpVersion::factory() ->create(['version_number' => '7.4', 'default' => true]); $command = \Mockery::mock(CliCommand::class); @@ -62,7 +62,7 @@ public function it_turns_xdebug_on() /** @test */ public function if_xdebug_is_already_on_we_dont_restart_the_containers() { - $version = factory(PhpVersion::class) + $version = PhpVersion::factory() ->create(['version_number' => '7.4', 'default' => true]); $command = \Mockery::mock(CliCommand::class); @@ -99,7 +99,7 @@ public function if_xdebug_is_already_on_we_dont_restart_the_containers() /** @test */ public function it_turns_xdebug_off() { - $version = factory(PhpVersion::class) + $version = PhpVersion::factory() ->create(['version_number' => '7.4', 'default' => true]); $command = \Mockery::mock(CliCommand::class); @@ -137,7 +137,7 @@ public function it_turns_xdebug_off() /** @test */ public function if_xdebug_is_already_off_we_dont_restart_the_containers() { - $version = factory(PhpVersion::class) + $version = PhpVersion::factory() ->create(['version_number' => '7.4', 'default' => true]); $command = \Mockery::mock(CliCommand::class);