From 6a7591af678b006073f7e3a7aebbd71da1c859d0 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 22 May 2024 22:31:10 +0200 Subject: [PATCH 01/12] wip --- .env.example | 15 + .github/workflows/tests.yml | 14 + .gitignore | 1 + README.md | 3 +- app/Concerns/HasTags.php | 4 + app/Console/Kernel.php | 31 - app/Exceptions/Handler.php | 51 - .../Articles/ArticlesController.php | 2 +- .../Controllers/Articles/AuthoredArticles.php | 2 +- .../Auth/ForgotPasswordController.php | 2 +- app/Http/Controllers/Auth/LoginController.php | 6 +- .../Controllers/Auth/RegisterController.php | 6 +- .../Auth/ResetPasswordController.php | 6 +- .../Auth/VerificationController.php | 4 +- .../MarkNotificationsController.php | 2 +- app/Http/Kernel.php | 67 - app/Http/Middleware/Authenticate.php | 17 - app/Http/Middleware/EncryptCookies.php | 17 - .../PreventRequestsDuringMaintenance.php | 17 - .../Middleware/RedirectIfAuthenticated.php | 30 - app/Http/Middleware/SiteIndexing.php | 17 - app/Http/Middleware/TrimStrings.php | 19 - app/Http/Middleware/TrustHosts.php | 20 - app/Http/Middleware/TrustProxies.php | 28 - app/Http/Middleware/ValidateSignature.php | 22 - app/Http/Middleware/VerifyCsrfToken.php | 36 - app/Http/Requests/ArticleRequest.php | 7 + app/Http/Requests/RegisterRequest.php | 9 + app/Http/Requests/ThreadRequest.php | 7 + app/Jobs/GenerateSocialShareImage.php | 17 +- app/Livewire/NotificationIndicator.php | 6 +- app/Models/Article.php | 23 +- app/Models/Thread.php | 15 +- app/Models/User.php | 15 +- app/Providers/AppServiceProvider.php | 43 +- app/Providers/AuthServiceProvider.php | 30 - app/Providers/EventServiceProvider.php | 76 - app/Providers/RouteServiceProvider.php | 42 - app/Rules/DoesNotContainUrlRule.php | 16 +- app/Rules/HttpImageRule.php | 16 +- app/Rules/InvalidMentionRule.php | 16 +- app/Rules/PasscheckRule.php | 16 +- app/Rules/UniqueGitHubUser.php | 25 +- artisan | 50 +- bootstrap/app.php | 98 +- bootstrap/providers.php | 6 + composer.json | 47 +- composer.lock | 1595 ++++++----------- config/.gitkeep | 0 config/app.php | 106 +- config/auth.php | 104 -- config/broadcasting.php | 71 - config/cache.php | 111 -- config/cors.php | 34 - config/database.php | 75 +- config/filesystems.php | 76 - config/hashing.php | 52 - config/logging.php | 112 -- config/mail.php | 112 -- config/queue.php | 109 -- config/sanctum.php | 24 +- config/services.php | 22 - config/session.php | 201 --- config/view.php | 36 - .../2013_09_17_113019_create_users_table.php | 21 - ...2013_09_17_121043_create_session_table.php | 17 - .../2013_09_17_160916_create_roles_table.php | 18 - ...13_09_17_164244_create_role_user_table.php | 18 - ...17_170055_add_is_banned_field_to_users.php | 15 - .../2013_09_18_115103_create_pastes_table.php | 23 - ...013_09_19_101701_create_comments_table.php | 29 - ...013_09_19_104855_create_activity_table.php | 21 - ...22_130010_add_image_url_field_to_users.php | 15 - ...9_22_130711_add_type_field_to_comments.php | 15 - ...013_09_22_163103_create_articles_table.php | 21 - .../2013_09_22_163347_create_tags_table.php | 17 - ..._09_22_163816_create_article_tag_table.php | 19 - ...3_111349_add_description_field_to_tags.php | 15 - ...454_add_published_at_field_to_articles.php | 16 - ..._add_comment_counter_cache_to_articles.php | 15 - ...09_24_145833_create_contributors_table.php | 23 - ..._27_014229_add_soft_delete_to_articles.php | 15 - ..._09_27_015000_add_soft_delete_to_users.php | 15 - ..._27_015109_add_soft_delete_to_comments.php | 15 - ...09_27_021650_add_soft_delete_to_pastes.php | 15 - ..._10_24_131412_create_comment_tag_table.php | 19 - ...13_10_30_104107_add_tag_section_fields.php | 16 - ...08_161643_comments_add_laravel_version.php | 15 - ...1829_articles_add_laravel_verion_field.php | 15 - ...1_27_135001_forum_threads_create_table.php | 25 - ...1_27_141317_forum_replies_create_table.php | 20 - ...01_31_140118_tagged_items_create_table.php | 19 - ...014_02_01_022633_pastes_add_hash_field.php | 15 - ...5035_forum_threads_add_question_fields.php | 15 - ...08_forum_threads_add_solution_reply_id.php | 15 - ...ead_visitation_timestamps_create_table.php | 20 - ..._30_115728_users_add_remember_me_token.php | 15 - ...14_09_10_112330_add_ip_to_pastes_table.php | 15 - .../2014_11_09_185116_pinned_threads.php | 15 - ...7_143131_add_user_confirmation_columns.php | 16 - .../2014_12_13_164931_create_ip_columns.php | 23 - ...210738_add_spam_counter_to_users_table.php | 15 - ...12_21_212154_remove_contributors_table.php | 12 - .../2015_04_12_171949_add_indexes.php | 26 - ..._12_172949_add_indexes_to_tagged_items.php | 16 - .../2015_07_26_160128_l5_cleanup.php | 18 - .../2015_08_26_191523_drop_unused_tables.php | 14 - .../2017_04_08_104959_next_version.php | 203 --- .../2017_07_08_202506_add_user_bio_column.php | 14 - ...2017_08_29_123258_add_banned_at_column.php | 25 - ...0_18_193001_create_subscriptions_table.php | 27 - .../2017_12_03_111900_create_likes_table.php | 19 - ..._01_27_111437_fix_subscription_indexes.php | 26 - ..._02_20_215439_create_failed_jobs_table.php | 20 - .../2018_05_22_191538_cleanup_tables.php | 21 - ...01_create_personal_access_tokens_table.php | 21 - ...1_09_193921_create_notifications_table.php | 20 - .../2020_04_07_181731_create_series_table.php | 23 - ...185543_create_community_articles_table.php | 33 - .../2020_07_16_185353_add_twitter_columns.php | 20 - ..._add_email_verified_at_column_to_users.php | 18 - ...3_205735_add_uuid_to_failed_jobs_table.php | 15 - ..._194212_create_schedule_monitor_tables.php | 49 - ..._10_161050_add_index_to_replyable_type.php | 15 - .../2021_07_05_205125_remove_series.php | 24 - ...te_articles_table_add_hero_image_field.php | 15 - .../2021_07_31_183222_unique_github_ids.php | 28 - ...20452_add_resolved_by_to_threads_table.php | 16 - ..._add_locked_by_column_to_threads_table.php | 21 - ...d_declined_at_column_to_articles_table.php | 15 - ...pdated_by_to_threads_and_replies_table.php | 19 - ...93555_migrate_thread_feed_to_timestamp.php | 33 - .../2022_04_06_152416_add_uuids_to_tables.php | 28 - ...2_05_10_180922_make_uuids_non_nullable.php | 28 - ...6_14_072001_create_blocked_users_table.php | 19 - ...07_08_145847_create_spam_reports_table.php | 21 - ...3_update_articles_table_add_view_count.php | 15 - ..._29_135113_add__website_to_users_table.php | 15 - ...d_soft_delete_columns_to_replies_table.php | 18 - ...50405_add_banned_reason_to_users_table.php | 15 - ...1_145605_add_expires_at_column_sanctum.php | 15 - ...ed_notifications_column_to_users_table.php | 15 - .../{mysql-schema.dump => mysql-schema.sql} | 171 +- lang/en/validation.php | 184 -- phpunit.xml | 7 +- public/index.php | 48 +- routes/api.php | 2 +- routes/channels.php | 7 - routes/console.php | 17 + routes/web.php | 2 +- tests/CreatesApplication.php | 21 - tests/Feature/AuthTest.php | 1 + tests/Integration/Rules/PasscheckRuleTest.php | 12 +- tests/TestCase.php | 1 - .../Unit/Rules/DoesNotContainUrlRuleTest.php | 18 +- tests/Unit/Rules/HttpImageRuleTest.php | 12 +- tests/Unit/Rules/InvalidMentionRuleTest.php | 8 +- 157 files changed, 1058 insertions(+), 4998 deletions(-) delete mode 100644 app/Console/Kernel.php delete mode 100644 app/Exceptions/Handler.php delete mode 100755 app/Http/Kernel.php delete mode 100644 app/Http/Middleware/Authenticate.php delete mode 100644 app/Http/Middleware/EncryptCookies.php delete mode 100644 app/Http/Middleware/PreventRequestsDuringMaintenance.php delete mode 100644 app/Http/Middleware/RedirectIfAuthenticated.php delete mode 100644 app/Http/Middleware/SiteIndexing.php delete mode 100644 app/Http/Middleware/TrimStrings.php delete mode 100644 app/Http/Middleware/TrustHosts.php delete mode 100644 app/Http/Middleware/TrustProxies.php delete mode 100644 app/Http/Middleware/ValidateSignature.php delete mode 100644 app/Http/Middleware/VerifyCsrfToken.php delete mode 100644 app/Providers/AuthServiceProvider.php delete mode 100644 app/Providers/EventServiceProvider.php delete mode 100644 app/Providers/RouteServiceProvider.php create mode 100644 bootstrap/providers.php create mode 100644 config/.gitkeep delete mode 100644 config/broadcasting.php delete mode 100644 config/cache.php delete mode 100644 config/cors.php delete mode 100644 config/filesystems.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 delete mode 100644 database/migrations/2013_09_17_113019_create_users_table.php delete mode 100644 database/migrations/2013_09_17_121043_create_session_table.php delete mode 100644 database/migrations/2013_09_17_160916_create_roles_table.php delete mode 100644 database/migrations/2013_09_17_164244_create_role_user_table.php delete mode 100644 database/migrations/2013_09_17_170055_add_is_banned_field_to_users.php delete mode 100644 database/migrations/2013_09_18_115103_create_pastes_table.php delete mode 100644 database/migrations/2013_09_19_101701_create_comments_table.php delete mode 100644 database/migrations/2013_09_19_104855_create_activity_table.php delete mode 100644 database/migrations/2013_09_22_130010_add_image_url_field_to_users.php delete mode 100644 database/migrations/2013_09_22_130711_add_type_field_to_comments.php delete mode 100644 database/migrations/2013_09_22_163103_create_articles_table.php delete mode 100644 database/migrations/2013_09_22_163347_create_tags_table.php delete mode 100644 database/migrations/2013_09_22_163816_create_article_tag_table.php delete mode 100644 database/migrations/2013_09_23_111349_add_description_field_to_tags.php delete mode 100644 database/migrations/2013_09_23_121454_add_published_at_field_to_articles.php delete mode 100644 database/migrations/2013_09_23_160937_add_comment_counter_cache_to_articles.php delete mode 100644 database/migrations/2013_09_24_145833_create_contributors_table.php delete mode 100644 database/migrations/2013_09_27_014229_add_soft_delete_to_articles.php delete mode 100644 database/migrations/2013_09_27_015000_add_soft_delete_to_users.php delete mode 100644 database/migrations/2013_09_27_015109_add_soft_delete_to_comments.php delete mode 100644 database/migrations/2013_09_27_021650_add_soft_delete_to_pastes.php delete mode 100644 database/migrations/2013_10_24_131412_create_comment_tag_table.php delete mode 100644 database/migrations/2013_10_30_104107_add_tag_section_fields.php delete mode 100644 database/migrations/2013_12_08_161643_comments_add_laravel_version.php delete mode 100644 database/migrations/2013_12_14_151829_articles_add_laravel_verion_field.php delete mode 100644 database/migrations/2014_01_27_135001_forum_threads_create_table.php delete mode 100644 database/migrations/2014_01_27_141317_forum_replies_create_table.php delete mode 100644 database/migrations/2014_01_31_140118_tagged_items_create_table.php delete mode 100644 database/migrations/2014_02_01_022633_pastes_add_hash_field.php delete mode 100644 database/migrations/2014_02_07_125035_forum_threads_add_question_fields.php delete mode 100644 database/migrations/2014_02_07_144708_forum_threads_add_solution_reply_id.php delete mode 100644 database/migrations/2014_02_07_155103_forum_thread_visitation_timestamps_create_table.php delete mode 100644 database/migrations/2014_05_30_115728_users_add_remember_me_token.php delete mode 100644 database/migrations/2014_09_10_112330_add_ip_to_pastes_table.php delete mode 100644 database/migrations/2014_11_09_185116_pinned_threads.php delete mode 100644 database/migrations/2014_12_07_143131_add_user_confirmation_columns.php delete mode 100644 database/migrations/2014_12_13_164931_create_ip_columns.php delete mode 100644 database/migrations/2014_12_13_210738_add_spam_counter_to_users_table.php delete mode 100644 database/migrations/2014_12_21_212154_remove_contributors_table.php delete mode 100644 database/migrations/2015_04_12_171949_add_indexes.php delete mode 100644 database/migrations/2015_04_12_172949_add_indexes_to_tagged_items.php delete mode 100644 database/migrations/2015_07_26_160128_l5_cleanup.php delete mode 100644 database/migrations/2015_08_26_191523_drop_unused_tables.php delete mode 100644 database/migrations/2017_04_08_104959_next_version.php delete mode 100644 database/migrations/2017_07_08_202506_add_user_bio_column.php delete mode 100644 database/migrations/2017_08_29_123258_add_banned_at_column.php delete mode 100644 database/migrations/2017_10_18_193001_create_subscriptions_table.php delete mode 100644 database/migrations/2017_12_03_111900_create_likes_table.php delete mode 100644 database/migrations/2018_01_27_111437_fix_subscription_indexes.php delete mode 100644 database/migrations/2018_02_20_215439_create_failed_jobs_table.php delete mode 100644 database/migrations/2018_05_22_191538_cleanup_tables.php delete mode 100644 database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php delete mode 100644 database/migrations/2020_01_09_193921_create_notifications_table.php delete mode 100644 database/migrations/2020_04_07_181731_create_series_table.php delete mode 100644 database/migrations/2020_04_07_185543_create_community_articles_table.php delete mode 100644 database/migrations/2020_07_16_185353_add_twitter_columns.php delete mode 100644 database/migrations/2020_10_01_093001_add_email_verified_at_column_to_users.php delete mode 100644 database/migrations/2020_11_03_205735_add_uuid_to_failed_jobs_table.php delete mode 100644 database/migrations/2020_11_22_194212_create_schedule_monitor_tables.php delete mode 100644 database/migrations/2021_03_10_161050_add_index_to_replyable_type.php delete mode 100644 database/migrations/2021_07_05_205125_remove_series.php delete mode 100644 database/migrations/2021_07_23_110409_update_articles_table_add_hero_image_field.php delete mode 100644 database/migrations/2021_07_31_183222_unique_github_ids.php delete mode 100644 database/migrations/2021_09_12_220452_add_resolved_by_to_threads_table.php delete mode 100644 database/migrations/2021_10_12_170118_add_locked_by_column_to_threads_table.php delete mode 100644 database/migrations/2021_10_31_143501_add_declined_at_column_to_articles_table.php delete mode 100644 database/migrations/2021_11_15_213258_add_updated_by_to_threads_and_replies_table.php delete mode 100644 database/migrations/2021_11_22_093555_migrate_thread_feed_to_timestamp.php delete mode 100644 database/migrations/2022_04_06_152416_add_uuids_to_tables.php delete mode 100644 database/migrations/2022_05_10_180922_make_uuids_non_nullable.php delete mode 100644 database/migrations/2022_06_14_072001_create_blocked_users_table.php delete mode 100644 database/migrations/2022_07_08_145847_create_spam_reports_table.php delete mode 100644 database/migrations/2022_07_09_191433_update_articles_table_add_view_count.php delete mode 100644 database/migrations/2022_07_29_135113_add__website_to_users_table.php delete mode 100644 database/migrations/2022_08_21_215918_add_soft_delete_columns_to_replies_table.php delete mode 100644 database/migrations/2022_10_15_150405_add_banned_reason_to_users_table.php delete mode 100644 database/migrations/2022_12_11_145605_add_expires_at_column_sanctum.php delete mode 100755 database/migrations/2023_01_31_190506_add_allowed_notifications_column_to_users_table.php rename database/schema/{mysql-schema.dump => mysql-schema.sql} (64%) delete mode 100644 lang/en/validation.php delete mode 100644 routes/channels.php create mode 100644 routes/console.php delete mode 100644 tests/CreatesApplication.php diff --git a/.env.example b/.env.example index c604d587e..0581c42f0 100644 --- a/.env.example +++ b/.env.example @@ -2,9 +2,20 @@ APP_NAME="Laravel.io" APP_ENV=local APP_KEY= APP_DEBUG=true +APP_TIMEZONE=UTC APP_HOST=laravel.io.test APP_URL=http://${APP_HOST} +APP_MAINTENANCE_DRIVER=file +APP_MAINTENANCE_STORE=database + +CACHE_STORE=file +SESSION_DRIVER=file + +AUTH_PASSWORD_RESET_TOKEN_TABLE=password_resets + +BCRYPT_ROUNDS=12 + DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD=password @@ -38,3 +49,7 @@ TELEGRAM_CHANNEL= FATHOM_SITE_ID= FATHOM_TOKEN= +LOG_STACK=single +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2315b0692..e1dc0af90 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,6 +6,16 @@ jobs: tests: runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_DATABASE: laravel + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: - name: Checkout code uses: actions/checkout@v2 @@ -28,6 +38,10 @@ jobs: - name: Execute tests run: vendor/bin/pest + env: + DB_CONNECTION: mysql + DB_COLLATION: utf8mb4_unicode_ci + DB_DATABASE: laravel - name: Deploy if: github.repository == 'laravelio/laravel.io' && github.ref_name == 'main' diff --git a/.gitignore b/.gitignore index 531a3d1fe..0f4c6998b 100755 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /.vscode .env .phpunit.result.cache +!database/schema/*.sql diff --git a/README.md b/README.md index 3b4301760..d8320283d 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,8 @@ The following tools are required in order to start the installation. 4. Run `composer setup` to setup the application 5. Set up a working e-mail driver like [Mailtrap](https://mailtrap.io/) 6. Run `valet link` to link the site to a testing web address -7. Configure the (optional) features from below +7. Create a `testing` database in MySQL so you can run the test suite +8. Configure the (optional) features from below You can now visit the app in your browser by visiting [http://laravel.io.test](http://laravel.io.test). If you seeded the database you can login into a test account with **`testing`** & **`password`**. diff --git a/app/Concerns/HasTags.php b/app/Concerns/HasTags.php index fe80b6448..47d14b9c5 100644 --- a/app/Concerns/HasTags.php +++ b/app/Concerns/HasTags.php @@ -18,7 +18,11 @@ public function tags(): Collection */ public function syncTags(array $tags) { + try { $this->save(); + } catch (\Exception $e) { + dd($e); + } $this->tagsRelation()->sync($tags); $this->unsetRelation('tagsRelation'); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index 6c1cb067d..000000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,31 +0,0 @@ -command('schedule-monitor:sync')->dailyAt('04:56'); - $schedule->command('model:prune', ['--model' => MonitoredScheduledTaskLogItem::class])->daily(); - $schedule->command('horizon:snapshot')->everyFiveMinutes(); - $schedule->command('lio:post-article-to-twitter')->twiceDaily(14, 18); - $schedule->command('lio:generate-sitemap')->daily()->graceTimeInMinutes(25); - $schedule->command('lio:update-article-view-counts')->twiceDaily(); - } - - /** - * Register the Closure based commands for the application. - */ - protected function commands(): void - { - $this->load(__DIR__.'/Commands'); - } -} diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php deleted file mode 100644 index 25b3d29c9..000000000 --- a/app/Exceptions/Handler.php +++ /dev/null @@ -1,51 +0,0 @@ -reportable(function (Throwable $e) { - Integration::captureUnhandledException($e); - }); - } -} diff --git a/app/Http/Controllers/Articles/ArticlesController.php b/app/Http/Controllers/Articles/ArticlesController.php index f6c14ed4d..c5ea9d005 100644 --- a/app/Http/Controllers/Articles/ArticlesController.php +++ b/app/Http/Controllers/Articles/ArticlesController.php @@ -4,7 +4,6 @@ use App\Concerns\UsesFilters; use App\Http\Controllers\Controller; -use App\Http\Middleware\Authenticate; use App\Http\Requests\ArticleRequest; use App\Http\Resources\ArticleResource; use App\Jobs\CreateArticle; @@ -14,6 +13,7 @@ use App\Models\Tag; use App\Models\User; use App\Policies\ArticlePolicy; +use Illuminate\Auth\Middleware\Authenticate; use Illuminate\Auth\Middleware\EnsureEmailIsVerified; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; diff --git a/app/Http/Controllers/Articles/AuthoredArticles.php b/app/Http/Controllers/Articles/AuthoredArticles.php index d3779851a..963c45f3a 100644 --- a/app/Http/Controllers/Articles/AuthoredArticles.php +++ b/app/Http/Controllers/Articles/AuthoredArticles.php @@ -3,7 +3,7 @@ namespace App\Http\Controllers\Articles; use App\Http\Controllers\Controller; -use App\Http\Middleware\Authenticate; +use Illuminate\Auth\Middleware\Authenticate; use Illuminate\Auth\Middleware\EnsureEmailIsVerified; use Illuminate\Http\Request; use Illuminate\View\View; diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 7e93ba3a9..c4bc11cd4 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -3,7 +3,7 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Http\Middleware\RedirectIfAuthenticated; +use Illuminate\Auth\Middleware\RedirectIfAuthenticated; use Illuminate\Foundation\Auth\SendsPasswordResetEmails; class ForgotPasswordController extends Controller diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index a4692480c..ec99620ae 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -3,8 +3,8 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Http\Middleware\RedirectIfAuthenticated; -use App\Providers\RouteServiceProvider; +use App\Providers\AppServiceProvider; +use Illuminate\Auth\Middleware\RedirectIfAuthenticated; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; @@ -28,7 +28,7 @@ class LoginController extends Controller * * @var string */ - protected $redirectTo = RouteServiceProvider::HOME; + protected $redirectTo = AppServiceProvider::HOME; /** * Create a new controller instance. diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 87ce00683..6627f6889 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -3,12 +3,12 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Http\Middleware\RedirectIfAuthenticated; use App\Http\Requests\RegisterRequest; use App\Jobs\RegisterUser; use App\Models\User; -use App\Providers\RouteServiceProvider; +use App\Providers\AppServiceProvider; use Illuminate\Auth\Events\Registered; +use Illuminate\Auth\Middleware\RedirectIfAuthenticated; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Http\JsonResponse; @@ -32,7 +32,7 @@ class RegisterController extends Controller * * @var string */ - protected $redirectTo = RouteServiceProvider::HOME; + protected $redirectTo = AppServiceProvider::HOME; /** * Create a new controller instance. diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index be846cbbe..602144e7b 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -3,8 +3,8 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Http\Middleware\RedirectIfAuthenticated; -use App\Providers\RouteServiceProvider; +use App\Providers\AppServiceProvider; +use Illuminate\Auth\Middleware\RedirectIfAuthenticated; use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Validation\Rules\Password; @@ -28,7 +28,7 @@ class ResetPasswordController extends Controller * * @var string */ - protected $redirectTo = RouteServiceProvider::HOME; + protected $redirectTo = AppServiceProvider::HOME; /** * Create a new controller instance. diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php index 7c17cf1b9..794d69071 100644 --- a/app/Http/Controllers/Auth/VerificationController.php +++ b/app/Http/Controllers/Auth/VerificationController.php @@ -3,7 +3,7 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Providers\RouteServiceProvider; +use App\Providers\AppServiceProvider; use Illuminate\Foundation\Auth\VerifiesEmails; use Illuminate\Http\Request; @@ -30,7 +30,7 @@ class VerificationController extends Controller * * @var string */ - protected $redirectTo = RouteServiceProvider::HOME; + protected $redirectTo = AppServiceProvider::HOME; /** * Create a new controller instance. diff --git a/app/Http/Controllers/MarkNotificationsController.php b/app/Http/Controllers/MarkNotificationsController.php index 03b68a73b..8ae983772 100644 --- a/app/Http/Controllers/MarkNotificationsController.php +++ b/app/Http/Controllers/MarkNotificationsController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers; -use App\Http\Middleware\Authenticate; +use Illuminate\Auth\Middleware\Authenticate; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php deleted file mode 100755 index d10bbfa98..000000000 --- a/app/Http/Kernel.php +++ /dev/null @@ -1,67 +0,0 @@ - [ - \App\Http\Middleware\DisableFloc::class, - \App\Http\Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, - // \Illuminate\Session\Middleware\AuthenticateSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - \App\Http\Middleware\RedirectIfBanned::class, - ], - - 'api' => [ - 'throttle:api', - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - ]; - - /** - * The application's route middleware. - * - * These middleware may be assigned to groups or used individually. - * - * @var array - */ - protected $middlewareAliases = [ - 'auth' => \App\Http\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, - 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, - ]; -} diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index d4ef6447a..000000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,17 +0,0 @@ -expectsJson() ? null : 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(RouteServiceProvider::HOME); - } - } - - return $next($request); - } -} diff --git a/app/Http/Middleware/SiteIndexing.php b/app/Http/Middleware/SiteIndexing.php deleted file mode 100644 index c1f48108d..000000000 --- a/app/Http/Middleware/SiteIndexing.php +++ /dev/null @@ -1,17 +0,0 @@ -environment('production'); - } -} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php deleted file mode 100644 index 88cadcaaf..000000000 --- a/app/Http/Middleware/TrimStrings.php +++ /dev/null @@ -1,19 +0,0 @@ - - */ - protected $except = [ - 'current_password', - 'password', - 'password_confirmation', - ]; -} diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php deleted file mode 100644 index c9c58bddc..000000000 --- a/app/Http/Middleware/TrustHosts.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - public function hosts(): array - { - return [ - $this->allSubdomainsOfApplicationUrl(), - ]; - } -} diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php deleted file mode 100644 index 3391630ec..000000000 --- a/app/Http/Middleware/TrustProxies.php +++ /dev/null @@ -1,28 +0,0 @@ -|string|null - */ - protected $proxies; - - /** - * The headers that should be used to detect proxies. - * - * @var int - */ - protected $headers = - Request::HEADER_X_FORWARDED_FOR | - Request::HEADER_X_FORWARDED_HOST | - Request::HEADER_X_FORWARDED_PORT | - Request::HEADER_X_FORWARDED_PROTO | - Request::HEADER_X_FORWARDED_AWS_ELB; -} diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php deleted file mode 100644 index 093bf64af..000000000 --- a/app/Http/Middleware/ValidateSignature.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - protected $except = [ - // 'fbclid', - // 'utm_campaign', - // 'utm_content', - // 'utm_medium', - // 'utm_source', - // 'utm_term', - ]; -} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php deleted file mode 100644 index 163ab8e9d..000000000 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ /dev/null @@ -1,36 +0,0 @@ -session()->token(), - $this->availableAt(60 * $config['lifetime']), - $config['path'], - $config['domain'], - $config['secure'], - true, - false, - $config['same_site'] ?? null, - $config['partitioned'] ?? false - ); - } -} diff --git a/app/Http/Requests/ArticleRequest.php b/app/Http/Requests/ArticleRequest.php index e4010c23c..33ecc01c0 100644 --- a/app/Http/Requests/ArticleRequest.php +++ b/app/Http/Requests/ArticleRequest.php @@ -22,6 +22,13 @@ public function rules(): array ]; } + public function messages(): array + { + return [ + 'title.max' => 'The :attribute must not be greater than :max characters.', + ]; + } + public function author(): User { return $this->user(); diff --git a/app/Http/Requests/RegisterRequest.php b/app/Http/Requests/RegisterRequest.php index 62136b53b..93d6910bc 100644 --- a/app/Http/Requests/RegisterRequest.php +++ b/app/Http/Requests/RegisterRequest.php @@ -32,6 +32,15 @@ public function rules(): array ]; } + public function messages(): array + { + return [ + 'username.alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', + 'rules.accepted' => 'The rules must be accepted.', + 'terms.accepted' => 'The terms must be accepted.', + ]; + } + public function name(): string { return $this->get('name'); diff --git a/app/Http/Requests/ThreadRequest.php b/app/Http/Requests/ThreadRequest.php index 380c38646..15e9ced51 100644 --- a/app/Http/Requests/ThreadRequest.php +++ b/app/Http/Requests/ThreadRequest.php @@ -18,6 +18,13 @@ public function rules(): array ]; } + public function messages(): array + { + return [ + 'subject.max' => 'The :attribute must not be greater than :max characters.', + ]; + } + public function subject(): string { return $this->get('subject'); diff --git a/app/Jobs/GenerateSocialShareImage.php b/app/Jobs/GenerateSocialShareImage.php index bc46776c5..152bcce4d 100644 --- a/app/Jobs/GenerateSocialShareImage.php +++ b/app/Jobs/GenerateSocialShareImage.php @@ -21,8 +21,6 @@ final class GenerateSocialShareImage const TEMPLATE = 'social-share-template.png'; - const CACHE_LIFETIME = 43200; - public function __construct(private Article $article) { } @@ -31,13 +29,12 @@ public function handle(ImageManager $image): mixed { $text = wordwrap($this->article->title(), self::CHARACTERS_PER_LINE); - return $image->cache(function ($image) use ($text) { - $image->make(resource_path('images/'.self::TEMPLATE)) - ->text($text, self::TEXT_X_POSITION, self::TEXT_Y_POSITION, function ($font) { - $font->file(resource_path('fonts/'.self::FONT)); - $font->size(self::FONT_SIZE); - $font->color(self::TEXT_COLOUR); - }); - }, self::CACHE_LIFETIME, true)->response('png'); + return $image->make(resource_path('images/'.self::TEMPLATE)) + ->text($text, self::TEXT_X_POSITION, self::TEXT_Y_POSITION, function ($font) { + $font->file(resource_path('fonts/'.self::FONT)); + $font->size(self::FONT_SIZE); + $font->color(self::TEXT_COLOUR); + }) + ->response('png'); } } diff --git a/app/Livewire/NotificationIndicator.php b/app/Livewire/NotificationIndicator.php index 205acf119..e26a56c1d 100644 --- a/app/Livewire/NotificationIndicator.php +++ b/app/Livewire/NotificationIndicator.php @@ -5,15 +5,12 @@ use Illuminate\Support\Facades\Auth; use Illuminate\View\View; use Livewire\Component; +use Livewire\Attributes\On; final class NotificationIndicator extends Component { public $hasNotification; - protected $listeners = [ - 'NotificationMarkedAsRead' => 'setHasNotification', - ]; - public function render(): View { $this->hasNotification = $this->setHasNotification( @@ -25,6 +22,7 @@ public function render(): View ]); } + #[On('NotificationMarkedAsRead')] public function setHasNotification(int $count): bool { return $count > 0; diff --git a/app/Models/Article.php b/app/Models/Article.php index 290244b89..9fa33d422 100644 --- a/app/Models/Article.php +++ b/app/Models/Article.php @@ -54,15 +54,6 @@ final class Article extends Model implements Feedable 'shared_at', ]; - /** - * {@inheritdoc} - */ - protected $casts = [ - 'submitted_at' => 'datetime', - 'approved_at' => 'datetime', - 'shared_at' => 'datetime', - ]; - /** * {@inheritdoc} */ @@ -73,6 +64,20 @@ final class Article extends Model implements Feedable 'tagsRelation', ]; + /** + * Get the attributes that should be cast. + * + * @return array + */ + protected function casts(): array + { + return [ + 'submitted_at' => 'datetime', + 'approved_at' => 'datetime', + 'shared_at' => 'datetime', + ]; + } + public function id(): int { return $this->id; diff --git a/app/Models/Thread.php b/app/Models/Thread.php index 7a737f552..1d19a39bb 100644 --- a/app/Models/Thread.php +++ b/app/Models/Thread.php @@ -82,12 +82,17 @@ final class Thread extends Model implements Feedable, MentionAble, ReplyAble, Sp ]; /** - * {@inheritdoc} + * Get the attributes that should be cast. + * + * @return array */ - protected $casts = [ - 'last_activity_at' => 'datetime', - 'locked_at' => 'datetime', - ]; + protected function casts(): array + { + return [ + 'last_activity_at' => 'datetime', + 'locked_at' => 'datetime', + ]; + } public function id(): int { diff --git a/app/Models/User.php b/app/Models/User.php index 78a8ef6a5..69aba8f99 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -60,14 +60,19 @@ final class User extends Authenticatable implements MustVerifyEmail /** * {@inheritdoc} */ - protected $casts = [ - 'allowed_notifications' => 'array', - ]; + protected $hidden = ['password', 'remember_token']; /** - * {@inheritdoc} + * Get the attributes that should be cast. + * + * @return array */ - protected $hidden = ['password', 'remember_token']; + protected function casts(): array + { + return [ + 'allowed_notifications' => 'array', + ]; + } public function id(): int { diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 9e387a741..a48746996 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -7,24 +7,40 @@ use App\Models\Thread; use App\Models\User; use App\Notifications\SlowQueryLogged; +use App\Observers\UserObserver; +use Illuminate\Cache\RateLimiting\Limit; use Illuminate\Database\Connection; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Events\QueryExecuted; +use Illuminate\Http\Request; use Illuminate\Notifications\AnonymousNotifiable; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Notification; -use Illuminate\Support\Facades\Request; +use Illuminate\Support\Facades\RateLimiter; +use Illuminate\Support\Facades\Request as RequestFacade; use Illuminate\Support\ServiceProvider; use Laravel\Horizon\Horizon; class AppServiceProvider extends ServiceProvider { + /** + * The path to your application's "home" route. + * + * This is used by Laravel authentication to redirect users after login. + * + * @var string + */ + public const HOME = '/user'; + public function boot(): void { $this->bootEloquentMorphs(); $this->bootMacros(); $this->bootHorizon(); $this->bootSlowQueryLogging(); + + $this->bootEvent(); + $this->bootRoute(); } private function bootEloquentMorphs() @@ -60,9 +76,32 @@ private function bootSlowQueryLogging() new SlowQueryLogged( $event->sql, $event->time, - Request::url(), + RequestFacade::url(), ), ); }); } + + /** + * Register any application services. + */ + public function register(): void + { + // + } + + public function bootEvent(): void + { + User::observe(UserObserver::class); + } + + public function bootRoute(): void + { + RateLimiter::for('api', function (Request $request) { + return Limit::perMinute(6); + }); + + require base_path('routes/bindings.php'); + + } } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php deleted file mode 100644 index 1364a8637..000000000 --- a/app/Providers/AuthServiceProvider.php +++ /dev/null @@ -1,30 +0,0 @@ - NotificationPolicy::class, - Reply::class => ReplyPolicy::class, - Thread::class => ThreadPolicy::class, - User::class => UserPolicy::class, - Article::class => ArticlePolicy::class, - ]; - - public function boot(): void - { - } -} diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php deleted file mode 100644 index e9565ea68..000000000 --- a/app/Providers/EventServiceProvider.php +++ /dev/null @@ -1,76 +0,0 @@ - [ - SendNewArticleNotification::class, - ], - ArticleWasApproved::class => [ - SendArticleApprovedNotification::class, - ], - EmailAddressWasChanged::class => [ - RenewEmailVerificationNotification::class, - ], - Registered::class => [ - ResolveDuplicateGitHubUsername::class, - SendEmailVerificationNotification::class, - ], - ReplyWasCreated::class => [ - MarkLastActivity::class, - SendNewReplyNotification::class, - SubscribeUsersMentionedInReply::class, - NotifyUsersMentionedInReply::class, - ], - ThreadWasCreated::class => [ - SubscribeUsersMentionedInThread::class, - NotifyUsersMentionedInThread::class, - ], - SpamWasReported::class => [ - SendNewSpamNotification::class, - ], - ]; - - public function boot(): void - { - User::observe(UserObserver::class); - } - - /** - * Determine if events and listeners should be automatically discovered. - */ - public function shouldDiscoverEvents(): bool - { - return false; - } -} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php deleted file mode 100644 index 8faa98c1a..000000000 --- a/app/Providers/RouteServiceProvider.php +++ /dev/null @@ -1,42 +0,0 @@ -routes(function () { - Route::prefix('api') - ->middleware('api') - ->group(base_path('routes/api.php')); - - Route::middleware('web') - ->group(base_path('routes/web.php')); - }); - } -} diff --git a/app/Rules/DoesNotContainUrlRule.php b/app/Rules/DoesNotContainUrlRule.php index 9b860cad4..81a61265f 100644 --- a/app/Rules/DoesNotContainUrlRule.php +++ b/app/Rules/DoesNotContainUrlRule.php @@ -2,22 +2,22 @@ namespace App\Rules; -use Illuminate\Contracts\Validation\Rule; +use Closure; +use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Validation\Concerns\ValidatesAttributes; -final class DoesNotContainUrlRule implements Rule +final class DoesNotContainUrlRule implements ValidationRule { use ValidatesAttributes; - public function passes($attribute, $value): bool + public function validate(string $attribute, mixed $value, Closure $fail): void { - return ! collect(explode(' ', $value))->contains(function ($word) { + $fails = collect(explode(' ', $value))->contains(function ($word) { return $this->validateRequired('word', $word) && $this->validateUrl('word', $word); }); - } - public function message(): string - { - return 'The :attribute field cannot contain an url.'; + if ($fails) { + $fail('The :attribute field cannot contain an url.'); + } } } diff --git a/app/Rules/HttpImageRule.php b/app/Rules/HttpImageRule.php index 9928664e0..c2b9c61fb 100644 --- a/app/Rules/HttpImageRule.php +++ b/app/Rules/HttpImageRule.php @@ -2,20 +2,18 @@ namespace App\Rules; -use Illuminate\Contracts\Validation\Rule; +use Closure; +use Illuminate\Contracts\Validation\ValidationRule; /** * This rule validates Markdown for non-HTTPS image links. */ -final class HttpImageRule implements Rule +final class HttpImageRule implements ValidationRule { - public function passes($attribute, $value): bool + public function validate(string $attribute, mixed $value, Closure $fail): void { - return ! preg_match('/!\[.*\]\(http:\/\/.*\)/', $value); - } - - public function message(): string - { - return 'The :attribute field contains at least one image with an HTTP link.'; + if (preg_match('/!\[.*\]\(http:\/\/.*\)/', $value)) { + $fail('The :attribute field contains at least one image with an HTTP link.'); + } } } diff --git a/app/Rules/InvalidMentionRule.php b/app/Rules/InvalidMentionRule.php index 6f4f52578..893e2055d 100644 --- a/app/Rules/InvalidMentionRule.php +++ b/app/Rules/InvalidMentionRule.php @@ -2,20 +2,18 @@ namespace App\Rules; -use Illuminate\Contracts\Validation\Rule; +use Closure; +use Illuminate\Contracts\Validation\ValidationRule; /** * This rule validates links are not diguised as mentions. */ -final class InvalidMentionRule implements Rule +final class InvalidMentionRule implements ValidationRule { - public function passes($attribute, $value): bool + public function validate(string $attribute, mixed $value, Closure $fail): void { - return ! preg_match('/\[@.*\]\(http.*\)/', $value); - } - - public function message(): string - { - return 'The :attribute field contains an invalid mention.'; + if (preg_match('/\[@.*\]\(http.*\)/', $value)) { + $fail('The :attribute field contains an invalid mention.'); + } } } diff --git a/app/Rules/PasscheckRule.php b/app/Rules/PasscheckRule.php index d059e4a0c..a66b5b1d5 100644 --- a/app/Rules/PasscheckRule.php +++ b/app/Rules/PasscheckRule.php @@ -2,19 +2,17 @@ namespace App\Rules; -use Illuminate\Contracts\Validation\Rule; +use Closure; +use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; -final class PasscheckRule implements Rule +final class PasscheckRule implements ValidationRule { - public function passes($attribute, $value): bool + public function validate(string $attribute, mixed $value, Closure $fail): void { - return Hash::check($value, Auth::user()->getAuthPassword()); - } - - public function message(): string - { - return 'Your current password is incorrect.'; + if (! Hash::check($value, Auth::user()->getAuthPassword())) { + $fail('Your current password is incorrect.'); + } } } diff --git a/app/Rules/UniqueGitHubUser.php b/app/Rules/UniqueGitHubUser.php index 2dfd033a5..d142c6ef7 100644 --- a/app/Rules/UniqueGitHubUser.php +++ b/app/Rules/UniqueGitHubUser.php @@ -4,30 +4,33 @@ use App\Concerns\SendsAlerts; use App\Models\User; -use Illuminate\Contracts\Validation\Rule; +use Closure; +use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Database\Eloquent\ModelNotFoundException; -final class UniqueGitHubUser implements Rule +final class UniqueGitHubUser implements ValidationRule { use SendsAlerts; - private User $user; - - public function passes($attribute, $value): bool + public function validate(string $attribute, mixed $value, Closure $fail): void { try { - $this->user = User::findByGitHubId($value); + $user = User::findByGitHubId($value); } catch (ModelNotFoundException) { - return true; + return; } - return false; + $message = $this->message($user); + + $this->error($message); + + $fail($message); } - public function message() + public function message(User $user): string { - $this->error('We already found a user with the given GitHub account (:username). Would you like to login instead?', [ - 'username' => '@'.$this->user->githubUsername(), + return __('We already found a user with the given GitHub account (:username). Would you like to login instead?', [ + 'username' => '@'.$user->githubUsername(), 'login' => route('login'), ]); } diff --git a/artisan b/artisan index 5c23e2e24..8e04b4224 100755 --- a/artisan +++ b/artisan @@ -1,53 +1,15 @@ #!/usr/bin/env php 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); +// Bootstrap Laravel and handle the command... +$status = (require_once __DIR__.'/bootstrap/app.php') + ->handleCommand(new ArgvInput); exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php index 9573ee83a..cba2b9522 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,55 +1,47 @@ 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; +use App\Providers\AppServiceProvider; +use Illuminate\Auth\Access\AuthorizationException; +use Illuminate\Auth\AuthenticationException; +use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Foundation\Application; +use Illuminate\Foundation\Configuration\Exceptions; +use Illuminate\Foundation\Configuration\Middleware; +use Illuminate\Session\TokenMismatchException; +use Illuminate\Validation\ValidationException; +use Sentry\Laravel\Integration; +use Symfony\Component\HttpKernel\Exception\HttpException; + +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) { + $middleware->redirectGuestsTo(fn () => route('login')); + $middleware->redirectUsersTo(AppServiceProvider::HOME); + + $middleware->web([ + \App\Http\Middleware\RedirectIfBanned::class, + ], [ + \App\Http\Middleware\DisableFloc::class, + ]); + + $middleware->throttleApi(); + }) + ->withExceptions(function (Exceptions $exceptions) { + $exceptions->dontReport([ + AuthenticationException::class, + AuthorizationException::class, + HttpException::class, + ModelNotFoundException::class, + TokenMismatchException::class, + ValidationException::class, + ]); + + Integration::handles($exceptions); + })->create(); diff --git a/bootstrap/providers.php b/bootstrap/providers.php new file mode 100644 index 000000000..7ad1b7b6b --- /dev/null +++ b/bootstrap/providers.php @@ -0,0 +1,6 @@ +2.2,<2.4" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "symfony/var-exporter": "^4.4 || ^5.4 || ^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", - "homepage": "https://www.doctrine-project.org/projects/cache.html", - "keywords": [ - "abstraction", - "apcu", - "cache", - "caching", - "couchdb", - "memcached", - "php", - "redis", - "xcache" - ], - "support": { - "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/2.2.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", - "type": "tidelift" - } - ], - "time": "2022-05-20T20:07:39+00:00" - }, - { - "name": "doctrine/dbal", - "version": "3.8.4", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "b05e48a745f722801f55408d0dbd8003b403dbbd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/b05e48a745f722801f55408d0dbd8003b403dbbd", - "reference": "b05e48a745f722801f55408d0dbd8003b403dbbd", - "shasum": "" - }, - "require": { - "composer-runtime-api": "^2", - "doctrine/cache": "^1.11|^2.0", - "doctrine/deprecations": "^0.5.3|^1", - "doctrine/event-manager": "^1|^2", - "php": "^7.4 || ^8.0", - "psr/cache": "^1|^2|^3", - "psr/log": "^1|^2|^3" - }, - "require-dev": { - "doctrine/coding-standard": "12.0.0", - "fig/log-test": "^1", - "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "1.10.58", - "phpstan/phpstan-strict-rules": "^1.5", - "phpunit/phpunit": "9.6.16", - "psalm/plugin-phpunit": "0.18.4", - "slevomat/coding-standard": "8.13.1", - "squizlabs/php_codesniffer": "3.9.0", - "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/console": "^4.4|^5.4|^6.0|^7.0", - "vimeo/psalm": "4.30.0" - }, - "suggest": { - "symfony/console": "For helpful console commands such as SQL execution and import of files." - }, - "bin": [ - "bin/doctrine-dbal" - ], - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\DBAL\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - } - ], - "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", - "homepage": "https://www.doctrine-project.org/projects/dbal.html", - "keywords": [ - "abstraction", - "database", - "db2", - "dbal", - "mariadb", - "mssql", - "mysql", - "oci8", - "oracle", - "pdo", - "pgsql", - "postgresql", - "queryobject", - "sasql", - "sql", - "sqlite", - "sqlserver", - "sqlsrv" - ], - "support": { - "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.8.4" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", - "type": "tidelift" - } - ], - "time": "2024-04-25T07:04:44+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" - }, - "time": "2024-01-30T19:34:25+00:00" - }, - { - "name": "doctrine/event-manager", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/event-manager.git", - "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32", - "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "conflict": { - "doctrine/common": "<2.9" - }, - "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.8.8", - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^4.28" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", - "homepage": "https://www.doctrine-project.org/projects/event-manager.html", - "keywords": [ - "event", - "event dispatcher", - "event manager", - "event system", - "events" - ], - "support": { - "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", - "type": "tidelift" - } - ], - "time": "2022-10-12T20:59:15+00:00" - }, { "name": "doctrine/inflector", "version": "2.0.10", @@ -1658,26 +1314,26 @@ }, { "name": "firebase/php-jwt", - "version": "v6.10.0", + "version": "v6.10.1", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "a49db6f0a5033aef5143295342f1c95521b075ff" + "reference": "500501c2ce893c824c801da135d02661199f60c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff", - "reference": "a49db6f0a5033aef5143295342f1c95521b075ff", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/500501c2ce893c824c801da135d02661199f60c5", + "reference": "500501c2ce893c824c801da135d02661199f60c5", "shasum": "" }, "require": { - "php": "^7.4||^8.0" + "php": "^8.0" }, "require-dev": { - "guzzlehttp/guzzle": "^6.5||^7.4", + "guzzlehttp/guzzle": "^7.4", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "psr/cache": "^1.0||^2.0", + "psr/cache": "^2.0||^3.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0" }, @@ -1715,9 +1371,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.10.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.10.1" }, - "time": "2023-12-01T16:26:39+00:00" + "time": "2024-05-18T18:05:11+00:00" }, { "name": "fruitcake/php-cors", @@ -2347,74 +2003,6 @@ ], "time": "2022-05-21T17:30:32+00:00" }, - { - "name": "intervention/imagecache", - "version": "2.6.0", - "source": { - "type": "git", - "url": "https://github.com/Intervention/imagecache.git", - "reference": "86136575a62d3634b51f196a998fce4a583b49bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Intervention/imagecache/zipball/86136575a62d3634b51f196a998fce4a583b49bb", - "reference": "86136575a62d3634b51f196a998fce4a583b49bb", - "shasum": "" - }, - "require": { - "illuminate/cache": "^5.5|~6|~7|~8|~9|~10", - "illuminate/filesystem": "^5.5|~6|~7|~8|~9|~10", - "intervention/image": "~2.2", - "nesbot/carbon": "^2.39", - "opis/closure": "^3.5", - "php": "~7.2|~8" - }, - "require-dev": { - "phpunit/phpunit": "^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Intervention\\Image\\": "src/Intervention/Image" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Oliver Vogel", - "email": "oliver@intervention.io", - "homepage": "http://intervention.io/" - } - ], - "description": "Caching extension for the Intervention Image Class", - "homepage": "https://image.intervention.io", - "keywords": [ - "cache", - "gd", - "image", - "imagick", - "laravel" - ], - "support": { - "issues": "https://github.com/Intervention/imagecache/issues", - "source": "https://github.com/Intervention/imagecache/tree/2.6.0" - }, - "funding": [ - { - "url": "https://paypal.me/interventionio", - "type": "custom" - }, - { - "url": "https://github.com/Intervention", - "type": "github" - } - ], - "abandoned": true, - "time": "2023-02-25T19:40:47+00:00" - }, { "name": "jean85/pretty-package-versions", "version": "2.0.6", @@ -2589,16 +2177,16 @@ }, { "name": "laravel-notification-channels/twitter", - "version": "v8.1.1", + "version": "V8.1.2", "source": { "type": "git", "url": "https://github.com/laravel-notification-channels/twitter.git", - "reference": "30375f873c90d8e31c349e1b1860963cdae27cb5" + "reference": "afa080e24a1dc1ebcd70af0b53483e738e138328" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel-notification-channels/twitter/zipball/30375f873c90d8e31c349e1b1860963cdae27cb5", - "reference": "30375f873c90d8e31c349e1b1860963cdae27cb5", + "url": "https://api.github.com/repos/laravel-notification-channels/twitter/zipball/afa080e24a1dc1ebcd70af0b53483e738e138328", + "reference": "afa080e24a1dc1ebcd70af0b53483e738e138328", "shasum": "" }, "require": { @@ -2644,22 +2232,22 @@ "homepage": "https://github.com/laravel-notification-channels/twitter", "support": { "issues": "https://github.com/laravel-notification-channels/twitter/issues", - "source": "https://github.com/laravel-notification-channels/twitter/tree/v8.1.1" + "source": "https://github.com/laravel-notification-channels/twitter/tree/V8.1.2" }, - "time": "2024-04-03T12:39:24+00:00" + "time": "2024-04-05T17:35:08+00:00" }, { "name": "laravel/framework", - "version": "v10.48.11", + "version": "v11.8.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "afdc2b03bd8d126446583da5414d659491aa4f54" + "reference": "ceb892a25817c888ef3df4d1a2af9cac53978300" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/afdc2b03bd8d126446583da5414d659491aa4f54", - "reference": "afdc2b03bd8d126446583da5414d659491aa4f54", + "url": "https://api.github.com/repos/laravel/framework/zipball/ceb892a25817c888ef3df4d1a2af9cac53978300", + "reference": "ceb892a25817c888ef3df4d1a2af9cac53978300", "shasum": "" }, "require": { @@ -2675,40 +2263,39 @@ "ext-openssl": "*", "ext-session": "*", "ext-tokenizer": "*", - "fruitcake/php-cors": "^1.2", + "fruitcake/php-cors": "^1.3", + "guzzlehttp/guzzle": "^7.8", "guzzlehttp/uri-template": "^1.0", - "laravel/prompts": "^0.1.9", + "laravel/prompts": "^0.1.18", "laravel/serializable-closure": "^1.3", "league/commonmark": "^2.2.1", "league/flysystem": "^3.8.0", "monolog/monolog": "^3.0", - "nesbot/carbon": "^2.67", - "nunomaduro/termwind": "^1.13", - "php": "^8.1", + "nesbot/carbon": "^2.72.2|^3.0", + "nunomaduro/termwind": "^2.0", + "php": "^8.2", "psr/container": "^1.1.1|^2.0.1", "psr/log": "^1.0|^2.0|^3.0", "psr/simple-cache": "^1.0|^2.0|^3.0", "ramsey/uuid": "^4.7", - "symfony/console": "^6.2", - "symfony/error-handler": "^6.2", - "symfony/finder": "^6.2", - "symfony/http-foundation": "^6.4", - "symfony/http-kernel": "^6.2", - "symfony/mailer": "^6.2", - "symfony/mime": "^6.2", - "symfony/process": "^6.2", - "symfony/routing": "^6.2", - "symfony/uid": "^6.2", - "symfony/var-dumper": "^6.2", + "symfony/console": "^7.0", + "symfony/error-handler": "^7.0", + "symfony/finder": "^7.0", + "symfony/http-foundation": "^7.0", + "symfony/http-kernel": "^7.0", + "symfony/mailer": "^7.0", + "symfony/mime": "^7.0", + "symfony/polyfill-php83": "^1.28", + "symfony/process": "^7.0", + "symfony/routing": "^7.0", + "symfony/uid": "^7.0", + "symfony/var-dumper": "^7.0", "tijsverkoyen/css-to-inline-styles": "^2.2.5", "vlucas/phpdotenv": "^5.4.1", "voku/portable-ascii": "^2.0" }, "conflict": { - "carbonphp/carbon-doctrine-types": ">=3.0", - "doctrine/dbal": ">=4.0", "mockery/mockery": "1.6.8", - "phpunit/phpunit": ">=11.0.0", "tightenco/collect": "<5.5.33" }, "provide": { @@ -2748,36 +2335,35 @@ "illuminate/testing": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", - "illuminate/view": "self.version" + "illuminate/view": "self.version", + "spatie/once": "*" }, "require-dev": { "ably/ably-php": "^1.0", "aws/aws-sdk-php": "^3.235.5", - "doctrine/dbal": "^3.5.1", "ext-gmp": "*", - "fakerphp/faker": "^1.21", - "guzzlehttp/guzzle": "^7.5", + "fakerphp/faker": "^1.23", "league/flysystem-aws-s3-v3": "^3.0", "league/flysystem-ftp": "^3.0", "league/flysystem-path-prefixing": "^3.3", "league/flysystem-read-only": "^3.3", "league/flysystem-sftp-v3": "^3.0", - "mockery/mockery": "^1.5.1", + "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^8.23.4", - "pda/pheanstalk": "^4.0", + "orchestra/testbench-core": "^9.0.15", + "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", - "phpunit/phpunit": "^10.0.7", + "phpunit/phpunit": "^10.5|^11.0", "predis/predis": "^2.0.2", - "symfony/cache": "^6.2", - "symfony/http-client": "^6.2.4", - "symfony/psr-http-message-bridge": "^2.0" + "resend/resend-php": "^0.10.0", + "symfony/cache": "^7.0", + "symfony/http-client": "^7.0", + "symfony/psr-http-message-bridge": "^7.0" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", - "brianium/paratest": "Required to run tests in parallel (^6.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^3.5.1).", + "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", "ext-apcu": "Required to use the APC cache driver.", "ext-fileinfo": "Required to use the Filesystem class.", "ext-ftp": "Required to use the Flysystem FTP driver.", @@ -2786,34 +2372,34 @@ "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", "ext-pdo": "Required to use all database features.", "ext-posix": "Required to use all features of the queue worker.", - "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0|^6.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "filp/whoops": "Required for friendly error pages in development (^2.14.3).", - "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.5).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).", "league/flysystem-read-only": "Required to use read-only disks (^3.3)", "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", - "mockery/mockery": "Required to use mocking (^1.5.1).", + "mockery/mockery": "Required to use mocking (^1.6).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8|^10.0.7).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^10.5|^11.0).", "predis/predis": "Required to use the predis connector (^2.0.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^6.2).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^6.2).", - "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.2).", - "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.2).", - "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.2).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." + "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^7.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^7.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -2853,7 +2439,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-05-21T17:53:51+00:00" + "time": "2024-05-21T17:57:45+00:00" }, { "name": "laravel/horizon", @@ -2994,37 +2580,35 @@ }, { "name": "laravel/sanctum", - "version": "v3.3.3", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5" + "reference": "9cfc0ce80cabad5334efff73ec856339e8ec1ac1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/8c104366459739f3ada0e994bcd3e6fd681ce3d5", - "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/9cfc0ce80cabad5334efff73ec856339e8ec1ac1", + "reference": "9cfc0ce80cabad5334efff73ec856339e8ec1ac1", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/console": "^9.21|^10.0", - "illuminate/contracts": "^9.21|^10.0", - "illuminate/database": "^9.21|^10.0", - "illuminate/support": "^9.21|^10.0", - "php": "^8.0.2" + "illuminate/console": "^11.0", + "illuminate/contracts": "^11.0", + "illuminate/database": "^11.0", + "illuminate/support": "^11.0", + "php": "^8.2", + "symfony/console": "^7.0" }, "require-dev": { - "mockery/mockery": "^1.0", - "orchestra/testbench": "^7.28.2|^8.8.3", + "mockery/mockery": "^1.6", + "orchestra/testbench": "^9.0", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.6" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - }, "laravel": { "providers": [ "Laravel\\Sanctum\\SanctumServiceProvider" @@ -3056,20 +2640,20 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2023-12-19T18:44:48+00:00" + "time": "2024-04-10T19:39:58+00:00" }, { "name": "laravel/scout", - "version": "v10.8.5", + "version": "v10.9.0", "source": { "type": "git", "url": "https://github.com/laravel/scout.git", - "reference": "db26233becb979d5e2104fa2a931440252a73200" + "reference": "7bac13a61f1670b4314a65a13b8b12c6575270c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/scout/zipball/db26233becb979d5e2104fa2a931440252a73200", - "reference": "db26233becb979d5e2104fa2a931440252a73200", + "url": "https://api.github.com/repos/laravel/scout/zipball/7bac13a61f1670b4314a65a13b8b12c6575270c8", + "reference": "7bac13a61f1670b4314a65a13b8b12c6575270c8", "shasum": "" }, "require": { @@ -3091,7 +2675,7 @@ "php-http/guzzle7-adapter": "^1.0", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.3|^10.4", - "typesense/typesense-php": "^4.9" + "typesense/typesense-php": "^4.9.3" }, "suggest": { "algolia/algoliasearch-client-php": "Required to use the Algolia engine (^3.2).", @@ -3134,7 +2718,7 @@ "issues": "https://github.com/laravel/scout/issues", "source": "https://github.com/laravel/scout" }, - "time": "2024-04-02T14:33:18+00:00" + "time": "2024-05-07T14:16:56+00:00" }, { "name": "laravel/serializable-closure", @@ -3587,16 +3171,16 @@ }, { "name": "league/flysystem", - "version": "3.27.0", + "version": "3.28.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "4729745b1ab737908c7d055148c9a6b3e959832f" + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4729745b1ab737908c7d055148c9a6b3e959832f", - "reference": "4729745b1ab737908c7d055148c9a6b3e959832f", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", + "reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c", "shasum": "" }, "require": { @@ -3620,10 +3204,13 @@ "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", + "ext-mongodb": "^1.3", "ext-zip": "*", "friendsofphp/php-cs-fixer": "^3.5", "google/cloud-storage": "^1.23", + "guzzlehttp/psr7": "^2.6", "microsoft/azure-storage-blob": "^1.1", + "mongodb/mongodb": "^1.2", "phpseclib/phpseclib": "^3.0.36", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.5.11|^10.0", @@ -3661,32 +3248,22 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.27.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.28.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-04-07T19:17:50+00:00" + "time": "2024-05-22T10:09:12+00:00" }, { "name": "league/flysystem-aws-s3-v3", - "version": "3.27.0", + "version": "3.28.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", - "reference": "3e6ce2f972f1470db779f04d29c289dcd2c32837" + "reference": "22071ef1604bc776f5ff2468ac27a752514665c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/3e6ce2f972f1470db779f04d29c289dcd2c32837", - "reference": "3e6ce2f972f1470db779f04d29c289dcd2c32837", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/22071ef1604bc776f5ff2468ac27a752514665c8", + "reference": "22071ef1604bc776f5ff2468ac27a752514665c8", "shasum": "" }, "require": { @@ -3726,32 +3303,22 @@ "storage" ], "support": { - "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.27.0" + "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.28.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-04-07T19:16:54+00:00" + "time": "2024-05-06T20:05:52+00:00" }, { "name": "league/flysystem-local", - "version": "3.25.1", + "version": "3.28.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92" + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/61a6a90d6e999e4ddd9ce5adb356de0939060b92", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/13f22ea8be526ea58c2ddff9e158ef7c296e4f40", + "reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40", "shasum": "" }, "require": { @@ -3785,19 +3352,9 @@ "local" ], "support": { - "source": "https://github.com/thephpleague/flysystem-local/tree/3.25.1" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.28.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-03-15T19:58:44+00:00" + "time": "2024-05-06T20:05:52+00:00" }, { "name": "league/mime-type-detection", @@ -3933,16 +3490,16 @@ }, { "name": "livewire/livewire", - "version": "v3.4.12", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "54dd265c17f7b5200627eb9690590e7cbbad1027" + "reference": "72e900825c560f0e4e620185b26c5441a8914435" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/54dd265c17f7b5200627eb9690590e7cbbad1027", - "reference": "54dd265c17f7b5200627eb9690590e7cbbad1027", + "url": "https://api.github.com/repos/livewire/livewire/zipball/72e900825c560f0e4e620185b26c5441a8914435", + "reference": "72e900825c560f0e4e620185b26c5441a8914435", "shasum": "" }, "require": { @@ -3997,7 +3554,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v3.4.12" + "source": "https://github.com/livewire/livewire/tree/v3.5.0" }, "funding": [ { @@ -4005,7 +3562,7 @@ "type": "github" } ], - "time": "2024-05-02T17:10:37+00:00" + "time": "2024-05-21T13:39:04+00:00" }, { "name": "lorisleiva/cron-translator", @@ -4065,16 +3622,16 @@ }, { "name": "masterminds/html5", - "version": "2.8.1", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf" + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f47dcf3c70c584de14f21143c55d9939631bc6cf", - "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", "shasum": "" }, "require": { @@ -4082,7 +3639,7 @@ "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" }, "type": "library", "extra": { @@ -4126,9 +3683,9 @@ ], "support": { "issues": "https://github.com/Masterminds/html5-php/issues", - "source": "https://github.com/Masterminds/html5-php/tree/2.8.1" + "source": "https://github.com/Masterminds/html5-php/tree/2.9.0" }, - "time": "2023-05-10T11:58:31+00:00" + "time": "2024-03-31T07:05:07+00:00" }, { "name": "monolog/monolog", @@ -4299,42 +3856,41 @@ }, { "name": "nesbot/carbon", - "version": "2.72.3", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" + "reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", - "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a", + "reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a", "shasum": "" }, "require": { "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", - "php": "^7.1.8 || ^8.0", + "php": "^8.1", "psr/clock": "^1.0", + "symfony/clock": "^6.3 || ^7.0", "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + "symfony/translation": "^4.4.18 || ^5.2.1|| ^6.0 || ^7.0" }, "provide": { "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", - "doctrine/orm": "^2.7 || ^3.0", - "friendsofphp/php-cs-fixer": "^3.0", - "kylekatarnls/multi-tester": "^2.0", - "ondrejmirtes/better-reflection": "*", - "phpmd/phpmd": "^2.9", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.99 || ^1.7.14", - "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", - "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", - "squizlabs/php_codesniffer": "^3.4" + "doctrine/dbal": "^3.6.3 || ^4.0", + "doctrine/orm": "^2.15.2 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.52.1", + "kylekatarnls/multi-tester": "^2.5.3", + "ondrejmirtes/better-reflection": "^6.25.0.4", + "phpmd/phpmd": "^2.15.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan": "^1.10.65", + "phpunit/phpunit": "^10.5.15", + "squizlabs/php_codesniffer": "^3.9.0" }, "bin": [ "bin/carbon" @@ -4342,8 +3898,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.x-dev" + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev" }, "laravel": { "providers": [ @@ -4402,7 +3958,7 @@ "type": "tidelift" } ], - "time": "2024-01-25T10:35:09+00:00" + "time": "2024-05-01T06:54:22+00:00" }, { "name": "nette/schema", @@ -4666,33 +4222,32 @@ }, { "name": "nunomaduro/termwind", - "version": "v1.15.1", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc" + "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/8ab0b32c8caa4a2e09700ea32925441385e4a5dc", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/58c4c58cf23df7f498daeb97092e34f5259feb6a", + "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^8.0", - "symfony/console": "^5.3.0|^6.0.0" - }, - "require-dev": { - "ergebnis/phpstan-rules": "^1.0.", - "illuminate/console": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", - "laravel/pint": "^1.0.0", - "pestphp/pest": "^1.21.0", - "pestphp/pest-plugin-mock": "^1.0", - "phpstan/phpstan": "^1.4.6", - "phpstan/phpstan-strict-rules": "^1.1.0", - "symfony/var-dumper": "^5.2.7|^6.0.0", + "php": "^8.2", + "symfony/console": "^7.0.4" + }, + "require-dev": { + "ergebnis/phpstan-rules": "^2.2.0", + "illuminate/console": "^11.0.0", + "laravel/pint": "^1.14.0", + "mockery/mockery": "^1.6.7", + "pestphp/pest": "^2.34.1", + "phpstan/phpstan": "^1.10.59", + "phpstan/phpstan-strict-rules": "^1.5.2", + "symfony/var-dumper": "^7.0.4", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -4701,6 +4256,9 @@ "providers": [ "Termwind\\Laravel\\TermwindServiceProvider" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -4732,7 +4290,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" + "source": "https://github.com/nunomaduro/termwind/tree/v2.0.1" }, "funding": [ { @@ -4748,7 +4306,7 @@ "type": "github" } ], - "time": "2023-02-08T01:06:31+00:00" + "time": "2024-03-06T16:17:14+00:00" }, { "name": "nyholm/psr7", @@ -4884,83 +4442,18 @@ }, "time": "2024-04-08T08:09:34+00:00" }, - { - "name": "opis/closure", - "version": "3.6.3", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0 || ^8.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6.x-dev" - } - }, - "autoload": { - "files": [ - "functions.php" - ], - "psr-4": { - "Opis\\Closure\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "support": { - "issues": "https://github.com/opis/closure/issues", - "source": "https://github.com/opis/closure/tree/3.6.3" - }, - "time": "2022-01-27T09:35:39+00:00" - }, { "name": "paragonie/constant_time_encoding", - "version": "v2.6.3", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "58c3f47f650c94ec05a151692652a868995d2938" + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", - "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", "shasum": "" }, "require": { @@ -5014,7 +4507,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2022-06-14T06:56:20+00:00" + "time": "2024-05-08T12:18:48+00:00" }, { "name": "paragonie/random_compat", @@ -5310,56 +4803,7 @@ "type": "github" } ], - "time": "2023-09-13T16:42:03+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" + "time": "2023-09-13T16:42:03+00:00" }, { "name": "psr/clock", @@ -6369,16 +5813,16 @@ }, { "name": "spatie/browsershot", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/spatie/browsershot.git", - "reference": "b764ca1683facdc1833ea9ee7d735001606fce2b" + "reference": "73313ccd1878f49bd237a97d87522dcb4a55b6b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/browsershot/zipball/b764ca1683facdc1833ea9ee7d735001606fce2b", - "reference": "b764ca1683facdc1833ea9ee7d735001606fce2b", + "url": "https://api.github.com/repos/spatie/browsershot/zipball/73313ccd1878f49bd237a97d87522dcb4a55b6b6", + "reference": "73313ccd1878f49bd237a97d87522dcb4a55b6b6", "shasum": "" }, "require": { @@ -6424,7 +5868,7 @@ "webpage" ], "support": { - "source": "https://github.com/spatie/browsershot/tree/4.0.2" + "source": "https://github.com/spatie/browsershot/tree/4.0.3" }, "funding": [ { @@ -6432,7 +5876,7 @@ "type": "github" } ], - "time": "2024-04-01T08:19:46+00:00" + "time": "2024-05-21T12:27:45+00:00" }, { "name": "spatie/crawler", @@ -6504,16 +5948,16 @@ }, { "name": "spatie/flare-client-php", - "version": "1.5.1", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/spatie/flare-client-php.git", - "reference": "e27977d534eefe04c154c6fd8460217024054c05" + "reference": "220a7c8745e9fa427d54099f47147c4b97fe6462" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/e27977d534eefe04c154c6fd8460217024054c05", - "reference": "e27977d534eefe04c154c6fd8460217024054c05", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/220a7c8745e9fa427d54099f47147c4b97fe6462", + "reference": "220a7c8745e9fa427d54099f47147c4b97fe6462", "shasum": "" }, "require": { @@ -6561,7 +6005,7 @@ ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.5.1" + "source": "https://github.com/spatie/flare-client-php/tree/1.6.0" }, "funding": [ { @@ -6569,7 +6013,7 @@ "type": "github" } ], - "time": "2024-05-03T15:43:14+00:00" + "time": "2024-05-22T09:45:39+00:00" }, { "name": "spatie/ignition", @@ -6898,66 +6342,6 @@ ], "time": "2024-03-20T07:29:11+00:00" }, - { - "name": "spatie/laravel-robots-middleware", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/laravel-robots-middleware.git", - "reference": "a2dfecbede3acaf7d47d13de456932b7aaa6950c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-robots-middleware/zipball/a2dfecbede3acaf7d47d13de456932b7aaa6950c", - "reference": "a2dfecbede3acaf7d47d13de456932b7aaa6950c", - "shasum": "" - }, - "require": { - "illuminate/http": "^10|^11.0", - "php": "^8.2" - }, - "require-dev": { - "orchestra/testbench": "^8.0|^9.0", - "phpunit/phpunit": "^9.4|^10.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\RobotsMiddleware\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Sebastian De Deyne", - "email": "sebastian@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "Add an `all` or `none` robots header to your requests via a middleware in Laravel", - "homepage": "https://github.com/spatie/laravel-robots-middleware", - "keywords": [ - "index", - "robots", - "seo", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/laravel-robots-middleware/issues", - "source": "https://github.com/spatie/laravel-robots-middleware/tree/1.4.0" - }, - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - } - ], - "time": "2024-03-11T16:05:11+00:00" - }, { "name": "spatie/laravel-schedule-monitor", "version": "3.7.1", @@ -7112,24 +6496,23 @@ }, { "name": "spatie/robots-txt", - "version": "2.0.3", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/spatie/robots-txt.git", - "reference": "dacba2ba159364987392aa1b0002e196c5923970" + "reference": "02722a0256731e7996bb9d0e544238a408e78bf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/robots-txt/zipball/dacba2ba159364987392aa1b0002e196c5923970", - "reference": "dacba2ba159364987392aa1b0002e196c5923970", + "url": "https://api.github.com/repos/spatie/robots-txt/zipball/02722a0256731e7996bb9d0e544238a408e78bf5", + "reference": "02722a0256731e7996bb9d0e544238a408e78bf5", "shasum": "" }, "require": { - "php": "^8.0" + "php": "^8.1" }, "require-dev": { - "larapack/dd": "^1.0", - "phpunit/phpunit": "^8.0 || ^9.0" + "phpunit/phpunit": "^9.0|^10.0" }, "type": "library", "autoload": { @@ -7157,7 +6540,7 @@ ], "support": { "issues": "https://github.com/spatie/robots-txt/issues", - "source": "https://github.com/spatie/robots-txt/tree/2.0.3" + "source": "https://github.com/spatie/robots-txt/tree/2.2.0" }, "funding": [ { @@ -7169,7 +6552,7 @@ "type": "github" } ], - "time": "2023-11-22T12:57:35+00:00" + "time": "2024-04-22T14:28:40+00:00" }, { "name": "spatie/temporary-directory", @@ -7232,49 +6615,122 @@ ], "time": "2023-12-25T11:46:58+00:00" }, + { + "name": "symfony/clock", + "version": "v7.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/clock.git", + "reference": "2008671acb4a30b01c453de193cf9c80549ebda6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/clock/zipball/2008671acb4a30b01c453de193cf9c80549ebda6", + "reference": "2008671acb4a30b01c453de193cf9c80549ebda6", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/clock": "^1.0", + "symfony/polyfill-php83": "^1.28" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/now.php" + ], + "psr-4": { + "Symfony\\Component\\Clock\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Decouples applications from the system clock", + "homepage": "https://symfony.com", + "keywords": [ + "clock", + "psr20", + "time" + ], + "support": { + "source": "https://github.com/symfony/clock/tree/v7.0.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:29:19+00:00" + }, { "name": "symfony/console", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a170e64ae10d00ba89e2acbb590dc2e54da8ad8f" + "reference": "c981e0e9380ce9f146416bde3150c79197ce9986" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a170e64ae10d00ba89e2acbb590dc2e54da8ad8f", - "reference": "a170e64ae10d00ba89e2acbb590dc2e54da8ad8f", + "url": "https://api.github.com/repos/symfony/console/zipball/c981e0e9380ce9f146416bde3150c79197ce9986", + "reference": "c981e0e9380ce9f146416bde3150c79197ce9986", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0|^7.0" + "symfony/string": "^6.4|^7.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -7308,7 +6764,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.7" + "source": "https://github.com/symfony/console/tree/v7.0.7" }, "funding": [ { @@ -7324,7 +6780,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/css-selector", @@ -7460,16 +6916,16 @@ }, { "name": "symfony/dom-crawler", - "version": "v7.0.4", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "6cb272cbec4dc7a30a853d2931766b03bea92dda" + "reference": "7cb4ae7166a8a36916be390dbb3819474fb06a29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/6cb272cbec4dc7a30a853d2931766b03bea92dda", - "reference": "6cb272cbec4dc7a30a853d2931766b03bea92dda", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/7cb4ae7166a8a36916be390dbb3819474fb06a29", + "reference": "7cb4ae7166a8a36916be390dbb3819474fb06a29", "shasum": "" }, "require": { @@ -7507,7 +6963,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v7.0.4" + "source": "https://github.com/symfony/dom-crawler/tree/v7.0.7" }, "funding": [ { @@ -7523,26 +6979,26 @@ "type": "tidelift" } ], - "time": "2024-02-12T11:15:03+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/error-handler", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "667a072466c6a53827ed7b119af93806b884cbb3" + "reference": "cf97429887e40480c847bfeb6c3991e1e2c086ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/667a072466c6a53827ed7b119af93806b884cbb3", - "reference": "667a072466c6a53827ed7b119af93806b884cbb3", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/cf97429887e40480c847bfeb6c3991e1e2c086ab", + "reference": "cf97429887e40480c847bfeb6c3991e1e2c086ab", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/var-dumper": "^6.4|^7.0" }, "conflict": { "symfony/deprecation-contracts": "<2.5", @@ -7551,7 +7007,7 @@ "require-dev": { "symfony/deprecation-contracts": "^2.5|^3", "symfony/http-kernel": "^6.4|^7.0", - "symfony/serializer": "^5.4|^6.0|^7.0" + "symfony/serializer": "^6.4|^7.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -7582,7 +7038,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.4.7" + "source": "https://github.com/symfony/error-handler/tree/v7.0.7" }, "funding": [ { @@ -7598,7 +7054,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/event-dispatcher", @@ -7758,23 +7214,23 @@ }, { "name": "symfony/finder", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "511c48990be17358c23bf45c5d71ab85d40fb764" + "reference": "4d58f0f4fe95a30d7b538d71197135483560b97c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/511c48990be17358c23bf45c5d71ab85d40fb764", - "reference": "511c48990be17358c23bf45c5d71ab85d40fb764", + "url": "https://api.github.com/repos/symfony/finder/zipball/4d58f0f4fe95a30d7b538d71197135483560b97c", + "reference": "4d58f0f4fe95a30d7b538d71197135483560b97c", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0|^7.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -7802,7 +7258,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.7" + "source": "https://github.com/symfony/finder/tree/v7.0.7" }, "funding": [ { @@ -7818,7 +7274,7 @@ "type": "tidelift" } ], - "time": "2024-04-23T10:36:43+00:00" + "time": "2024-04-28T11:44:19+00:00" }, { "name": "symfony/http-client", @@ -7992,36 +7448,36 @@ }, { "name": "symfony/http-foundation", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "b4db6b833035477cb70e18d0ae33cb7c2b521759" + "reference": "0194e064b8bdc29381462f790bab04e1cac8fdc8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b4db6b833035477cb70e18d0ae33cb7c2b521759", - "reference": "b4db6b833035477cb70e18d0ae33cb7c2b521759", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/0194e064b8bdc29381462f790bab04e1cac8fdc8", + "reference": "0194e064b8bdc29381462f790bab04e1cac8fdc8", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.1", "symfony/polyfill-php83": "^1.27" }, "conflict": { - "symfony/cache": "<6.3" + "doctrine/dbal": "<3.6", + "symfony/cache": "<6.4" }, "require-dev": { - "doctrine/dbal": "^2.13.1|^3|^4", + "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^6.3|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4|^7.0", - "symfony/mime": "^5.4|^6.0|^7.0", - "symfony/rate-limiter": "^5.4|^6.0|^7.0" + "symfony/cache": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/rate-limiter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -8049,7 +7505,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.7" + "source": "https://github.com/symfony/http-foundation/tree/v7.0.7" }, "funding": [ { @@ -8065,77 +7521,76 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "b7b5e6cdef670a0c82d015a966ffc7e855861a98" + "reference": "e07bb9bd86e7cd8ba2d3d9c618eec9d1bbe06d25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b7b5e6cdef670a0c82d015a966ffc7e855861a98", - "reference": "b7b5e6cdef670a0c82d015a966ffc7e855861a98", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e07bb9bd86e7cd8ba2d3d9c618eec9d1bbe06d25", + "reference": "e07bb9bd86e7cd8ba2d3d9c618eec9d1bbe06d25", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^6.4|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.4", - "symfony/config": "<6.1", - "symfony/console": "<5.4", + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", "symfony/dependency-injection": "<6.4", - "symfony/doctrine-bridge": "<5.4", - "symfony/form": "<5.4", - "symfony/http-client": "<5.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", "symfony/http-client-contracts": "<2.5", - "symfony/mailer": "<5.4", - "symfony/messenger": "<5.4", - "symfony/translation": "<5.4", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", "symfony/translation-contracts": "<2.5", - "symfony/twig-bridge": "<5.4", + "symfony/twig-bridge": "<6.4", "symfony/validator": "<6.4", - "symfony/var-dumper": "<6.3", - "twig/twig": "<2.13" + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.0.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0|^7.0", - "symfony/clock": "^6.2|^7.0", - "symfony/config": "^6.1|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/browser-kit": "^6.4|^7.0", + "symfony/clock": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/css-selector": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", - "symfony/dom-crawler": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/dom-crawler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/property-access": "^5.4.5|^6.0.5|^7.0", - "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/routing": "^6.4|^7.0", "symfony/serializer": "^6.4.4|^7.0.4", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/translation": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/uid": "^6.4|^7.0", "symfony/validator": "^6.4|^7.0", - "symfony/var-dumper": "^5.4|^6.4|^7.0", - "symfony/var-exporter": "^6.2|^7.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/var-dumper": "^6.4|^7.0", + "symfony/var-exporter": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "type": "library", "autoload": { @@ -8163,7 +7618,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.7" + "source": "https://github.com/symfony/http-kernel/tree/v7.0.7" }, "funding": [ { @@ -8179,43 +7634,43 @@ "type": "tidelift" } ], - "time": "2024-04-29T11:24:44+00:00" + "time": "2024-04-29T12:20:25+00:00" }, { "name": "symfony/mailer", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "2c446d4e446995bed983c0b5bb9ff837e8de7dbd" + "reference": "4ff41a7c7998a88cfdc31b5841ef64d9246fc56a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/2c446d4e446995bed983c0b5bb9ff837e8de7dbd", - "reference": "2c446d4e446995bed983c0b5bb9ff837e8de7dbd", + "url": "https://api.github.com/repos/symfony/mailer/zipball/4ff41a7c7998a88cfdc31b5841ef64d9246fc56a", + "reference": "4ff41a7c7998a88cfdc31b5841ef64d9246fc56a", "shasum": "" }, "require": { "egulias/email-validator": "^2.1.10|^3|^4", - "php": ">=8.1", + "php": ">=8.2", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", - "symfony/mime": "^6.2|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3" }, "conflict": { "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<5.4", - "symfony/messenger": "<6.2", - "symfony/mime": "<6.2", - "symfony/twig-bridge": "<6.2.1" + "symfony/http-kernel": "<6.4", + "symfony/messenger": "<6.4", + "symfony/mime": "<6.4", + "symfony/twig-bridge": "<6.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/messenger": "^6.2|^7.0", - "symfony/twig-bridge": "^6.2|^7.0" + "symfony/console": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/twig-bridge": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -8243,7 +7698,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.4.7" + "source": "https://github.com/symfony/mailer/tree/v7.0.7" }, "funding": [ { @@ -8259,7 +7714,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/mailgun-mailer", @@ -8332,21 +7787,20 @@ }, { "name": "symfony/mime", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "decadcf3865918ecfcbfa90968553994ce935a5e" + "reference": "3adbf110c306546f6f00337f421d2edca0e8d3c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/decadcf3865918ecfcbfa90968553994ce935a5e", - "reference": "decadcf3865918ecfcbfa90968553994ce935a5e", + "url": "https://api.github.com/repos/symfony/mime/zipball/3adbf110c306546f6f00337f421d2edca0e8d3c0", + "reference": "3adbf110c306546f6f00337f421d2edca0e8d3c0", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -8354,18 +7808,18 @@ "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<5.4", - "symfony/serializer": "<6.3.2" + "symfony/mailer": "<6.4", + "symfony/serializer": "<6.4" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", "league/html-to-markdown": "^5.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.4|^7.0", - "symfony/property-access": "^5.4|^6.0|^7.0", - "symfony/property-info": "^5.4|^6.0|^7.0", - "symfony/serializer": "^6.3.2|^7.0" + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -8397,7 +7851,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.4.7" + "source": "https://github.com/symfony/mime/tree/v7.0.7" }, "funding": [ { @@ -8413,7 +7867,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/options-resolver", @@ -9195,20 +8649,20 @@ }, { "name": "symfony/process", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "cdb1c81c145fd5aa9b0038bab694035020943381" + "reference": "3839e56b94dd1dbd13235d27504e66baf23faba0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cdb1c81c145fd5aa9b0038bab694035020943381", - "reference": "cdb1c81c145fd5aa9b0038bab694035020943381", + "url": "https://api.github.com/repos/symfony/process/zipball/3839e56b94dd1dbd13235d27504e66baf23faba0", + "reference": "3839e56b94dd1dbd13235d27504e66baf23faba0", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -9236,7 +8690,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.7" + "source": "https://github.com/symfony/process/tree/v7.0.7" }, "funding": [ { @@ -9252,7 +8706,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -9339,36 +8793,34 @@ }, { "name": "symfony/routing", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "276e06398f71fa2a973264d94f28150f93cfb907" + "reference": "9f82bf7766ccc9c22ab7aeb9bebb98351483fa5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/276e06398f71fa2a973264d94f28150f93cfb907", - "reference": "276e06398f71fa2a973264d94f28150f93cfb907", + "url": "https://api.github.com/repos/symfony/routing/zipball/9f82bf7766ccc9c22ab7aeb9bebb98351483fa5b", + "reference": "9f82bf7766ccc9c22ab7aeb9bebb98351483fa5b", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<6.2", - "symfony/dependency-injection": "<5.4", - "symfony/yaml": "<5.4" + "symfony/config": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/yaml": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3", - "symfony/config": "^6.2|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -9402,7 +8854,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.7" + "source": "https://github.com/symfony/routing/tree/v7.0.7" }, "funding": [ { @@ -9418,7 +8870,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/service-contracts", @@ -9591,33 +9043,32 @@ }, { "name": "symfony/translation", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "7495687c58bfd88b7883823747b0656d90679123" + "reference": "1515e03afaa93e6419aba5d5c9d209159317100b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/7495687c58bfd88b7883823747b0656d90679123", - "reference": "7495687c58bfd88b7883823747b0656d90679123", + "url": "https://api.github.com/repos/symfony/translation/zipball/1515e03afaa93e6419aba5d5c9d209159317100b", + "reference": "1515e03afaa93e6419aba5d5c9d209159317100b", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.5|^3.0" }, "conflict": { - "symfony/config": "<5.4", - "symfony/console": "<5.4", - "symfony/dependency-injection": "<5.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<5.4", + "symfony/http-kernel": "<6.4", "symfony/service-contracts": "<2.5", - "symfony/twig-bundle": "<5.4", - "symfony/yaml": "<5.4" + "symfony/twig-bundle": "<6.4", + "symfony/yaml": "<6.4" }, "provide": { "symfony/translation-implementation": "2.3|3.0" @@ -9625,17 +9076,17 @@ "require-dev": { "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", "symfony/http-client-contracts": "^2.5|^3.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/intl": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/routing": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -9666,7 +9117,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.7" + "source": "https://github.com/symfony/translation/tree/v7.0.7" }, "funding": [ { @@ -9682,7 +9133,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/translation-contracts", @@ -9764,24 +9215,24 @@ }, { "name": "symfony/uid", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "a66efcb71d8bc3a207d9d78e0bd67f3321510355" + "reference": "4f3a5d181999e25918586c8369de09e7814e7be2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/a66efcb71d8bc3a207d9d78e0bd67f3321510355", - "reference": "a66efcb71d8bc3a207d9d78e0bd67f3321510355", + "url": "https://api.github.com/repos/symfony/uid/zipball/4f3a5d181999e25918586c8369de09e7814e7be2", + "reference": "4f3a5d181999e25918586c8369de09e7814e7be2", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-uuid": "^1.15" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0" + "symfony/console": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -9818,7 +9269,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.4.7" + "source": "https://github.com/symfony/uid/tree/v7.0.7" }, "funding": [ { @@ -9834,38 +9285,36 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.7", + "version": "v7.0.7", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "7a9cd977cd1c5fed3694bee52990866432af07d7" + "reference": "d1627b66fd87c8b4d90cabe5671c29d575690924" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/7a9cd977cd1c5fed3694bee52990866432af07d7", - "reference": "7a9cd977cd1c5fed3694bee52990866432af07d7", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d1627b66fd87c8b4d90cabe5671c29d575690924", + "reference": "d1627b66fd87c8b4d90cabe5671c29d575690924", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/error-handler": "^6.3|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/uid": "^5.4|^6.0|^7.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "bin": [ "Resources/bin/var-dump-server" @@ -9903,7 +9352,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.7" + "source": "https://github.com/symfony/var-dumper/tree/v7.0.7" }, "funding": [ { @@ -9919,7 +9368,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:22:46+00:00" + "time": "2024-04-18T09:29:19+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -10286,6 +9735,53 @@ ], "time": "2024-02-20T07:24:02+00:00" }, + { + "name": "doctrine/deprecations", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + }, + "time": "2024-01-30T19:34:25+00:00" + }, { "name": "fakerphp/faker", "version": "v1.23.1", @@ -10676,40 +10172,38 @@ }, { "name": "nunomaduro/collision", - "version": "v7.10.0", + "version": "v8.1.1", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "49ec67fa7b002712da8526678abd651c09f375b2" + "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/49ec67fa7b002712da8526678abd651c09f375b2", - "reference": "49ec67fa7b002712da8526678abd651c09f375b2", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/13e5d538b95a744d85f447a321ce10adb28e9af9", + "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9", "shasum": "" }, "require": { - "filp/whoops": "^2.15.3", - "nunomaduro/termwind": "^1.15.1", - "php": "^8.1.0", - "symfony/console": "^6.3.4" + "filp/whoops": "^2.15.4", + "nunomaduro/termwind": "^2.0.1", + "php": "^8.2.0", + "symfony/console": "^7.0.4" }, "conflict": { - "laravel/framework": ">=11.0.0" + "laravel/framework": "<11.0.0 || >=12.0.0", + "phpunit/phpunit": "<10.5.1 || >=12.0.0" }, "require-dev": { - "brianium/paratest": "^7.3.0", - "laravel/framework": "^10.28.0", - "laravel/pint": "^1.13.3", - "laravel/sail": "^1.25.0", - "laravel/sanctum": "^3.3.1", - "laravel/tinker": "^2.8.2", - "nunomaduro/larastan": "^2.6.4", - "orchestra/testbench-core": "^8.13.0", - "pestphp/pest": "^2.23.2", - "phpunit/phpunit": "^10.4.1", - "sebastian/environment": "^6.0.1", - "spatie/laravel-ignition": "^2.3.1" + "larastan/larastan": "^2.9.2", + "laravel/framework": "^11.0.0", + "laravel/pint": "^1.14.0", + "laravel/sail": "^1.28.2", + "laravel/sanctum": "^4.0.0", + "laravel/tinker": "^2.9.0", + "orchestra/testbench-core": "^9.0.0", + "pestphp/pest": "^2.34.1 || ^3.0.0", + "sebastian/environment": "^6.0.1 || ^7.0.0" }, "type": "library", "extra": { @@ -10717,6 +10211,9 @@ "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" ] + }, + "branch-alias": { + "dev-8.x": "8.x-dev" } }, "autoload": { @@ -10768,7 +10265,7 @@ "type": "patreon" } ], - "time": "2023-10-11T15:45:01+00:00" + "time": "2024-03-06T16:20:09+00:00" }, { "name": "pestphp/pest", @@ -11266,16 +10763,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.4.0", + "version": "5.4.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "298d2febfe79d03fe714eb871d5538da55205b1a" + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/298d2febfe79d03fe714eb871d5538da55205b1a", - "reference": "298d2febfe79d03fe714eb871d5538da55205b1a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", "shasum": "" }, "require": { @@ -11324,9 +10821,9 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.0" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" }, - "time": "2024-04-09T21:13:58+00:00" + "time": "2024-05-21T05:55:05+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -11388,16 +10885,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.28.0", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb" + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/536889f2b340489d328f5ffb7b02bb6b183ddedc", + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc", "shasum": "" }, "require": { @@ -11429,9 +10926,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.0" }, - "time": "2024-04-03T18:51:33+00:00" + "time": "2024-05-06T12:04:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -12882,7 +12379,7 @@ } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, 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 8d0b30367..94a067157 100644 --- a/config/app.php +++ b/config/app.php @@ -1,8 +1,5 @@ env('APP_DEBUG', false), + 'debug' => (bool) env('APP_DEBUG', false), /* |-------------------------------------------------------------------------- @@ -51,7 +48,7 @@ | | 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. + | the application so that it's available within Artisan commands. | */ @@ -59,20 +56,18 @@ '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. + | will be used by the PHP date and date-time functions. The timezone + | is set to "UTC" by default as it is suitable for most use cases. | */ - 'timezone' => 'UTC', + 'timezone' => env('APP_TIMEZONE', 'UTC'), /* |-------------------------------------------------------------------------- @@ -80,53 +75,37 @@ |-------------------------------------------------------------------------- | | 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. + | by Laravel's translation / localization methods. This option can be + | set to any locale for which you plan to have translation strings. | */ - 'fallback_locale' => 'en', + 'locale' => env('APP_LOCALE', 'en'), - /* - |-------------------------------------------------------------------------- - | Faker Locale - |-------------------------------------------------------------------------- - | - | This locale will be used by the Faker PHP library when generating fake - | data for your database seeds. For example, this will be used to get - | localized telephone numbers, street address information and more. - | - */ + 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), - 'faker_locale' => 'en_US', + 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), /* |-------------------------------------------------------------------------- | 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! + | This key is utilized by Laravel's encryption services and should be set + | to a random, 32 character string to ensure that all encrypted values + | are secure. You should do this prior to deploying the application. | */ + 'cipher' => 'AES-256-CBC', + 'key' => env('APP_KEY'), - 'cipher' => 'AES-256-CBC', + 'previous_keys' => [ + ...array_filter( + explode(',', env('APP_PREVIOUS_KEYS', '')) + ), + ], /* |-------------------------------------------------------------------------- @@ -142,45 +121,8 @@ */ 'maintenance' => [ - 'driver' => 'file', - // 'store' => 'redis', + 'driver' => env('APP_MAINTENANCE_DRIVER', 'file'), + 'store' => env('APP_MAINTENANCE_STORE', 'database'), ], - /* - |-------------------------------------------------------------------------- - | 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' => ServiceProvider::defaultProviders()->merge([ - /* - * Application Service Providers... - */ - App\Providers\AppServiceProvider::class, - App\Providers\AuthServiceProvider::class, - App\Providers\EventServiceProvider::class, - App\Providers\RouteServiceProvider::class, - App\Markdown\MarkdownServiceProvider::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' => Facade::defaultAliases()->merge([ - // ... - ])->toArray(), - ]; diff --git a/config/auth.php b/config/auth.php index f0bdd42c1..1642fb24f 100644 --- a/config/auth.php +++ b/config/auth.php @@ -2,45 +2,7 @@ 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" - | - */ - 'guards' => [ - 'web' => [ - 'driver' => 'session', - 'provider' => 'users', - ], - 'api' => [ 'driver' => 'token', 'provider' => 'users', @@ -48,70 +10,4 @@ ], ], - /* - |-------------------------------------------------------------------------- - | 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 expiry time is the number of minutes that each reset token will 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, - 'throttle' => 60, - ], - ], - - /* - |-------------------------------------------------------------------------- - | Password Confirmation Timeout - |-------------------------------------------------------------------------- - | - | Here you may define the amount of seconds before a password confirmation - | times out and the user is prompted to re-enter their password via the - | confirmation screen. By default, the timeout lasts for three hours. - | - */ - - 'password_timeout' => 10800, - ]; diff --git a/config/broadcasting.php b/config/broadcasting.php deleted file mode 100644 index 241048538..000000000 --- a/config/broadcasting.php +++ /dev/null @@ -1,71 +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' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), - 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', - 'port' => env('PUSHER_PORT', 443), - 'scheme' => env('PUSHER_SCHEME', 'https'), - 'encrypted' => true, - 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', - ], - 'client_options' => [ - // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html - ], - ], - - 'ably' => [ - 'driver' => 'ably', - 'key' => env('ABLY_KEY'), - ], - - '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 d4171e221..000000000 --- a/config/cache.php +++ /dev/null @@ -1,111 +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. - | - | Supported drivers: "apc", "array", "database", "file", - | "memcached", "redis", "dynamodb", "octane", "null" - | - */ - - 'stores' => [ - - 'apc' => [ - 'driver' => 'apc', - ], - - 'array' => [ - 'driver' => 'array', - 'serialize' => false, - ], - - 'database' => [ - 'driver' => 'database', - 'table' => 'cache', - 'connection' => null, - 'lock_connection' => null, - ], - - 'file' => [ - 'driver' => 'file', - 'path' => storage_path('framework/cache/data'), - 'lock_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', - 'lock_connection' => 'default', - ], - - 'dynamodb' => [ - 'driver' => 'dynamodb', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), - 'endpoint' => env('DYNAMODB_ENDPOINT'), - ], - - 'octane' => [ - 'driver' => 'octane', - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing the APC, database, memcached, Redis, or DynamoDB cache - | stores there might be other applications using the same cache. For - | that reason, you may prefix every cache key to avoid collisions. - | - */ - - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), - -]; diff --git a/config/cors.php b/config/cors.php deleted file mode 100644 index 8a39e6daa..000000000 --- a/config/cors.php +++ /dev/null @@ -1,34 +0,0 @@ - ['api/*', 'sanctum/csrf-cookie'], - - 'allowed_methods' => ['*'], - - 'allowed_origins' => ['*'], - - 'allowed_origins_patterns' => [], - - 'allowed_headers' => ['*'], - - 'exposed_headers' => [], - - 'max_age' => 0, - - 'supports_credentials' => false, - -]; diff --git a/config/database.php b/config/database.php index 137ad18ce..f8e8dcb8a 100644 --- a/config/database.php +++ b/config/database.php @@ -10,26 +10,22 @@ |-------------------------------------------------------------------------- | | 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. + | to use as your default connection for database operations. This is + | the connection which will be utilized unless another connection + | is explicitly specified when you execute a query / statement. | */ - 'default' => env('DB_CONNECTION', 'mysql'), + 'default' => env('DB_CONNECTION', 'sqlite'), /* |-------------------------------------------------------------------------- | 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. + | Below are all of the database connections defined for your application. + | An example configuration is provided for each database system which + | is supported by Laravel. You're free to add / remove connections. | */ @@ -37,7 +33,7 @@ 'sqlite' => [ 'driver' => 'sqlite', - 'url' => env('DATABASE_URL'), + 'url' => env('DB_URL'), 'database' => env('DB_DATABASE', database_path('database.sqlite')), 'prefix' => '', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), @@ -45,15 +41,35 @@ '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', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => env('DB_CHARSET', 'utf8mb4'), + 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], + ], + + 'mariadb' => [ + 'driver' => 'mariadb', + 'url' => env('DB_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), + 'database' => env('DB_DATABASE', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', + 'charset' => env('DB_CHARSET', 'utf8mb4'), + 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), 'prefix' => '', 'prefix_indexes' => true, 'strict' => true, @@ -65,13 +81,13 @@ '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', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), + 'database' => env('DB_DATABASE', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', + 'charset' => env('DB_CHARSET', 'utf8'), 'prefix' => '', 'prefix_indexes' => true, 'search_path' => 'public', @@ -80,13 +96,13 @@ 'sqlsrv' => [ 'driver' => 'sqlsrv', - 'url' => env('DATABASE_URL'), + 'url' => env('DB_URL'), 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '1433'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), + 'database' => env('DB_DATABASE', 'laravel'), + 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', + 'charset' => env('DB_CHARSET', 'utf8'), 'prefix' => '', 'prefix_indexes' => true, // 'encrypt' => env('DB_ENCRYPT', 'yes'), @@ -102,11 +118,14 @@ | | 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. + | the migrations on disk haven't actually been run on the database. | */ - 'migrations' => 'migrations', + 'migrations' => [ + 'table' => 'migrations', + 'update_date_on_publish' => true, + ], /* |-------------------------------------------------------------------------- @@ -115,7 +134,7 @@ | | Redis is an open source, fast, and advanced key-value store that also | provides a richer body of commands than a typical key-value system - | such as APC or Memcached. Laravel makes it easy to dig right in. + | such as Memcached. You may define your connection settings here. | */ diff --git a/config/filesystems.php b/config/filesystems.php deleted file mode 100644 index e9d9dbdbe..000000000 --- a/config/filesystems.php +++ /dev/null @@ -1,76 +0,0 @@ - env('FILESYSTEM_DISK', 'local'), - - /* - |-------------------------------------------------------------------------- - | 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 set up for each driver as an example of the required values. - | - | Supported Drivers: "local", "ftp", "sftp", "s3" - | - */ - - 'disks' => [ - - 'local' => [ - 'driver' => 'local', - 'root' => storage_path('app'), - 'throw' => false, - ], - - 'public' => [ - 'driver' => 'local', - 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', - 'visibility' => 'public', - 'throw' => false, - ], - - 's3' => [ - 'driver' => 's3', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION'), - 'bucket' => env('AWS_BUCKET'), - 'url' => env('AWS_URL'), - 'endpoint' => env('AWS_ENDPOINT'), - 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), - 'throw' => false, - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Symbolic Links - |-------------------------------------------------------------------------- - | - | Here you may configure the symbolic links that will be created when the - | `storage:link` Artisan command is executed. The array keys should be - | the locations of the links and the values should be their targets. - | - */ - - 'links' => [ - public_path('storage') => storage_path('app/public'), - ], - -]; diff --git a/config/hashing.php b/config/hashing.php deleted file mode 100644 index bcd3be4c2..000000000 --- a/config/hashing.php +++ /dev/null @@ -1,52 +0,0 @@ - 'bcrypt', - - /* - |-------------------------------------------------------------------------- - | Bcrypt Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Bcrypt algorithm. This will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'bcrypt' => [ - 'rounds' => env('BCRYPT_ROUNDS', 10), - ], - - /* - |-------------------------------------------------------------------------- - | Argon Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Argon algorithm. These will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'argon' => [ - 'memory' => 65536, - 'threads' => 1, - 'time' => 4, - ], - -]; diff --git a/config/logging.php b/config/logging.php index aa0d00075..7d36ae7fe 100644 --- a/config/logging.php +++ b/config/logging.php @@ -1,60 +1,10 @@ env('LOG_CHANNEL', 'stack'), - - /* - |-------------------------------------------------------------------------- - | Deprecations Log Channel - |-------------------------------------------------------------------------- - | - | This option controls the log channel that should be used to log warnings - | regarding deprecated PHP and library features. This allows you to get - | your application ready for upcoming major versions of dependencies. - | - */ - 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), - /* - |-------------------------------------------------------------------------- - | Log Channels - |-------------------------------------------------------------------------- - | - | Here you may configure the log channels for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Drivers: "single", "daily", "slack", "syslog", - | "errorlog", "monolog", - | "custom", "stack" - | - */ - 'channels' => [ - 'stack' => [ - 'driver' => 'stack', - 'channels' => ['single'], - 'ignore_exceptions' => false, - ], - 'single' => [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), @@ -62,68 +12,6 @@ 'days' => 14, 'replace_placeholders' => true, ], - - 'daily' => [ - 'driver' => 'daily', - 'path' => storage_path('logs/laravel.log'), - 'level' => env('LOG_LEVEL', 'debug'), - 'days' => 14, - 'replace_placeholders' => true, - ], - - 'slack' => [ - 'driver' => 'slack', - 'url' => env('LOG_SLACK_WEBHOOK_URL'), - 'username' => 'Laravel Log', - 'emoji' => ':boom:', - 'level' => env('LOG_LEVEL', 'critical'), - 'replace_placeholders' => true, - ], - - 'papertrail' => [ - 'driver' => 'monolog', - 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), - 'handler_with' => [ - 'host' => env('PAPERTRAIL_URL'), - 'port' => env('PAPERTRAIL_PORT'), - 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), - ], - 'processors' => [PsrLogMessageProcessor::class], - ], - - 'stderr' => [ - 'driver' => 'monolog', - 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => StreamHandler::class, - 'formatter' => env('LOG_STDERR_FORMATTER'), - 'with' => [ - 'stream' => 'php://stderr', - ], - 'processors' => [PsrLogMessageProcessor::class], - ], - - 'syslog' => [ - 'driver' => 'syslog', - 'level' => env('LOG_LEVEL', 'debug'), - 'facility' => LOG_USER, - 'replace_placeholders' => true, - ], - - 'errorlog' => [ - 'driver' => 'errorlog', - 'level' => env('LOG_LEVEL', 'debug'), - 'replace_placeholders' => true, - ], - - 'null' => [ - 'driver' => 'monolog', - 'handler' => NullHandler::class, - ], - - 'emergency' => [ - 'path' => storage_path('logs/laravel.log'), - ], ], ]; diff --git a/config/mail.php b/config/mail.php index d7416b152..77815a619 100644 --- a/config/mail.php +++ b/config/mail.php @@ -2,125 +2,13 @@ return [ - /* - |-------------------------------------------------------------------------- - | Default Mailer - |-------------------------------------------------------------------------- - | - | This option controls the default mailer that is used to send any email - | messages sent by your application. Alternative mailers may be setup - | and used as needed; however, this mailer will be used by default. - | - */ - - 'default' => env('MAIL_MAILER', 'smtp'), - - /* - |-------------------------------------------------------------------------- - | Mailer Configurations - |-------------------------------------------------------------------------- - | - | Here you may configure all of the mailers used by your application plus - | their respective settings. Several examples have been configured for - | you and you are free to add your own as your application requires. - | - | Laravel supports a variety of mail "transport" drivers to be used while - | sending an e-mail. You will specify which one you are using for your - | mailers below. You are free to add additional mailers as required. - | - | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", - | "postmark", "log", "array", "failover" - | - */ - 'mailers' => [ - 'smtp' => [ - 'transport' => 'smtp', - 'url' => env('MAIL_URL'), - 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), - 'port' => env('MAIL_PORT', 587), - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - 'username' => env('MAIL_USERNAME'), - 'password' => env('MAIL_PASSWORD'), - 'timeout' => null, - 'local_domain' => env('MAIL_EHLO_DOMAIN'), - ], - - 'ses' => [ - 'transport' => 'ses', - ], - 'mailgun' => [ 'transport' => 'mailgun', // 'client' => [ // 'timeout' => 5, // ], ], - - 'postmark' => [ - 'transport' => 'postmark', - // 'message_stream_id' => null, - // 'client' => [ - // 'timeout' => 5, - // ], - ], - - 'sendmail' => [ - 'transport' => 'sendmail', - 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), - ], - - 'log' => [ - 'transport' => 'log', - 'channel' => env('MAIL_LOG_CHANNEL'), - ], - - 'array' => [ - 'transport' => 'array', - ], - - 'failover' => [ - 'transport' => 'failover', - 'mailers' => [ - 'smtp', - 'log', - ], - ], - ], - - /* - |-------------------------------------------------------------------------- - | 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'), - ], - - /* - |-------------------------------------------------------------------------- - | 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 01c6b054d..000000000 --- a/config/queue.php +++ /dev/null @@ -1,109 +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. - | - | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" - | - */ - - 'connections' => [ - - 'sync' => [ - 'driver' => 'sync', - ], - - 'database' => [ - 'driver' => 'database', - 'table' => 'jobs', - 'queue' => 'default', - 'retry_after' => 90, - 'after_commit' => false, - ], - - 'beanstalkd' => [ - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'retry_after' => 90, - 'block_for' => 0, - 'after_commit' => false, - ], - - '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', 'default'), - 'suffix' => env('SQS_SUFFIX'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'after_commit' => false, - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - 'queue' => env('REDIS_QUEUE', 'default'), - 'retry_after' => 90, - 'block_for' => null, - 'after_commit' => false, - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Job Batching - |-------------------------------------------------------------------------- - | - | The following options configure the database and table that store job - | batching information. These options can be updated to any database - | connection and table which has been defined by your application. - | - */ - - 'batching' => [ - 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'job_batches', - ], - - /* - |-------------------------------------------------------------------------- - | 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' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), - 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'failed_jobs', - ], - -]; diff --git a/config/sanctum.php b/config/sanctum.php index 529cfdc99..764a82fac 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -41,13 +41,28 @@ |-------------------------------------------------------------------------- | | This value controls the number of minutes until an issued token will be - | considered expired. If this value is null, personal access tokens do - | not expire. This won't tweak the lifetime of first-party sessions. + | considered expired. This will override any values set in the token's + | "expires_at" attribute, but first-party sessions are not affected. | */ 'expiration' => null, + /* + |-------------------------------------------------------------------------- + | Token Prefix + |-------------------------------------------------------------------------- + | + | Sanctum can prefix new tokens in order to take advantage of numerous + | security scanning initiatives maintained by open source platforms + | that notify developers if they commit tokens into repositories. + | + | See: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning + | + */ + + 'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''), + /* |-------------------------------------------------------------------------- | Sanctum Middleware @@ -60,8 +75,9 @@ */ 'middleware' => [ - 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, - 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, + 'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class, + 'encrypt_cookies' => Illuminate\Cookie\Middleware\EncryptCookies::class, + 'validate_csrf_token' => Illuminate\Foundation\Http\Middleware\ValidateCsrfToken::class, ], ]; diff --git a/config/services.php b/config/services.php index b343f6757..1105eb382 100644 --- a/config/services.php +++ b/config/services.php @@ -2,18 +2,6 @@ return [ - /* - |-------------------------------------------------------------------------- - | Third Party Services - |-------------------------------------------------------------------------- - | - | This file is for storing the credentials for third party services such - | as Mailgun, Postmark, AWS and more. This file provides the de facto - | location for this type of information, allowing packages to have - | a conventional file to locate the various service credentials. - | - */ - 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), @@ -21,16 +9,6 @@ 'scheme' => 'https', ], - 'postmark' => [ - 'token' => env('POSTMARK_TOKEN'), - ], - - 'ses' => [ - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - ], - 'github' => [ 'client_id' => env('GITHUB_ID'), 'client_secret' => env('GITHUB_SECRET'), diff --git a/config/session.php b/config/session.php deleted file mode 100644 index 733b561dc..000000000 --- a/config/session.php +++ /dev/null @@ -1,201 +0,0 @@ - env('SESSION_DRIVER', 'file'), - - /* - |-------------------------------------------------------------------------- - | 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' => env('SESSION_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' => 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' => env('SESSION_CONNECTION'), - - /* - |-------------------------------------------------------------------------- - | 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 - |-------------------------------------------------------------------------- - | - | While using one of the framework's cache driven session backends 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". - | - | Affects: "apc", "dynamodb", "memcached", "redis" - | - */ - - 'store' => env('SESSION_STORE'), - - /* - |-------------------------------------------------------------------------- - | 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'), - - /* - |-------------------------------------------------------------------------- - | 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 when it can't be done securely. - | - */ - - 'secure' => env('SESSION_SECURE_COOKIE'), - - /* - |-------------------------------------------------------------------------- - | 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' => true, - - /* - |-------------------------------------------------------------------------- - | Same-Site Cookies - |-------------------------------------------------------------------------- - | - | This option determines how your cookies behave when cross-site requests - | take place, and can be used to mitigate CSRF attacks. By default, we - | will set this value to "lax" since this is a secure default value. - | - | Supported: "lax", "strict", "none", null - | - */ - - 'same_site' => 'lax', - -]; diff --git a/config/view.php b/config/view.php deleted file mode 100644 index 40cbf7743..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')), - ), - -]; diff --git a/database/migrations/2013_09_17_113019_create_users_table.php b/database/migrations/2013_09_17_113019_create_users_table.php deleted file mode 100644 index 212962e7c..000000000 --- a/database/migrations/2013_09_17_113019_create_users_table.php +++ /dev/null @@ -1,21 +0,0 @@ -increments('id'); - $table->string('github_id')->default(''); - $table->string('github_url')->default(''); - $table->string('email'); - $table->string('name'); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2013_09_17_121043_create_session_table.php b/database/migrations/2013_09_17_121043_create_session_table.php deleted file mode 100644 index 198a734da..000000000 --- a/database/migrations/2013_09_17_121043_create_session_table.php +++ /dev/null @@ -1,17 +0,0 @@ -string('id')->unique(); - $table->text('payload'); - $table->integer('last_activity'); - }); - } -}; diff --git a/database/migrations/2013_09_17_160916_create_roles_table.php b/database/migrations/2013_09_17_160916_create_roles_table.php deleted file mode 100644 index 0b1dc77b9..000000000 --- a/database/migrations/2013_09_17_160916_create_roles_table.php +++ /dev/null @@ -1,18 +0,0 @@ -increments('id'); - $table->string('name'); - $table->string('description'); - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2013_09_17_164244_create_role_user_table.php b/database/migrations/2013_09_17_164244_create_role_user_table.php deleted file mode 100644 index 85b990054..000000000 --- a/database/migrations/2013_09_17_164244_create_role_user_table.php +++ /dev/null @@ -1,18 +0,0 @@ -increments('id'); - $table->integer('user_id'); - $table->integer('role_id'); - $table->index('user_id'); - }); - } -}; diff --git a/database/migrations/2013_09_17_170055_add_is_banned_field_to_users.php b/database/migrations/2013_09_17_170055_add_is_banned_field_to_users.php deleted file mode 100644 index 74b88ce6c..000000000 --- a/database/migrations/2013_09_17_170055_add_is_banned_field_to_users.php +++ /dev/null @@ -1,15 +0,0 @@ -integer('is_banned')->default(0); - }); - } -}; diff --git a/database/migrations/2013_09_18_115103_create_pastes_table.php b/database/migrations/2013_09_18_115103_create_pastes_table.php deleted file mode 100644 index 30d937a54..000000000 --- a/database/migrations/2013_09_18_115103_create_pastes_table.php +++ /dev/null @@ -1,23 +0,0 @@ -increments('id'); - $table->integer('author_id')->nullable(); - $table->integer('parent_id')->nullable(); - $table->text('description')->nullable(); - $table->text('code'); - $table->integer('comment_count'); - $table->integer('child_count'); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2013_09_19_101701_create_comments_table.php b/database/migrations/2013_09_19_101701_create_comments_table.php deleted file mode 100644 index 3c950f3c7..000000000 --- a/database/migrations/2013_09_19_101701_create_comments_table.php +++ /dev/null @@ -1,29 +0,0 @@ -increments('id'); - - $table->string('title')->nullable(); - $table->text('body'); - - $table->string('owner_type'); - $table->integer('owner_id'); - - $table->integer('author_id'); - $table->integer('parent_id')->nullable(); - - $table->integer('child_count')->default(0); - $table->integer('most_recent_child_id')->nullable(); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2013_09_19_104855_create_activity_table.php b/database/migrations/2013_09_19_104855_create_activity_table.php deleted file mode 100644 index fcc956f9a..000000000 --- a/database/migrations/2013_09_19_104855_create_activity_table.php +++ /dev/null @@ -1,21 +0,0 @@ -increments('id'); - $table->integer('user_id'); - $table->integer('activity_type'); - $table->integer('activity_id'); - $table->text('description'); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2013_09_22_130010_add_image_url_field_to_users.php b/database/migrations/2013_09_22_130010_add_image_url_field_to_users.php deleted file mode 100644 index daa7116ec..000000000 --- a/database/migrations/2013_09_22_130010_add_image_url_field_to_users.php +++ /dev/null @@ -1,15 +0,0 @@ -string('image_url')->nullable(); - }); - } -}; diff --git a/database/migrations/2013_09_22_130711_add_type_field_to_comments.php b/database/migrations/2013_09_22_130711_add_type_field_to_comments.php deleted file mode 100644 index f0296edc5..000000000 --- a/database/migrations/2013_09_22_130711_add_type_field_to_comments.php +++ /dev/null @@ -1,15 +0,0 @@ -integer('type')->default(0); - }); - } -}; diff --git a/database/migrations/2013_09_22_163103_create_articles_table.php b/database/migrations/2013_09_22_163103_create_articles_table.php deleted file mode 100644 index 02b412d71..000000000 --- a/database/migrations/2013_09_22_163103_create_articles_table.php +++ /dev/null @@ -1,21 +0,0 @@ -increments('id'); - $table->integer('author_id'); - $table->string('title'); - $table->text('content'); - $table->boolean('featured')->default(0); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2013_09_22_163347_create_tags_table.php b/database/migrations/2013_09_22_163347_create_tags_table.php deleted file mode 100644 index 330aebc83..000000000 --- a/database/migrations/2013_09_22_163347_create_tags_table.php +++ /dev/null @@ -1,17 +0,0 @@ -increments('id'); - $table->string('name'); - $table->string('slug'); - }); - } -}; diff --git a/database/migrations/2013_09_22_163816_create_article_tag_table.php b/database/migrations/2013_09_22_163816_create_article_tag_table.php deleted file mode 100644 index 80a01517c..000000000 --- a/database/migrations/2013_09_22_163816_create_article_tag_table.php +++ /dev/null @@ -1,19 +0,0 @@ -increments('id'); - $table->integer('article_id')->index(); - $table->integer('tag_id')->index(); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2013_09_23_111349_add_description_field_to_tags.php b/database/migrations/2013_09_23_111349_add_description_field_to_tags.php deleted file mode 100644 index 8838b02ae..000000000 --- a/database/migrations/2013_09_23_111349_add_description_field_to_tags.php +++ /dev/null @@ -1,15 +0,0 @@ -text('description')->nullable(); - }); - } -}; diff --git a/database/migrations/2013_09_23_121454_add_published_at_field_to_articles.php b/database/migrations/2013_09_23_121454_add_published_at_field_to_articles.php deleted file mode 100644 index 7f0c03378..000000000 --- a/database/migrations/2013_09_23_121454_add_published_at_field_to_articles.php +++ /dev/null @@ -1,16 +0,0 @@ -integer('status')->default(0); - $table->dateTime('published_at')->nullable(); - }); - } -}; diff --git a/database/migrations/2013_09_23_160937_add_comment_counter_cache_to_articles.php b/database/migrations/2013_09_23_160937_add_comment_counter_cache_to_articles.php deleted file mode 100644 index a638bbba6..000000000 --- a/database/migrations/2013_09_23_160937_add_comment_counter_cache_to_articles.php +++ /dev/null @@ -1,15 +0,0 @@ -integer('comment_count')->default(0); - }); - } -}; diff --git a/database/migrations/2013_09_24_145833_create_contributors_table.php b/database/migrations/2013_09_24_145833_create_contributors_table.php deleted file mode 100644 index 46b73472b..000000000 --- a/database/migrations/2013_09_24_145833_create_contributors_table.php +++ /dev/null @@ -1,23 +0,0 @@ -increments('id'); - $table->integer('user_id')->nullable(); - $table->string('github_id'); - $table->string('name'); - $table->string('avatar_url'); - $table->string('github_url'); - $table->integer('contribution_count')->default(0); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2013_09_27_014229_add_soft_delete_to_articles.php b/database/migrations/2013_09_27_014229_add_soft_delete_to_articles.php deleted file mode 100644 index fcada4bcf..000000000 --- a/database/migrations/2013_09_27_014229_add_soft_delete_to_articles.php +++ /dev/null @@ -1,15 +0,0 @@ -softDeletes(); - }); - } -}; diff --git a/database/migrations/2013_09_27_015000_add_soft_delete_to_users.php b/database/migrations/2013_09_27_015000_add_soft_delete_to_users.php deleted file mode 100644 index ab5558c78..000000000 --- a/database/migrations/2013_09_27_015000_add_soft_delete_to_users.php +++ /dev/null @@ -1,15 +0,0 @@ -softDeletes(); - }); - } -}; diff --git a/database/migrations/2013_09_27_015109_add_soft_delete_to_comments.php b/database/migrations/2013_09_27_015109_add_soft_delete_to_comments.php deleted file mode 100644 index 489c6bdde..000000000 --- a/database/migrations/2013_09_27_015109_add_soft_delete_to_comments.php +++ /dev/null @@ -1,15 +0,0 @@ -softDeletes(); - }); - } -}; diff --git a/database/migrations/2013_09_27_021650_add_soft_delete_to_pastes.php b/database/migrations/2013_09_27_021650_add_soft_delete_to_pastes.php deleted file mode 100644 index fcdf0cd65..000000000 --- a/database/migrations/2013_09_27_021650_add_soft_delete_to_pastes.php +++ /dev/null @@ -1,15 +0,0 @@ -softDeletes(); - }); - } -}; diff --git a/database/migrations/2013_10_24_131412_create_comment_tag_table.php b/database/migrations/2013_10_24_131412_create_comment_tag_table.php deleted file mode 100644 index 6525694b6..000000000 --- a/database/migrations/2013_10_24_131412_create_comment_tag_table.php +++ /dev/null @@ -1,19 +0,0 @@ -increments('id'); - $table->integer('comment_id')->index(); - $table->integer('tag_id')->index(); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2013_10_30_104107_add_tag_section_fields.php b/database/migrations/2013_10_30_104107_add_tag_section_fields.php deleted file mode 100644 index a515b959e..000000000 --- a/database/migrations/2013_10_30_104107_add_tag_section_fields.php +++ /dev/null @@ -1,16 +0,0 @@ -smallInteger('forum')->default(0); - $table->smallInteger('articles')->default(0); - }); - } -}; diff --git a/database/migrations/2013_12_08_161643_comments_add_laravel_version.php b/database/migrations/2013_12_08_161643_comments_add_laravel_version.php deleted file mode 100644 index 935c46de8..000000000 --- a/database/migrations/2013_12_08_161643_comments_add_laravel_version.php +++ /dev/null @@ -1,15 +0,0 @@ -integer('laravel_version')->default(0); - }); - } -}; diff --git a/database/migrations/2013_12_14_151829_articles_add_laravel_verion_field.php b/database/migrations/2013_12_14_151829_articles_add_laravel_verion_field.php deleted file mode 100644 index d96027a4d..000000000 --- a/database/migrations/2013_12_14_151829_articles_add_laravel_verion_field.php +++ /dev/null @@ -1,15 +0,0 @@ -integer('laravel_version')->default(0); - }); - } -}; diff --git a/database/migrations/2014_01_27_135001_forum_threads_create_table.php b/database/migrations/2014_01_27_135001_forum_threads_create_table.php deleted file mode 100644 index a6a6bc52e..000000000 --- a/database/migrations/2014_01_27_135001_forum_threads_create_table.php +++ /dev/null @@ -1,25 +0,0 @@ -increments('id'); - $table->integer('author_id'); - $table->string('subject'); - $table->text('body'); - $table->string('slug'); - $table->string('category_slug'); - $table->integer('laravel_version'); - $table->integer('most_recent_reply_id'); - $table->integer('reply_count'); - $table->timestamps(); - $table->softDeletes(); - }); - } -}; diff --git a/database/migrations/2014_01_27_141317_forum_replies_create_table.php b/database/migrations/2014_01_27_141317_forum_replies_create_table.php deleted file mode 100644 index 33e4c4d0e..000000000 --- a/database/migrations/2014_01_27_141317_forum_replies_create_table.php +++ /dev/null @@ -1,20 +0,0 @@ -increments('id'); - $table->text('body'); - $table->integer('author_id'); - $table->integer('thread_id'); - $table->timestamps(); - $table->softDeletes(); - }); - } -}; diff --git a/database/migrations/2014_01_31_140118_tagged_items_create_table.php b/database/migrations/2014_01_31_140118_tagged_items_create_table.php deleted file mode 100644 index cb580638f..000000000 --- a/database/migrations/2014_01_31_140118_tagged_items_create_table.php +++ /dev/null @@ -1,19 +0,0 @@ -increments('id'); - $table->integer('thread_id'); - $table->integer('tag_id'); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2014_02_01_022633_pastes_add_hash_field.php b/database/migrations/2014_02_01_022633_pastes_add_hash_field.php deleted file mode 100644 index 3155ff0e1..000000000 --- a/database/migrations/2014_02_01_022633_pastes_add_hash_field.php +++ /dev/null @@ -1,15 +0,0 @@ -string('hash')->nullable(); - }); - } -}; diff --git a/database/migrations/2014_02_07_125035_forum_threads_add_question_fields.php b/database/migrations/2014_02_07_125035_forum_threads_add_question_fields.php deleted file mode 100644 index 972384c02..000000000 --- a/database/migrations/2014_02_07_125035_forum_threads_add_question_fields.php +++ /dev/null @@ -1,15 +0,0 @@ -boolean('is_question')->default(true); - }); - } -}; diff --git a/database/migrations/2014_02_07_144708_forum_threads_add_solution_reply_id.php b/database/migrations/2014_02_07_144708_forum_threads_add_solution_reply_id.php deleted file mode 100644 index 4d486cf05..000000000 --- a/database/migrations/2014_02_07_144708_forum_threads_add_solution_reply_id.php +++ /dev/null @@ -1,15 +0,0 @@ -integer('solution_reply_id')->nullable()->default(null); - }); - } -}; diff --git a/database/migrations/2014_02_07_155103_forum_thread_visitation_timestamps_create_table.php b/database/migrations/2014_02_07_155103_forum_thread_visitation_timestamps_create_table.php deleted file mode 100644 index 763f81ebf..000000000 --- a/database/migrations/2014_02_07_155103_forum_thread_visitation_timestamps_create_table.php +++ /dev/null @@ -1,20 +0,0 @@ -create(); - $table->increments('id'); - $table->integer('user_id'); - $table->integer('thread_id'); - $table->timestamp('visited_at'); - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2014_05_30_115728_users_add_remember_me_token.php b/database/migrations/2014_05_30_115728_users_add_remember_me_token.php deleted file mode 100644 index f8a5e4c3c..000000000 --- a/database/migrations/2014_05_30_115728_users_add_remember_me_token.php +++ /dev/null @@ -1,15 +0,0 @@ -string('remember_token')->default(''); - }); - } -}; diff --git a/database/migrations/2014_09_10_112330_add_ip_to_pastes_table.php b/database/migrations/2014_09_10_112330_add_ip_to_pastes_table.php deleted file mode 100644 index 1bd877914..000000000 --- a/database/migrations/2014_09_10_112330_add_ip_to_pastes_table.php +++ /dev/null @@ -1,15 +0,0 @@ -string('ip')->nullable(); - }); - } -}; diff --git a/database/migrations/2014_11_09_185116_pinned_threads.php b/database/migrations/2014_11_09_185116_pinned_threads.php deleted file mode 100644 index 022716311..000000000 --- a/database/migrations/2014_11_09_185116_pinned_threads.php +++ /dev/null @@ -1,15 +0,0 @@ -boolean('pinned')->default(false); - }); - } -}; diff --git a/database/migrations/2014_12_07_143131_add_user_confirmation_columns.php b/database/migrations/2014_12_07_143131_add_user_confirmation_columns.php deleted file mode 100644 index d8f0eeb03..000000000 --- a/database/migrations/2014_12_07_143131_add_user_confirmation_columns.php +++ /dev/null @@ -1,16 +0,0 @@ -boolean('confirmed')->default(0); - $table->string('confirmation_code')->nullable(); - }); - } -}; diff --git a/database/migrations/2014_12_13_164931_create_ip_columns.php b/database/migrations/2014_12_13_164931_create_ip_columns.php deleted file mode 100644 index 5257d6712..000000000 --- a/database/migrations/2014_12_13_164931_create_ip_columns.php +++ /dev/null @@ -1,23 +0,0 @@ -string('ip', 100)->default(''); - }); - - Schema::table('forum_threads', function (Blueprint $table) { - $table->string('ip', 100)->default(''); - }); - - Schema::table('forum_replies', function (Blueprint $table) { - $table->string('ip', 100)->default(''); - }); - } -}; diff --git a/database/migrations/2014_12_13_210738_add_spam_counter_to_users_table.php b/database/migrations/2014_12_13_210738_add_spam_counter_to_users_table.php deleted file mode 100644 index 28fa1f26f..000000000 --- a/database/migrations/2014_12_13_210738_add_spam_counter_to_users_table.php +++ /dev/null @@ -1,15 +0,0 @@ -tinyInteger('spam_count')->default(0); - }); - } -}; diff --git a/database/migrations/2014_12_21_212154_remove_contributors_table.php b/database/migrations/2014_12_21_212154_remove_contributors_table.php deleted file mode 100644 index 9c549dbc9..000000000 --- a/database/migrations/2014_12_21_212154_remove_contributors_table.php +++ /dev/null @@ -1,12 +0,0 @@ -index('author_id'); - $table->index('most_recent_reply_id'); - $table->index('solution_reply_id'); - }); - - Schema::table('forum_replies', function (Blueprint $table) { - $table->index('author_id'); - $table->index('thread_id'); - }); - - Schema::table('comments', function (Blueprint $table) { - $table->index('author_id'); - }); - } -}; diff --git a/database/migrations/2015_04_12_172949_add_indexes_to_tagged_items.php b/database/migrations/2015_04_12_172949_add_indexes_to_tagged_items.php deleted file mode 100644 index af36bda1b..000000000 --- a/database/migrations/2015_04_12_172949_add_indexes_to_tagged_items.php +++ /dev/null @@ -1,16 +0,0 @@ -index('thread_id'); - $table->index('tag_id'); - }); - } -}; diff --git a/database/migrations/2015_07_26_160128_l5_cleanup.php b/database/migrations/2015_07_26_160128_l5_cleanup.php deleted file mode 100644 index 34a21f163..000000000 --- a/database/migrations/2015_07_26_160128_l5_cleanup.php +++ /dev/null @@ -1,18 +0,0 @@ -dropColumn('articles'); - }); - } -}; diff --git a/database/migrations/2015_08_26_191523_drop_unused_tables.php b/database/migrations/2015_08_26_191523_drop_unused_tables.php deleted file mode 100644 index 785b2cac5..000000000 --- a/database/migrations/2015_08_26_191523_drop_unused_tables.php +++ /dev/null @@ -1,14 +0,0 @@ -runningUnitTests()) { - DB::table('forum_replies') - ->join('forum_threads', 'forum_replies.thread_id', '=', 'forum_threads.id') - ->whereNotNull('forum_threads.deleted_at') - ->delete(); - DB::table('tagged_items') - ->join('forum_threads', 'tagged_items.thread_id', '=', 'forum_threads.id') - ->whereNotNull('forum_threads.deleted_at') - ->delete(); - DB::table('forum_threads')->whereNotNull('deleted_at')->delete(); - DB::table('forum_replies')->whereNotNull('deleted_at')->delete(); - DB::table('users')->whereNotNull('deleted_at')->delete(); - DB::table('tagged_items')->whereRaw('thread_id NOT IN (SELECT id FROM forum_threads)')->delete(); - DB::table('forum_threads') - ->whereRaw('solution_reply_id NOT IN (SELECT id FROM forum_replies)') - ->update(['solution_reply_id' => null]); - } - - // Create password_resets table - Schema::create('password_resets', function (Blueprint $table) { - $table->string('email')->index(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - - // Clean up users - Schema::table('users', function (Blueprint $table) { - $table->string('email')->unique()->change(); - $table->string('username', 40)->default(''); - $table->string('password')->default(''); - $table->smallInteger('type', false, true)->default(1); - $table->dateTime('created_at')->nullable()->default(null)->change(); - $table->dateTime('updated_at')->nullable()->default(null)->change(); - }); - Schema::table('users', function (Blueprint $table) { - $table->dropSoftDeletes(); - }); - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('image_url', 'spam_count'); - }); - Schema::table('users', function (Blueprint $table) { - $table->renameColumn('github_url', 'github_username'); - }); - - if (! app()->runningUnitTests()) { - DB::statement('UPDATE users SET username = LOWER(name), github_username = name'); - } - - Schema::table('users', function (Blueprint $table) { - $table->unique('username'); - $table->index('email'); - $table->index('username'); - }); - - if (! app()->runningUnitTests()) { - // Migrate moderators - DB::statement('UPDATE users SET type = 2 WHERE id IN ( - SELECT user_id FROM role_user WHERE role_id = 2 - )'); - - // Migrate admins - DB::statement('UPDATE users SET type = 3 WHERE id IN ( - SELECT user_id FROM role_user WHERE role_id = 3 - )'); - } - - // Refactor replies - Schema::rename('forum_replies', 'replies'); - Schema::table('replies', function (Blueprint $table) { - $table->string('replyable_type')->default(''); - $table->dateTime('created_at')->nullable()->default(null)->change(); - $table->dateTime('updated_at')->nullable()->default(null)->change(); - }); - - if (! app()->runningUnitTests()) { - DB::table('replies')->update(['replyable_type' => 'threads']); - } - - Schema::table('replies', function (Blueprint $table) { - $table->dropIndex('forum_replies_author_id_index'); - $table->dropIndex('forum_replies_thread_id_index'); - }); - Schema::table('replies', function (Blueprint $table) { - $table->renameColumn('thread_id', 'replyable_id'); - }); - Schema::table('replies', function (Blueprint $table) { - $table->dropSoftDeletes(); - }); - Schema::table('replies', function (Blueprint $table) { - $table->index('author_id'); - $table->index('replyable_id'); - $table->integer('author_id')->unsigned()->change(); - $table->foreign('author_id') - ->references('id')->on('users') - ->onDelete('CASCADE'); - }); - - // Clean up forum threads - Schema::rename('forum_threads', 'threads'); - Schema::table('threads', function (Blueprint $table) { - $table->unique('slug'); - $table->dateTime('created_at')->nullable()->default(null)->change(); - $table->dateTime('updated_at')->nullable()->default(null)->change(); - }); - Schema::table('threads', function (Blueprint $table) { - $table->dropIndex('forum_threads_author_id_index'); - $table->dropIndex('forum_threads_most_recent_reply_id_index'); - $table->dropIndex('forum_threads_solution_reply_id_index'); - }); - Schema::table('threads', function (Blueprint $table) { - $table->integer('solution_reply_id')->unsigned()->change(); - $table->foreign('solution_reply_id') - ->references('id')->on('replies') - ->onDelete('SET NULL'); - $table->integer('author_id')->unsigned()->change(); - $table->foreign('author_id') - ->references('id')->on('users') - ->onDelete('CASCADE'); - }); - Schema::table('threads', function (Blueprint $table) { - $table->dropColumn( - 'category_slug', - 'most_recent_reply_id', - 'reply_count', - 'is_question', - 'pinned', - 'laravel_version', - ); - }); - Schema::table('threads', function (Blueprint $table) { - $table->dropSoftDeletes(); - }); - Schema::table('threads', function (Blueprint $table) { - $table->index('author_id'); - $table->index('slug'); - $table->index('solution_reply_id'); - }); - - // Refactor tags - Schema::rename('tagged_items', 'taggables'); - - // Fix timestamps on taggables - if (! app()->runningUnitTests()) { - DB::statement('UPDATE taggables, threads SET taggables.created_at = threads.created_at, taggables.updated_at = threads.updated_at WHERE taggables.thread_id = threads.id'); - } - - // Make slugs lowercase - if (! app()->runningUnitTests()) { - DB::statement('UPDATE tags SET slug = LOWER(slug)'); - } - - Schema::table('taggables', function (Blueprint $table) { - $table->string('taggable_type')->default(''); - $table->dateTime('created_at')->nullable()->default(null)->change(); - $table->dateTime('updated_at')->nullable()->default(null)->change(); - }); - Schema::table('taggables', function (Blueprint $table) { - $table->dropIndex('tagged_items_thread_id_index'); - $table->dropIndex('tagged_items_tag_id_index'); - }); - Schema::table('taggables', function (Blueprint $table) { - $table->renameColumn('thread_id', 'taggable_id'); - }); - - if (! app()->runningUnitTests()) { - DB::table('taggables')->update(['taggable_type' => 'threads']); - } - - Schema::table('taggables', function (Blueprint $table) { - $table->index('taggable_id'); - $table->index('tag_id'); - $table->integer('tag_id')->unsigned()->change(); - $table->foreign('tag_id') - ->references('id')->on('tags') - ->onDelete('CASCADE'); - }); - Schema::table('tags', function (Blueprint $table) { - $table->dropColumn('forum', 'description'); - $table->unique('name'); - $table->unique('slug'); - $table->index('slug'); - }); - - // Remove unused tables - Schema::drop('comments'); - Schema::drop('comment_tag'); - Schema::drop('pastes'); - Schema::drop('role_user'); - Schema::drop('roles'); - } -}; diff --git a/database/migrations/2017_07_08_202506_add_user_bio_column.php b/database/migrations/2017_07_08_202506_add_user_bio_column.php deleted file mode 100644 index 081cd9521..000000000 --- a/database/migrations/2017_07_08_202506_add_user_bio_column.php +++ /dev/null @@ -1,14 +0,0 @@ -string('bio', 160)->default(''); - }); - } -}; diff --git a/database/migrations/2017_08_29_123258_add_banned_at_column.php b/database/migrations/2017_08_29_123258_add_banned_at_column.php deleted file mode 100644 index 8ef99334d..000000000 --- a/database/migrations/2017_08_29_123258_add_banned_at_column.php +++ /dev/null @@ -1,25 +0,0 @@ -dateTime('banned_at')->nullable(); - }); - - User::where('is_banned', 1)->each(function ($user) { - $user->banned_at = $user->updated_at; - $user->save(); - }); - - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('is_banned'); - }); - } -}; diff --git a/database/migrations/2017_10_18_193001_create_subscriptions_table.php b/database/migrations/2017_10_18_193001_create_subscriptions_table.php deleted file mode 100644 index 8e564ac65..000000000 --- a/database/migrations/2017_10_18_193001_create_subscriptions_table.php +++ /dev/null @@ -1,27 +0,0 @@ -uuid('uuid'); - $table->primary('uuid'); - $table->integer('user_id')->unsigned(); - $table->integer('subscriptionable_id'); - $table->string('subscriptionable_type')->default(''); - $table->timestamps(); - }); - - Schema::table('subscriptions', function (Blueprint $table) { - $table->index(['user_id', 'uuid']); - $table->foreign('user_id') - ->references('id')->on('users') - ->onDelete('CASCADE'); - }); - } -}; diff --git a/database/migrations/2017_12_03_111900_create_likes_table.php b/database/migrations/2017_12_03_111900_create_likes_table.php deleted file mode 100644 index 6464802e1..000000000 --- a/database/migrations/2017_12_03_111900_create_likes_table.php +++ /dev/null @@ -1,19 +0,0 @@ -increments('id'); - $table->unsignedInteger('user_id'); - $table->unsignedInteger('likeable_id'); - $table->string('likeable_type'); - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2018_01_27_111437_fix_subscription_indexes.php b/database/migrations/2018_01_27_111437_fix_subscription_indexes.php deleted file mode 100644 index 6535d9a9f..000000000 --- a/database/migrations/2018_01_27_111437_fix_subscription_indexes.php +++ /dev/null @@ -1,26 +0,0 @@ -dropForeign('subscriptions_user_id_foreign'); - } - $table->dropIndex(['user_id', 'uuid']); - $table->index('uuid'); - $table->index('user_id'); - $table->unique('uuid'); - $table->unique(['user_id', 'subscriptionable_id', 'subscriptionable_type'], 'subscriptions_are_unique'); - $table->foreign('user_id') - ->references('id')->on('users') - ->onDelete('CASCADE'); - }); - } -}; diff --git a/database/migrations/2018_02_20_215439_create_failed_jobs_table.php b/database/migrations/2018_02_20_215439_create_failed_jobs_table.php deleted file mode 100644 index 065ed9525..000000000 --- a/database/migrations/2018_02_20_215439_create_failed_jobs_table.php +++ /dev/null @@ -1,20 +0,0 @@ -bigIncrements('id'); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } -}; diff --git a/database/migrations/2018_05_22_191538_cleanup_tables.php b/database/migrations/2018_05_22_191538_cleanup_tables.php deleted file mode 100644 index 10a7132d2..000000000 --- a/database/migrations/2018_05_22_191538_cleanup_tables.php +++ /dev/null @@ -1,21 +0,0 @@ -dropColumn('ip'); - }); - Schema::table('replies', function (Blueprint $table) { - $table->dropColumn('ip'); - }); - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('ip'); - }); - } -}; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php deleted file mode 100644 index bbea0b460..000000000 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ /dev/null @@ -1,21 +0,0 @@ -bigIncrements('id'); - $table->morphs('tokenable'); - $table->string('name'); - $table->string('token', 64)->unique(); - $table->text('abilities')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2020_01_09_193921_create_notifications_table.php b/database/migrations/2020_01_09_193921_create_notifications_table.php deleted file mode 100644 index 1a13c8ec9..000000000 --- a/database/migrations/2020_01_09_193921_create_notifications_table.php +++ /dev/null @@ -1,20 +0,0 @@ -uuid('id')->primary(); - $table->string('type'); - $table->morphs('notifiable'); - $table->text('data'); - $table->timestamp('read_at')->nullable(); - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2020_04_07_181731_create_series_table.php b/database/migrations/2020_04_07_181731_create_series_table.php deleted file mode 100644 index cc280021f..000000000 --- a/database/migrations/2020_04_07_181731_create_series_table.php +++ /dev/null @@ -1,23 +0,0 @@ -increments('id'); - $table->unsignedInteger('author_id'); - $table->string('title'); - $table->string('slug')->unique(); - $table->timestamps(); - - $table->foreign('author_id') - ->references('id')->on('users') - ->onDelete('CASCADE'); - }); - } -}; diff --git a/database/migrations/2020_04_07_185543_create_community_articles_table.php b/database/migrations/2020_04_07_185543_create_community_articles_table.php deleted file mode 100644 index 98cddfb36..000000000 --- a/database/migrations/2020_04_07_185543_create_community_articles_table.php +++ /dev/null @@ -1,33 +0,0 @@ -increments('id'); - $table->unsignedInteger('series_id')->nullable(); - $table->unsignedInteger('author_id'); - $table->string('title'); - $table->text('body'); - $table->string('original_url')->nullable(); - $table->string('slug')->unique(); - $table->boolean('is_pinned')->default(false); - $table->timestamp('submitted_at')->nullable(); - $table->timestamp('approved_at')->nullable(); - $table->timestamps(); - - $table->foreign('series_id') - ->references('id')->on('series') - ->onDelete('SET NULL'); - - $table->foreign('author_id') - ->references('id')->on('users') - ->onDelete('CASCADE'); - }); - } -}; diff --git a/database/migrations/2020_07_16_185353_add_twitter_columns.php b/database/migrations/2020_07_16_185353_add_twitter_columns.php deleted file mode 100644 index d0c3a5f37..000000000 --- a/database/migrations/2020_07_16_185353_add_twitter_columns.php +++ /dev/null @@ -1,20 +0,0 @@ -unsignedBigInteger('tweet_id')->after('is_pinned')->nullable(); - $table->dateTime('shared_at')->after('approved_at')->nullable(); - }); - - Schema::table('users', function (Blueprint $table) { - $table->string('twitter')->after('email')->nullable(); - }); - } -}; diff --git a/database/migrations/2020_10_01_093001_add_email_verified_at_column_to_users.php b/database/migrations/2020_10_01_093001_add_email_verified_at_column_to_users.php deleted file mode 100644 index ef16d74ca..000000000 --- a/database/migrations/2020_10_01_093001_add_email_verified_at_column_to_users.php +++ /dev/null @@ -1,18 +0,0 @@ -timestamp('email_verified_at')->nullable(); - }); - Schema::table('users', function (Blueprint $table) { - $table->dropColumn(['confirmed', 'confirmation_code']); - }); - } -}; diff --git a/database/migrations/2020_11_03_205735_add_uuid_to_failed_jobs_table.php b/database/migrations/2020_11_03_205735_add_uuid_to_failed_jobs_table.php deleted file mode 100644 index 39b338e72..000000000 --- a/database/migrations/2020_11_03_205735_add_uuid_to_failed_jobs_table.php +++ /dev/null @@ -1,15 +0,0 @@ -string('uuid')->after('id')->nullable()->unique(); - }); - } -}; diff --git a/database/migrations/2020_11_22_194212_create_schedule_monitor_tables.php b/database/migrations/2020_11_22_194212_create_schedule_monitor_tables.php deleted file mode 100644 index 9a19a1110..000000000 --- a/database/migrations/2020_11_22_194212_create_schedule_monitor_tables.php +++ /dev/null @@ -1,49 +0,0 @@ -bigIncrements('id'); - - $table->string('name'); - $table->string('type')->nullable(); - $table->string('cron_expression'); - $table->string('timezone')->nullable(); - $table->string('ping_url')->nullable(); - - $table->dateTime('last_started_at')->nullable(); - $table->dateTime('last_finished_at')->nullable(); - $table->dateTime('last_failed_at')->nullable(); - $table->dateTime('last_skipped_at')->nullable(); - - $table->dateTime('registered_on_oh_dear_at')->nullable(); - $table->dateTime('last_pinged_at')->nullable(); - $table->integer('grace_time_in_minutes'); - - $table->timestamps(); - }); - - Schema::create('monitored_scheduled_task_log_items', function (Blueprint $table) { - $table->bigIncrements('id'); - - $table->unsignedBigInteger('monitored_scheduled_task_id'); - $table - ->foreign('monitored_scheduled_task_id', 'fk_scheduled_task_id') - ->references('id') - ->on('monitored_scheduled_tasks') - ->cascadeOnDelete(); - - $table->string('type'); - - $table->json('meta')->nullable(); - - $table->timestamps(); - }); - } -}; diff --git a/database/migrations/2021_03_10_161050_add_index_to_replyable_type.php b/database/migrations/2021_03_10_161050_add_index_to_replyable_type.php deleted file mode 100644 index 1f2f9a847..000000000 --- a/database/migrations/2021_03_10_161050_add_index_to_replyable_type.php +++ /dev/null @@ -1,15 +0,0 @@ -index('replyable_type'); - }); - } -}; diff --git a/database/migrations/2021_07_05_205125_remove_series.php b/database/migrations/2021_07_05_205125_remove_series.php deleted file mode 100644 index d88b35f70..000000000 --- a/database/migrations/2021_07_05_205125_remove_series.php +++ /dev/null @@ -1,24 +0,0 @@ -dropForeign(['series_id']); - }); - } - - Schema::table('articles', function (Blueprint $table) { - $table->dropColumn('series_id'); - }); - - Schema::dropIfExists('series'); - } -}; diff --git a/database/migrations/2021_07_23_110409_update_articles_table_add_hero_image_field.php b/database/migrations/2021_07_23_110409_update_articles_table_add_hero_image_field.php deleted file mode 100644 index f36dcae7f..000000000 --- a/database/migrations/2021_07_23_110409_update_articles_table_add_hero_image_field.php +++ /dev/null @@ -1,15 +0,0 @@ -string('hero_image')->after('slug')->nullable(); - }); - } -}; diff --git a/database/migrations/2021_07_31_183222_unique_github_ids.php b/database/migrations/2021_07_31_183222_unique_github_ids.php deleted file mode 100644 index af8273c7b..000000000 --- a/database/migrations/2021_07_31_183222_unique_github_ids.php +++ /dev/null @@ -1,28 +0,0 @@ -string('github_id')->nullable()->change(); - }); - Schema::table('users', function (Blueprint $table) { - $table->string('github_username')->nullable()->change(); - }); - - if (! app()->runningUnitTests()) { - DB::table('users')->where('github_id', '')->update(['github_id' => null]); - DB::table('users')->where('github_username', '')->update(['github_username' => null]); - } - - Schema::table('users', function (Blueprint $table) { - $table->unique('github_id'); - }); - } -}; diff --git a/database/migrations/2021_09_12_220452_add_resolved_by_to_threads_table.php b/database/migrations/2021_09_12_220452_add_resolved_by_to_threads_table.php deleted file mode 100644 index c55c8fbfa..000000000 --- a/database/migrations/2021_09_12_220452_add_resolved_by_to_threads_table.php +++ /dev/null @@ -1,16 +0,0 @@ -integer('resolved_by')->unsigned()->nullable()->default(null); - $table->foreign('resolved_by')->references('id')->on('users')->onDelete('SET NULL'); - }); - } -}; diff --git a/database/migrations/2021_10_12_170118_add_locked_by_column_to_threads_table.php b/database/migrations/2021_10_12_170118_add_locked_by_column_to_threads_table.php deleted file mode 100644 index 059a96737..000000000 --- a/database/migrations/2021_10_12_170118_add_locked_by_column_to_threads_table.php +++ /dev/null @@ -1,21 +0,0 @@ -timestamp('locked_at')->nullable()->default(null); - $table->integer('locked_by')->unsigned()->nullable()->default(null); - - $table->foreign('locked_by') - ->references('id') - ->on('users') - ->onDelete('SET NULL'); - }); - } -}; diff --git a/database/migrations/2021_10_31_143501_add_declined_at_column_to_articles_table.php b/database/migrations/2021_10_31_143501_add_declined_at_column_to_articles_table.php deleted file mode 100644 index fd9b94d0a..000000000 --- a/database/migrations/2021_10_31_143501_add_declined_at_column_to_articles_table.php +++ /dev/null @@ -1,15 +0,0 @@ -timestamp('declined_at')->nullable()->after('shared_at'); - }); - } -}; diff --git a/database/migrations/2021_11_15_213258_add_updated_by_to_threads_and_replies_table.php b/database/migrations/2021_11_15_213258_add_updated_by_to_threads_and_replies_table.php deleted file mode 100644 index beb4257e7..000000000 --- a/database/migrations/2021_11_15_213258_add_updated_by_to_threads_and_replies_table.php +++ /dev/null @@ -1,19 +0,0 @@ -foreignId('updated_by')->nullable(); - }); - - Schema::table('replies', function (Blueprint $table) { - $table->foreignId('updated_by')->nullable(); - }); - } -}; diff --git a/database/migrations/2021_11_22_093555_migrate_thread_feed_to_timestamp.php b/database/migrations/2021_11_22_093555_migrate_thread_feed_to_timestamp.php deleted file mode 100644 index 7601de076..000000000 --- a/database/migrations/2021_11_22_093555_migrate_thread_feed_to_timestamp.php +++ /dev/null @@ -1,33 +0,0 @@ -timestamp('last_activity_at') - ->after('slug') - ->nullable() - ->index(); - }); - - // Iterate over all the threads and update the `last_active_at` timestamp to - // the latest reply `created_at` or thread `created_at` if no reply exists. - if (! app()->runningUnitTests()) { - Thread::with(['repliesRelation' => function ($query) { - $query->latest(); - }]) - ->lazy() - ->each(function ($thread) { - $thread->update([ - 'last_activity_at' => ($reply = $thread->replies()->first()) ? $reply->created_at : $thread->created_at, - ]); - }); - } - } -}; diff --git a/database/migrations/2022_04_06_152416_add_uuids_to_tables.php b/database/migrations/2022_04_06_152416_add_uuids_to_tables.php deleted file mode 100644 index f40966a93..000000000 --- a/database/migrations/2022_04_06_152416_add_uuids_to_tables.php +++ /dev/null @@ -1,28 +0,0 @@ -uuid($columnName) - ->after('id') - ->index("{$tableName}_{$columnName}_index") - ->nullable(); - }); - } - } -}; diff --git a/database/migrations/2022_05_10_180922_make_uuids_non_nullable.php b/database/migrations/2022_05_10_180922_make_uuids_non_nullable.php deleted file mode 100644 index 3291fb6c9..000000000 --- a/database/migrations/2022_05_10_180922_make_uuids_non_nullable.php +++ /dev/null @@ -1,28 +0,0 @@ -dropIndex($tableName.'_uuid_index'); - - $table->uuid('uuid') - ->nullable(false) - ->unique() - ->change(); - }); - } - } -}; diff --git a/database/migrations/2022_06_14_072001_create_blocked_users_table.php b/database/migrations/2022_06_14_072001_create_blocked_users_table.php deleted file mode 100644 index 6a56af9bd..000000000 --- a/database/migrations/2022_06_14_072001_create_blocked_users_table.php +++ /dev/null @@ -1,19 +0,0 @@ -id(); - $table->unsignedInteger('user_id'); - $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete(); - $table->unsignedInteger('blocked_user_id'); - $table->foreign('blocked_user_id')->references('id')->on('users')->cascadeOnDelete(); - }); - } -}; diff --git a/database/migrations/2022_07_08_145847_create_spam_reports_table.php b/database/migrations/2022_07_08_145847_create_spam_reports_table.php deleted file mode 100644 index 07389e21d..000000000 --- a/database/migrations/2022_07_08_145847_create_spam_reports_table.php +++ /dev/null @@ -1,21 +0,0 @@ -id(); - $table->unsignedInteger('reporter_id'); - $table->foreign('reporter_id')->references('id')->on('users')->cascadeOnDelete(); - $table->nullableMorphs('spam'); - $table->timestamps(); - - $table->unique(['reporter_id', 'spam_id', 'spam_type']); - }); - } -}; diff --git a/database/migrations/2022_07_09_191433_update_articles_table_add_view_count.php b/database/migrations/2022_07_09_191433_update_articles_table_add_view_count.php deleted file mode 100644 index 72f1c6fbd..000000000 --- a/database/migrations/2022_07_09_191433_update_articles_table_add_view_count.php +++ /dev/null @@ -1,15 +0,0 @@ -bigInteger('view_count')->nullable()->after('is_pinned'); - }); - } -}; diff --git a/database/migrations/2022_07_29_135113_add__website_to_users_table.php b/database/migrations/2022_07_29_135113_add__website_to_users_table.php deleted file mode 100644 index 6cb2ef75e..000000000 --- a/database/migrations/2022_07_29_135113_add__website_to_users_table.php +++ /dev/null @@ -1,15 +0,0 @@ -string('website')->nullable()->after('twitter'); - }); - } -}; diff --git a/database/migrations/2022_08_21_215918_add_soft_delete_columns_to_replies_table.php b/database/migrations/2022_08_21_215918_add_soft_delete_columns_to_replies_table.php deleted file mode 100644 index 66f63b431..000000000 --- a/database/migrations/2022_08_21_215918_add_soft_delete_columns_to_replies_table.php +++ /dev/null @@ -1,18 +0,0 @@ -softDeletes(); - $table->integer('deleted_by')->unsigned()->nullable(); - $table->foreign('deleted_by')->references('id')->on('users')->onDelete('CASCADE'); - $table->text('deleted_reason')->nullable(); - }); - } -}; diff --git a/database/migrations/2022_10_15_150405_add_banned_reason_to_users_table.php b/database/migrations/2022_10_15_150405_add_banned_reason_to_users_table.php deleted file mode 100644 index 4c89d89d8..000000000 --- a/database/migrations/2022_10_15_150405_add_banned_reason_to_users_table.php +++ /dev/null @@ -1,15 +0,0 @@ -text('banned_reason')->after('banned_at')->nullable(); - }); - } -}; diff --git a/database/migrations/2022_12_11_145605_add_expires_at_column_sanctum.php b/database/migrations/2022_12_11_145605_add_expires_at_column_sanctum.php deleted file mode 100644 index 595d3c342..000000000 --- a/database/migrations/2022_12_11_145605_add_expires_at_column_sanctum.php +++ /dev/null @@ -1,15 +0,0 @@ -timestamp('expires_at')->nullable()->after('last_used_at'); - }); - } -}; diff --git a/database/migrations/2023_01_31_190506_add_allowed_notifications_column_to_users_table.php b/database/migrations/2023_01_31_190506_add_allowed_notifications_column_to_users_table.php deleted file mode 100755 index 1e5af27f4..000000000 --- a/database/migrations/2023_01_31_190506_add_allowed_notifications_column_to_users_table.php +++ /dev/null @@ -1,15 +0,0 @@ -json('allowed_notifications')->nullable(); - }); - } -}; diff --git a/database/schema/mysql-schema.dump b/database/schema/mysql-schema.sql similarity index 64% rename from database/schema/mysql-schema.dump rename to database/schema/mysql-schema.sql index 07dbf82f6..c9c815c7d 100644 --- a/database/schema/mysql-schema.dump +++ b/database/schema/mysql-schema.sql @@ -192,6 +192,21 @@ CREATE TABLE `replies` ( CONSTRAINT `replies_deleted_by_foreign` FOREIGN KEY (`deleted_by`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `sessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sessions` ( + `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `user_id` bigint unsigned DEFAULT NULL, + `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, + `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `last_activity` int NOT NULL, + PRIMARY KEY (`id`), + KEY `sessions_user_id_index` (`user_id`), + KEY `sessions_last_activity_index` (`last_activity`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `spam_reports`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; @@ -309,6 +324,7 @@ CREATE TABLE `users` ( `banned_at` datetime DEFAULT NULL, `banned_reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `email_verified_at` timestamp NULL DEFAULT NULL, + `allowed_notifications` json DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `users_email_unique` (`email`), UNIQUE KEY `users_username_unique` (`username`), @@ -324,80 +340,81 @@ CREATE TABLE `users` ( /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -INSERT INTO `migrations` VALUES (1,'2013_09_17_113019_create_users_table',1); -INSERT INTO `migrations` VALUES (2,'2013_09_17_121043_create_session_table',1); -INSERT INTO `migrations` VALUES (3,'2013_09_17_160916_create_roles_table',1); -INSERT INTO `migrations` VALUES (4,'2013_09_17_164244_create_role_user_table',1); -INSERT INTO `migrations` VALUES (5,'2013_09_17_170055_add_is_banned_field_to_users',1); -INSERT INTO `migrations` VALUES (6,'2013_09_18_115103_create_pastes_table',1); -INSERT INTO `migrations` VALUES (7,'2013_09_19_101701_create_comments_table',1); -INSERT INTO `migrations` VALUES (8,'2013_09_19_104855_create_activity_table',1); -INSERT INTO `migrations` VALUES (9,'2013_09_22_130010_add_image_url_field_to_users',1); -INSERT INTO `migrations` VALUES (10,'2013_09_22_130711_add_type_field_to_comments',1); -INSERT INTO `migrations` VALUES (11,'2013_09_22_163103_create_articles_table',1); -INSERT INTO `migrations` VALUES (12,'2013_09_22_163347_create_tags_table',1); -INSERT INTO `migrations` VALUES (13,'2013_09_22_163816_create_article_tag_table',1); -INSERT INTO `migrations` VALUES (14,'2013_09_23_111349_add_description_field_to_tags',1); -INSERT INTO `migrations` VALUES (15,'2013_09_23_121454_add_published_at_field_to_articles',1); -INSERT INTO `migrations` VALUES (16,'2013_09_23_160937_add_comment_counter_cache_to_articles',1); -INSERT INTO `migrations` VALUES (17,'2013_09_24_145833_create_contributors_table',1); -INSERT INTO `migrations` VALUES (18,'2013_09_27_014229_add_soft_delete_to_articles',1); -INSERT INTO `migrations` VALUES (19,'2013_09_27_015000_add_soft_delete_to_users',1); -INSERT INTO `migrations` VALUES (20,'2013_09_27_015109_add_soft_delete_to_comments',1); -INSERT INTO `migrations` VALUES (21,'2013_09_27_021650_add_soft_delete_to_pastes',1); -INSERT INTO `migrations` VALUES (22,'2013_10_24_131412_create_comment_tag_table',1); -INSERT INTO `migrations` VALUES (23,'2013_10_30_104107_add_tag_section_fields',1); -INSERT INTO `migrations` VALUES (24,'2013_12_08_161643_comments_add_laravel_version',1); -INSERT INTO `migrations` VALUES (25,'2013_12_14_151829_articles_add_laravel_verion_field',1); -INSERT INTO `migrations` VALUES (26,'2014_01_27_135001_forum_threads_create_table',1); -INSERT INTO `migrations` VALUES (27,'2014_01_27_141317_forum_replies_create_table',1); -INSERT INTO `migrations` VALUES (28,'2014_01_31_140118_tagged_items_create_table',1); -INSERT INTO `migrations` VALUES (29,'2014_02_01_022633_pastes_add_hash_field',1); -INSERT INTO `migrations` VALUES (30,'2014_02_07_125035_forum_threads_add_question_fields',1); -INSERT INTO `migrations` VALUES (31,'2014_02_07_144708_forum_threads_add_solution_reply_id',1); -INSERT INTO `migrations` VALUES (32,'2014_02_07_155103_forum_thread_visitation_timestamps_create_table',1); -INSERT INTO `migrations` VALUES (33,'2014_05_30_115728_users_add_remember_me_token',1); -INSERT INTO `migrations` VALUES (34,'2014_09_10_112330_add_ip_to_pastes_table',1); -INSERT INTO `migrations` VALUES (35,'2014_11_09_185116_pinned_threads',1); -INSERT INTO `migrations` VALUES (36,'2014_12_07_143131_add_user_confirmation_columns',1); -INSERT INTO `migrations` VALUES (37,'2014_12_13_164931_create_ip_columns',1); -INSERT INTO `migrations` VALUES (38,'2014_12_13_210738_add_spam_counter_to_users_table',1); -INSERT INTO `migrations` VALUES (39,'2014_12_21_212154_remove_contributors_table',1); -INSERT INTO `migrations` VALUES (40,'2015_04_12_171949_add_indexes',1); -INSERT INTO `migrations` VALUES (41,'2015_04_12_172949_add_indexes_to_tagged_items',1); -INSERT INTO `migrations` VALUES (42,'2015_07_26_160128_l5_cleanup',1); -INSERT INTO `migrations` VALUES (43,'2015_08_26_191523_drop_unused_tables',1); -INSERT INTO `migrations` VALUES (44,'2017_04_08_104959_next_version',1); -INSERT INTO `migrations` VALUES (45,'2017_07_08_202506_add_user_bio_column',1); -INSERT INTO `migrations` VALUES (46,'2017_08_29_123258_add_banned_at_column',1); -INSERT INTO `migrations` VALUES (47,'2017_10_18_193001_create_subscriptions_table',1); -INSERT INTO `migrations` VALUES (48,'2017_12_03_111900_create_likes_table',1); -INSERT INTO `migrations` VALUES (49,'2018_01_27_111437_fix_subscription_indexes',1); -INSERT INTO `migrations` VALUES (50,'2018_02_20_215439_create_failed_jobs_table',1); -INSERT INTO `migrations` VALUES (51,'2018_05_22_191538_cleanup_tables',1); -INSERT INTO `migrations` VALUES (52,'2020_01_09_193921_create_notifications_table',1); -INSERT INTO `migrations` VALUES (53,'2020_04_07_181731_create_series_table',1); -INSERT INTO `migrations` VALUES (54,'2020_04_07_185543_create_community_articles_table',1); -INSERT INTO `migrations` VALUES (55,'2020_07_16_185353_add_twitter_columns',1); -INSERT INTO `migrations` VALUES (56,'2020_10_01_093001_add_email_verified_at_column_to_users',1); -INSERT INTO `migrations` VALUES (57,'2020_11_03_205735_add_uuid_to_failed_jobs_table',1); -INSERT INTO `migrations` VALUES (58,'2020_11_22_194212_create_schedule_monitor_tables',1); -INSERT INTO `migrations` VALUES (59,'2021_03_10_161050_add_index_to_replyable_type',1); -INSERT INTO `migrations` VALUES (60,'2021_07_05_205125_remove_series',1); -INSERT INTO `migrations` VALUES (61,'2021_07_23_110409_update_articles_table_add_hero_image_field',1); -INSERT INTO `migrations` VALUES (62,'2021_07_31_183222_unique_github_ids',1); -INSERT INTO `migrations` VALUES (63,'2021_09_12_220452_add_resolved_by_to_threads_table',2); -INSERT INTO `migrations` VALUES (64,'2021_10_31_143501_add_declined_at_column_to_articles_table',3); -INSERT INTO `migrations` VALUES (65,'2021_11_15_213258_add_updated_by_to_threads_and_replies_table',4); -INSERT INTO `migrations` VALUES (66,'2021_11_22_093555_migrate_thread_feed_to_timestamp',4); -INSERT INTO `migrations` VALUES (67,'2021_10_12_170118_add_locked_by_column_to_threads_table',5); -INSERT INTO `migrations` VALUES (68,'2019_12_14_000001_create_personal_access_tokens_table',6); -INSERT INTO `migrations` VALUES (69,'2022_04_06_152416_add_uuids_to_tables',7); -INSERT INTO `migrations` VALUES (70,'2022_05_10_180922_make_uuids_non_nullable',7); -INSERT INTO `migrations` VALUES (71,'2022_06_14_072001_create_blocked_users_table',8); -INSERT INTO `migrations` VALUES (72,'2022_07_09_191433_update_articles_table_add_view_count',9); -INSERT INTO `migrations` VALUES (73,'2022_07_29_135113_add__website_to_users_table',9); -INSERT INTO `migrations` VALUES (74,'2022_08_21_215918_add_soft_delete_columns_to_replies_table',10); -INSERT INTO `migrations` VALUES (75,'2022_07_08_145847_create_spam_reports_table',11); -INSERT INTO `migrations` VALUES (76,'2022_10_15_150405_add_banned_reason_to_users_table',11); -INSERT INTO `migrations` VALUES (77,'2022_12_11_145605_add_expires_at_column_sanctum',12); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'2013_09_17_113019_create_users_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (2,'2013_09_17_121043_create_session_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (3,'2013_09_17_160916_create_roles_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (4,'2013_09_17_164244_create_role_user_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (5,'2013_09_17_170055_add_is_banned_field_to_users',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (6,'2013_09_18_115103_create_pastes_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (7,'2013_09_19_101701_create_comments_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (8,'2013_09_19_104855_create_activity_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (9,'2013_09_22_130010_add_image_url_field_to_users',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (10,'2013_09_22_130711_add_type_field_to_comments',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (11,'2013_09_22_163103_create_articles_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (12,'2013_09_22_163347_create_tags_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (13,'2013_09_22_163816_create_article_tag_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (14,'2013_09_23_111349_add_description_field_to_tags',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (15,'2013_09_23_121454_add_published_at_field_to_articles',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (16,'2013_09_23_160937_add_comment_counter_cache_to_articles',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (17,'2013_09_24_145833_create_contributors_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (18,'2013_09_27_014229_add_soft_delete_to_articles',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (19,'2013_09_27_015000_add_soft_delete_to_users',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (20,'2013_09_27_015109_add_soft_delete_to_comments',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (21,'2013_09_27_021650_add_soft_delete_to_pastes',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2013_10_24_131412_create_comment_tag_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2013_10_30_104107_add_tag_section_fields',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (24,'2013_12_08_161643_comments_add_laravel_version',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2013_12_14_151829_articles_add_laravel_verion_field',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (26,'2014_01_27_135001_forum_threads_create_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (27,'2014_01_27_141317_forum_replies_create_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (28,'2014_01_31_140118_tagged_items_create_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (29,'2014_02_01_022633_pastes_add_hash_field',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (30,'2014_02_07_125035_forum_threads_add_question_fields',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (31,'2014_02_07_144708_forum_threads_add_solution_reply_id',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (32,'2014_02_07_155103_forum_thread_visitation_timestamps_create_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (33,'2014_05_30_115728_users_add_remember_me_token',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (34,'2014_09_10_112330_add_ip_to_pastes_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (35,'2014_11_09_185116_pinned_threads',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (36,'2014_12_07_143131_add_user_confirmation_columns',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (37,'2014_12_13_164931_create_ip_columns',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (38,'2014_12_13_210738_add_spam_counter_to_users_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (39,'2014_12_21_212154_remove_contributors_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (40,'2015_04_12_171949_add_indexes',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (41,'2015_04_12_172949_add_indexes_to_tagged_items',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (42,'2015_07_26_160128_l5_cleanup',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (43,'2015_08_26_191523_drop_unused_tables',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (44,'2017_04_08_104959_next_version',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (45,'2017_07_08_202506_add_user_bio_column',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (46,'2017_08_29_123258_add_banned_at_column',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (47,'2017_10_18_193001_create_subscriptions_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (48,'2017_12_03_111900_create_likes_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (49,'2018_01_27_111437_fix_subscription_indexes',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (50,'2018_02_20_215439_create_failed_jobs_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (51,'2018_05_22_191538_cleanup_tables',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (52,'2020_01_09_193921_create_notifications_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (53,'2020_04_07_181731_create_series_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (54,'2020_04_07_185543_create_community_articles_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (55,'2020_07_16_185353_add_twitter_columns',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (56,'2020_10_01_093001_add_email_verified_at_column_to_users',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (57,'2020_11_03_205735_add_uuid_to_failed_jobs_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (58,'2020_11_22_194212_create_schedule_monitor_tables',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (59,'2021_03_10_161050_add_index_to_replyable_type',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (60,'2021_07_05_205125_remove_series',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (61,'2021_07_23_110409_update_articles_table_add_hero_image_field',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (62,'2021_07_31_183222_unique_github_ids',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (63,'2021_09_12_220452_add_resolved_by_to_threads_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (64,'2021_10_31_143501_add_declined_at_column_to_articles_table',3); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (65,'2021_11_15_213258_add_updated_by_to_threads_and_replies_table',4); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (66,'2021_11_22_093555_migrate_thread_feed_to_timestamp',4); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (67,'2021_10_12_170118_add_locked_by_column_to_threads_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (68,'2019_12_14_000001_create_personal_access_tokens_table',6); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (69,'2022_04_06_152416_add_uuids_to_tables',7); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (70,'2022_05_10_180922_make_uuids_non_nullable',7); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (71,'2022_06_14_072001_create_blocked_users_table',8); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (72,'2022_07_09_191433_update_articles_table_add_view_count',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (73,'2022_07_29_135113_add__website_to_users_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (74,'2022_08_21_215918_add_soft_delete_columns_to_replies_table',10); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (75,'2022_07_08_145847_create_spam_reports_table',11); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (76,'2022_10_15_150405_add_banned_reason_to_users_table',11); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (77,'2022_12_11_145605_add_expires_at_column_sanctum',12); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (78,'2023_01_31_190506_add_allowed_notifications_column_to_users_table',13); diff --git a/lang/en/validation.php b/lang/en/validation.php deleted file mode 100644 index 70407c9d9..000000000 --- a/lang/en/validation.php +++ /dev/null @@ -1,184 +0,0 @@ - 'The :attribute must be accepted.', - 'accepted_if' => 'The :attribute must be accepted when :other is :value.', - '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 must only contain letters.', - 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', - 'alpha_num' => 'The :attribute must only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', - 'between' => [ - 'array' => 'The :attribute must have between :min and :max items.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'numeric' => 'The :attribute must be between :min and :max.', - 'string' => 'The :attribute must be between :min and :max characters.', - ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'current_password' => 'The password is incorrect.', - 'date' => 'The :attribute is not a valid date.', - 'date_equals' => 'The :attribute must be a date equal to :date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'decimal' => 'The :attribute must have :decimal decimal places.', - 'declined' => 'The :attribute must be declined.', - 'declined_if' => 'The :attribute must be declined when :other is :value.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.', - 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', - 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute 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.', - 'filled' => 'The :attribute field must have a value.', - 'gt' => [ - 'array' => 'The :attribute must have more than :value items.', - 'file' => 'The :attribute must be greater than :value kilobytes.', - 'numeric' => 'The :attribute must be greater than :value.', - 'string' => 'The :attribute must be greater than :value characters.', - ], - 'gte' => [ - 'array' => 'The :attribute must have :value items or more.', - 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', - 'numeric' => 'The :attribute must be greater than or equal to :value.', - 'string' => 'The :attribute must be greater than or equal to :value characters.', - ], - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'lowercase' => 'The :attribute must be lowercase.', - 'lt' => [ - 'array' => 'The :attribute must have less than :value items.', - 'file' => 'The :attribute must be less than :value kilobytes.', - 'numeric' => 'The :attribute must be less than :value.', - 'string' => 'The :attribute must be less than :value characters.', - ], - 'lte' => [ - 'array' => 'The :attribute must not have more than :value items.', - 'file' => 'The :attribute must be less than or equal to :value kilobytes.', - 'numeric' => 'The :attribute must be less than or equal to :value.', - 'string' => 'The :attribute must be less than or equal to :value characters.', - ], - 'mac_address' => 'The :attribute must be a valid MAC address.', - 'max' => [ - 'array' => 'The :attribute must not have more than :max items.', - 'file' => 'The :attribute must not be greater than :max kilobytes.', - 'numeric' => 'The :attribute must not be greater than :max.', - 'string' => 'The :attribute must not be greater than :max characters.', - ], - 'max_digits' => 'The :attribute must not have more than :max digits.', - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ - 'array' => 'The :attribute must have at least :min items.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'numeric' => 'The :attribute must be at least :min.', - 'string' => 'The :attribute must be at least :min characters.', - ], - 'min_digits' => 'The :attribute 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 must be a multiple of :value.', - 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute format is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'password' => [ - 'letters' => 'The :attribute must contain at least one letter.', - 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', - 'numbers' => 'The :attribute must contain at least one number.', - 'symbols' => 'The :attribute 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.', - '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 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 are present.', - 'required_without' => 'The :attribute field is required when :values is not present.', - 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ - 'array' => 'The :attribute must contain :size items.', - 'file' => 'The :attribute must be :size kilobytes.', - 'numeric' => 'The :attribute must be :size.', - 'string' => 'The :attribute must be :size characters.', - ], - 'starts_with' => 'The :attribute must start with one of the following: :values.', - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid timezone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'uppercase' => 'The :attribute must be uppercase.', - 'url' => 'The :attribute must be a valid URL.', - 'ulid' => 'The :attribute must be a valid ULID.', - 'uuid' => 'The :attribute must be a valid UUID.', - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => [ - 'attribute-name' => [ - 'rule-name' => 'custom-message', - ], - ], - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | 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. - | - */ - - 'attributes' => [], - -]; diff --git a/phpunit.xml b/phpunit.xml index 90b3cf0c6..8502c633e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -20,9 +20,10 @@ - - - + + + + diff --git a/public/index.php b/public/index.php index 75dd8877f..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()); diff --git a/routes/api.php b/routes/api.php index 856681dd0..bd952d2a0 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,7 +1,7 @@ middleware('throttle:api')->group(function () { Route::post('/', [ArticlesController::class, 'store'])->name('api.articles.store'); diff --git a/routes/channels.php b/routes/channels.php deleted file mode 100644 index eefef2459..000000000 --- a/routes/channels.php +++ /dev/null @@ -1,7 +0,0 @@ -id === (int) $id; -}); diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 000000000..4602d7a95 --- /dev/null +++ b/routes/console.php @@ -0,0 +1,17 @@ +comment(Inspiring::quote()); +})->purpose('Display an inspiring quote')->hourly(); + +Schedule::command('schedule-monitor:sync')->dailyAt('04:56'); +Schedule::command('model:prune', ['--model' => MonitoredScheduledTaskLogItem::class])->daily(); +Schedule::command('horizon:snapshot')->everyFiveMinutes(); +Schedule::command('lio:post-article-to-twitter')->twiceDaily(14, 18); +Schedule::command('lio:generate-sitemap')->daily()->graceTimeInMinutes(25); +Schedule::command('lio:update-article-view-counts')->twiceDaily(); diff --git a/routes/web.php b/routes/web.php index d5689cd96..d5146396c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -27,7 +27,7 @@ use App\Http\Controllers\SocialImageController; use App\Http\Controllers\SubscriptionController; use App\Http\Controllers\UnblockUserController; -use App\Http\Middleware\Authenticate; +use Illuminate\Auth\Middleware\Authenticate; use Illuminate\Support\Facades\Route; Route::feeds(); 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/Feature/AuthTest.php b/tests/Feature/AuthTest.php index 0273b98bb..4313fe2b8 100644 --- a/tests/Feature/AuthTest.php +++ b/tests/Feature/AuthTest.php @@ -43,6 +43,7 @@ 'email' => 'The email field is required.', 'username' => 'The username field is required.', 'rules' => 'The rules must be accepted.', + 'terms' => 'The terms must be accepted.', ]); }); diff --git a/tests/Integration/Rules/PasscheckRuleTest.php b/tests/Integration/Rules/PasscheckRuleTest.php index 88e19b89a..318276242 100644 --- a/tests/Integration/Rules/PasscheckRuleTest.php +++ b/tests/Integration/Rules/PasscheckRuleTest.php @@ -11,16 +11,12 @@ $this->login(['password' => bcrypt('foo')]); $rule = new PasscheckRule(); - $result = $rule->passes('password', 'foo'); - - expect($result)->toBeTrue(); -}); + $rule->validate('password', 'foo', fn () => throw new Exception()); +})->throwsNoExceptions(); it('fails when the password is incorrect', function () { $this->login(); $rule = new PasscheckRule(); - $result = $rule->passes('password', 'foo'); - - expect($result)->toBeFalse(); -}); + $rule->validate('password', 'foo', fn () => throw new Exception()); +})->throws(Exception::class); diff --git a/tests/TestCase.php b/tests/TestCase.php index 1ec3bb513..f14f9bd61 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -6,7 +6,6 @@ class TestCase extends IlluminateTestCase { - use CreatesApplication; use CreatesUsers; use HttpAssertions; diff --git a/tests/Unit/Rules/DoesNotContainUrlRuleTest.php b/tests/Unit/Rules/DoesNotContainUrlRuleTest.php index 6280a6163..e67503e31 100644 --- a/tests/Unit/Rules/DoesNotContainUrlRuleTest.php +++ b/tests/Unit/Rules/DoesNotContainUrlRuleTest.php @@ -3,19 +3,13 @@ use App\Rules\DoesNotContainUrlRule; it('detects a url in a string', function () { - $this->assertFalse( - (new DoesNotContainUrlRule())->passes('foo', 'This is a string http://example.com with an url in it.'), - ); -}); + (new DoesNotContainUrlRule())->validate('foo', 'This is a string http://example.com with an url in it.', fn () => throw new Exception()); +})->throws(Exception::class); it('passes when no url is present', function () { - $this->assertTrue( - (new DoesNotContainUrlRule())->passes('foo', 'This is a string without an url in it.'), - ); -}); + (new DoesNotContainUrlRule())->validate('foo', 'This is a string without an url in it.', fn () => throw new Exception()); +})->throwsNoExceptions(); it('passes when extra spaces are present', function () { - $this->assertTrue( - (new DoesNotContainUrlRule())->passes('foo', 'This is a string with extra spaces.'), - ); -}); + (new DoesNotContainUrlRule())->validate('foo', 'This is a string with extra spaces.', fn () => throw new Exception()); +})->throwsNoExceptions(); diff --git a/tests/Unit/Rules/HttpImageRuleTest.php b/tests/Unit/Rules/HttpImageRuleTest.php index ed20a0b66..ad0c4cc2d 100644 --- a/tests/Unit/Rules/HttpImageRuleTest.php +++ b/tests/Unit/Rules/HttpImageRuleTest.php @@ -3,13 +3,9 @@ use App\Rules\HttpImageRule; it('passes when no http links are detected', function () { - $this->assertTrue( - (new HttpImageRule())->passes('body', 'some text ![](https://link.com)'), - ); -}); + (new HttpImageRule())->validate('body', 'some text ![](https://link.com)', fn () => throw new Exception()); +})->throwsNoExceptions(); it('fails when http links are detected', function () { - $this->assertFalse( - (new HttpImageRule())->passes('body', 'some text ![](http://link.com)'), - ); -}); + (new HttpImageRule())->validate('body', 'some text ![](http://link.com)', fn () => throw new Exception()); +})->throws(Exception::class); diff --git a/tests/Unit/Rules/InvalidMentionRuleTest.php b/tests/Unit/Rules/InvalidMentionRuleTest.php index bc5c47d14..8994a5c5d 100644 --- a/tests/Unit/Rules/InvalidMentionRuleTest.php +++ b/tests/Unit/Rules/InvalidMentionRuleTest.php @@ -3,7 +3,7 @@ use App\Rules\InvalidMentionRule; it('passes when no invalid mentions are detected', function ($body) { - expect((new InvalidMentionRule())->passes('body', $body))->toBeTrue(); + expect((new InvalidMentionRule())->validate('body', $body, fn () => throw new Exception())); })->with([ 'Hello, I\'m looking for some help', 'I\'ve seen [this link](https://example.com), is it legit?', @@ -24,10 +24,10 @@ [link](https://example.com) \n ![image](https://example.com/image.png)", -]); +])->throwsNoExceptions(); it('fails when invalid mentions are detected', function ($body) { - expect((new InvalidMentionRule())->passes('body', $body))->toBeFalse(); + expect((new InvalidMentionRule())->validate('body', $body, fn () => throw new Exception())); })->with([ '[@driesvints](https://somethingnasty.com)', 'Hey [@joedixon](https://somethingnasty.com), is it legit?', @@ -48,4 +48,4 @@ [link](https://example.com) \n ![image](https://example.com/image.png)", -]); +])->throws(Exception::class); From 8f17ce132b5dc1e3df7b32cb284aeb61f21ae99e Mon Sep 17 00:00:00 2001 From: driesvints Date: Wed, 22 May 2024 20:31:41 +0000 Subject: [PATCH 02/12] Fix code styling --- app/Concerns/HasTags.php | 2 +- app/Livewire/NotificationIndicator.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Concerns/HasTags.php b/app/Concerns/HasTags.php index 47d14b9c5..d00095d46 100644 --- a/app/Concerns/HasTags.php +++ b/app/Concerns/HasTags.php @@ -19,7 +19,7 @@ public function tags(): Collection public function syncTags(array $tags) { try { - $this->save(); + $this->save(); } catch (\Exception $e) { dd($e); } diff --git a/app/Livewire/NotificationIndicator.php b/app/Livewire/NotificationIndicator.php index e26a56c1d..e66f705a7 100644 --- a/app/Livewire/NotificationIndicator.php +++ b/app/Livewire/NotificationIndicator.php @@ -4,8 +4,8 @@ use Illuminate\Support\Facades\Auth; use Illuminate\View\View; +use Livewire\Attributes\On; use Livewire\Component; -use Livewire\Attributes\On; final class NotificationIndicator extends Component { @@ -22,7 +22,7 @@ public function render(): View ]); } - #[On('NotificationMarkedAsRead')] + #[On('NotificationMarkedAsRead')] public function setHasNotification(int $count): bool { return $count > 0; From 287cd797683d63923bf8f9ba616999fff89841e1 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 22 May 2024 22:32:08 +0200 Subject: [PATCH 03/12] wip --- app/Concerns/HasTags.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Concerns/HasTags.php b/app/Concerns/HasTags.php index d00095d46..fe80b6448 100644 --- a/app/Concerns/HasTags.php +++ b/app/Concerns/HasTags.php @@ -18,11 +18,7 @@ public function tags(): Collection */ public function syncTags(array $tags) { - try { - $this->save(); - } catch (\Exception $e) { - dd($e); - } + $this->save(); $this->tagsRelation()->sync($tags); $this->unsetRelation('tagsRelation'); From 3e0f40026a99d8282998bdff420698c902a05bbf Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 28 Aug 2024 10:21:49 +0200 Subject: [PATCH 04/12] wip --- app/Providers/AppServiceProvider.php | 8 ++++++++ tests/Feature/NotificationsTest.php | 2 +- tests/Integration/Models/ThreadTest.php | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index a48746996..e49648d29 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -8,13 +8,16 @@ use App\Models\User; use App\Notifications\SlowQueryLogged; use App\Observers\UserObserver; +use App\Policies\NotificationPolicy; use Illuminate\Cache\RateLimiting\Limit; use Illuminate\Database\Connection; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Events\QueryExecuted; use Illuminate\Http\Request; use Illuminate\Notifications\AnonymousNotifiable; +use Illuminate\Notifications\DatabaseNotification; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Gate; use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\RateLimiter; use Illuminate\Support\Facades\Request as RequestFacade; @@ -41,6 +44,7 @@ public function boot(): void $this->bootEvent(); $this->bootRoute(); + $this->bootPolicies(); } private function bootEloquentMorphs() @@ -102,6 +106,10 @@ public function bootRoute(): void }); require base_path('routes/bindings.php'); + } + public function bootPolicies(): void + { + Gate::policy(DatabaseNotification::class, NotificationPolicy::class); } } diff --git a/tests/Feature/NotificationsTest.php b/tests/Feature/NotificationsTest.php index a8bbdde9f..9f4579f84 100644 --- a/tests/Feature/NotificationsTest.php +++ b/tests/Feature/NotificationsTest.php @@ -74,7 +74,7 @@ "A new reply was added to \"{$thread->subject()}\".", )) ->assertDispatched('NotificationMarkedAsRead'); -}); +})->only(); test('a_non_logged_in_user_cannot_access_notifications', function () { Livewire::test(Notifications::class)->assertForbidden(); diff --git a/tests/Integration/Models/ThreadTest.php b/tests/Integration/Models/ThreadTest.php index 0c149737b..48f96cced 100644 --- a/tests/Integration/Models/ThreadTest.php +++ b/tests/Integration/Models/ThreadTest.php @@ -87,6 +87,9 @@ $threadUpdatedYesterday = createThreadFromYesterday(); $threadFromToday = createThreadFromToday(); $threadFromTwoDaysAgo = createThreadFromTwoDaysAgo(); + + sleep(1); + dispatch_sync(new CreateReply(Str::uuid(), 'Hello world', User::factory()->create(), $threadFromTwoDaysAgo)); $threads = Thread::feed(); From 490cc25564ce519b34b561a72e5ab53b1c29ce6f Mon Sep 17 00:00:00 2001 From: driesvints Date: Wed, 28 Aug 2024 08:22:19 +0000 Subject: [PATCH 05/12] Fix code styling --- tests/Integration/Rules/PasscheckRuleTest.php | 4 ++-- tests/Unit/Rules/DoesNotContainUrlRuleTest.php | 6 +++--- tests/Unit/Rules/HttpImageRuleTest.php | 4 ++-- tests/Unit/Rules/InvalidMentionRuleTest.php | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Integration/Rules/PasscheckRuleTest.php b/tests/Integration/Rules/PasscheckRuleTest.php index c39670b01..ee3c11679 100644 --- a/tests/Integration/Rules/PasscheckRuleTest.php +++ b/tests/Integration/Rules/PasscheckRuleTest.php @@ -11,12 +11,12 @@ $this->login(['password' => bcrypt('foo')]); $rule = new PasscheckRule; - $rule->validate('password', 'foo', fn () => throw new Exception()); + $rule->validate('password', 'foo', fn () => throw new Exception); })->throwsNoExceptions(); it('fails when the password is incorrect', function () { $this->login(); $rule = new PasscheckRule; - $rule->validate('password', 'foo', fn () => throw new Exception()); + $rule->validate('password', 'foo', fn () => throw new Exception); })->throws(Exception::class); diff --git a/tests/Unit/Rules/DoesNotContainUrlRuleTest.php b/tests/Unit/Rules/DoesNotContainUrlRuleTest.php index e67503e31..0972a47ee 100644 --- a/tests/Unit/Rules/DoesNotContainUrlRuleTest.php +++ b/tests/Unit/Rules/DoesNotContainUrlRuleTest.php @@ -3,13 +3,13 @@ use App\Rules\DoesNotContainUrlRule; it('detects a url in a string', function () { - (new DoesNotContainUrlRule())->validate('foo', 'This is a string http://example.com with an url in it.', fn () => throw new Exception()); + (new DoesNotContainUrlRule)->validate('foo', 'This is a string http://example.com with an url in it.', fn () => throw new Exception); })->throws(Exception::class); it('passes when no url is present', function () { - (new DoesNotContainUrlRule())->validate('foo', 'This is a string without an url in it.', fn () => throw new Exception()); + (new DoesNotContainUrlRule)->validate('foo', 'This is a string without an url in it.', fn () => throw new Exception); })->throwsNoExceptions(); it('passes when extra spaces are present', function () { - (new DoesNotContainUrlRule())->validate('foo', 'This is a string with extra spaces.', fn () => throw new Exception()); + (new DoesNotContainUrlRule)->validate('foo', 'This is a string with extra spaces.', fn () => throw new Exception); })->throwsNoExceptions(); diff --git a/tests/Unit/Rules/HttpImageRuleTest.php b/tests/Unit/Rules/HttpImageRuleTest.php index ad0c4cc2d..82ab2a6ea 100644 --- a/tests/Unit/Rules/HttpImageRuleTest.php +++ b/tests/Unit/Rules/HttpImageRuleTest.php @@ -3,9 +3,9 @@ use App\Rules\HttpImageRule; it('passes when no http links are detected', function () { - (new HttpImageRule())->validate('body', 'some text ![](https://link.com)', fn () => throw new Exception()); + (new HttpImageRule)->validate('body', 'some text ![](https://link.com)', fn () => throw new Exception); })->throwsNoExceptions(); it('fails when http links are detected', function () { - (new HttpImageRule())->validate('body', 'some text ![](http://link.com)', fn () => throw new Exception()); + (new HttpImageRule)->validate('body', 'some text ![](http://link.com)', fn () => throw new Exception); })->throws(Exception::class); diff --git a/tests/Unit/Rules/InvalidMentionRuleTest.php b/tests/Unit/Rules/InvalidMentionRuleTest.php index 8994a5c5d..8bce0e929 100644 --- a/tests/Unit/Rules/InvalidMentionRuleTest.php +++ b/tests/Unit/Rules/InvalidMentionRuleTest.php @@ -3,7 +3,7 @@ use App\Rules\InvalidMentionRule; it('passes when no invalid mentions are detected', function ($body) { - expect((new InvalidMentionRule())->validate('body', $body, fn () => throw new Exception())); + expect((new InvalidMentionRule)->validate('body', $body, fn () => throw new Exception)); })->with([ 'Hello, I\'m looking for some help', 'I\'ve seen [this link](https://example.com), is it legit?', @@ -27,7 +27,7 @@ ])->throwsNoExceptions(); it('fails when invalid mentions are detected', function ($body) { - expect((new InvalidMentionRule())->validate('body', $body, fn () => throw new Exception())); + expect((new InvalidMentionRule)->validate('body', $body, fn () => throw new Exception)); })->with([ '[@driesvints](https://somethingnasty.com)', 'Hey [@joedixon](https://somethingnasty.com), is it legit?', From 42d41456d7c100ed0fd5b00642bbc007b3cbde34 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 28 Aug 2024 10:22:22 +0200 Subject: [PATCH 06/12] wip --- app/Providers/AppServiceProvider.php | 16 ++++++++-------- tests/Feature/NotificationsTest.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index e49648d29..036dfcca4 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -86,14 +86,6 @@ private function bootSlowQueryLogging() }); } - /** - * Register any application services. - */ - public function register(): void - { - // - } - public function bootEvent(): void { User::observe(UserObserver::class); @@ -112,4 +104,12 @@ public function bootPolicies(): void { Gate::policy(DatabaseNotification::class, NotificationPolicy::class); } + + /** + * Register any application services. + */ + public function register(): void + { + // + } } diff --git a/tests/Feature/NotificationsTest.php b/tests/Feature/NotificationsTest.php index 9f4579f84..a8bbdde9f 100644 --- a/tests/Feature/NotificationsTest.php +++ b/tests/Feature/NotificationsTest.php @@ -74,7 +74,7 @@ "A new reply was added to \"{$thread->subject()}\".", )) ->assertDispatched('NotificationMarkedAsRead'); -})->only(); +}); test('a_non_logged_in_user_cannot_access_notifications', function () { Livewire::test(Notifications::class)->assertForbidden(); From c6bda9d41c49d14319754f0a85eb101ac16d2686 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 28 Aug 2024 12:25:49 +0200 Subject: [PATCH 07/12] wip --- .github/workflows/tests.yml | 2 +- tests/Feature/ReplyTest.php | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e1dc0af90..33190038d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/tests/Feature/ReplyTest.php b/tests/Feature/ReplyTest.php index 7a1afe934..71448b18d 100644 --- a/tests/Feature/ReplyTest.php +++ b/tests/Feature/ReplyTest.php @@ -8,6 +8,7 @@ use App\Notifications\MentionNotification; use App\Rules\InvalidMentionRule; use Illuminate\Foundation\Testing\DatabaseMigrations; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Notifications\DatabaseNotification; use Illuminate\Support\Facades\Notification; use Illuminate\Support\HtmlString; @@ -15,7 +16,7 @@ use Tests\TestCase; uses(TestCase::class); -uses(DatabaseMigrations::class); +uses(RefreshDatabase::class); test('users can add a reply to a thread', function () { $thread = Thread::factory()->create(['subject' => 'The first thread', 'slug' => 'the-first-thread']); @@ -75,11 +76,11 @@ }); test('users cannot delete a reply they do not own', function () { - Reply::factory()->create(); + $reply = Reply::factory()->create(); $this->login(); - $this->delete('/replies/1') + $this->delete("/replies/{$reply->id}") ->assertForbidden(); }); @@ -200,13 +201,13 @@ 'replyable_id' => $thread->id, 'replyable_type' => Thread::TABLE, ]); - + $notification = DatabaseNotification::first(); $this->assertSame($user->id, (int) $notification->notifiable_id); $this->assertSame('users', $notification->notifiable_type); $this->assertSame('mention', $notification->data['type']); $this->assertSame('The first thread', $notification->data['replyable_subject']); -}); +})->only(); test('users are not notified when mentioned in an edited reply', function () { Notification::fake(); From 6acada9639987b73c346448111cf1a871813c8ec Mon Sep 17 00:00:00 2001 From: driesvints Date: Wed, 28 Aug 2024 10:26:25 +0000 Subject: [PATCH 08/12] Fix code styling --- tests/Feature/ReplyTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Feature/ReplyTest.php b/tests/Feature/ReplyTest.php index 71448b18d..52dcb512f 100644 --- a/tests/Feature/ReplyTest.php +++ b/tests/Feature/ReplyTest.php @@ -7,7 +7,6 @@ use App\Models\User; use App\Notifications\MentionNotification; use App\Rules\InvalidMentionRule; -use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Notifications\DatabaseNotification; use Illuminate\Support\Facades\Notification; @@ -201,7 +200,7 @@ 'replyable_id' => $thread->id, 'replyable_type' => Thread::TABLE, ]); - + $notification = DatabaseNotification::first(); $this->assertSame($user->id, (int) $notification->notifiable_id); $this->assertSame('users', $notification->notifiable_type); From 6d3b393e44c76ceccbc6584f9e7e7c8659ff14bc Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 28 Aug 2024 12:37:59 +0200 Subject: [PATCH 09/12] wip --- .../NotifyUsersMentionedInThread.php | 2 +- tests/Feature/ReplyTest.php | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/Listeners/NotifyUsersMentionedInThread.php b/app/Listeners/NotifyUsersMentionedInThread.php index 69538d065..8bcf5b47e 100644 --- a/app/Listeners/NotifyUsersMentionedInThread.php +++ b/app/Listeners/NotifyUsersMentionedInThread.php @@ -10,7 +10,7 @@ final class NotifyUsersMentionedInThread { public function handle(ThreadWasCreated $event): void - { + {dd('test'); $event->thread->mentionedUsers()->each(function ($user) use ($event) { if (! $user->isNotificationAllowed(MentionNotification::class)) { return; diff --git a/tests/Feature/ReplyTest.php b/tests/Feature/ReplyTest.php index 52dcb512f..281374d07 100644 --- a/tests/Feature/ReplyTest.php +++ b/tests/Feature/ReplyTest.php @@ -201,11 +201,20 @@ 'replyable_type' => Thread::TABLE, ]); - $notification = DatabaseNotification::first(); - $this->assertSame($user->id, (int) $notification->notifiable_id); - $this->assertSame('users', $notification->notifiable_type); - $this->assertSame('mention', $notification->data['type']); - $this->assertSame('The first thread', $notification->data['replyable_subject']); + $tested = false; + + foreach (DatabaseNotification::all() as $notification) { + if ($notification->type === MentionNotification::class) { + $this->assertSame($user->id, (int) $notification->notifiable_id); + $this->assertSame('users', $notification->notifiable_type); + $this->assertSame('mention', $notification->data['type']); + $this->assertSame('The first thread', $notification->data['replyable_subject']); + + $tested = true; + } + } + + $this->assertTrue($tested); })->only(); test('users are not notified when mentioned in an edited reply', function () { From 8689758fa3d9272d977a04ba957597b126a2590e Mon Sep 17 00:00:00 2001 From: driesvints Date: Wed, 28 Aug 2024 10:38:25 +0000 Subject: [PATCH 10/12] Fix code styling --- app/Listeners/NotifyUsersMentionedInThread.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Listeners/NotifyUsersMentionedInThread.php b/app/Listeners/NotifyUsersMentionedInThread.php index 8bcf5b47e..8ad7f6094 100644 --- a/app/Listeners/NotifyUsersMentionedInThread.php +++ b/app/Listeners/NotifyUsersMentionedInThread.php @@ -10,7 +10,8 @@ final class NotifyUsersMentionedInThread { public function handle(ThreadWasCreated $event): void - {dd('test'); + { + dd('test'); $event->thread->mentionedUsers()->each(function ($user) use ($event) { if (! $user->isNotificationAllowed(MentionNotification::class)) { return; From 8d7111d426c1c0670cb013e9df247fd0e75d322b Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 28 Aug 2024 12:40:45 +0200 Subject: [PATCH 11/12] wip --- app/Listeners/NotifyUsersMentionedInThread.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Listeners/NotifyUsersMentionedInThread.php b/app/Listeners/NotifyUsersMentionedInThread.php index 8ad7f6094..69538d065 100644 --- a/app/Listeners/NotifyUsersMentionedInThread.php +++ b/app/Listeners/NotifyUsersMentionedInThread.php @@ -11,7 +11,6 @@ final class NotifyUsersMentionedInThread { public function handle(ThreadWasCreated $event): void { - dd('test'); $event->thread->mentionedUsers()->each(function ($user) use ($event) { if (! $user->isNotificationAllowed(MentionNotification::class)) { return; From d7c3ca815b2b5916cfacbd5f00c7274b530dae09 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Wed, 28 Aug 2024 12:50:12 +0200 Subject: [PATCH 12/12] wip --- ..._08_28_104736_create_job_batches_table.php | 27 +++++++++++++++++++ .../2024_08_28_104755_create_jobs_table.php | 24 +++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 database/migrations/2024_08_28_104736_create_job_batches_table.php create mode 100644 database/migrations/2024_08_28_104755_create_jobs_table.php diff --git a/database/migrations/2024_08_28_104736_create_job_batches_table.php b/database/migrations/2024_08_28_104736_create_job_batches_table.php new file mode 100644 index 000000000..d9cd6b5ea --- /dev/null +++ b/database/migrations/2024_08_28_104736_create_job_batches_table.php @@ -0,0 +1,27 @@ +string('id')->primary(); + $table->string('name'); + $table->integer('total_jobs'); + $table->integer('pending_jobs'); + $table->integer('failed_jobs'); + $table->longText('failed_job_ids'); + $table->mediumText('options')->nullable(); + $table->integer('cancelled_at')->nullable(); + $table->integer('created_at'); + $table->integer('finished_at')->nullable(); + }); + } +}; diff --git a/database/migrations/2024_08_28_104755_create_jobs_table.php b/database/migrations/2024_08_28_104755_create_jobs_table.php new file mode 100644 index 000000000..58a8bc948 --- /dev/null +++ b/database/migrations/2024_08_28_104755_create_jobs_table.php @@ -0,0 +1,24 @@ +bigIncrements('id'); + $table->string('queue')->index(); + $table->longText('payload'); + $table->unsignedTinyInteger('attempts'); + $table->unsignedInteger('reserved_at')->nullable(); + $table->unsignedInteger('available_at'); + $table->unsignedInteger('created_at'); + }); + } +};