From c042d13590c0f6fd77f2f7f47e2f68ae4412a5b9 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 21 Jul 2024 01:52:14 -0600 Subject: [PATCH 1/6] Update instance config, update network cache feed max_hours_old falloff to 90 days instead of 6 hours to allow for less active instances to have more results --- config/instance.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/instance.php b/config/instance.php index 3c931cf7..c3912740 100644 --- a/config/instance.php +++ b/config/instance.php @@ -36,7 +36,7 @@ return [ 'network' => [ 'cached' => env('PF_NETWORK_TIMELINE') ? env('INSTANCE_NETWORK_TIMELINE_CACHED', false) : false, 'cache_dropoff' => env('INSTANCE_NETWORK_TIMELINE_CACHE_DROPOFF', 100), - 'max_hours_old' => env('INSTANCE_NETWORK_TIMELINE_CACHE_MAX_HOUR_INGEST', 6), + 'max_hours_old' => env('INSTANCE_NETWORK_TIMELINE_CACHE_MAX_HOUR_INGEST', 2160), ], ], From 83ce8fd78e56bc31d1b038bb8b35dcfa7bbeca47 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 22 Jul 2024 01:13:59 -0600 Subject: [PATCH 2/6] Add Push Notifications --- app/User.php | 10 ++- composer.json | 1 + composer.lock | 66 ++++++++++++++++++- config/services.php | 3 + ...2_065800_add_expo_token_to_users_table.php | 36 ++++++++++ 5 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 database/migrations/2024_07_22_065800_add_expo_token_to_users_table.php diff --git a/app/User.php b/app/User.php index a39f650b..6ec31e96 100644 --- a/app/User.php +++ b/app/User.php @@ -8,10 +8,13 @@ use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use App\Util\RateLimit\User as UserRateLimit; use App\Services\AvatarService; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use NotificationChannels\WebPush\HasPushSubscriptions; +use NotificationChannels\Expo\ExpoPushToken; class User extends Authenticatable { - use Notifiable, SoftDeletes, HasApiTokens, UserRateLimit; + use Notifiable, SoftDeletes, HasApiTokens, UserRateLimit, HasFactory, HasPushSubscriptions; /** * The attributes that should be mutated to dates. @@ -23,6 +26,7 @@ class User extends Authenticatable 'email_verified_at' => 'datetime', '2fa_setup_at' => 'datetime', 'last_active_at' => 'datetime', + 'expo_token' => ExpoPushToken::class ]; /** @@ -115,4 +119,8 @@ class User extends Authenticatable return AvatarService::get($this->profile_id); } + public function routeNotificationForExpo(): ?ExpoPushToken + { + return $this->expo_token; + } } diff --git a/composer.json b/composer.json index 24112cbf..dbe6a62e 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ "doctrine/dbal": "^3.0", "intervention/image": "^2.4", "jenssegers/agent": "^2.6", + "laravel-notification-channels/expo": "^2.0", "laravel-notification-channels/webpush": "^8.0", "laravel/framework": "^11.0", "laravel/helpers": "^1.1", diff --git a/composer.lock b/composer.lock index 12fde064..882eb34d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "55dc6d48024fd1d158f8777eda3ea624", + "content-hash": "53a815fd998a7264135d59184253d0de", "packages": [ { "name": "aws/aws-crt-php", @@ -2247,6 +2247,70 @@ ], "time": "2020-06-13T08:05:20+00:00" }, + { + "name": "laravel-notification-channels/expo", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/laravel-notification-channels/expo.git", + "reference": "29d038b6409077ac4c671cc5587a4dc7986260b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel-notification-channels/expo/zipball/29d038b6409077ac4c671cc5587a4dc7986260b0", + "reference": "29d038b6409077ac4c671cc5587a4dc7986260b0", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/guzzle": "^7.1", + "illuminate/contracts": "^11.0", + "illuminate/notifications": "^11.0", + "illuminate/support": "^11.0", + "php": "~8.3" + }, + "require-dev": { + "larastan/larastan": "^2.0", + "laravel/pint": "^1.0", + "orchestra/testbench": "^9.0", + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-zlib": "Required for compressing payloads exceeding 1 KiB in size." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NotificationChannels\\Expo\\ExpoServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "NotificationChannels\\Expo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Muhammed Sari", + "email": "muhammed@dive.be", + "homepage": "https://dive.be", + "role": "Developer" + } + ], + "description": "Expo Notifications Channel for Laravel", + "homepage": "https://github.com/laravel-notification-channels/expo", + "support": { + "issues": "https://github.com/laravel-notification-channels/expo/issues", + "source": "https://github.com/laravel-notification-channels/expo/tree/v2.0.0" + }, + "time": "2024-03-18T07:49:28+00:00" + }, { "name": "laravel-notification-channels/webpush", "version": "8.0.0", diff --git a/config/services.php b/config/services.php index 58db77fe..8f00697b 100644 --- a/config/services.php +++ b/config/services.php @@ -35,4 +35,7 @@ return [ 'secret' => env('STRIPE_SECRET'), ], + 'expo' => [ + 'access_token' => env('EXPO_ACCESS_TOKEN'), + ], ]; diff --git a/database/migrations/2024_07_22_065800_add_expo_token_to_users_table.php b/database/migrations/2024_07_22_065800_add_expo_token_to_users_table.php new file mode 100644 index 00000000..4f7c4688 --- /dev/null +++ b/database/migrations/2024_07_22_065800_add_expo_token_to_users_table.php @@ -0,0 +1,36 @@ +string('expo_token')->nullable(); + $table->boolean('notify_like')->default(true); + $table->boolean('notify_follow')->default(true); + $table->boolean('notify_mention')->default(true); + $table->boolean('notify_comment')->default(true); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('expo_token'); + $table->dropColumn('notify_like'); + $table->dropColumn('notify_follow'); + $table->dropColumn('notify_mention'); + $table->dropColumn('notify_comment'); + }); + } +}; From cafbf6ff19de571fc8ece2842239e152b6acba0a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 22 Jul 2024 01:32:24 -0600 Subject: [PATCH 3/6] Update circleci config, and composer --- .circleci/config.yml | 2 +- composer.lock | 501 ++++++++++++++++++++++--------------------- 2 files changed, 252 insertions(+), 251 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ba36559b..c33688f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: build: docker: # Specify the version you desire here - - image: cimg/php:8.2.5 + - image: cimg/php:8.3.8 # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images diff --git a/composer.lock b/composer.lock index 882eb34d..06fd1bc6 100644 --- a/composer.lock +++ b/composer.lock @@ -62,16 +62,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.315.2", + "version": "3.316.3", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "0d9911bf67e0f2c4b6965d7f10840b11f323e6b2" + "reference": "e832e594b3c213760e067e15ef2739f77505e832" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0d9911bf67e0f2c4b6965d7f10840b11f323e6b2", - "reference": "0d9911bf67e0f2c4b6965d7f10840b11f323e6b2", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e832e594b3c213760e067e15ef2739f77505e832", + "reference": "e832e594b3c213760e067e15ef2739f77505e832", "shasum": "" }, "require": { @@ -151,9 +151,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.315.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.316.3" }, - "time": "2024-06-28T19:07:22+00:00" + "time": "2024-07-12T18:07:23+00:00" }, { "name": "bacon/bacon-qr-code", @@ -524,16 +524,16 @@ }, { "name": "dflydev/dot-access-data", - "version": "v3.0.2", + "version": "v3.0.3", "source": { "type": "git", "url": "https://github.com/dflydev/dflydev-dot-access-data.git", - "reference": "f41715465d65213d644d3141a6a93081be5d3549" + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549", - "reference": "f41715465d65213d644d3141a6a93081be5d3549", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f", "shasum": "" }, "require": { @@ -593,9 +593,9 @@ ], "support": { "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", - "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3" }, - "time": "2022-10-27T11:44:00+00:00" + "time": "2024-07-08T12:26:09+00:00" }, { "name": "doctrine/cache", @@ -1557,24 +1557,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2" + "phpoption/phpoption": "^1.9.3" }, "require-dev": { - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "autoload": { @@ -1603,7 +1603,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" }, "funding": [ { @@ -1615,26 +1615,26 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:16:48+00:00" + "time": "2024-07-20T21:45:45+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.8.1", + "version": "7.9.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a629e5b69db96eb4939c1b34114130077dd4c6fc", + "reference": "a629e5b69db96eb4939c1b34114130077dd4c6fc", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1645,9 +1645,9 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1725,7 +1725,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + "source": "https://github.com/guzzle/guzzle/tree/7.9.1" }, "funding": [ { @@ -1741,20 +1741,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:35:24+00:00" + "time": "2024-07-19T16:19:57+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "shasum": "" }, "require": { @@ -1762,7 +1762,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -1808,7 +1808,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" + "source": "https://github.com/guzzle/promises/tree/2.0.3" }, "funding": [ { @@ -1824,20 +1824,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:19:20+00:00" + "time": "2024-07-18T10:29:17+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.2", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "shasum": "" }, "require": { @@ -1852,8 +1852,8 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -1924,7 +1924,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/guzzle/psr7/tree/2.7.0" }, "funding": [ { @@ -1940,7 +1940,7 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2024-07-18T11:15:46+00:00" }, { "name": "guzzlehttp/uri-template", @@ -2371,16 +2371,16 @@ }, { "name": "laravel/framework", - "version": "v11.13.0", + "version": "v11.16.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "92deaa4f037ff100e36809443811301819a8cf84" + "reference": "bd4808aaf103ccb5cb4b00bcee46140c070c0ec4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/92deaa4f037ff100e36809443811301819a8cf84", - "reference": "92deaa4f037ff100e36809443811301819a8cf84", + "url": "https://api.github.com/repos/laravel/framework/zipball/bd4808aaf103ccb5cb4b00bcee46140c070c0ec4", + "reference": "bd4808aaf103ccb5cb4b00bcee46140c070c0ec4", "shasum": "" }, "require": { @@ -2433,6 +2433,7 @@ }, "provide": { "psr/container-implementation": "1.1|2.0", + "psr/log-implementation": "1.0|2.0|3.0", "psr/simple-cache-implementation": "1.0|2.0|3.0" }, "replace": { @@ -2485,7 +2486,7 @@ "nyholm/psr7": "^1.2", "orchestra/testbench-core": "^9.1.5", "pda/pheanstalk": "^5.0", - "phpstan/phpstan": "^1.4.7", + "phpstan/phpstan": "^1.11.5", "phpunit/phpunit": "^10.5|^11.0", "predis/predis": "^2.0.2", "resend/resend-php": "^0.10.0", @@ -2572,7 +2573,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-06-27T09:04:50+00:00" + "time": "2024-07-16T14:33:07+00:00" }, { "name": "laravel/helpers", @@ -2633,16 +2634,16 @@ }, { "name": "laravel/horizon", - "version": "v5.24.5", + "version": "v5.25.0", "source": { "type": "git", "url": "https://github.com/laravel/horizon.git", - "reference": "3c359e3a9ebd3e3be012a15eedf2d64ef8b82540" + "reference": "81e62cee5b3feaf169d683b8890e33bf454698ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/horizon/zipball/3c359e3a9ebd3e3be012a15eedf2d64ef8b82540", - "reference": "3c359e3a9ebd3e3be012a15eedf2d64ef8b82540", + "url": "https://api.github.com/repos/laravel/horizon/zipball/81e62cee5b3feaf169d683b8890e33bf454698ab", + "reference": "81e62cee5b3feaf169d683b8890e33bf454698ab", "shasum": "" }, "require": { @@ -2706,9 +2707,9 @@ ], "support": { "issues": "https://github.com/laravel/horizon/issues", - "source": "https://github.com/laravel/horizon/tree/v5.24.5" + "source": "https://github.com/laravel/horizon/tree/v5.25.0" }, - "time": "2024-05-31T16:18:41+00:00" + "time": "2024-07-05T16:46:31+00:00" }, { "name": "laravel/passport", @@ -4273,16 +4274,16 @@ }, { "name": "nesbot/carbon", - "version": "3.6.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "39c8ef752db6865717cc3fba63970c16f057982c" + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/39c8ef752db6865717cc3fba63970c16f057982c", - "reference": "39c8ef752db6865717cc3fba63970c16f057982c", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cb4374784c87d0a0294e8513a52eb63c0aff3139", + "reference": "cb4374784c87d0a0294e8513a52eb63c0aff3139", "shasum": "" }, "require": { @@ -4375,7 +4376,7 @@ "type": "tidelift" } ], - "time": "2024-06-20T15:52:59+00:00" + "time": "2024-07-16T22:29:20+00:00" }, { "name": "nette/schema", @@ -4527,16 +4528,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.0.2", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", "shasum": "" }, "require": { @@ -4547,7 +4548,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -4579,9 +4580,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" }, - "time": "2024-03-05T20:51:40+00:00" + "time": "2024-07-01T20:03:41+00:00" }, { "name": "nunomaduro/termwind", @@ -5121,16 +5122,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -5138,13 +5139,13 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "1.9-dev" @@ -5180,7 +5181,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -5192,7 +5193,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T21:59:55+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "phpseclib/phpseclib", @@ -9908,23 +9909,23 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.6.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.2", + "graham-campbell/result-type": "^1.1.3", "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2", + "phpoption/phpoption": "^1.9.3", "symfony/polyfill-ctype": "^1.24", "symfony/polyfill-mbstring": "^1.24", "symfony/polyfill-php80": "^1.24" @@ -9941,7 +9942,7 @@ "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "5.6-dev" @@ -9976,7 +9977,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -9988,7 +9989,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:43:29+00:00" + "time": "2024-07-20T21:52:34+00:00" }, { "name": "voku/portable-ascii", @@ -10690,16 +10691,16 @@ }, { "name": "laravel/pint", - "version": "v1.16.1", + "version": "v1.16.2", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "9266a47f1b9231b83e0cfd849009547329d871b1" + "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/9266a47f1b9231b83e0cfd849009547329d871b1", - "reference": "9266a47f1b9231b83e0cfd849009547329d871b1", + "url": "https://api.github.com/repos/laravel/pint/zipball/51f1ba679a6afe0315621ad143d788bd7ded0eca", + "reference": "51f1ba679a6afe0315621ad143d788bd7ded0eca", "shasum": "" }, "require": { @@ -10752,7 +10753,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-06-18T16:50:05+00:00" + "time": "2024-07-09T15:58:08+00:00" }, { "name": "laravel/telescope", @@ -10968,38 +10969,38 @@ }, { "name": "nunomaduro/collision", - "version": "v8.1.1", + "version": "v8.3.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9" + "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/13e5d538b95a744d85f447a321ce10adb28e9af9", - "reference": "13e5d538b95a744d85f447a321ce10adb28e9af9", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b49f5b2891ce52726adfd162841c69d4e4c84229", + "reference": "b49f5b2891ce52726adfd162841c69d4e4c84229", "shasum": "" }, "require": { "filp/whoops": "^2.15.4", "nunomaduro/termwind": "^2.0.1", "php": "^8.2.0", - "symfony/console": "^7.0.4" + "symfony/console": "^7.1.2" }, "conflict": { "laravel/framework": "<11.0.0 || >=12.0.0", "phpunit/phpunit": "<10.5.1 || >=12.0.0" }, "require-dev": { - "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", + "larastan/larastan": "^2.9.8", + "laravel/framework": "^11.16.0", + "laravel/pint": "^1.16.2", + "laravel/sail": "^1.30.2", + "laravel/sanctum": "^4.0.2", "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" + "orchestra/testbench-core": "^9.2.1", + "pestphp/pest": "^2.34.9 || ^3.0.0", + "sebastian/environment": "^6.1.0 || ^7.0.0" }, "type": "library", "extra": { @@ -11061,7 +11062,7 @@ "type": "patreon" } ], - "time": "2024-03-06T16:20:09+00:00" + "time": "2024-07-16T22:41:01+00:00" }, { "name": "phar-io/manifest", @@ -11183,16 +11184,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "11.0.4", + "version": "11.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "4dc2b7a606073f0fb80da09842ffb068b627c38f" + "reference": "19b6365ab8b59a64438c0c3f4241feeb480c9861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4dc2b7a606073f0fb80da09842ffb068b627c38f", - "reference": "4dc2b7a606073f0fb80da09842ffb068b627c38f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/19b6365ab8b59a64438c0c3f4241feeb480c9861", + "reference": "19b6365ab8b59a64438c0c3f4241feeb480c9861", "shasum": "" }, "require": { @@ -11249,7 +11250,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.4" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.5" }, "funding": [ { @@ -11257,20 +11258,20 @@ "type": "github" } ], - "time": "2024-06-29T08:26:25+00:00" + "time": "2024-07-03T05:05:37+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "99e95c94ad9500daca992354fa09d7b99abe2210" + "reference": "6ed896bf50bbbfe4d504a33ed5886278c78e4a26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/99e95c94ad9500daca992354fa09d7b99abe2210", - "reference": "99e95c94ad9500daca992354fa09d7b99abe2210", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6ed896bf50bbbfe4d504a33ed5886278c78e4a26", + "reference": "6ed896bf50bbbfe4d504a33ed5886278c78e4a26", "shasum": "" }, "require": { @@ -11310,7 +11311,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.0.1" }, "funding": [ { @@ -11318,20 +11319,20 @@ "type": "github" } ], - "time": "2024-02-02T06:05:04+00:00" + "time": "2024-07-03T05:06:37+00:00" }, { "name": "phpunit/php-invoker", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5d8d9355a16d8cc5a1305b0a85342cfa420612be" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5d8d9355a16d8cc5a1305b0a85342cfa420612be", - "reference": "5d8d9355a16d8cc5a1305b0a85342cfa420612be", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { @@ -11374,7 +11375,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -11382,20 +11383,20 @@ "type": "github" } ], - "time": "2024-02-02T06:05:50+00:00" + "time": "2024-07-03T05:07:44+00:00" }, { "name": "phpunit/php-text-template", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "d38f6cbff1cdb6f40b03c9811421561668cc133e" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/d38f6cbff1cdb6f40b03c9811421561668cc133e", - "reference": "d38f6cbff1cdb6f40b03c9811421561668cc133e", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { @@ -11434,7 +11435,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -11442,20 +11443,20 @@ "type": "github" } ], - "time": "2024-02-02T06:06:56+00:00" + "time": "2024-07-03T05:08:43+00:00" }, { "name": "phpunit/php-timer", - "version": "7.0.0", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "8a59d9e25720482ee7fcdf296595e08795b84dc5" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8a59d9e25720482ee7fcdf296595e08795b84dc5", - "reference": "8a59d9e25720482ee7fcdf296595e08795b84dc5", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { @@ -11494,7 +11495,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.0" + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -11502,20 +11503,20 @@ "type": "github" } ], - "time": "2024-02-02T06:08:01+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "phpunit/phpunit", - "version": "11.2.5", + "version": "11.2.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "be9e3ed32a1287a9bfda15936cc86fef4e4cf591" + "reference": "a7a29e8d3113806f18f99d670f580a30e8ffff39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/be9e3ed32a1287a9bfda15936cc86fef4e4cf591", - "reference": "be9e3ed32a1287a9bfda15936cc86fef4e4cf591", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a7a29e8d3113806f18f99d670f580a30e8ffff39", + "reference": "a7a29e8d3113806f18f99d670f580a30e8ffff39", "shasum": "" }, "require": { @@ -11525,25 +11526,25 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0", - "phpunit/php-file-iterator": "^5.0", - "phpunit/php-invoker": "^5.0", - "phpunit/php-text-template": "^4.0", - "phpunit/php-timer": "^7.0", - "sebastian/cli-parser": "^3.0", - "sebastian/code-unit": "^3.0", - "sebastian/comparator": "^6.0", - "sebastian/diff": "^6.0", - "sebastian/environment": "^7.0", - "sebastian/exporter": "^6.1.2", - "sebastian/global-state": "^7.0", - "sebastian/object-enumerator": "^6.0", - "sebastian/type": "^5.0", - "sebastian/version": "^5.0" + "phpunit/php-code-coverage": "^11.0.5", + "phpunit/php-file-iterator": "^5.0.1", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.1", + "sebastian/comparator": "^6.0.1", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.1.3", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.0.1", + "sebastian/version": "^5.0.1" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -11586,7 +11587,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.2.5" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.2.8" }, "funding": [ { @@ -11602,20 +11603,20 @@ "type": "tidelift" } ], - "time": "2024-06-20T13:11:31+00:00" + "time": "2024-07-18T14:56:37+00:00" }, { "name": "sebastian/cli-parser", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "00a74d5568694711f0222e54fb281e1d15fdf04a" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/00a74d5568694711f0222e54fb281e1d15fdf04a", - "reference": "00a74d5568694711f0222e54fb281e1d15fdf04a", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { @@ -11651,7 +11652,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -11659,20 +11660,20 @@ "type": "github" } ], - "time": "2024-03-02T07:26:58+00:00" + "time": "2024-07-03T04:41:36+00:00" }, { "name": "sebastian/code-unit", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "6634549cb8d702282a04a774e36a7477d2bd9015" + "reference": "6bb7d09d6623567178cf54126afa9c2310114268" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6634549cb8d702282a04a774e36a7477d2bd9015", - "reference": "6634549cb8d702282a04a774e36a7477d2bd9015", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268", + "reference": "6bb7d09d6623567178cf54126afa9c2310114268", "shasum": "" }, "require": { @@ -11708,7 +11709,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", "security": "https://github.com/sebastianbergmann/code-unit/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1" }, "funding": [ { @@ -11716,20 +11717,20 @@ "type": "github" } ], - "time": "2024-02-02T05:50:41+00:00" + "time": "2024-07-03T04:44:28+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "df80c875d3e459b45c6039e4d9b71d4fbccae25d" + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/df80c875d3e459b45c6039e4d9b71d4fbccae25d", - "reference": "df80c875d3e459b45c6039e4d9b71d4fbccae25d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", "shasum": "" }, "require": { @@ -11764,7 +11765,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" }, "funding": [ { @@ -11772,20 +11773,20 @@ "type": "github" } ], - "time": "2024-02-02T05:52:17+00:00" + "time": "2024-07-03T04:45:54+00:00" }, { "name": "sebastian/comparator", - "version": "6.0.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "bd0f2fa5b9257c69903537b266ccb80fcf940db8" + "reference": "131942b86d3587291067a94f295498ab6ac79c20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/bd0f2fa5b9257c69903537b266ccb80fcf940db8", - "reference": "bd0f2fa5b9257c69903537b266ccb80fcf940db8", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/131942b86d3587291067a94f295498ab6ac79c20", + "reference": "131942b86d3587291067a94f295498ab6ac79c20", "shasum": "" }, "require": { @@ -11841,7 +11842,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/6.0.0" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.0.1" }, "funding": [ { @@ -11849,20 +11850,20 @@ "type": "github" } ], - "time": "2024-02-02T05:53:45+00:00" + "time": "2024-07-03T04:48:07+00:00" }, { "name": "sebastian/complexity", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "88a434ad86150e11a606ac4866b09130712671f0" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/88a434ad86150e11a606ac4866b09130712671f0", - "reference": "88a434ad86150e11a606ac4866b09130712671f0", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { @@ -11899,7 +11900,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -11907,20 +11908,20 @@ "type": "github" } ], - "time": "2024-02-02T05:55:19+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "6.0.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ab83243ecc233de5655b76f577711de9f842e712" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ab83243ecc233de5655b76f577711de9f842e712", - "reference": "ab83243ecc233de5655b76f577711de9f842e712", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { @@ -11966,7 +11967,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -11974,20 +11975,20 @@ "type": "github" } ], - "time": "2024-03-02T07:30:33+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "7.1.0", + "version": "7.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4eb3a442574d0e9d141aab209cd4aaf25701b09a" + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4eb3a442574d0e9d141aab209cd4aaf25701b09a", - "reference": "4eb3a442574d0e9d141aab209cd4aaf25701b09a", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", "shasum": "" }, "require": { @@ -12002,7 +12003,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "7.1-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -12030,7 +12031,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/7.1.0" + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" }, "funding": [ { @@ -12038,20 +12039,20 @@ "type": "github" } ], - "time": "2024-03-23T08:56:34+00:00" + "time": "2024-07-03T04:54:44+00:00" }, { "name": "sebastian/exporter", - "version": "6.1.2", + "version": "6.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "507d2333cbc4e6ea248fbda2d45ee1511e03da13" + "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/507d2333cbc4e6ea248fbda2d45ee1511e03da13", - "reference": "507d2333cbc4e6ea248fbda2d45ee1511e03da13", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", + "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", "shasum": "" }, "require": { @@ -12108,7 +12109,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/6.1.2" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.1.3" }, "funding": [ { @@ -12116,20 +12117,20 @@ "type": "github" } ], - "time": "2024-06-18T11:19:56+00:00" + "time": "2024-07-03T04:56:19+00:00" }, { "name": "sebastian/global-state", - "version": "7.0.1", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c3a307e832f2e69c7ef869e31fc644fde0e7cb3e" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c3a307e832f2e69c7ef869e31fc644fde0e7cb3e", - "reference": "c3a307e832f2e69c7ef869e31fc644fde0e7cb3e", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { @@ -12170,7 +12171,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -12178,20 +12179,20 @@ "type": "github" } ], - "time": "2024-03-02T07:32:10+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "376c5b3f6b43c78fdc049740bca76a7c846706c0" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/376c5b3f6b43c78fdc049740bca76a7c846706c0", - "reference": "376c5b3f6b43c78fdc049740bca76a7c846706c0", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { @@ -12228,7 +12229,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -12236,20 +12237,20 @@ "type": "github" } ], - "time": "2024-02-02T06:00:36+00:00" + "time": "2024-07-03T04:58:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "6.0.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "f75f6c460da0bbd9668f43a3dde0ec0ba7faa678" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f75f6c460da0bbd9668f43a3dde0ec0ba7faa678", - "reference": "f75f6c460da0bbd9668f43a3dde0ec0ba7faa678", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { @@ -12286,7 +12287,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.0" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -12294,20 +12295,20 @@ "type": "github" } ], - "time": "2024-02-02T06:01:29+00:00" + "time": "2024-07-03T05:00:13+00:00" }, { "name": "sebastian/object-reflector", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "bb2a6255d30853425fd38f032eb64ced9f7f132d" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/bb2a6255d30853425fd38f032eb64ced9f7f132d", - "reference": "bb2a6255d30853425fd38f032eb64ced9f7f132d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { @@ -12342,7 +12343,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -12350,20 +12351,20 @@ "type": "github" } ], - "time": "2024-02-02T06:02:18+00:00" + "time": "2024-07-03T05:01:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "6.0.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "2f15508e17af4ea35129bbc32ce28a814d9c7426" + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2f15508e17af4ea35129bbc32ce28a814d9c7426", - "reference": "2f15508e17af4ea35129bbc32ce28a814d9c7426", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", "shasum": "" }, "require": { @@ -12406,7 +12407,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" }, "funding": [ { @@ -12414,20 +12415,20 @@ "type": "github" } ], - "time": "2024-06-17T05:22:57+00:00" + "time": "2024-07-03T05:10:34+00:00" }, { "name": "sebastian/type", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8502785eb3523ca0dd4afe9ca62235590020f3f" + "reference": "fb6a6566f9589e86661291d13eba708cce5eb4aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8502785eb3523ca0dd4afe9ca62235590020f3f", - "reference": "b8502785eb3523ca0dd4afe9ca62235590020f3f", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb6a6566f9589e86661291d13eba708cce5eb4aa", + "reference": "fb6a6566f9589e86661291d13eba708cce5eb4aa", "shasum": "" }, "require": { @@ -12463,7 +12464,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/5.0.1" }, "funding": [ { @@ -12471,20 +12472,20 @@ "type": "github" } ], - "time": "2024-02-02T06:09:34+00:00" + "time": "2024-07-03T05:11:49+00:00" }, { "name": "sebastian/version", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "13999475d2cb1ab33cb73403ba356a814fdbb001" + "reference": "45c9debb7d039ce9b97de2f749c2cf5832a06ac4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/13999475d2cb1ab33cb73403ba356a814fdbb001", - "reference": "13999475d2cb1ab33cb73403ba356a814fdbb001", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/45c9debb7d039ce9b97de2f749c2cf5832a06ac4", + "reference": "45c9debb7d039ce9b97de2f749c2cf5832a06ac4", "shasum": "" }, "require": { @@ -12517,7 +12518,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/version/tree/5.0.1" }, "funding": [ { @@ -12525,7 +12526,7 @@ "type": "github" } ], - "time": "2024-02-02T06:10:47+00:00" + "time": "2024-07-03T05:13:08+00:00" }, { "name": "theseer/tokenizer", From 0cac17d8d539f55185bee08d8233a9b46b7ce414 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 22 Jul 2024 01:37:17 -0600 Subject: [PATCH 4/6] Update composer, add support for php 8.2 and 8.3 --- composer.json | 2 +- composer.lock | 41 ++++++++++++++++++----------------------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/composer.json b/composer.json index dbe6a62e..de544cb5 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "doctrine/dbal": "^3.0", "intervention/image": "^2.4", "jenssegers/agent": "^2.6", - "laravel-notification-channels/expo": "^2.0", + "laravel-notification-channels/expo": "^1.3.0|^2.0", "laravel-notification-channels/webpush": "^8.0", "laravel/framework": "^11.0", "laravel/helpers": "^1.1", diff --git a/composer.lock b/composer.lock index 06fd1bc6..1f850987 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "53a815fd998a7264135d59184253d0de", + "content-hash": "fbadeaf1fbbd9e0f64feaa1433ca7dd0", "packages": [ { "name": "aws/aws-crt-php", @@ -2249,34 +2249,29 @@ }, { "name": "laravel-notification-channels/expo", - "version": "v2.0.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/laravel-notification-channels/expo.git", - "reference": "29d038b6409077ac4c671cc5587a4dc7986260b0" + "reference": "d718a89dfc4997aba69b673f5db416ac833188e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel-notification-channels/expo/zipball/29d038b6409077ac4c671cc5587a4dc7986260b0", - "reference": "29d038b6409077ac4c671cc5587a4dc7986260b0", + "url": "https://api.github.com/repos/laravel-notification-channels/expo/zipball/d718a89dfc4997aba69b673f5db416ac833188e9", + "reference": "d718a89dfc4997aba69b673f5db416ac833188e9", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/guzzle": "^7.1", - "illuminate/contracts": "^11.0", - "illuminate/notifications": "^11.0", - "illuminate/support": "^11.0", - "php": "~8.3" + "guzzlehttp/guzzle": "~6.0 || ~7.0", + "illuminate/notifications": "~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0 || ~11.0", + "illuminate/support": "~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0 || ~11.0", + "php": ">=7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3" }, "require-dev": { - "larastan/larastan": "^2.0", - "laravel/pint": "^1.0", - "orchestra/testbench": "^9.0", - "phpunit/phpunit": "^11.0" - }, - "suggest": { - "ext-zlib": "Required for compressing payloads exceeding 1 KiB in size." + "mockery/mockery": "^1.0", + "orchestra/testbench": "^6.18", + "phpunit/phpunit": "^8.0" }, "type": "library", "extra": { @@ -2297,19 +2292,19 @@ ], "authors": [ { - "name": "Muhammed Sari", - "email": "muhammed@dive.be", - "homepage": "https://dive.be", + "name": "Nick Pratley", + "email": "nick@npratley.net", + "homepage": "https://npratley.net/", "role": "Developer" } ], - "description": "Expo Notifications Channel for Laravel", + "description": "Expo Notifications driver for Laravel", "homepage": "https://github.com/laravel-notification-channels/expo", "support": { "issues": "https://github.com/laravel-notification-channels/expo/issues", - "source": "https://github.com/laravel-notification-channels/expo/tree/v2.0.0" + "source": "https://github.com/laravel-notification-channels/expo/tree/1.3.1" }, - "time": "2024-03-18T07:49:28+00:00" + "time": "2024-03-15T00:24:58+00:00" }, { "name": "laravel-notification-channels/webpush", From 8f7becc58b38813d8d0a11760cfaae1a67eaf635 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 22 Jul 2024 03:04:04 -0600 Subject: [PATCH 5/6] Add push notification api endpoints --- .../Controllers/Api/ApiV1Dot1Controller.php | 62 +++++++++++++++++++ app/User.php | 46 ++++++++------ composer.json | 2 +- composer.lock | 41 ++++++------ routes/api.php | 6 ++ 5 files changed, 119 insertions(+), 38 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Dot1Controller.php b/app/Http/Controllers/Api/ApiV1Dot1Controller.php index 9a47bb15..e6dfeadf 100644 --- a/app/Http/Controllers/Api/ApiV1Dot1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Dot1Controller.php @@ -37,6 +37,7 @@ use Jenssegers\Agent\Agent; use League\Fractal; use League\Fractal\Serializer\ArraySerializer; use Mail; +use NotificationChannels\Expo\ExpoPushToken; class ApiV1Dot1Controller extends Controller { @@ -1008,4 +1009,65 @@ class ApiV1Dot1Controller extends Controller return $this->json($account, 200, $rateLimiting ? $limits : []); } + + public function getExpoPushNotifications(Request $request) + { + abort_if(! $request->user() || ! $request->user()->token(), 403); + abort_unless($request->user()->tokenCan('push'), 403); + + $user = $request->user(); + $res = [ + 'expo_token' => (bool) $user->expo_token, + 'notify_like' => (bool) $user->notify_like, + 'notify_follow' => (bool) $user->notify_follow, + 'notify_mention' => (bool) $user->notify_mention, + 'notify_comment' => (bool) $user->notify_comment, + ]; + + return $this->json($res); + } + + public function disableExpoPushNotifications(Request $request) + { + abort_if(! $request->user() || ! $request->user()->token(), 403); + abort_unless($request->user()->tokenCan('push'), 403); + abort_unless(config('services.expo.access_token') && strlen(config('services.expo.access_token')) > 10, 404, 'Push notifications are not supported on this server.'); + $request->user()->update([ + 'expo_token' => null, + ]); + + return $this->json(['expo_token' => null]); + } + + public function updateExpoPushNotifications(Request $request) + { + abort_if(! $request->user() || ! $request->user()->token(), 403); + abort_unless($request->user()->tokenCan('push'), 403); + abort_unless(config('services.expo.access_token') && strlen(config('services.expo.access_token')) > 10, 404, 'Push notifications are not supported on this server.'); + $this->validate($request, [ + 'expo_token' => ['required', ExpoPushToken::rule()], + 'notify_like' => 'sometimes', + 'notify_follow' => 'sometimes', + 'notify_mention' => 'sometimes', + 'notify_comment' => 'sometimes', + ]); + + $user = $request->user()->update([ + 'expo_token' => $request->input('expo_token'), + 'notify_like' => $request->has('notify_like') && $request->boolean('notify_like'), + 'notify_follow' => $request->has('notify_follow') && $request->boolean('notify_follow'), + 'notify_mention' => $request->has('notify_mention') && $request->boolean('notify_mention'), + 'notify_comment' => $request->has('notify_comment') && $request->boolean('notify_comment'), + ]); + + $res = [ + 'expo_token' => (bool) $request->user()->expo_token, + 'notify_like' => (bool) $request->user()->notify_like, + 'notify_follow' => (bool) $request->user()->notify_follow, + 'notify_mention' => (bool) $request->user()->notify_mention, + 'notify_comment' => (bool) $request->user()->notify_comment, + ]; + + return $this->json($res); + } } diff --git a/app/User.php b/app/User.php index 6ec31e96..02244810 100644 --- a/app/User.php +++ b/app/User.php @@ -2,32 +2,35 @@ namespace App; -use Laravel\Passport\HasApiTokens; -use Illuminate\Notifications\Notifiable; +use App\Services\AvatarService; +use App\Util\RateLimit\User as UserRateLimit; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; -use App\Util\RateLimit\User as UserRateLimit; -use App\Services\AvatarService; -use Illuminate\Database\Eloquent\Factories\HasFactory; -use NotificationChannels\WebPush\HasPushSubscriptions; +use Illuminate\Notifications\Notifiable; +use Laravel\Passport\HasApiTokens; use NotificationChannels\Expo\ExpoPushToken; +use NotificationChannels\WebPush\HasPushSubscriptions; class User extends Authenticatable { - use Notifiable, SoftDeletes, HasApiTokens, UserRateLimit, HasFactory, HasPushSubscriptions; + use HasApiTokens, HasFactory, HasPushSubscriptions, Notifiable, SoftDeletes, UserRateLimit; /** * The attributes that should be mutated to dates. * * @var array */ - protected $casts = [ - 'deleted_at' => 'datetime', - 'email_verified_at' => 'datetime', - '2fa_setup_at' => 'datetime', - 'last_active_at' => 'datetime', - 'expo_token' => ExpoPushToken::class - ]; + protected function casts(): array + { + return [ + 'deleted_at' => 'datetime', + 'email_verified_at' => 'datetime', + '2fa_setup_at' => 'datetime', + 'last_active_at' => 'datetime', + 'expo_token' => ExpoPushToken::class, + ]; + } /** * The attributes that are mass assignable. @@ -42,7 +45,12 @@ class User extends Authenticatable 'app_register_ip', 'email_verified_at', 'last_active_at', - 'register_source' + 'register_source', + 'expo_token', + 'notify_like', + 'notify_follow', + 'notify_mention', + 'notify_comment', ]; /** @@ -54,7 +62,7 @@ class User extends Authenticatable 'email', 'password', 'is_admin', 'remember_token', 'email_verified_at', '2fa_enabled', '2fa_secret', '2fa_backup_codes', '2fa_setup_at', 'deleted_at', - 'updated_at' + 'updated_at', ]; public function profile() @@ -97,7 +105,7 @@ class User extends Authenticatable public function storageUsedKey() { - return 'profile:storage:used:' . $this->id; + return 'profile:storage:used:'.$this->id; } public function accountLog() @@ -112,8 +120,8 @@ class User extends Authenticatable public function avatarUrl() { - if(!$this->profile_id || $this->status) { - return config('app.url') . '/storage/avatars/default.jpg'; + if (! $this->profile_id || $this->status) { + return config('app.url').'/storage/avatars/default.jpg'; } return AvatarService::get($this->profile_id); diff --git a/composer.json b/composer.json index de544cb5..b97ec118 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "doctrine/dbal": "^3.0", "intervention/image": "^2.4", "jenssegers/agent": "^2.6", - "laravel-notification-channels/expo": "^1.3.0|^2.0", + "laravel-notification-channels/expo": "~1.3.0|~2.0.0", "laravel-notification-channels/webpush": "^8.0", "laravel/framework": "^11.0", "laravel/helpers": "^1.1", diff --git a/composer.lock b/composer.lock index 1f850987..e6fd309e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fbadeaf1fbbd9e0f64feaa1433ca7dd0", + "content-hash": "c055c4b1ba26004ab6951e9dba4b4508", "packages": [ { "name": "aws/aws-crt-php", @@ -2249,29 +2249,34 @@ }, { "name": "laravel-notification-channels/expo", - "version": "1.3.1", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/laravel-notification-channels/expo.git", - "reference": "d718a89dfc4997aba69b673f5db416ac833188e9" + "reference": "29d038b6409077ac4c671cc5587a4dc7986260b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel-notification-channels/expo/zipball/d718a89dfc4997aba69b673f5db416ac833188e9", - "reference": "d718a89dfc4997aba69b673f5db416ac833188e9", + "url": "https://api.github.com/repos/laravel-notification-channels/expo/zipball/29d038b6409077ac4c671cc5587a4dc7986260b0", + "reference": "29d038b6409077ac4c671cc5587a4dc7986260b0", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/guzzle": "~6.0 || ~7.0", - "illuminate/notifications": "~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0 || ~11.0", - "illuminate/support": "~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0 || ~11.0", - "php": ">=7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3" + "guzzlehttp/guzzle": "^7.1", + "illuminate/contracts": "^11.0", + "illuminate/notifications": "^11.0", + "illuminate/support": "^11.0", + "php": "~8.3" }, "require-dev": { - "mockery/mockery": "^1.0", - "orchestra/testbench": "^6.18", - "phpunit/phpunit": "^8.0" + "larastan/larastan": "^2.0", + "laravel/pint": "^1.0", + "orchestra/testbench": "^9.0", + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-zlib": "Required for compressing payloads exceeding 1 KiB in size." }, "type": "library", "extra": { @@ -2292,19 +2297,19 @@ ], "authors": [ { - "name": "Nick Pratley", - "email": "nick@npratley.net", - "homepage": "https://npratley.net/", + "name": "Muhammed Sari", + "email": "muhammed@dive.be", + "homepage": "https://dive.be", "role": "Developer" } ], - "description": "Expo Notifications driver for Laravel", + "description": "Expo Notifications Channel for Laravel", "homepage": "https://github.com/laravel-notification-channels/expo", "support": { "issues": "https://github.com/laravel-notification-channels/expo/issues", - "source": "https://github.com/laravel-notification-channels/expo/tree/1.3.1" + "source": "https://github.com/laravel-notification-channels/expo/tree/v2.0.0" }, - "time": "2024-03-15T00:24:58+00:00" + "time": "2024-03-18T07:49:28+00:00" }, { "name": "laravel-notification-channels/webpush", diff --git a/routes/api.php b/routes/api.php index bb81af2d..65ea86bb 100644 --- a/routes/api.php +++ b/routes/api.php @@ -194,6 +194,12 @@ Route::group(['prefix' => 'api'], function() use($middleware) { Route::post('invite/admin/uc', 'AdminInviteController@apiUsernameCheck')->middleware('throttle:20,120'); Route::post('invite/admin/ec', 'AdminInviteController@apiEmailCheck')->middleware('throttle:10,1440'); }); + + Route::group(['prefix' => 'expo'], function() use($middleware) { + Route::get('push-notifications', 'Api\ApiV1Dot1Controller@getExpoPushNotifications')->middleware($middleware); + Route::post('push-notifications/update', 'Api\ApiV1Dot1Controller@updateExpoPushNotifications')->middleware($middleware); + Route::post('push-notifications/disable', 'Api\ApiV1Dot1Controller@disableExpoPushNotifications')->middleware($middleware); + }); }); Route::group(['prefix' => 'live'], function() use($middleware) { From bd3d0722275a81f4245f569a1ce73f5b2c7a4a3b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 22 Jul 2024 03:11:26 -0600 Subject: [PATCH 6/6] Update ApiV1Dot1Controller.php --- app/Http/Controllers/Api/ApiV1Dot1Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/ApiV1Dot1Controller.php b/app/Http/Controllers/Api/ApiV1Dot1Controller.php index e6dfeadf..ace20f07 100644 --- a/app/Http/Controllers/Api/ApiV1Dot1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Dot1Controller.php @@ -1014,7 +1014,7 @@ class ApiV1Dot1Controller extends Controller { abort_if(! $request->user() || ! $request->user()->token(), 403); abort_unless($request->user()->tokenCan('push'), 403); - + abort_unless(config('services.expo.access_token') && strlen(config('services.expo.access_token')) > 10, 404, 'Push notifications are not supported on this server.'); $user = $request->user(); $res = [ 'expo_token' => (bool) $user->expo_token,