From 360993c11eb1fa6d1f5a4eb89a08636f96ccf3ef Mon Sep 17 00:00:00 2001 From: Sjors Ottjes Date: Thu, 5 Sep 2019 16:10:59 +0200 Subject: [PATCH 1/5] Update bootstrap.php --- tests/bootstrap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 5041c5a6..943a2898 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,6 +4,10 @@ require_once __DIR__.'/../vendor/autoload.php'; +if (file_exists($_SERVER['APP_CONFIG_CACHE'])) { + unlink($_SERVER['APP_CONFIG_CACHE']); +} + /* |-------------------------------------------------------------------------- | Bootstrap The Test Environment From 731cd4c499638138c3331572f726310354d1b1ea Mon Sep 17 00:00:00 2001 From: Sjors Ottjes Date: Fri, 6 Sep 2019 08:16:34 +0200 Subject: [PATCH 2/5] add phpunit extension --- phpunit.xml | 5 ++++- tests/Bootstrap.php | 42 ++++++++++++++++++++++++++++++++++++++++++ tests/bootstrap.php | 33 --------------------------------- 3 files changed, 46 insertions(+), 34 deletions(-) create mode 100644 tests/Bootstrap.php delete mode 100644 tests/bootstrap.php diff --git a/phpunit.xml b/phpunit.xml index d562be80..61b6b64b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@ ./app + + + diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php new file mode 100644 index 00000000..5fa7829c --- /dev/null +++ b/tests/Bootstrap.php @@ -0,0 +1,42 @@ +createApplication()->make(Kernel::class); + + $commands = [ + 'config:cache', + 'event:cache', + ]; + + foreach ($commands as $command) { + $console->call($command); + } + } + + public function executeAfterLastTest(): void + { + array_map('unlink', glob('bootstrap/cache/*.phpunit.php')); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 943a2898..00000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,33 +0,0 @@ -make(Kernel::class))->bootstrap(); - -foreach ($commands as $command) { - $console->call($command); -} From 42936c656c70dc39d71dae7e79a487a716f2b1a6 Mon Sep 17 00:00:00 2001 From: Sjors Ottjes Date: Fri, 6 Sep 2019 08:17:43 +0200 Subject: [PATCH 3/5] style --- tests/Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 5fa7829c..207faccb 100644 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -2,9 +2,9 @@ namespace Tests; -use Illuminate\Contracts\Console\Kernel; use PHPUnit\Runner\AfterLastTestHook; use PHPUnit\Runner\BeforeFirstTestHook; +use Illuminate\Contracts\Console\Kernel; class Bootstrap implements BeforeFirstTestHook, AfterLastTestHook { From 86908e1eb4a6cc8f5474b1355db4c104c548619e Mon Sep 17 00:00:00 2001 From: Patrick Heppler <12952240+HepplerDotNet@users.noreply.github.com> Date: Fri, 6 Sep 2019 14:16:32 +0200 Subject: [PATCH 4/5] Set argon defaults to prevent password_hash(): Memory cost is outside of allowed memory range on PHP 7.4 (#5094) With the values ```` 'argon' => [ 'memory' => 1024, 'threads' => 2, 'time' => 2, ], ``` Hash::make() produces password_hash(): Memory cost is outside of allowed memory range on PHP 7.4 --- config/hashing.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/hashing.php b/config/hashing.php index 84257708..948fd195 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -44,9 +44,9 @@ */ 'argon' => [ - 'memory' => 1024, - 'threads' => 2, - 'time' => 2, + 'memory' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST, + 'threads' => PASSWORD_ARGON2_DEFAULT_THREADS, + 'time' => PASSWORD_ARGON2_DEFAULT_TIME_COST, ], ]; From 31394de4d736c171d40bb03d50313c60b0e4af38 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 7 Sep 2019 02:18:51 +0200 Subject: [PATCH 5/5] Revert "Set argon defaults to prevent password_hash(): Memory cost is outside of allowed memory range on PHP 7.4 (#5094)" (#5095) This reverts commit 86908e1eb4a6cc8f5474b1355db4c104c548619e. --- config/hashing.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/hashing.php b/config/hashing.php index 948fd195..84257708 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -44,9 +44,9 @@ */ 'argon' => [ - 'memory' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST, - 'threads' => PASSWORD_ARGON2_DEFAULT_THREADS, - 'time' => PASSWORD_ARGON2_DEFAULT_TIME_COST, + 'memory' => 1024, + 'threads' => 2, + 'time' => 2, ], ];