From 67ec85125abe6305a1d0251479e76a0d22c2ec48 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:19:59 +0000 Subject: [PATCH 01/17] Use Faker methods Accessing Faker properties was deprecated in Faker 1.14. --- database/factories/ModelFactory.php | 4 ++-- database/factories/ReleaseFactory.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 8dd3fcdf0..ad3d27a33 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -20,8 +20,8 @@ $factory->define(App\User::class, function (Faker\Generator $faker) { static $password; return [ - 'name' => $faker->name, - 'email' => $faker->unique()->safeEmail, + 'name' => $faker->name(), + 'email' => $faker->unique()->safeEmail(), 'password' => $password ?: $password = bcrypt('secret'), 'remember_token' => Str::random(10), ]; diff --git a/database/factories/ReleaseFactory.php b/database/factories/ReleaseFactory.php index 833e8bc84..6195ec47f 100644 --- a/database/factories/ReleaseFactory.php +++ b/database/factories/ReleaseFactory.php @@ -20,7 +20,7 @@ class ReleaseFactory extends Factory public function definition(): array { return [ - 'name' => $this->faker->name, + 'name' => $this->faker->name(), 'searchname' => $this->faker->unique()->name(), 'fromname' => $this->faker->unique()->safeEmail(), 'postdate' => $this->faker->date(), From 0daa15ebffc65ae7c0ce47aee9ded3f5768cbc6e Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:19:59 +0000 Subject: [PATCH 02/17] Remove unnecessary `$model` property --- database/factories/ReleaseFactory.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/database/factories/ReleaseFactory.php b/database/factories/ReleaseFactory.php index 6195ec47f..6e0edf8bd 100644 --- a/database/factories/ReleaseFactory.php +++ b/database/factories/ReleaseFactory.php @@ -7,13 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class ReleaseFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = Release::class; - /** * Define the model's default state. */ From 755ba85436f53712657110f2df21cbc39919cd4a Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:00 +0000 Subject: [PATCH 03/17] Move `resources/lang` folder --- {resources/lang => lang}/en/auth.php | 0 {resources/lang => lang}/en/pagination.php | 0 {resources/lang => lang}/en/passwords.php | 0 {resources/lang => lang}/en/validation.php | 0 {resources/lang => lang}/vendor/forum/.gitkeep | 0 {resources/lang => lang}/vendor/forum/de/categories.php | 0 {resources/lang => lang}/vendor/forum/de/general.php | 0 {resources/lang => lang}/vendor/forum/de/posts.php | 0 {resources/lang => lang}/vendor/forum/de/threads.php | 0 {resources/lang => lang}/vendor/forum/de/validation.php | 0 {resources/lang => lang}/vendor/forum/en/categories.php | 0 {resources/lang => lang}/vendor/forum/en/general.php | 0 {resources/lang => lang}/vendor/forum/en/posts.php | 0 {resources/lang => lang}/vendor/forum/en/threads.php | 0 {resources/lang => lang}/vendor/forum/en/validation.php | 0 {resources/lang => lang}/vendor/forum/es/categories.php | 0 {resources/lang => lang}/vendor/forum/es/general.php | 0 {resources/lang => lang}/vendor/forum/es/posts.php | 0 {resources/lang => lang}/vendor/forum/es/threads.php | 0 {resources/lang => lang}/vendor/forum/es/validation.php | 0 {resources/lang => lang}/vendor/forum/fr/categories.php | 0 {resources/lang => lang}/vendor/forum/fr/general.php | 0 {resources/lang => lang}/vendor/forum/fr/posts.php | 0 {resources/lang => lang}/vendor/forum/fr/threads.php | 0 {resources/lang => lang}/vendor/forum/fr/validation.php | 0 {resources/lang => lang}/vendor/forum/id/categories.php | 0 {resources/lang => lang}/vendor/forum/id/general.php | 0 {resources/lang => lang}/vendor/forum/id/posts.php | 0 {resources/lang => lang}/vendor/forum/id/threads.php | 0 {resources/lang => lang}/vendor/forum/id/validation.php | 0 {resources/lang => lang}/vendor/forum/it/categories.php | 0 {resources/lang => lang}/vendor/forum/it/general.php | 0 {resources/lang => lang}/vendor/forum/it/posts.php | 0 {resources/lang => lang}/vendor/forum/it/threads.php | 0 {resources/lang => lang}/vendor/forum/it/validation.php | 0 {resources/lang => lang}/vendor/forum/nl/categories.php | 0 {resources/lang => lang}/vendor/forum/nl/general.php | 0 {resources/lang => lang}/vendor/forum/nl/posts.php | 0 {resources/lang => lang}/vendor/forum/nl/threads.php | 0 {resources/lang => lang}/vendor/forum/nl/validation.php | 0 {resources/lang => lang}/vendor/forum/pt-br/categories.php | 0 {resources/lang => lang}/vendor/forum/pt-br/general.php | 0 {resources/lang => lang}/vendor/forum/pt-br/posts.php | 0 {resources/lang => lang}/vendor/forum/pt-br/threads.php | 0 {resources/lang => lang}/vendor/forum/pt-br/validation.php | 0 {resources/lang => lang}/vendor/forum/ro/categories.php | 0 {resources/lang => lang}/vendor/forum/ro/general.php | 0 {resources/lang => lang}/vendor/forum/ro/posts.php | 0 {resources/lang => lang}/vendor/forum/ro/threads.php | 0 {resources/lang => lang}/vendor/forum/ro/validation.php | 0 {resources/lang => lang}/vendor/forum/ru/categories.php | 0 {resources/lang => lang}/vendor/forum/ru/general.php | 0 {resources/lang => lang}/vendor/forum/ru/posts.php | 0 {resources/lang => lang}/vendor/forum/ru/threads.php | 0 {resources/lang => lang}/vendor/forum/ru/validation.php | 0 {resources/lang => lang}/vendor/forum/sr/categories.php | 0 {resources/lang => lang}/vendor/forum/sr/general.php | 0 {resources/lang => lang}/vendor/forum/sr/posts.php | 0 {resources/lang => lang}/vendor/forum/sr/threads.php | 0 {resources/lang => lang}/vendor/forum/sr/validation.php | 0 {resources/lang => lang}/vendor/forum/sv/categories.php | 0 {resources/lang => lang}/vendor/forum/sv/general.php | 0 {resources/lang => lang}/vendor/forum/sv/posts.php | 0 {resources/lang => lang}/vendor/forum/sv/threads.php | 0 {resources/lang => lang}/vendor/forum/sv/validation.php | 0 {resources/lang => lang}/vendor/forum/th/categories.php | 0 {resources/lang => lang}/vendor/forum/th/general.php | 0 {resources/lang => lang}/vendor/forum/th/posts.php | 0 {resources/lang => lang}/vendor/forum/th/threads.php | 0 {resources/lang => lang}/vendor/forum/th/validation.php | 0 {resources/lang => lang}/vendor/forum/tr/categories.php | 0 {resources/lang => lang}/vendor/forum/tr/general.php | 0 {resources/lang => lang}/vendor/forum/tr/posts.php | 0 {resources/lang => lang}/vendor/forum/tr/threads.php | 0 {resources/lang => lang}/vendor/forum/tr/validation.php | 0 {resources/lang => lang}/vendor/forum/zh/categories.php | 0 {resources/lang => lang}/vendor/forum/zh/general.php | 0 {resources/lang => lang}/vendor/forum/zh/posts.php | 0 {resources/lang => lang}/vendor/forum/zh/threads.php | 0 {resources/lang => lang}/vendor/forum/zh/validation.php | 0 80 files changed, 0 insertions(+), 0 deletions(-) rename {resources/lang => lang}/en/auth.php (100%) rename {resources/lang => lang}/en/pagination.php (100%) rename {resources/lang => lang}/en/passwords.php (100%) rename {resources/lang => lang}/en/validation.php (100%) rename {resources/lang => lang}/vendor/forum/.gitkeep (100%) rename {resources/lang => lang}/vendor/forum/de/categories.php (100%) rename {resources/lang => lang}/vendor/forum/de/general.php (100%) rename {resources/lang => lang}/vendor/forum/de/posts.php (100%) rename {resources/lang => lang}/vendor/forum/de/threads.php (100%) rename {resources/lang => lang}/vendor/forum/de/validation.php (100%) rename {resources/lang => lang}/vendor/forum/en/categories.php (100%) rename {resources/lang => lang}/vendor/forum/en/general.php (100%) rename {resources/lang => lang}/vendor/forum/en/posts.php (100%) rename {resources/lang => lang}/vendor/forum/en/threads.php (100%) rename {resources/lang => lang}/vendor/forum/en/validation.php (100%) rename {resources/lang => lang}/vendor/forum/es/categories.php (100%) rename {resources/lang => lang}/vendor/forum/es/general.php (100%) rename {resources/lang => lang}/vendor/forum/es/posts.php (100%) rename {resources/lang => lang}/vendor/forum/es/threads.php (100%) rename {resources/lang => lang}/vendor/forum/es/validation.php (100%) rename {resources/lang => lang}/vendor/forum/fr/categories.php (100%) rename {resources/lang => lang}/vendor/forum/fr/general.php (100%) rename {resources/lang => lang}/vendor/forum/fr/posts.php (100%) rename {resources/lang => lang}/vendor/forum/fr/threads.php (100%) rename {resources/lang => lang}/vendor/forum/fr/validation.php (100%) rename {resources/lang => lang}/vendor/forum/id/categories.php (100%) rename {resources/lang => lang}/vendor/forum/id/general.php (100%) rename {resources/lang => lang}/vendor/forum/id/posts.php (100%) rename {resources/lang => lang}/vendor/forum/id/threads.php (100%) rename {resources/lang => lang}/vendor/forum/id/validation.php (100%) rename {resources/lang => lang}/vendor/forum/it/categories.php (100%) rename {resources/lang => lang}/vendor/forum/it/general.php (100%) rename {resources/lang => lang}/vendor/forum/it/posts.php (100%) rename {resources/lang => lang}/vendor/forum/it/threads.php (100%) rename {resources/lang => lang}/vendor/forum/it/validation.php (100%) rename {resources/lang => lang}/vendor/forum/nl/categories.php (100%) rename {resources/lang => lang}/vendor/forum/nl/general.php (100%) rename {resources/lang => lang}/vendor/forum/nl/posts.php (100%) rename {resources/lang => lang}/vendor/forum/nl/threads.php (100%) rename {resources/lang => lang}/vendor/forum/nl/validation.php (100%) rename {resources/lang => lang}/vendor/forum/pt-br/categories.php (100%) rename {resources/lang => lang}/vendor/forum/pt-br/general.php (100%) rename {resources/lang => lang}/vendor/forum/pt-br/posts.php (100%) rename {resources/lang => lang}/vendor/forum/pt-br/threads.php (100%) rename {resources/lang => lang}/vendor/forum/pt-br/validation.php (100%) rename {resources/lang => lang}/vendor/forum/ro/categories.php (100%) rename {resources/lang => lang}/vendor/forum/ro/general.php (100%) rename {resources/lang => lang}/vendor/forum/ro/posts.php (100%) rename {resources/lang => lang}/vendor/forum/ro/threads.php (100%) rename {resources/lang => lang}/vendor/forum/ro/validation.php (100%) rename {resources/lang => lang}/vendor/forum/ru/categories.php (100%) rename {resources/lang => lang}/vendor/forum/ru/general.php (100%) rename {resources/lang => lang}/vendor/forum/ru/posts.php (100%) rename {resources/lang => lang}/vendor/forum/ru/threads.php (100%) rename {resources/lang => lang}/vendor/forum/ru/validation.php (100%) rename {resources/lang => lang}/vendor/forum/sr/categories.php (100%) rename {resources/lang => lang}/vendor/forum/sr/general.php (100%) rename {resources/lang => lang}/vendor/forum/sr/posts.php (100%) rename {resources/lang => lang}/vendor/forum/sr/threads.php (100%) rename {resources/lang => lang}/vendor/forum/sr/validation.php (100%) rename {resources/lang => lang}/vendor/forum/sv/categories.php (100%) rename {resources/lang => lang}/vendor/forum/sv/general.php (100%) rename {resources/lang => lang}/vendor/forum/sv/posts.php (100%) rename {resources/lang => lang}/vendor/forum/sv/threads.php (100%) rename {resources/lang => lang}/vendor/forum/sv/validation.php (100%) rename {resources/lang => lang}/vendor/forum/th/categories.php (100%) rename {resources/lang => lang}/vendor/forum/th/general.php (100%) rename {resources/lang => lang}/vendor/forum/th/posts.php (100%) rename {resources/lang => lang}/vendor/forum/th/threads.php (100%) rename {resources/lang => lang}/vendor/forum/th/validation.php (100%) rename {resources/lang => lang}/vendor/forum/tr/categories.php (100%) rename {resources/lang => lang}/vendor/forum/tr/general.php (100%) rename {resources/lang => lang}/vendor/forum/tr/posts.php (100%) rename {resources/lang => lang}/vendor/forum/tr/threads.php (100%) rename {resources/lang => lang}/vendor/forum/tr/validation.php (100%) rename {resources/lang => lang}/vendor/forum/zh/categories.php (100%) rename {resources/lang => lang}/vendor/forum/zh/general.php (100%) rename {resources/lang => lang}/vendor/forum/zh/posts.php (100%) rename {resources/lang => lang}/vendor/forum/zh/threads.php (100%) rename {resources/lang => lang}/vendor/forum/zh/validation.php (100%) diff --git a/resources/lang/en/auth.php b/lang/en/auth.php similarity index 100% rename from resources/lang/en/auth.php rename to lang/en/auth.php diff --git a/resources/lang/en/pagination.php b/lang/en/pagination.php similarity index 100% rename from resources/lang/en/pagination.php rename to lang/en/pagination.php diff --git a/resources/lang/en/passwords.php b/lang/en/passwords.php similarity index 100% rename from resources/lang/en/passwords.php rename to lang/en/passwords.php diff --git a/resources/lang/en/validation.php b/lang/en/validation.php similarity index 100% rename from resources/lang/en/validation.php rename to lang/en/validation.php diff --git a/resources/lang/vendor/forum/.gitkeep b/lang/vendor/forum/.gitkeep similarity index 100% rename from resources/lang/vendor/forum/.gitkeep rename to lang/vendor/forum/.gitkeep diff --git a/resources/lang/vendor/forum/de/categories.php b/lang/vendor/forum/de/categories.php similarity index 100% rename from resources/lang/vendor/forum/de/categories.php rename to lang/vendor/forum/de/categories.php diff --git a/resources/lang/vendor/forum/de/general.php b/lang/vendor/forum/de/general.php similarity index 100% rename from resources/lang/vendor/forum/de/general.php rename to lang/vendor/forum/de/general.php diff --git a/resources/lang/vendor/forum/de/posts.php b/lang/vendor/forum/de/posts.php similarity index 100% rename from resources/lang/vendor/forum/de/posts.php rename to lang/vendor/forum/de/posts.php diff --git a/resources/lang/vendor/forum/de/threads.php b/lang/vendor/forum/de/threads.php similarity index 100% rename from resources/lang/vendor/forum/de/threads.php rename to lang/vendor/forum/de/threads.php diff --git a/resources/lang/vendor/forum/de/validation.php b/lang/vendor/forum/de/validation.php similarity index 100% rename from resources/lang/vendor/forum/de/validation.php rename to lang/vendor/forum/de/validation.php diff --git a/resources/lang/vendor/forum/en/categories.php b/lang/vendor/forum/en/categories.php similarity index 100% rename from resources/lang/vendor/forum/en/categories.php rename to lang/vendor/forum/en/categories.php diff --git a/resources/lang/vendor/forum/en/general.php b/lang/vendor/forum/en/general.php similarity index 100% rename from resources/lang/vendor/forum/en/general.php rename to lang/vendor/forum/en/general.php diff --git a/resources/lang/vendor/forum/en/posts.php b/lang/vendor/forum/en/posts.php similarity index 100% rename from resources/lang/vendor/forum/en/posts.php rename to lang/vendor/forum/en/posts.php diff --git a/resources/lang/vendor/forum/en/threads.php b/lang/vendor/forum/en/threads.php similarity index 100% rename from resources/lang/vendor/forum/en/threads.php rename to lang/vendor/forum/en/threads.php diff --git a/resources/lang/vendor/forum/en/validation.php b/lang/vendor/forum/en/validation.php similarity index 100% rename from resources/lang/vendor/forum/en/validation.php rename to lang/vendor/forum/en/validation.php diff --git a/resources/lang/vendor/forum/es/categories.php b/lang/vendor/forum/es/categories.php similarity index 100% rename from resources/lang/vendor/forum/es/categories.php rename to lang/vendor/forum/es/categories.php diff --git a/resources/lang/vendor/forum/es/general.php b/lang/vendor/forum/es/general.php similarity index 100% rename from resources/lang/vendor/forum/es/general.php rename to lang/vendor/forum/es/general.php diff --git a/resources/lang/vendor/forum/es/posts.php b/lang/vendor/forum/es/posts.php similarity index 100% rename from resources/lang/vendor/forum/es/posts.php rename to lang/vendor/forum/es/posts.php diff --git a/resources/lang/vendor/forum/es/threads.php b/lang/vendor/forum/es/threads.php similarity index 100% rename from resources/lang/vendor/forum/es/threads.php rename to lang/vendor/forum/es/threads.php diff --git a/resources/lang/vendor/forum/es/validation.php b/lang/vendor/forum/es/validation.php similarity index 100% rename from resources/lang/vendor/forum/es/validation.php rename to lang/vendor/forum/es/validation.php diff --git a/resources/lang/vendor/forum/fr/categories.php b/lang/vendor/forum/fr/categories.php similarity index 100% rename from resources/lang/vendor/forum/fr/categories.php rename to lang/vendor/forum/fr/categories.php diff --git a/resources/lang/vendor/forum/fr/general.php b/lang/vendor/forum/fr/general.php similarity index 100% rename from resources/lang/vendor/forum/fr/general.php rename to lang/vendor/forum/fr/general.php diff --git a/resources/lang/vendor/forum/fr/posts.php b/lang/vendor/forum/fr/posts.php similarity index 100% rename from resources/lang/vendor/forum/fr/posts.php rename to lang/vendor/forum/fr/posts.php diff --git a/resources/lang/vendor/forum/fr/threads.php b/lang/vendor/forum/fr/threads.php similarity index 100% rename from resources/lang/vendor/forum/fr/threads.php rename to lang/vendor/forum/fr/threads.php diff --git a/resources/lang/vendor/forum/fr/validation.php b/lang/vendor/forum/fr/validation.php similarity index 100% rename from resources/lang/vendor/forum/fr/validation.php rename to lang/vendor/forum/fr/validation.php diff --git a/resources/lang/vendor/forum/id/categories.php b/lang/vendor/forum/id/categories.php similarity index 100% rename from resources/lang/vendor/forum/id/categories.php rename to lang/vendor/forum/id/categories.php diff --git a/resources/lang/vendor/forum/id/general.php b/lang/vendor/forum/id/general.php similarity index 100% rename from resources/lang/vendor/forum/id/general.php rename to lang/vendor/forum/id/general.php diff --git a/resources/lang/vendor/forum/id/posts.php b/lang/vendor/forum/id/posts.php similarity index 100% rename from resources/lang/vendor/forum/id/posts.php rename to lang/vendor/forum/id/posts.php diff --git a/resources/lang/vendor/forum/id/threads.php b/lang/vendor/forum/id/threads.php similarity index 100% rename from resources/lang/vendor/forum/id/threads.php rename to lang/vendor/forum/id/threads.php diff --git a/resources/lang/vendor/forum/id/validation.php b/lang/vendor/forum/id/validation.php similarity index 100% rename from resources/lang/vendor/forum/id/validation.php rename to lang/vendor/forum/id/validation.php diff --git a/resources/lang/vendor/forum/it/categories.php b/lang/vendor/forum/it/categories.php similarity index 100% rename from resources/lang/vendor/forum/it/categories.php rename to lang/vendor/forum/it/categories.php diff --git a/resources/lang/vendor/forum/it/general.php b/lang/vendor/forum/it/general.php similarity index 100% rename from resources/lang/vendor/forum/it/general.php rename to lang/vendor/forum/it/general.php diff --git a/resources/lang/vendor/forum/it/posts.php b/lang/vendor/forum/it/posts.php similarity index 100% rename from resources/lang/vendor/forum/it/posts.php rename to lang/vendor/forum/it/posts.php diff --git a/resources/lang/vendor/forum/it/threads.php b/lang/vendor/forum/it/threads.php similarity index 100% rename from resources/lang/vendor/forum/it/threads.php rename to lang/vendor/forum/it/threads.php diff --git a/resources/lang/vendor/forum/it/validation.php b/lang/vendor/forum/it/validation.php similarity index 100% rename from resources/lang/vendor/forum/it/validation.php rename to lang/vendor/forum/it/validation.php diff --git a/resources/lang/vendor/forum/nl/categories.php b/lang/vendor/forum/nl/categories.php similarity index 100% rename from resources/lang/vendor/forum/nl/categories.php rename to lang/vendor/forum/nl/categories.php diff --git a/resources/lang/vendor/forum/nl/general.php b/lang/vendor/forum/nl/general.php similarity index 100% rename from resources/lang/vendor/forum/nl/general.php rename to lang/vendor/forum/nl/general.php diff --git a/resources/lang/vendor/forum/nl/posts.php b/lang/vendor/forum/nl/posts.php similarity index 100% rename from resources/lang/vendor/forum/nl/posts.php rename to lang/vendor/forum/nl/posts.php diff --git a/resources/lang/vendor/forum/nl/threads.php b/lang/vendor/forum/nl/threads.php similarity index 100% rename from resources/lang/vendor/forum/nl/threads.php rename to lang/vendor/forum/nl/threads.php diff --git a/resources/lang/vendor/forum/nl/validation.php b/lang/vendor/forum/nl/validation.php similarity index 100% rename from resources/lang/vendor/forum/nl/validation.php rename to lang/vendor/forum/nl/validation.php diff --git a/resources/lang/vendor/forum/pt-br/categories.php b/lang/vendor/forum/pt-br/categories.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/categories.php rename to lang/vendor/forum/pt-br/categories.php diff --git a/resources/lang/vendor/forum/pt-br/general.php b/lang/vendor/forum/pt-br/general.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/general.php rename to lang/vendor/forum/pt-br/general.php diff --git a/resources/lang/vendor/forum/pt-br/posts.php b/lang/vendor/forum/pt-br/posts.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/posts.php rename to lang/vendor/forum/pt-br/posts.php diff --git a/resources/lang/vendor/forum/pt-br/threads.php b/lang/vendor/forum/pt-br/threads.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/threads.php rename to lang/vendor/forum/pt-br/threads.php diff --git a/resources/lang/vendor/forum/pt-br/validation.php b/lang/vendor/forum/pt-br/validation.php similarity index 100% rename from resources/lang/vendor/forum/pt-br/validation.php rename to lang/vendor/forum/pt-br/validation.php diff --git a/resources/lang/vendor/forum/ro/categories.php b/lang/vendor/forum/ro/categories.php similarity index 100% rename from resources/lang/vendor/forum/ro/categories.php rename to lang/vendor/forum/ro/categories.php diff --git a/resources/lang/vendor/forum/ro/general.php b/lang/vendor/forum/ro/general.php similarity index 100% rename from resources/lang/vendor/forum/ro/general.php rename to lang/vendor/forum/ro/general.php diff --git a/resources/lang/vendor/forum/ro/posts.php b/lang/vendor/forum/ro/posts.php similarity index 100% rename from resources/lang/vendor/forum/ro/posts.php rename to lang/vendor/forum/ro/posts.php diff --git a/resources/lang/vendor/forum/ro/threads.php b/lang/vendor/forum/ro/threads.php similarity index 100% rename from resources/lang/vendor/forum/ro/threads.php rename to lang/vendor/forum/ro/threads.php diff --git a/resources/lang/vendor/forum/ro/validation.php b/lang/vendor/forum/ro/validation.php similarity index 100% rename from resources/lang/vendor/forum/ro/validation.php rename to lang/vendor/forum/ro/validation.php diff --git a/resources/lang/vendor/forum/ru/categories.php b/lang/vendor/forum/ru/categories.php similarity index 100% rename from resources/lang/vendor/forum/ru/categories.php rename to lang/vendor/forum/ru/categories.php diff --git a/resources/lang/vendor/forum/ru/general.php b/lang/vendor/forum/ru/general.php similarity index 100% rename from resources/lang/vendor/forum/ru/general.php rename to lang/vendor/forum/ru/general.php diff --git a/resources/lang/vendor/forum/ru/posts.php b/lang/vendor/forum/ru/posts.php similarity index 100% rename from resources/lang/vendor/forum/ru/posts.php rename to lang/vendor/forum/ru/posts.php diff --git a/resources/lang/vendor/forum/ru/threads.php b/lang/vendor/forum/ru/threads.php similarity index 100% rename from resources/lang/vendor/forum/ru/threads.php rename to lang/vendor/forum/ru/threads.php diff --git a/resources/lang/vendor/forum/ru/validation.php b/lang/vendor/forum/ru/validation.php similarity index 100% rename from resources/lang/vendor/forum/ru/validation.php rename to lang/vendor/forum/ru/validation.php diff --git a/resources/lang/vendor/forum/sr/categories.php b/lang/vendor/forum/sr/categories.php similarity index 100% rename from resources/lang/vendor/forum/sr/categories.php rename to lang/vendor/forum/sr/categories.php diff --git a/resources/lang/vendor/forum/sr/general.php b/lang/vendor/forum/sr/general.php similarity index 100% rename from resources/lang/vendor/forum/sr/general.php rename to lang/vendor/forum/sr/general.php diff --git a/resources/lang/vendor/forum/sr/posts.php b/lang/vendor/forum/sr/posts.php similarity index 100% rename from resources/lang/vendor/forum/sr/posts.php rename to lang/vendor/forum/sr/posts.php diff --git a/resources/lang/vendor/forum/sr/threads.php b/lang/vendor/forum/sr/threads.php similarity index 100% rename from resources/lang/vendor/forum/sr/threads.php rename to lang/vendor/forum/sr/threads.php diff --git a/resources/lang/vendor/forum/sr/validation.php b/lang/vendor/forum/sr/validation.php similarity index 100% rename from resources/lang/vendor/forum/sr/validation.php rename to lang/vendor/forum/sr/validation.php diff --git a/resources/lang/vendor/forum/sv/categories.php b/lang/vendor/forum/sv/categories.php similarity index 100% rename from resources/lang/vendor/forum/sv/categories.php rename to lang/vendor/forum/sv/categories.php diff --git a/resources/lang/vendor/forum/sv/general.php b/lang/vendor/forum/sv/general.php similarity index 100% rename from resources/lang/vendor/forum/sv/general.php rename to lang/vendor/forum/sv/general.php diff --git a/resources/lang/vendor/forum/sv/posts.php b/lang/vendor/forum/sv/posts.php similarity index 100% rename from resources/lang/vendor/forum/sv/posts.php rename to lang/vendor/forum/sv/posts.php diff --git a/resources/lang/vendor/forum/sv/threads.php b/lang/vendor/forum/sv/threads.php similarity index 100% rename from resources/lang/vendor/forum/sv/threads.php rename to lang/vendor/forum/sv/threads.php diff --git a/resources/lang/vendor/forum/sv/validation.php b/lang/vendor/forum/sv/validation.php similarity index 100% rename from resources/lang/vendor/forum/sv/validation.php rename to lang/vendor/forum/sv/validation.php diff --git a/resources/lang/vendor/forum/th/categories.php b/lang/vendor/forum/th/categories.php similarity index 100% rename from resources/lang/vendor/forum/th/categories.php rename to lang/vendor/forum/th/categories.php diff --git a/resources/lang/vendor/forum/th/general.php b/lang/vendor/forum/th/general.php similarity index 100% rename from resources/lang/vendor/forum/th/general.php rename to lang/vendor/forum/th/general.php diff --git a/resources/lang/vendor/forum/th/posts.php b/lang/vendor/forum/th/posts.php similarity index 100% rename from resources/lang/vendor/forum/th/posts.php rename to lang/vendor/forum/th/posts.php diff --git a/resources/lang/vendor/forum/th/threads.php b/lang/vendor/forum/th/threads.php similarity index 100% rename from resources/lang/vendor/forum/th/threads.php rename to lang/vendor/forum/th/threads.php diff --git a/resources/lang/vendor/forum/th/validation.php b/lang/vendor/forum/th/validation.php similarity index 100% rename from resources/lang/vendor/forum/th/validation.php rename to lang/vendor/forum/th/validation.php diff --git a/resources/lang/vendor/forum/tr/categories.php b/lang/vendor/forum/tr/categories.php similarity index 100% rename from resources/lang/vendor/forum/tr/categories.php rename to lang/vendor/forum/tr/categories.php diff --git a/resources/lang/vendor/forum/tr/general.php b/lang/vendor/forum/tr/general.php similarity index 100% rename from resources/lang/vendor/forum/tr/general.php rename to lang/vendor/forum/tr/general.php diff --git a/resources/lang/vendor/forum/tr/posts.php b/lang/vendor/forum/tr/posts.php similarity index 100% rename from resources/lang/vendor/forum/tr/posts.php rename to lang/vendor/forum/tr/posts.php diff --git a/resources/lang/vendor/forum/tr/threads.php b/lang/vendor/forum/tr/threads.php similarity index 100% rename from resources/lang/vendor/forum/tr/threads.php rename to lang/vendor/forum/tr/threads.php diff --git a/resources/lang/vendor/forum/tr/validation.php b/lang/vendor/forum/tr/validation.php similarity index 100% rename from resources/lang/vendor/forum/tr/validation.php rename to lang/vendor/forum/tr/validation.php diff --git a/resources/lang/vendor/forum/zh/categories.php b/lang/vendor/forum/zh/categories.php similarity index 100% rename from resources/lang/vendor/forum/zh/categories.php rename to lang/vendor/forum/zh/categories.php diff --git a/resources/lang/vendor/forum/zh/general.php b/lang/vendor/forum/zh/general.php similarity index 100% rename from resources/lang/vendor/forum/zh/general.php rename to lang/vendor/forum/zh/general.php diff --git a/resources/lang/vendor/forum/zh/posts.php b/lang/vendor/forum/zh/posts.php similarity index 100% rename from resources/lang/vendor/forum/zh/posts.php rename to lang/vendor/forum/zh/posts.php diff --git a/resources/lang/vendor/forum/zh/threads.php b/lang/vendor/forum/zh/threads.php similarity index 100% rename from resources/lang/vendor/forum/zh/threads.php rename to lang/vendor/forum/zh/threads.php diff --git a/resources/lang/vendor/forum/zh/validation.php b/lang/vendor/forum/zh/validation.php similarity index 100% rename from resources/lang/vendor/forum/zh/validation.php rename to lang/vendor/forum/zh/validation.php From 5de0e71685729d1b55e975b814c83614b4d7b357 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:14 +0000 Subject: [PATCH 04/17] Remove default `app` files --- app/Http/Middleware/Authenticate.php | 19 ------------- app/Http/Middleware/EncryptCookies.php | 17 ----------- .../Middleware/RedirectIfAuthenticated.php | 23 --------------- app/Http/Middleware/TrimStrings.php | 18 ------------ app/Http/Middleware/TrustProxies.php | 28 ------------------- app/Http/Middleware/VerifyCsrfToken.php | 26 ----------------- app/Providers/AuthServiceProvider.php | 24 ---------------- app/Providers/BroadcastServiceProvider.php | 19 ------------- 8 files changed, 174 deletions(-) delete mode 100644 app/Http/Middleware/Authenticate.php delete mode 100644 app/Http/Middleware/EncryptCookies.php delete mode 100644 app/Http/Middleware/RedirectIfAuthenticated.php delete mode 100644 app/Http/Middleware/TrimStrings.php delete mode 100644 app/Http/Middleware/TrustProxies.php delete mode 100644 app/Http/Middleware/VerifyCsrfToken.php delete mode 100644 app/Providers/AuthServiceProvider.php delete mode 100644 app/Providers/BroadcastServiceProvider.php diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index 9b131d0d9..000000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,19 +0,0 @@ -expectsJson()) { - return route('login'); - } - } -} diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php deleted file mode 100644 index 033136ad1..000000000 --- a/app/Http/Middleware/EncryptCookies.php +++ /dev/null @@ -1,17 +0,0 @@ -check()) { - return redirect()->to('/'); - } - - return $next($request); - } -} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php deleted file mode 100644 index 5a50e7b5c..000000000 --- a/app/Http/Middleware/TrimStrings.php +++ /dev/null @@ -1,18 +0,0 @@ - 'App\Policies\ModelPolicy', - ]; - - /** - * Register any authentication / authorization services. - */ - public function boot(): void - { - } -} diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php deleted file mode 100644 index 2be04f5d9..000000000 --- a/app/Providers/BroadcastServiceProvider.php +++ /dev/null @@ -1,19 +0,0 @@ - Date: Sat, 27 Apr 2024 08:20:15 +0000 Subject: [PATCH 05/17] Shift core files --- artisan | 54 ++----------- lang/en/validation.php | 179 ++++++++++++++++++++++++++++------------- public/index.php | 60 +++----------- 3 files changed, 144 insertions(+), 149 deletions(-) diff --git a/artisan b/artisan index 0cf63cb67..8e04b4224 100755 --- a/artisan +++ b/artisan @@ -1,53 +1,15 @@ #!/usr/bin/env php handleCommand(new ArgvInput); - /* - |-------------------------------------------------------------------------- - | Run The Artisan Application - |-------------------------------------------------------------------------- - | - | When we run the console application, the current CLI command will be - | executed in this console and the response sent back to a terminal - | or another output device for the developers. Here goes nothing! - | - */ - - $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); - - $status = $kernel->handle( - $input = new Symfony\Component\Console\Input\ArgvInput, - new Symfony\Component\Console\Output\ConsoleOutput - ); - - /* - |-------------------------------------------------------------------------- - | Shutdown The Application - |-------------------------------------------------------------------------- - | - | Once Artisan has finished running, we will fire off the shutdown events - | so that any final work may be done by the application before we shut - | down the process. This is the last thing to happen to the request. - | - */ - - $kernel->terminate($input, $status); - - exit($status); +exit($status); diff --git a/lang/en/validation.php b/lang/en/validation.php index b59ca31d6..aea190d40 100644 --- a/lang/en/validation.php +++ b/lang/en/validation.php @@ -13,80 +13,151 @@ return [ | */ - 'accepted' => 'The :attribute must be accepted.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'accepted' => 'The :attribute field must be accepted.', + 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', + 'active_url' => 'The :attribute field must be a valid URL.', + 'after' => 'The :attribute field must be a date after :date.', + 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', + 'alpha' => 'The :attribute field must only contain letters.', + 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', + 'alpha_num' => 'The :attribute field must only contain letters and numbers.', + 'array' => 'The :attribute field must be an array.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute field must be a date before :date.', + 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', 'between' => [ - 'numeric' => 'The :attribute must be between :min and :max.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', + 'array' => 'The :attribute field must have between :min and :max items.', + 'file' => 'The :attribute field must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute field must be between :min and :max.', + 'string' => 'The :attribute field must be between :min and :max characters.', ], 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'date' => 'The :attribute is not a valid date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', + 'can' => 'The :attribute field contains an unauthorized value.', + 'confirmed' => 'The :attribute field confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute field must be a valid date.', + 'date_equals' => 'The :attribute field must be a date equal to :date.', + 'date_format' => 'The :attribute field must match the format :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', + 'declined' => 'The :attribute field must be declined.', + 'declined_if' => 'The :attribute field must be declined when :other is :value.', + 'different' => 'The :attribute field and :other must be different.', + 'digits' => 'The :attribute field must be :digits digits.', + 'digits_between' => 'The :attribute field must be between :min and :max digits.', + 'dimensions' => 'The :attribute field has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', - 'email' => 'The :attribute must be a valid email address.', + 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', + 'email' => 'The :attribute field must be a valid email address.', + 'ends_with' => 'The :attribute field must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', + 'extensions' => 'The :attribute field must have one of the following extensions: :values.', + 'file' => 'The :attribute field must be a file.', 'filled' => 'The :attribute field must have a value.', - 'image' => 'The :attribute must be an image.', + 'gt' => [ + 'array' => 'The :attribute field must have more than :value items.', + 'file' => 'The :attribute field must be greater than :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than :value.', + 'string' => 'The :attribute field must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute field must have :value items or more.', + 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than or equal to :value.', + 'string' => 'The :attribute field must be greater than or equal to :value characters.', + ], + 'hex_color' => 'The :attribute field must be a valid hexadecimal color.', + 'image' => 'The :attribute field must be an image.', 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', + 'in_array' => 'The :attribute field must exist in :other.', + 'integer' => 'The :attribute field must be an integer.', + 'ip' => 'The :attribute field must be a valid IP address.', + 'ipv4' => 'The :attribute field must be a valid IPv4 address.', + 'ipv6' => 'The :attribute field must be a valid IPv6 address.', + 'json' => 'The :attribute field must be a valid JSON string.', + 'list' => 'The :attribute field must be a list.', + 'lowercase' => 'The :attribute field must be lowercase.', + 'lt' => [ + 'array' => 'The :attribute field must have less than :value items.', + 'file' => 'The :attribute field must be less than :value kilobytes.', + 'numeric' => 'The :attribute field must be less than :value.', + 'string' => 'The :attribute field must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute field must not have more than :value items.', + 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be less than or equal to :value.', + 'string' => 'The :attribute field must be less than or equal to :value characters.', + ], + 'mac_address' => 'The :attribute field must be a valid MAC address.', 'max' => [ - 'numeric' => 'The :attribute may not be greater than :max.', - 'file' => 'The :attribute may not be greater than :max kilobytes.', - 'string' => 'The :attribute may not be greater than :max characters.', - 'array' => 'The :attribute may not have more than :max items.', + 'array' => 'The :attribute field must not have more than :max items.', + 'file' => 'The :attribute field must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute field must not be greater than :max.', + 'string' => 'The :attribute field must not be greater than :max characters.', ], - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'max_digits' => 'The :attribute field must not have more than :max digits.', + 'mimes' => 'The :attribute field must be a file of type: :values.', + 'mimetypes' => 'The :attribute field must be a file of type: :values.', 'min' => [ - 'numeric' => 'The :attribute must be at least :min.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', + 'array' => 'The :attribute field must have at least :min items.', + 'file' => 'The :attribute field must be at least :min kilobytes.', + 'numeric' => 'The :attribute field must be at least :min.', + 'string' => 'The :attribute field must be at least :min characters.', ], + 'min_digits' => 'The :attribute field must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute field must be a multiple of :value.', 'not_in' => 'The selected :attribute is invalid.', - 'numeric' => 'The :attribute must be a number.', + 'not_regex' => 'The :attribute field format is invalid.', + 'numeric' => 'The :attribute field must be a number.', + 'password' => [ + 'letters' => 'The :attribute field must contain at least one letter.', + 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute field must contain at least one number.', + 'symbols' => 'The :attribute field must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], 'present' => 'The :attribute field must be present.', - 'regex' => 'The :attribute format is invalid.', + 'present_if' => 'The :attribute field must be present when :other is :value.', + 'present_unless' => 'The :attribute field must be present unless :other is :value.', + 'present_with' => 'The :attribute field must be present when :values is present.', + 'present_with_all' => 'The :attribute field must be present when :values are present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute field format is invalid.', 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', 'required_unless' => 'The :attribute field is required unless :other is in :values.', 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', 'required_without' => 'The :attribute field is required when :values is not present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', + 'same' => 'The :attribute field must match :other.', 'size' => [ - 'numeric' => 'The :attribute must be :size.', - 'file' => 'The :attribute must be :size kilobytes.', - 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', + 'array' => 'The :attribute field must contain :size items.', + 'file' => 'The :attribute field must be :size kilobytes.', + 'numeric' => 'The :attribute field must be :size.', + 'string' => 'The :attribute field must be :size characters.', ], - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid zone.', + 'starts_with' => 'The :attribute field must start with one of the following: :values.', + 'string' => 'The :attribute field must be a string.', + 'timezone' => 'The :attribute field must be a valid timezone.', 'unique' => 'The :attribute has already been taken.', 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute format is invalid.', + 'uppercase' => 'The :attribute field must be uppercase.', + 'url' => 'The :attribute field must be a valid URL.', + 'ulid' => 'The :attribute field must be a valid ULID.', + 'uuid' => 'The :attribute field must be a valid UUID.', /* |-------------------------------------------------------------------------- @@ -110,9 +181,9 @@ return [ | Custom Validation Attributes |-------------------------------------------------------------------------- | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. | */ diff --git a/public/index.php b/public/index.php index 58500ccd5..947d98963 100644 --- a/public/index.php +++ b/public/index.php @@ -1,55 +1,17 @@ make(Kernel::class); - - $response = $kernel->handle( - $request = Request::capture() - )->send(); - - $kernel->terminate($request, $response); +// Bootstrap Laravel and handle the request... +(require_once __DIR__.'/../bootstrap/app.php') + ->handleRequest(Request::capture()); From d7e65c055795643f9104ecccdb526e4c2e9021a5 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:22 +0000 Subject: [PATCH 06/17] Streamline config files --- config/.gitkeep | 0 config/app.php | 201 ++-------------------------------------- config/auth.php | 91 +----------------- config/broadcasting.php | 58 ------------ config/cache.php | 87 ----------------- config/database.php | 77 +-------------- config/filesystems.php | 61 ------------ config/hashing.php | 45 --------- config/logging.php | 62 +------------ config/mail.php | 104 --------------------- config/queue.php | 79 ---------------- config/services.php | 22 ----- config/session.php | 196 --------------------------------------- config/view.php | 36 ------- 14 files changed, 16 insertions(+), 1103 deletions(-) create mode 100644 config/.gitkeep delete mode 100644 config/broadcasting.php delete mode 100644 config/cache.php delete mode 100644 config/hashing.php delete mode 100644 config/queue.php delete mode 100644 config/session.php delete mode 100644 config/view.php diff --git a/config/.gitkeep b/config/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/config/app.php b/config/app.php index 59821b34d..73ad85ac2 100644 --- a/config/app.php +++ b/config/app.php @@ -1,152 +1,14 @@ env('APP_NAME', 'NNTmux'), - - /* - |-------------------------------------------------------------------------- - | Application Environment - |-------------------------------------------------------------------------- - | - | This value determines the "environment" your application is currently - | running in. This may determine how you prefer to configure various - | services your application utilizes. Set this in your ".env" file. - | - */ - - 'env' => env('APP_ENV', 'production'), - - /* - |-------------------------------------------------------------------------- - | Application Debug Mode - |-------------------------------------------------------------------------- - | - | When your application is in debug mode, detailed error messages with - | stack traces will be shown on every error that occurs within your - | application. If disabled, a simple generic error page is shown. - | - */ - - 'debug' => env('APP_DEBUG', false), - - /* - |-------------------------------------------------------------------------- - | Application URL - |-------------------------------------------------------------------------- - | - | This URL is used by the console to properly generate URLs when using - | the Artisan command line tool. You should set this to the root of - | your application so that it is used when running Artisan tasks. - | - */ - - 'url' => env('APP_URL', 'http://localhost'), - - 'asset_url' => env('ASSET_URL', null), - - /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. - | - */ - - 'timezone' => env('APP_TZ', 'UTC'), - - /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | - */ - - 'locale' => 'en', - - /* - |-------------------------------------------------------------------------- - | Application Fallback Locale - |-------------------------------------------------------------------------- - | - | The fallback locale determines the locale to use when the current one - | is not available. You may change the value to correspond to any of - | the language folders that are provided through your application. - | - */ - - 'fallback_locale' => 'en', - - /* - |-------------------------------------------------------------------------- - | Encryption Key - |-------------------------------------------------------------------------- - | - | This key is used by the Illuminate encrypter service and should be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! - | - */ - - 'key' => env('APP_KEY'), - - 'cipher' => 'AES-256-CBC', - - /* - |-------------------------------------------------------------------------- - | Autoloaded Service Providers - |-------------------------------------------------------------------------- - | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. - | - */ - - 'providers' => [ - + 'providers' => ServiceProvider::defaultProviders()->merge([ /* * Laravel Framework Service Providers... */ - Illuminate\Auth\AuthServiceProvider::class, - Illuminate\Broadcasting\BroadcastServiceProvider::class, - Illuminate\Bus\BusServiceProvider::class, - Illuminate\Cache\CacheServiceProvider::class, - Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, - Illuminate\Cookie\CookieServiceProvider::class, - Illuminate\Database\DatabaseServiceProvider::class, - Illuminate\Encryption\EncryptionServiceProvider::class, - Illuminate\Filesystem\FilesystemServiceProvider::class, - Illuminate\Foundation\Providers\FoundationServiceProvider::class, - Illuminate\Hashing\HashServiceProvider::class, - Illuminate\Mail\MailServiceProvider::class, - Illuminate\Notifications\NotificationServiceProvider::class, - Illuminate\Pagination\PaginationServiceProvider::class, - Illuminate\Pipeline\PipelineServiceProvider::class, - Illuminate\Queue\QueueServiceProvider::class, - Illuminate\Redis\RedisServiceProvider::class, - Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, - Illuminate\Session\SessionServiceProvider::class, - Illuminate\Translation\TranslationServiceProvider::class, - Illuminate\Validation\ValidationServiceProvider::class, - Illuminate\View\ViewServiceProvider::class, /* * Package Service Providers... @@ -165,60 +27,11 @@ return [ Jrean\UserVerification\UserVerificationServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\UserServiceProvider::class, + ])->toArray(), - ], - - /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. - | - */ - - 'aliases' => [ - - 'App' => Illuminate\Support\Facades\App::class, - 'Arr' => Illuminate\Support\Arr::class, - 'Artisan' => Illuminate\Support\Facades\Artisan::class, - 'Auth' => Illuminate\Support\Facades\Auth::class, - 'Blade' => Illuminate\Support\Facades\Blade::class, - 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, - 'Bus' => Illuminate\Support\Facades\Bus::class, - 'Cache' => Illuminate\Support\Facades\Cache::class, - 'Config' => Illuminate\Support\Facades\Config::class, - 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Crypt' => Illuminate\Support\Facades\Crypt::class, - 'DB' => Illuminate\Support\Facades\DB::class, - 'Eloquent' => Illuminate\Database\Eloquent\Model::class, - 'Event' => Illuminate\Support\Facades\Event::class, - 'File' => Illuminate\Support\Facades\File::class, - 'Gate' => Illuminate\Support\Facades\Gate::class, - 'Hash' => Illuminate\Support\Facades\Hash::class, - 'Http' => Illuminate\Support\Facades\Http::class, - 'Js' => Illuminate\Support\Js::class, - 'Lang' => Illuminate\Support\Facades\Lang::class, - 'Log' => Illuminate\Support\Facades\Log::class, - 'Mail' => Illuminate\Support\Facades\Mail::class, - 'Notification' => Illuminate\Support\Facades\Notification::class, - 'Password' => Illuminate\Support\Facades\Password::class, - 'Queue' => Illuminate\Support\Facades\Queue::class, - 'Redirect' => Illuminate\Support\Facades\Redirect::class, + 'aliases' => Facade::defaultAliases()->merge([ 'RedisManager' => Illuminate\Support\Facades\Redis::class, - 'Request' => Illuminate\Support\Facades\Request::class, - 'Response' => Illuminate\Support\Facades\Response::class, - 'Route' => Illuminate\Support\Facades\Route::class, - 'Schema' => Illuminate\Support\Facades\Schema::class, - 'Session' => Illuminate\Support\Facades\Session::class, - 'Storage' => Illuminate\Support\Facades\Storage::class, - 'Str' => Illuminate\Support\Str::class, - 'URL' => Illuminate\Support\Facades\URL::class, - 'Validator' => Illuminate\Support\Facades\Validator::class, - 'View' => Illuminate\Support\Facades\View::class, 'UserVerification' => Jrean\UserVerification\Facades\UserVerification::class, - ], + ])->toArray(), ]; diff --git a/config/auth.php b/config/auth.php index 706ea97c8..5b47cf5aa 100644 --- a/config/auth.php +++ b/config/auth.php @@ -2,106 +2,17 @@ return [ - /* - |-------------------------------------------------------------------------- - | Authentication Defaults - |-------------------------------------------------------------------------- - | - | This option controls the default authentication "guard" and password - | reset options for your application. You may change these defaults - | as required, but they're a perfect start for most applications. - | - */ - - 'defaults' => [ - 'guard' => 'web', - 'passwords' => 'users', - ], - - /* - |-------------------------------------------------------------------------- - | Authentication Guards - |-------------------------------------------------------------------------- - | - | Next, you may define every authentication guard for your application. - | Of course, a great default configuration has been defined for you - | here which uses session storage and the Eloquent user provider. - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | Supported: "session", "token" - | - */ - 'guards' => [ - 'web' => [ - 'driver' => 'session', - 'provider' => 'users', - ], - 'api' => [ 'driver' => 'token', 'provider' => 'users', 'hash' => false, ], + 'rss' => [ 'driver' => 'token', 'provider' => 'users', ], ], - /* - |-------------------------------------------------------------------------- - | User Providers - |-------------------------------------------------------------------------- - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | If you have multiple user tables or models you may configure multiple - | sources which represent each model / table. These sources may then - | be assigned to any extra authentication guards you have defined. - | - | Supported: "database", "eloquent" - | - */ - - 'providers' => [ - 'users' => [ - 'driver' => 'eloquent', - 'model' => App\Models\User::class, - ], - - // 'users' => [ - // 'driver' => 'database', - // 'table' => 'users', - // ], - ], - - /* - |-------------------------------------------------------------------------- - | Resetting Passwords - |-------------------------------------------------------------------------- - | - | You may specify multiple password reset configurations if you have more - | than one user table or model in the application and you want to have - | separate password reset settings based on the specific user types. - | - | The expire time is the number of minutes that the reset token should be - | considered valid. This security feature keeps tokens short-lived so - | they have less time to be guessed. You may change this as needed. - | - */ - - 'passwords' => [ - 'users' => [ - 'provider' => 'users', - 'table' => 'password_resets', - 'expire' => 60, - ], - ], - ]; diff --git a/config/broadcasting.php b/config/broadcasting.php deleted file mode 100644 index 5eecd2b26..000000000 --- a/config/broadcasting.php +++ /dev/null @@ -1,58 +0,0 @@ - env('BROADCAST_DRIVER', 'null'), - - /* - |-------------------------------------------------------------------------- - | Broadcast Connections - |-------------------------------------------------------------------------- - | - | Here you may define all of the broadcast connections that will be used - | to broadcast events to other systems or over websockets. Samples of - | each available type of connection are provided inside this array. - | - */ - - 'connections' => [ - - 'pusher' => [ - 'driver' => 'pusher', - 'key' => env('PUSHER_APP_KEY'), - 'secret' => env('PUSHER_APP_SECRET'), - 'app_id' => env('PUSHER_APP_ID'), - 'options' => [ - // - ], - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - ], - - 'log' => [ - 'driver' => 'log', - ], - - 'null' => [ - 'driver' => 'null', - ], - - ], - -]; diff --git a/config/cache.php b/config/cache.php deleted file mode 100644 index 0a3b4136a..000000000 --- a/config/cache.php +++ /dev/null @@ -1,87 +0,0 @@ - env('CACHE_DRIVER', 'file'), - /* - |-------------------------------------------------------------------------- - | Cache Stores - |-------------------------------------------------------------------------- - | - | Here you may define all of the cache "stores" for your application as - | well as their drivers. You may even define multiple stores for the - | same cache driver to group types of items stored in your caches. - | - */ - 'stores' => [ - 'apc' => [ - 'driver' => 'apc', - ], - 'array' => [ - 'driver' => 'array', - ], - 'database' => [ - 'driver' => 'database', - 'table' => 'cache', - 'connection' => null, - ], - 'file' => [ - 'driver' => 'file', - 'path' => storage_path('framework/cache/data'), - ], - 'memcached' => [ - 'driver' => 'memcached', - 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), - 'sasl' => [ - env('MEMCACHED_USERNAME'), - env('MEMCACHED_PASSWORD'), - ], - 'options' => [ - // Memcached::OPT_CONNECT_TIMEOUT => 2000, - ], - 'servers' => [ - [ - 'host' => env('MEMCACHED_HOST', '127.0.0.1'), - 'port' => env('MEMCACHED_PORT', 11211), - 'weight' => 100, - ], - ], - ], - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'cache', - ], - 'dynamodb' => [ - 'driver' => 'dynamodb', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_REGION', 'us-east-1'), - 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), - ], - ], - /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. - | - */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), -]; diff --git a/config/database.php b/config/database.php index afe35a1aa..91cb847de 100644 --- a/config/database.php +++ b/config/database.php @@ -4,44 +4,7 @@ use Illuminate\Support\Str; return [ - /* - |-------------------------------------------------------------------------- - | Default Database Connection Name - |-------------------------------------------------------------------------- - | - | Here you may specify which of the database connections below you wish - | to use as your default connection for all database work. Of course - | you may use many connections at once using the Database library. - | - */ - - 'default' => env('DB_CONNECTION', 'mysql'), - - /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to make development simple. - | - | - | All database work in Laravel is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. - | - */ - 'connections' => [ - - 'sqlite' => [ - 'driver' => 'sqlite', - 'url' => env('DATABASE_URL'), - 'database' => env('DB_DATABASE', database_path('database.sqlite')), - 'prefix' => '', - ], - 'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), @@ -75,18 +38,6 @@ return [ 'sslmode' => 'prefer', ], - 'sqlsrv' => [ - 'driver' => 'sqlsrv', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', 'localhost'), - 'port' => env('DB_PORT', '1433'), - 'database' => env('DB_DATABASE', 'nntmux'), - 'username' => env('DB_USERNAME', 'nntmux'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - ], - 'sphinx' => [ 'driver' => 'mysql', 'host' => env('MANTICORESEARCH_HOST', '127.0.0.1'), @@ -95,32 +46,12 @@ return [ 'unix_socket' => '', 'charset' => 'utf8', ], - ], - /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk haven't actually been run in the database. - | - */ - - 'migrations' => 'migrations', - - /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer set of commands than a typical key-value systems - | such as APC or Memcached. Laravel makes it easy to dig right in. - | - */ + 'migrations' => [ + 'table' => 'migrations', + 'update_date_on_publish' => false, // disable to preserve original behavior for existing applications + ], 'redis' => [ 'client' => env('REDIS_CLIENT', 'phpredis'), diff --git a/config/filesystems.php b/config/filesystems.php index 4544f60c4..bf2c99cd4 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -2,67 +2,6 @@ return [ - /* - |-------------------------------------------------------------------------- - | Default Filesystem Disk - |-------------------------------------------------------------------------- - | - | Here you may specify the default filesystem disk that should be used - | by the framework. The "local" disk, as well as a variety of cloud - | based disks are available to your application. Just store away! - | - */ - - 'default' => env('FILESYSTEM_DRIVER', 'local'), - - /* - |-------------------------------------------------------------------------- - | Default Cloud Filesystem Disk - |-------------------------------------------------------------------------- - | - | Many applications store files both locally and in the cloud. For this - | reason, you may specify a default "cloud" driver here. This driver - | will be bound as the Cloud disk implementation in the container. - | - */ - 'cloud' => env('FILESYSTEM_CLOUD', 's3'), - /* - |-------------------------------------------------------------------------- - | Filesystem Disks - |-------------------------------------------------------------------------- - | - | Here you may configure as many filesystem "disks" as you wish, and you - | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. - | - | Supported Drivers: "local", "ftp", "s3", "rackspace" - | - */ - - 'disks' => [ - - 'local' => [ - 'driver' => 'local', - 'root' => storage_path('app'), - ], - - 'public' => [ - 'driver' => 'local', - 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', - 'visibility' => 'public', - ], - - 's3' => [ - 'driver' => 's3', - 'key' => env('AWS_KEY'), - 'secret' => env('AWS_SECRET'), - 'region' => env('AWS_REGION'), - 'bucket' => env('AWS_BUCKET'), - ], - - ], - ]; diff --git a/config/hashing.php b/config/hashing.php deleted file mode 100644 index 3ed4c3a17..000000000 --- a/config/hashing.php +++ /dev/null @@ -1,45 +0,0 @@ - env('PASSWORD_HASH', 'argon'), - /* - |-------------------------------------------------------------------------- - | Bcrypt Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Bcrypt algorithm. This will allow you - | to control the amount of time it takes to hash the given password. - | - */ - 'bcrypt' => [ - 'rounds' => env('BCRYPT_ROUNDS', 10), - ], - /* - |-------------------------------------------------------------------------- - | Argon Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Argon algorithm. These will allow you - | to control the amount of time it takes to hash the given password. - | - */ - 'argon' => [ - 'memory' => 1024, - 'threads' => 2, - 'time' => 2, - ], -]; diff --git a/config/logging.php b/config/logging.php index 865d7310a..452c5a01d 100644 --- a/config/logging.php +++ b/config/logging.php @@ -4,32 +4,6 @@ use Monolog\Handler\StreamHandler; use Monolog\Handler\SyslogUdpHandler; return [ - /* - |-------------------------------------------------------------------------- - | Default Log Channel - |-------------------------------------------------------------------------- - | - | This option defines the default log channel that gets used when writing - | messages to the logs. The name specified in this option should match - | one of the channels defined in the "channels" configuration array. - | - */ - 'default' => env('LOG_CHANNEL', 'stack'), - - /* - |-------------------------------------------------------------------------- - | Log Channels - |-------------------------------------------------------------------------- - | - | Here you may configure the log channels for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Drivers: "single", "daily", "slack", "syslog", - | "errorlog", "monolog", - | "custom", "stack" - | - */ 'channels' => [ 'stack' => [ @@ -38,6 +12,7 @@ return [ 'channels' => ['daily', 'flare'], 'ignore_exceptions' => false, ], + 'single' => [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), @@ -46,6 +21,7 @@ return [ 'permission' => 0775, 'locking' => false, ], + 'daily' => [ 'driver' => 'daily', 'path' => storage_path('logs/laravel.log'), @@ -55,40 +31,10 @@ return [ 'permission' => 0775, 'locking' => false, ], - 'slack' => [ - 'driver' => 'slack', - 'url' => env('LOG_SLACK_WEBHOOK_URL'), - 'username' => 'Laravel Log', - 'emoji' => ':boom:', - 'level' => 'critical', - ], - 'papertrail' => [ - 'driver' => 'monolog', - 'level' => 'debug', - 'handler' => SyslogUdpHandler::class, - 'handler_with' => [ - 'host' => env('PAPERTRAIL_URL'), - 'port' => env('PAPERTRAIL_PORT'), - ], - ], - 'stderr' => [ - 'driver' => 'monolog', - 'handler' => StreamHandler::class, - 'formatter' => env('LOG_STDERR_FORMATTER'), - 'with' => [ - 'stream' => 'php://stderr', - ], - ], - 'syslog' => [ - 'driver' => 'syslog', - 'level' => 'debug', - ], - 'errorlog' => [ - 'driver' => 'errorlog', - 'level' => 'debug', - ], + 'flare' => [ 'driver' => 'flare', ], ], + ]; diff --git a/config/mail.php b/config/mail.php index 608b00ac5..2b0c90385 100644 --- a/config/mail.php +++ b/config/mail.php @@ -2,122 +2,18 @@ return [ - /* - |-------------------------------------------------------------------------- - | Mail Driver - |-------------------------------------------------------------------------- - | - | Laravel supports both SMTP and PHP's "mail" function as drivers for the - | sending of e-mail. You may specify which one you're using throughout - | your application here. By default, Laravel is setup for SMTP mail. - | - | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses", - | "sparkpost", "postmark", "log", "array" - | - */ - 'driver' => env('MAIL_DRIVER', 'smtp'), - /* - |-------------------------------------------------------------------------- - | SMTP Host Address - |-------------------------------------------------------------------------- - | - | Here you may provide the host address of the SMTP server used by your - | applications. A default option is provided that is compatible with - | the Mailgun mail service which will provide reliable deliveries. - | - */ - 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), - /* - |-------------------------------------------------------------------------- - | SMTP Host Port - |-------------------------------------------------------------------------- - | - | This is the SMTP port used by your application to deliver e-mails to - | users of the application. Like the host we have set this value to - | stay compatible with the Mailgun e-mail application by default. - | - */ - 'port' => env('MAIL_PORT', 587), - /* - |-------------------------------------------------------------------------- - | Global "From" Address - |-------------------------------------------------------------------------- - | - | You may wish for all e-mails sent by your application to be sent from - | the same address. Here, you may specify a name and address that is - | used globally for all e-mails that are sent by your application. - | - */ - - 'from' => [ - 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), - 'name' => env('MAIL_FROM_NAME', 'Example'), - ], - - /* - |-------------------------------------------------------------------------- - | E-Mail Encryption Protocol - |-------------------------------------------------------------------------- - | - | Here you may specify the encryption protocol that should be used when - | the application send e-mail messages. A sensible default using the - | transport layer security protocol should provide great security. - | - */ - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - /* - |-------------------------------------------------------------------------- - | SMTP Server Username - |-------------------------------------------------------------------------- - | - | If your SMTP server requires a username for authentication, you should - | set it here. This will get used to authenticate with your server on - | connection. You may also set the "password" value below this one. - | - */ - 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), - /* - |-------------------------------------------------------------------------- - | Sendmail System Path - |-------------------------------------------------------------------------- - | - | When using the "sendmail" driver to send e-mails, we will need to know - | the path to where Sendmail lives on this server. A default path has - | been provided here, which will work well on most of your systems. - | - */ - 'sendmail' => '/usr/sbin/sendmail -bs', - /* - |-------------------------------------------------------------------------- - | Markdown Mail Settings - |-------------------------------------------------------------------------- - | - | If you are using Markdown based email rendering, you may configure your - | theme and component paths here, allowing you to customize the design - | of the emails. Or, you may simply stick with the Laravel defaults! - | - */ - - 'markdown' => [ - 'theme' => 'default', - - 'paths' => [ - resource_path('views/vendor/mail'), - ], - ], - ]; diff --git a/config/queue.php b/config/queue.php deleted file mode 100644 index ff9b45bfa..000000000 --- a/config/queue.php +++ /dev/null @@ -1,79 +0,0 @@ - env('QUEUE_CONNECTION', 'sync'), - - /* - |-------------------------------------------------------------------------- - | Queue Connections - |-------------------------------------------------------------------------- - | - | Here you may configure the connection information for each server that - | is used by your application. A default configuration has been added - | for each back-end shipped with Laravel. You are free to add more. - | - */ - - 'connections' => [ - 'sync' => [ - 'driver' => 'sync', - ], - 'database' => [ - 'driver' => 'database', - 'table' => 'jobs', - 'queue' => 'default', - 'retry_after' => 90, - ], - 'beanstalkd' => [ - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'retry_after' => 90, - 'block_for' => 0, - ], - 'sqs' => [ - 'driver' => 'sqs', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), - 'queue' => env('SQS_QUEUE', 'your-queue-name'), - 'region' => env('AWS_REGION', 'us-east-1'), - ], - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - 'queue' => env('REDIS_QUEUE', 'default'), - 'retry_after' => 90, - 'block_for' => null, - ], - ], - /* - |-------------------------------------------------------------------------- - | Failed Queue Jobs - |-------------------------------------------------------------------------- - | - | These options configure the behavior of failed queue job logging so you - | can control which database and table are used to store the jobs that - | have failed. You may change them to any database / table you wish. - | - */ - 'failed' => [ - 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'failed_jobs', - ], - -]; diff --git a/config/services.php b/config/services.php index e470f6598..cf345c69c 100644 --- a/config/services.php +++ b/config/services.php @@ -2,34 +2,12 @@ return [ - /* - |-------------------------------------------------------------------------- - | Third Party Services - |-------------------------------------------------------------------------- - | - | This file is for storing the credentials for third party services such - | as Stripe, Mailgun, SparkPost and others. This file provides a sane - | default location for this type of information, allowing packages - | to have a conventional place to find your various credentials. - | - */ - 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), ], - 'postmark' => [ - 'token' => env('POSTMARK_TOKEN'), - ], - - 'ses' => [ - 'key' => env('SES_KEY'), - 'secret' => env('SES_SECRET'), - 'region' => env('SES_REGION', 'us-east-1'), - ], - 'sparkpost' => [ 'secret' => env('SPARKPOST_SECRET'), ], diff --git a/config/session.php b/config/session.php deleted file mode 100644 index f5f481c7a..000000000 --- a/config/session.php +++ /dev/null @@ -1,196 +0,0 @@ - env('SESSION_DRIVER', 'cookie'), - - /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle before it expires. If you want them - | to immediately expire on the browser closing, set that option. - | - */ - - 'lifetime' => 120, - - 'expire_on_close' => false, - - /* - |-------------------------------------------------------------------------- - | Session Encryption - |-------------------------------------------------------------------------- - | - | This option allows you to easily specify that all of your session data - | should be encrypted before it is stored. All encryption will be run - | automatically by Laravel and you can use the Session like normal. - | - */ - - 'encrypt' => env('SESSION_ENCRYPT', false), - - /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When using the native session driver, we need a location where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | - */ - - 'files' => storage_path('framework/sessions'), - - /* - |-------------------------------------------------------------------------- - | Session Database Connection - |-------------------------------------------------------------------------- - | - | When using the "database" or "redis" session drivers, you may specify a - | connection that should be used to manage these sessions. This should - | correspond to a connection in your database configuration options. - | - */ - - 'connection' => 'session', - - /* - |-------------------------------------------------------------------------- - | Session Database Table - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the table we - | should use to manage the sessions. Of course, a sensible default is - | provided for you; however, you are free to change this as needed. - | - */ - - 'table' => 'sessions', - - /* - |-------------------------------------------------------------------------- - | Session Cache Store - |-------------------------------------------------------------------------- - | - | When using the "apc", "memcached", or "dynamodb" session drivers you may - | list a cache store that should be used for these sessions. This value - | must match with one of the application's configured cache "stores". - | - */ - 'store' => env('SESSION_STORE', null), - - /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | - */ - - 'lottery' => [2, 100], - - /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | - */ - 'cookie' => env( - 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_').'_session' - ), - - /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | - */ - - 'path' => '/', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | - */ - - 'domain' => env('SESSION_DOMAIN', null), - - /* - |-------------------------------------------------------------------------- - | HTTPS Only Cookies - |-------------------------------------------------------------------------- - | - | By setting this option to true, session cookies will only be sent back - | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you if it can not be done securely. - | - */ - - 'secure' => env('SESSION_SECURE_COOKIE', false), - - /* - |-------------------------------------------------------------------------- - | HTTP Access Only - |-------------------------------------------------------------------------- - | - | Setting this value to true will prevent JavaScript from accessing the - | value of the cookie and the cookie will only be accessible through - | the HTTP protocol. You are free to modify this option if needed. - | - */ - - 'http_only' => false, - - /* - |-------------------------------------------------------------------------- - | Same-Site Cookies - |-------------------------------------------------------------------------- - | - | This option determines how your cookies behave when cross-site requests - | take place, and can be used to mitigate CSRF attacks. By default, we - | do not enable this as other CSRF protection services are in place. - | - | Supported: "lax", "strict", "none" - | - */ - 'same_site' => null, - -]; diff --git a/config/view.php b/config/view.php deleted file mode 100644 index 22b8a18d3..000000000 --- a/config/view.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - resource_path('views'), - ], - - /* - |-------------------------------------------------------------------------- - | Compiled View Path - |-------------------------------------------------------------------------- - | - | This option determines where all the compiled Blade templates will be - | stored for your application. Typically, this is within the storage - | directory. However, as usual, you are free to change this value. - | - */ - - 'compiled' => env( - 'VIEW_COMPILED_PATH', - realpath(storage_path('framework/views')) - ), - -]; From 40284c545d71deaeb7b06bbc992992a4944bf7af Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:23 +0000 Subject: [PATCH 07/17] Set new `ENV` variables --- .env.example | 19 +++++++++++++++++-- config/database.php | 4 ++-- phpunit.xml | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.env.example b/.env.example index 9932324f3..1b579eceb 100644 --- a/.env.example +++ b/.env.example @@ -45,14 +45,25 @@ ADMIN_EMAIL= APP_NAME=NNTmux APP_ENV=production APP_DEBUG=false +APP_TIMEZONE=UTC APP_URL= + +APP_LOCALE=en +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=en_US + +APP_MAINTENANCE_DRIVER=file +APP_MAINTENANCE_STORE=database + +BCRYPT_ROUNDS=12 APP_TZ=Europe/Paris APP_KEY= LOG_CHANNEL=stack +LOG_STACK=single PASSWORD_HASH=argon2id -BROADCAST_DRIVER=log -CACHE_DRIVER=redis +BROADCAST_CONNECTION=log +CACHE_STORE=redis QUEUE_CONNECTION=sync REDIS_HOST=127.0.0.1 @@ -173,3 +184,7 @@ PURGE_INACTIVE_USERS=false OTP_ENABLED=false FLARE_KEY= + +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null diff --git a/config/database.php b/config/database.php index 91cb847de..bc7be74fa 100644 --- a/config/database.php +++ b/config/database.php @@ -7,7 +7,7 @@ return [ 'connections' => [ 'mysql' => [ 'driver' => 'mysql', - 'url' => env('DATABASE_URL'), + 'url' => env('DB_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'nntmux'), @@ -26,7 +26,7 @@ return [ 'pgsql' => [ 'driver' => 'pgsql', - 'url' => env('DATABASE_URL'), + 'url' => env('DB_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'nntmux'), diff --git a/phpunit.xml b/phpunit.xml index 1e2c9a449..888fcef4b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -14,7 +14,7 @@ - + From 091edebef073eee0e374a3144d7bd89aefbff6cc Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:23 +0000 Subject: [PATCH 08/17] Default new `bootstrap/app.php` --- bootstrap/app.php | 70 +++++++++++------------------------------ bootstrap/providers.php | 5 +++ 2 files changed, 23 insertions(+), 52 deletions(-) create mode 100644 bootstrap/providers.php diff --git a/bootstrap/app.php b/bootstrap/app.php index 037e17df0..d5d7e70d2 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,55 +1,21 @@ singleton( - Illuminate\Contracts\Http\Kernel::class, - App\Http\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Console\Kernel::class, - App\Console\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Debug\ExceptionHandler::class, - App\Exceptions\Handler::class -); - -/* -|-------------------------------------------------------------------------- -| Return The Application -|-------------------------------------------------------------------------- -| -| This script returns the application instance. The instance is given to -| the calling script so we can separate the building of the instances -| from the actual running of the application and sending responses. -| -*/ - -return $app; +return Application::configure(basePath: dirname(__DIR__)) + ->withProviders() + ->withRouting( + web: __DIR__.'/../routes/web.php', + // api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', + // channels: __DIR__.'/../routes/channels.php', + health: '/up', + ) + ->withMiddleware(function (Middleware $middleware) { + // + }) + ->withExceptions(function (Exceptions $exceptions) { + // + })->create(); diff --git a/bootstrap/providers.php b/bootstrap/providers.php new file mode 100644 index 000000000..38b258d18 --- /dev/null +++ b/bootstrap/providers.php @@ -0,0 +1,5 @@ + Date: Sat, 27 Apr 2024 08:20:23 +0000 Subject: [PATCH 09/17] Re-register HTTP middleware --- app/Http/Kernel.php | 69 --------------------------------------------- bootstrap/app.php | 29 ++++++++++++++++++- 2 files changed, 28 insertions(+), 70 deletions(-) delete mode 100644 app/Http/Kernel.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php deleted file mode 100644 index 5d1f25639..000000000 --- a/app/Http/Kernel.php +++ /dev/null @@ -1,69 +0,0 @@ - [ - Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\Session\Middleware\AuthenticateSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - - 'api' => [ - 'throttle:60,1', - 'bindings', - ], - ]; - - /** - * The application's route middleware. - * - * These middleware may be assigned to groups or used individually. - * - * @var array - */ - protected $middlewareAliases = [ - 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, - 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => Middleware\RedirectIfAuthenticated::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'isVerified' => \Jrean\UserVerification\Middleware\IsVerified::class, - 'role' => \Spatie\Permission\Middleware\RoleMiddleware::class, - 'permission' => \Spatie\Permission\Middleware\PermissionMiddleware::class, - 'role_or_permission' => \Spatie\Permission\Middleware\RoleOrPermissionMiddleware::class, - 'clearance' => Middleware\ClearanceMiddleware::class, - '2fa' => Middleware\Google2FAMiddleware::class, - ]; -} diff --git a/bootstrap/app.php b/bootstrap/app.php index d5d7e70d2..2de7e2d55 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -14,7 +14,34 @@ return Application::configure(basePath: dirname(__DIR__)) health: '/up', ) ->withMiddleware(function (Middleware $middleware) { - // + $middleware->redirectGuestsTo(fn () => route('login')); + $middleware->redirectUsersTo('/'); + + $middleware->validateCsrfTokens(except: [ + 'failed', + 'admin/*', + 'btcpay/webhook', + ]); + + $middleware->append([ + \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, + \Monicahq\Cloudflare\Http\Middleware\TrustProxies::class, + \App\Http\Middleware\ForceJsonOnAPI::class, + ]); + + $middleware->web(\Illuminate\Session\Middleware\AuthenticateSession::class); + + $middleware->throttleApi('60,1'); + + $middleware->alias([ + '2fa' => \App\Http\Middleware\Google2FAMiddleware::class, + 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, + 'clearance' => \App\Http\Middleware\ClearanceMiddleware::class, + 'isVerified' => \Jrean\UserVerification\Middleware\IsVerified::class, + 'permission' => \Spatie\Permission\Middleware\PermissionMiddleware::class, + 'role' => \Spatie\Permission\Middleware\RoleMiddleware::class, + 'role_or_permission' => \Spatie\Permission\Middleware\RoleOrPermissionMiddleware::class, + ]); }) ->withExceptions(function (Exceptions $exceptions) { // From f9d038146b0e9461fb3ad1c83977b99afdef5efe Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:23 +0000 Subject: [PATCH 10/17] Consolidate service providers --- app/Providers/EventServiceProvider.php | 43 -------------------------- 1 file changed, 43 deletions(-) delete mode 100644 app/Providers/EventServiceProvider.php diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php deleted file mode 100644 index 3bd786af3..000000000 --- a/app/Providers/EventServiceProvider.php +++ /dev/null @@ -1,43 +0,0 @@ - [ - SendEmailVerificationNotification::class, - ], - - UserLoggedIn::class => [ - UpdateUserLoggedIn::class, - ], - - UserAccessedApi::class => [ - UpdateUserAccessedApi::class, - ], - ]; - - /** - * Register any events for your application. - */ - public function boot(): void - { - parent::boot(); - - // - } -} From 099db99025c79951bbaf777045252690fe5f3a20 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:23 +0000 Subject: [PATCH 11/17] Re-register service providers --- bootstrap/app.php | 5 ++++- bootstrap/providers.php | 4 ++++ config/app.php | 23 ----------------------- 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 2de7e2d55..dc804ae7e 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -5,7 +5,10 @@ use Illuminate\Foundation\Configuration\Exceptions; use Illuminate\Foundation\Configuration\Middleware; return Application::configure(basePath: dirname(__DIR__)) - ->withProviders() + ->withProviders([ + \Laravel\Tinker\TinkerServiceProvider::class, + \Jrean\UserVerification\UserVerificationServiceProvider::class, + ]) ->withRouting( web: __DIR__.'/../routes/web.php', // api: __DIR__.'/../routes/api.php', diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 38b258d18..ffc860cbb 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -2,4 +2,8 @@ return [ App\Providers\AppServiceProvider::class, + App\Providers\HorizonServiceProvider::class, + App\Providers\TelescopeServiceProvider::class, + App\Providers\RouteServiceProvider::class, + App\Providers\UserServiceProvider::class, ]; diff --git a/config/app.php b/config/app.php index 73ad85ac2..8021bd9a7 100644 --- a/config/app.php +++ b/config/app.php @@ -5,29 +5,6 @@ use Illuminate\Support\ServiceProvider; return [ - 'providers' => ServiceProvider::defaultProviders()->merge([ - /* - * Laravel Framework Service Providers... - */ - - /* - * Package Service Providers... - */ - Laravel\Tinker\TinkerServiceProvider::class, - - /* - * Application Service Providers... - */ - App\Providers\AppServiceProvider::class, - App\Providers\AuthServiceProvider::class, - // App\Providers\BroadcastServiceProvider::class, - App\Providers\EventServiceProvider::class, - App\Providers\HorizonServiceProvider::class, - App\Providers\TelescopeServiceProvider::class, - Jrean\UserVerification\UserVerificationServiceProvider::class, - App\Providers\RouteServiceProvider::class, - App\Providers\UserServiceProvider::class, - ])->toArray(), 'aliases' => Facade::defaultAliases()->merge([ 'RedisManager' => Illuminate\Support\Facades\Redis::class, From 424b56d8d0435d37bcdad5c4dbf8f8e2d124b523 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:27 +0000 Subject: [PATCH 12/17] Re-register routes --- bootstrap/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index dc804ae7e..2219604d2 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -11,9 +11,9 @@ return Application::configure(basePath: dirname(__DIR__)) ]) ->withRouting( web: __DIR__.'/../routes/web.php', - // api: __DIR__.'/../routes/api.php', + api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', - // channels: __DIR__.'/../routes/channels.php', + channels: __DIR__.'/../routes/channels.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { From 70d242d8d0324ba403283d93913ecf875c67f7a9 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:28 +0000 Subject: [PATCH 13/17] Re-register scheduled commands --- app/Console/Kernel.php | 48 ------------------------------------------ routes/console.php | 17 +++++++++++++++ 2 files changed, 17 insertions(+), 48 deletions(-) delete mode 100644 app/Console/Kernel.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index 9b2a62220..000000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,48 +0,0 @@ -command('disposable:update')->weekly(); - $schedule->command('clean:directories')->hourly()->withoutOverlapping(); - $schedule->command('nntmux:delete-unverified-users')->twiceDaily(1, 13); - $schedule->command('nntmux:update-expired-roles')->daily(); - $schedule->command('nntmux:remove-bad')->hourly()->withoutOverlapping(); - $schedule->command('telescope:prune')->daily(); - $schedule->command('horizon:snapshot')->everyFiveMinutes()->withoutOverlapping(); - $schedule->command('cloudflare:reload')->daily(); - $schedule->command('cache:prune-stale-tags')->hourly(); - if (config('nntmux.purge_inactive_users') === true) { - $schedule->job(new RemoveInactiveAccounts())->daily(); - } - } - - /** - * Register the commands for the application. - */ - protected function commands(): void - { - $this->load(__DIR__.'/Commands'); - - require base_path('routes/console.php'); - } -} diff --git a/routes/console.php b/routes/console.php index 0130cb393..f12f8b972 100644 --- a/routes/console.php +++ b/routes/console.php @@ -1,5 +1,8 @@ comment(Inspiring::quote()); })->purpose('Display an inspiring quote'); + + +Schedule::command('disposable:update')->weekly(); +Schedule::command('clean:directories')->hourly()->withoutOverlapping(); +Schedule::command('nntmux:delete-unverified-users')->twiceDaily(1, 13); +Schedule::command('nntmux:update-expired-roles')->daily(); +Schedule::command('nntmux:remove-bad')->hourly()->withoutOverlapping(); +Schedule::command('telescope:prune')->daily(); +Schedule::command('horizon:snapshot')->everyFiveMinutes()->withoutOverlapping(); +Schedule::command('cloudflare:reload')->daily(); +Schedule::command('cache:prune-stale-tags')->hourly(); +if (config('nntmux.purge_inactive_users') === true) { + Schedule::job(new RemoveInactiveAccounts())->daily(); +} From 62e68c9ace4bc44219d866b3d49ce8103c213f01 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:28 +0000 Subject: [PATCH 14/17] Bump Composer dependencies --- composer.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index b00113930..2e4a0f9a7 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,7 @@ "dariusiii/tmdb-laravel": "^7.0", "dborsatto/php-giantbomb": "^2.2", "divineomega/php-cli-progress-bar": "^2.1", - "fakerphp/faker": "^1.12", + "fakerphp/faker": "^1.23", "genealabs/laravel-caffeine": "^11.0", "geoip2/geoip2": "^3.0", "google/recaptcha": "^1.3", @@ -67,19 +67,19 @@ "kevinlebrun/colors.php": "^1.0", "laravel/framework": "^11.5", "laravel/horizon": "^5.23", - "laravel/pulse": "^1.0@beta", + "laravel/pulse": "dev-validation-errors", "laravel/sanctum": "^4.0", - "laravel/scout": "^10.0", + "laravel/scout": "^10.8", "laravel/telescope": "^5.0", - "laravel/tinker": "^2.8", + "laravel/tinker": "^2.9", "laravel/ui": "^4.4", "laravelcollective/html": "^6.4", "league/climate": "^3.8", - "mailerlite/laravel-elasticsearch": "^11.0", + "mailerlite/laravel-elasticsearch": "^11.1", "manticoresoftware/manticoresearch-php": "^3.0", - "marcreichel/igdb-laravel": "^4.1", + "marcreichel/igdb-laravel": "^4.2", "mhor/php-mediainfo": "^5.6", - "monicahq/laravel-cloudflare": "^3.5", + "monicahq/laravel-cloudflare": "^3.6", "monolog/monolog": "^3.5", "mtownsend/xml-to-array": "^2.0", "nesbot/carbon": "^3.3", @@ -88,22 +88,22 @@ "php-ffmpeg/php-ffmpeg": "^1.2", "php-http/guzzle7-adapter": "^1.0", "php-http/message": "^1.16", - "pragmarx/google2fa-laravel": "^2.1", + "pragmarx/google2fa-laravel": "^2.2", "predis/predis": "^2.2", - "propaganistas/laravel-disposable-email": "^2.2", + "propaganistas/laravel-disposable-email": "^2.3", "ramsey/uuid": "^4.7", "riari/laravel-forum": "^6.0", - "sentry/sentry-laravel": "^4.2", + "sentry/sentry-laravel": "^4.3", "smarty/smarty": "^4.3", "spatie/async": "^1.6", "spatie/laravel-backup": "^8.6", - "spatie/laravel-directory-cleanup": "^1.9", - "spatie/laravel-fractal": "^6.0", + "spatie/laravel-directory-cleanup": "^1.10", + "spatie/laravel-fractal": "^6.1", "spatie/laravel-ignition": "^2.4", - "spatie/laravel-image-optimizer": "^1.7", + "spatie/laravel-image-optimizer": "^1.8", "spatie/laravel-permission": "^6.3", "sspat/es-query-sanitizer": "^1.0", - "stechstudio/laravel-zipstream": "^4.13", + "stechstudio/laravel-zipstream": "^4.14", "symfony/http-client": "^7.0", "symfony/postmark-mailer": "^7.0", "symfony/process": "^7.0", @@ -114,19 +114,19 @@ "require-dev": { "barryvdh/laravel-ide-helper": "^3.0", "beyondcode/laravel-dump-server": "^2.0", - "captainhook/captainhook": "^5.1", - "captainhook/plugin-composer": "^5.1", + "captainhook/captainhook": "^5.4", + "captainhook/plugin-composer": "^5.2", "driftingly/rector-laravel": "^0.29", "ergebnis/composer-normalize": "^2.30", "friendsofphp/php-cs-fixer": "^3.49", "jubeki/laravel-code-style": "^2.0", - "larastan/larastan": "^2.7", - "laravel/pint": "^1.6", - "laravel/sail": "^1.21", - "mockery/mockery": "^1.4.4", + "larastan/larastan": "^2.8", + "laravel/pint": "^1.13", + "laravel/sail": "^1.26", + "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.0", - "php-coveralls/php-coveralls": "^2.0", - "phpunit/phpunit": "^10.1", + "php-coveralls/php-coveralls": "^2.4", + "phpunit/phpunit": "^10.5", "rector/rector": "^0.18.13" }, "suggest": { From fe642048f2567ed649f1f90778ad393c8599de1b Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:32 +0000 Subject: [PATCH 15/17] Adopt Laravel type hints --- app/Console/Commands/CleanNZB.php | 2 +- app/Console/Commands/ImportNzbs.php | 2 +- app/Console/Commands/RecategorizeReleases.php | 2 +- app/Models/AnidbEpisode.php | 6 ++++-- app/Models/AnidbTitle.php | 5 +++-- app/Models/DnzbFailure.php | 5 +++-- app/Models/Genre.php | 3 ++- app/Models/Invitation.php | 3 ++- app/Models/MusicInfo.php | 3 ++- app/Models/Predb.php | 5 +++-- app/Models/Release.php | 2 +- app/Models/ReleaseNfo.php | 3 ++- app/Models/ReleasesGroups.php | 3 ++- app/Models/TvEpisode.php | 3 ++- app/Models/UsersRelease.php | 5 +++-- 15 files changed, 32 insertions(+), 20 deletions(-) diff --git a/app/Console/Commands/CleanNZB.php b/app/Console/Commands/CleanNZB.php index 7176637e4..edd7dfe7f 100644 --- a/app/Console/Commands/CleanNZB.php +++ b/app/Console/Commands/CleanNZB.php @@ -34,7 +34,7 @@ class CleanNZB extends Command /** * Execute the console command. */ - public function handle() + public function handle(): void { // Check if any options are false if (! $this->option('notindb') && ! $this->option('notondisk')) { diff --git a/app/Console/Commands/ImportNzbs.php b/app/Console/Commands/ImportNzbs.php index 594a8ffaf..d06467672 100644 --- a/app/Console/Commands/ImportNzbs.php +++ b/app/Console/Commands/ImportNzbs.php @@ -30,7 +30,7 @@ class ImportNzbs extends Command /** * Execute the console command. */ - public function handle() + public function handle(): void { if ($this->option('folder')) { if ($this->option('filename')) { diff --git a/app/Console/Commands/RecategorizeReleases.php b/app/Console/Commands/RecategorizeReleases.php index f6907b0bd..5c6989d12 100644 --- a/app/Console/Commands/RecategorizeReleases.php +++ b/app/Console/Commands/RecategorizeReleases.php @@ -34,7 +34,7 @@ class RecategorizeReleases extends Command /** * Execute the console command. */ - public function handle() + public function handle(): void { $countQuery = Release::query(); if ($this->option('misc')) { diff --git a/app/Models/AnidbEpisode.php b/app/Models/AnidbEpisode.php index c3db72a9c..6da41b624 100644 --- a/app/Models/AnidbEpisode.php +++ b/app/Models/AnidbEpisode.php @@ -2,6 +2,8 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Model; /** @@ -54,12 +56,12 @@ class AnidbEpisode extends Model */ protected $guarded = []; - public function title() + public function title(): BelongsTo { return $this->belongsTo(AnidbTitle::class, 'anidbid'); } - public function info() + public function info(): HasMany { return $this->hasMany(AnidbInfo::class, 'anidbid'); } diff --git a/app/Models/AnidbTitle.php b/app/Models/AnidbTitle.php index 94677909f..816d4b056 100644 --- a/app/Models/AnidbTitle.php +++ b/app/Models/AnidbTitle.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Model; /** @@ -52,12 +53,12 @@ class AnidbTitle extends Model */ protected $guarded = []; - public function episode() + public function episode(): HasMany { return $this->hasMany(AnidbEpisode::class, 'anidbid'); } - public function info() + public function info(): HasMany { return $this->hasMany(AnidbInfo::class, 'anidbid'); } diff --git a/app/Models/DnzbFailure.php b/app/Models/DnzbFailure.php index 3703a778b..a4a8b998e 100644 --- a/app/Models/DnzbFailure.php +++ b/app/Models/DnzbFailure.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -49,12 +50,12 @@ class DnzbFailure extends Model */ protected $guarded = []; - public function release() + public function release(): BelongsTo { return $this->belongsTo(Release::class, 'release_id'); } - public function user() + public function user(): BelongsTo { return $this->belongsTo(User::class, 'users_id'); } diff --git a/app/Models/Genre.php b/app/Models/Genre.php index 503d5a265..3ee52d7f9 100644 --- a/app/Models/Genre.php +++ b/app/Models/Genre.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Model; /** @@ -41,7 +42,7 @@ class Genre extends Model */ protected $guarded = []; - public function music() + public function music(): HasMany { return $this->hasMany(MusicInfo::class, 'genres_id'); } diff --git a/app/Models/Invitation.php b/app/Models/Invitation.php index 55f15fb5c..8e2cc7ed8 100644 --- a/app/Models/Invitation.php +++ b/app/Models/Invitation.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -47,7 +48,7 @@ class Invitation extends Model */ protected $guarded = ['id']; - public function user() + public function user(): BelongsTo { return $this->belongsTo(User::class, 'users_id'); } diff --git a/app/Models/MusicInfo.php b/app/Models/MusicInfo.php index 2258784ee..b34f9af26 100644 --- a/app/Models/MusicInfo.php +++ b/app/Models/MusicInfo.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; use Laravel\Scout\Searchable; @@ -71,7 +72,7 @@ class MusicInfo extends Model */ protected $guarded = []; - public function genre() + public function genre(): BelongsTo { return $this->belongsTo(Genre::class, 'genres_id'); } diff --git a/app/Models/Predb.php b/app/Models/Predb.php index 0b9c796d7..b18bf557a 100644 --- a/app/Models/Predb.php +++ b/app/Models/Predb.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\HasMany; use Blacklight\ColorCLI; use Blacklight\ConsoleTools; use Blacklight\ElasticSearchSiteSearch; @@ -89,12 +90,12 @@ class Predb extends Model */ protected $guarded = []; - public function hash() + public function hash(): HasMany { return $this->hasMany(PredbHash::class, 'predb_id'); } - public function release() + public function release(): HasMany { return $this->hasMany(Release::class, 'predb_id'); } diff --git a/app/Models/Release.php b/app/Models/Release.php index 6b81dd470..6acb8cff5 100644 --- a/app/Models/Release.php +++ b/app/Models/Release.php @@ -180,7 +180,7 @@ class Release extends Model return $this->hasMany(UsersRelease::class, 'releases_id'); } - public function file() + public function file(): HasMany { return $this->hasMany(ReleaseFile::class, 'releases_id'); } diff --git a/app/Models/ReleaseNfo.php b/app/Models/ReleaseNfo.php index 95ec44507..f54dec4ed 100644 --- a/app/Models/ReleaseNfo.php +++ b/app/Models/ReleaseNfo.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -39,7 +40,7 @@ class ReleaseNfo extends Model */ protected $guarded = []; - public function release() + public function release(): BelongsTo { return $this->belongsTo(Release::class, 'releases_id'); } diff --git a/app/Models/ReleasesGroups.php b/app/Models/ReleasesGroups.php index 4ece8b993..dbcf77e5e 100644 --- a/app/Models/ReleasesGroups.php +++ b/app/Models/ReleasesGroups.php @@ -20,6 +20,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -69,7 +70,7 @@ class ReleasesGroups extends Model */ protected $guarded = []; - public function release() + public function release(): BelongsTo { return $this->belongsTo(Release::class, 'releases_id'); } diff --git a/app/Models/TvEpisode.php b/app/Models/TvEpisode.php index 81878a7e5..2edad1a6c 100644 --- a/app/Models/TvEpisode.php +++ b/app/Models/TvEpisode.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; @@ -51,7 +52,7 @@ class TvEpisode extends Model */ public $timestamps = false; - public function video() + public function video(): BelongsTo { return $this->belongsTo(Video::class, 'videos_id'); } diff --git a/app/Models/UsersRelease.php b/app/Models/UsersRelease.php index 1b96e7a38..448f0f0a6 100644 --- a/app/Models/UsersRelease.php +++ b/app/Models/UsersRelease.php @@ -2,6 +2,7 @@ namespace App\Models; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Model; /** @@ -39,12 +40,12 @@ class UsersRelease extends Model */ protected $guarded = ['id']; - public function user() + public function user(): BelongsTo { return $this->belongsTo(User::class, 'users_id'); } - public function release() + public function release(): BelongsTo { return $this->belongsTo(Release::class, 'releases_id'); } From 6a8d56dc539bf1fc83e46d9d19295198d0bc3b34 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:32 +0000 Subject: [PATCH 16/17] Mark base controller as `abstract` --- app/Http/Controllers/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index a0a2a8a34..e749914fa 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -7,7 +7,7 @@ use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; -class Controller extends BaseController +abstract class Controller extends BaseController { use AuthorizesRequests, DispatchesJobs, ValidatesRequests; } From 95253c0bbf7bb67df65c72a3f46e1e44fe628485 Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 27 Apr 2024 08:20:32 +0000 Subject: [PATCH 17/17] Remove `CreatesApplication` testing trait --- tests/CreatesApplication.php | 21 --------------------- tests/TestCase.php | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 tests/CreatesApplication.php diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php deleted file mode 100644 index cc6830112..000000000 --- a/tests/CreatesApplication.php +++ /dev/null @@ -1,21 +0,0 @@ -make(Kernel::class)->bootstrap(); - - return $app; - } -} diff --git a/tests/TestCase.php b/tests/TestCase.php index 2932d4a69..fe1ffc2ff 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -6,5 +6,5 @@ use Illuminate\Foundation\Testing\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase { - use CreatesApplication; + // }