From f90655bc43fb0549b317554b480fc2483d87021d Mon Sep 17 00:00:00 2001 From: = Date: Thu, 14 May 2026 06:22:40 +0000 Subject: [PATCH] refactor: enhance ConnectionStatus handling and remove redundant logo field - Added `ConnectionStatusData` DTO and `ConnectionStatusService` for managing connection statuses with mapped enums. - Updated `ConnectedAppFactory` and Livewire `StoreConnectedAppForm` to integrate `ConnectionStatusData` and remove `logoUrl` field. - Adjusted `ConnectedApp` model to rename columns for consistency. - Implemented error handling in `ConnectedAppService::create()` for improved resilience. - Updated Blade templates and composer dependencies for compatibility. --- app/Data/ConnectedApp/ConnectAppRequest.php | 7 +- .../ConnectedApp/ConnectionStatusData.php | 23 ++ app/Factories/ConnectedAppFactory.php | 1 - app/Livewire/Forms/StoreConnectedAppFrom.php | 7 +- app/Models/ConnectedApp.php | 6 +- app/Services/ConnectedAppService.php | 11 +- app/Services/ConnectionStatusService.php | 19 ++ composer.lock | 218 ++++++------------ .../pages/connected-apps/⚡create.blade.php | 32 ++- 9 files changed, 154 insertions(+), 170 deletions(-) create mode 100644 app/Data/ConnectedApp/ConnectionStatusData.php create mode 100644 app/Services/ConnectionStatusService.php diff --git a/app/Data/ConnectedApp/ConnectAppRequest.php b/app/Data/ConnectedApp/ConnectAppRequest.php index 0174060..aed2aa1 100644 --- a/app/Data/ConnectedApp/ConnectAppRequest.php +++ b/app/Data/ConnectedApp/ConnectAppRequest.php @@ -4,11 +4,11 @@ namespace App\Data\ConnectedApp; -use Spatie\LaravelData\Attributes\MapInputName; +use Spatie\LaravelData\Attributes\MapOutputName; use Spatie\LaravelData\Data; use Spatie\LaravelData\Mappers\SnakeCaseMapper; -#[MapInputName(SnakeCaseMapper::class)] +#[MapOutputName(SnakeCaseMapper::class)] class ConnectAppRequest extends Data { public function __construct( @@ -16,8 +16,7 @@ public function __construct( public int $connectionProviderId, public int $connectionProtocolId, public ?string $connectionService = null, - public ?string $logoUrl = null, public ?string $slug = null, - public ?int $statusId = null, + public ?int $connectionStatusId = null, ) {} } diff --git a/app/Data/ConnectedApp/ConnectionStatusData.php b/app/Data/ConnectedApp/ConnectionStatusData.php new file mode 100644 index 0000000..fd3c005 --- /dev/null +++ b/app/Data/ConnectedApp/ConnectionStatusData.php @@ -0,0 +1,23 @@ + $data->name, 'connection_provider_id' => $data->connectionProviderId, 'connection_protocol_id' => $data->connectionProtocolId, - 'logo_url' => $data->logoUrl, 'slug' => $data->slug, 'connection_status_id' => $data->statusId, ]; diff --git a/app/Livewire/Forms/StoreConnectedAppFrom.php b/app/Livewire/Forms/StoreConnectedAppFrom.php index 9c39853..b35f0cd 100644 --- a/app/Livewire/Forms/StoreConnectedAppFrom.php +++ b/app/Livewire/Forms/StoreConnectedAppFrom.php @@ -23,9 +23,6 @@ class StoreConnectedAppFrom extends Form #[Validate('required|numeric|min:1|exists:connection_statuses,id')] public int $statusId = 0; - #[Validate('nullable|string|max:255|min:3')] - public ?string $logoUrl = null; - public function save(): void { $this->validate(); @@ -34,11 +31,9 @@ public function save(): void name: $this->name, connectionProviderId: $this->providerId, connectionProtocolId: $this->protocolId, - logoUrl: $this->logoUrl, slug: str($this->name)->slug()->toString(), - statusId: $this->statusId, + connectionStatusId: $this->statusId, ); - app(ConnectedAppService::class)->create($serviceData); $this->reset(); } diff --git a/app/Models/ConnectedApp.php b/app/Models/ConnectedApp.php index 8c7fa2d..9ea3493 100644 --- a/app/Models/ConnectedApp.php +++ b/app/Models/ConnectedApp.php @@ -11,9 +11,9 @@ #[Fillable([ 'name', 'slug', - 'service_protocol_id', - 'service_provider_id', - 'service_status_id', + 'connection_protocol_id', + 'connection_provider_id', + 'connection_status_id', ])] class ConnectedApp extends Model { diff --git a/app/Services/ConnectedAppService.php b/app/Services/ConnectedAppService.php index 8709483..7afabd8 100644 --- a/app/Services/ConnectedAppService.php +++ b/app/Services/ConnectedAppService.php @@ -5,18 +5,21 @@ namespace App\Services; use App\Data\ConnectedApp\ConnectAppRequest; -use App\Factories\ConnectedAppFactory; use App\Models\ConnectedApp; use Illuminate\Support\Facades\DB; +use Throwable; final class ConnectedAppService { + /** + * Create a new connected app. + * @throws Throwable + */ public function create(ConnectAppRequest $data): void { - $data = app(ConnectedAppFactory::class)->createDataFromDto($data); DB::transaction( - fn () => ConnectedApp::create( - $data + fn () => ConnectedApp::query()->create( + $data->toArray() ) ); } diff --git a/app/Services/ConnectionStatusService.php b/app/Services/ConnectionStatusService.php new file mode 100644 index 0000000..424b6fc --- /dev/null +++ b/app/Services/ConnectionStatusService.php @@ -0,0 +1,19 @@ + + */ + public function getAll(): DataCollection + { + $statuses = ConnectionStatus::query()->get(); + return ConnectionStatusData::collect($statuses, DataCollection::class); + } +} diff --git a/composer.lock b/composer.lock index 80c7dd7..b10e264 100644 --- a/composer.lock +++ b/composer.lock @@ -1494,16 +1494,16 @@ }, { "name": "laravel/framework", - "version": "v13.8.0", + "version": "v13.9.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "e7db333a025a1e93ebca7744953069d7719f4bcf" + "reference": "a0c6ad03b380287015287d8d5a0fa2459e2332fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/e7db333a025a1e93ebca7744953069d7719f4bcf", - "reference": "e7db333a025a1e93ebca7744953069d7719f4bcf", + "url": "https://api.github.com/repos/laravel/framework/zipball/a0c6ad03b380287015287d8d5a0fa2459e2332fd", + "reference": "a0c6ad03b380287015287d8d5a0fa2459e2332fd", "shasum": "" }, "require": { @@ -1607,7 +1607,7 @@ "aws/aws-sdk-php": "^3.322.9", "ext-gmp": "*", "fakerphp/faker": "^1.24", - "guzzlehttp/psr7": "^2.4", + "guzzlehttp/psr7": "^2.9", "laravel/pint": "^1.18", "league/flysystem-aws-s3-v3": "^3.25.1", "league/flysystem-ftp": "^3.25.1", @@ -1714,7 +1714,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2026-05-05T21:01:14+00:00" + "time": "2026-05-13T15:38:40+00:00" }, { "name": "laravel/passkeys", @@ -3011,16 +3011,16 @@ }, { "name": "nette/utils", - "version": "v4.1.3", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe" + "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/bb3ea637e3d131d72acc033cfc2746ee893349fe", - "reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe", + "url": "https://api.github.com/repos/nette/utils/zipball/7da6c396d7ebe142bc857c20479d5e70a5e1aac7", + "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7", "shasum": "" }, "require": { @@ -3096,9 +3096,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.1.3" + "source": "https://github.com/nette/utils/tree/v4.1.4" }, - "time": "2026-02-13T03:05:33+00:00" + "time": "2026-05-11T20:49:54+00:00" }, { "name": "nikic/php-parser", @@ -3314,78 +3314,6 @@ }, "time": "2025-09-24T15:06:41+00:00" }, - { - "name": "phpdocumentor/reflection", - "version": "6.6.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/Reflection.git", - "reference": "c8d36446027506a005103d57265ba5ea56beabfc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/c8d36446027506a005103d57265ba5ea56beabfc", - "reference": "c8d36446027506a005103d57265ba5ea56beabfc", - "shasum": "" - }, - "require": { - "composer-runtime-api": "^2", - "nikic/php-parser": "~4.18 || ^5.0", - "php": "8.1.*|8.2.*|8.3.*|8.4.*|8.5.*", - "phpdocumentor/reflection-common": "^2.1", - "phpdocumentor/reflection-docblock": "^5", - "phpdocumentor/type-resolver": "^1.4", - "symfony/polyfill-php80": "^1.28", - "webmozart/assert": "^1.7" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "doctrine/coding-standard": "^13.0", - "eliashaeussler/phpunit-attributes": "^1.8", - "mikey179/vfsstream": "~1.2", - "mockery/mockery": "~1.6.0", - "phpspec/prophecy-phpunit": "^2.4", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-webmozart-assert": "^1.2", - "phpunit/phpunit": "^10.5.53", - "psalm/phar": "^6.0", - "rector/rector": "^1.0.0", - "squizlabs/php_codesniffer": "^3.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-5.x": "5.3.x-dev", - "dev-6.x": "6.0.x-dev" - } - }, - "autoload": { - "files": [ - "src/php-parser/Modifiers.php" - ], - "psr-4": { - "phpDocumentor\\": "src/phpDocumentor" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Reflection library to do Static Analysis for PHP Projects", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/Reflection/issues", - "source": "https://github.com/phpDocumentor/Reflection/tree/6.6.0" - }, - "time": "2026-04-12T18:07:10+00:00" - }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", @@ -4426,22 +4354,24 @@ }, { "name": "spatie/laravel-data", - "version": "4.22.1", + "version": "4.23.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-data.git", - "reference": "ec254c0ebc3f3b37515cd7449e2dbb10588e606b" + "reference": "230543769c996e407fec2873930626aed7dd0d3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-data/zipball/ec254c0ebc3f3b37515cd7449e2dbb10588e606b", - "reference": "ec254c0ebc3f3b37515cd7449e2dbb10588e606b", + "url": "https://api.github.com/repos/spatie/laravel-data/zipball/230543769c996e407fec2873930626aed7dd0d3b", + "reference": "230543769c996e407fec2873930626aed7dd0d3b", "shasum": "" }, "require": { "illuminate/contracts": "^10.0|^11.0|^12.0|^13.0", "php": "^8.1", - "phpdocumentor/reflection": "^6.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/reflection-docblock": "^5.3 || ^6.0", + "phpdocumentor/type-resolver": "^1.7 || ^2.0", "spatie/laravel-package-tools": "^1.9.0", "spatie/php-structure-discoverer": "^2.0" }, @@ -4496,7 +4426,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-data/issues", - "source": "https://github.com/spatie/laravel-data/tree/4.22.1" + "source": "https://github.com/spatie/laravel-data/tree/4.23.0" }, "funding": [ { @@ -4504,7 +4434,7 @@ "type": "github" } ], - "time": "2026-04-27T07:30:53+00:00" + "time": "2026-05-08T14:41:13+00:00" }, { "name": "spatie/laravel-package-tools", @@ -4994,16 +4924,16 @@ }, { "name": "symfony/console", - "version": "v8.0.9", + "version": "v8.0.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "7113778e2e91f4709cb3194a75dfa9c0d028d94d" + "reference": "3156577f46a38aa1b9323aad223de7a9cd426782" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/7113778e2e91f4709cb3194a75dfa9c0d028d94d", - "reference": "7113778e2e91f4709cb3194a75dfa9c0d028d94d", + "url": "https://api.github.com/repos/symfony/console/zipball/3156577f46a38aa1b9323aad223de7a9cd426782", + "reference": "3156577f46a38aa1b9323aad223de7a9cd426782", "shasum": "" }, "require": { @@ -5060,7 +4990,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.9" + "source": "https://github.com/symfony/console/tree/v8.0.11" }, "funding": [ { @@ -5080,7 +5010,7 @@ "type": "tidelift" } ], - "time": "2026-04-29T15:02:55+00:00" + "time": "2026-05-13T12:07:53+00:00" }, { "name": "symfony/css-selector", @@ -5618,16 +5548,16 @@ }, { "name": "symfony/http-kernel", - "version": "v8.0.10", + "version": "v8.0.11", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "fb3f65b3d4ca2dad31c80d323819a762ca31d6ac" + "reference": "20d3680373f4b791903c09e74b45402b4aeda71c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/fb3f65b3d4ca2dad31c80d323819a762ca31d6ac", - "reference": "fb3f65b3d4ca2dad31c80d323819a762ca31d6ac", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/20d3680373f4b791903c09e74b45402b4aeda71c", + "reference": "20d3680373f4b791903c09e74b45402b4aeda71c", "shasum": "" }, "require": { @@ -5698,7 +5628,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/v8.0.10" + "source": "https://github.com/symfony/http-kernel/tree/v8.0.11" }, "funding": [ { @@ -5718,7 +5648,7 @@ "type": "tidelift" } ], - "time": "2026-05-06T12:27:31+00:00" + "time": "2026-05-13T18:07:14+00:00" }, { "name": "symfony/mailer", @@ -6797,16 +6727,16 @@ }, { "name": "symfony/process", - "version": "v8.0.8", + "version": "v8.0.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc" + "reference": "26d89e459f037d2873300605d0a07e7a8ef84db0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", - "reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc", + "url": "https://api.github.com/repos/symfony/process/zipball/26d89e459f037d2873300605d0a07e7a8ef84db0", + "reference": "26d89e459f037d2873300605d0a07e7a8ef84db0", "shasum": "" }, "require": { @@ -6838,7 +6768,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.0.8" + "source": "https://github.com/symfony/process/tree/v8.0.11" }, "funding": [ { @@ -6858,7 +6788,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-11T16:56:32+00:00" }, { "name": "symfony/property-access", @@ -7113,16 +7043,16 @@ }, { "name": "symfony/serializer", - "version": "v7.4.8", + "version": "v7.4.10", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "006fd51717addf2df2bd1a64dafef6b7fab6b455" + "reference": "268c5aa6c4bd675eddd89348e7ecac292a843ddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/006fd51717addf2df2bd1a64dafef6b7fab6b455", - "reference": "006fd51717addf2df2bd1a64dafef6b7fab6b455", + "url": "https://api.github.com/repos/symfony/serializer/zipball/268c5aa6c4bd675eddd89348e7ecac292a843ddd", + "reference": "268c5aa6c4bd675eddd89348e7ecac292a843ddd", "shasum": "" }, "require": { @@ -7135,7 +7065,7 @@ "phpdocumentor/reflection-docblock": "<5.2|>=7", "phpdocumentor/type-resolver": "<1.5.1", "symfony/dependency-injection": "<6.4", - "symfony/property-access": "<6.4", + "symfony/property-access": "<6.4.31|>=7.0,<7.4.2|>=8.0,<8.0.2", "symfony/property-info": "<6.4", "symfony/type-info": "<7.2.5", "symfony/uid": "<6.4", @@ -7157,7 +7087,7 @@ "symfony/http-kernel": "^6.4|^7.0|^8.0", "symfony/messenger": "^6.4|^7.0|^8.0", "symfony/mime": "^6.4|^7.0|^8.0", - "symfony/property-access": "^6.4|^7.0|^8.0", + "symfony/property-access": "^6.4.31|^7.4.2|^8.0.2", "symfony/property-info": "^6.4|^7.0|^8.0", "symfony/translation-contracts": "^2.5|^3", "symfony/type-info": "^7.2.5|^8.0", @@ -7193,7 +7123,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v7.4.8" + "source": "https://github.com/symfony/serializer/tree/v7.4.10" }, "funding": [ { @@ -7213,7 +7143,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T21:34:42+00:00" + "time": "2026-05-03T13:03:28+00:00" }, { "name": "symfony/service-contracts", @@ -7304,16 +7234,16 @@ }, { "name": "symfony/string", - "version": "v8.0.8", + "version": "v8.0.11", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ae9488f874d7603f9d2dfbf120203882b645d963" + "reference": "39be2ad058a3c0bd558edca23e65f009865d75ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ae9488f874d7603f9d2dfbf120203882b645d963", - "reference": "ae9488f874d7603f9d2dfbf120203882b645d963", + "url": "https://api.github.com/repos/symfony/string/zipball/39be2ad058a3c0bd558edca23e65f009865d75ff", + "reference": "39be2ad058a3c0bd558edca23e65f009865d75ff", "shasum": "" }, "require": { @@ -7370,7 +7300,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.8" + "source": "https://github.com/symfony/string/tree/v8.0.11" }, "funding": [ { @@ -7390,7 +7320,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-13T12:07:53+00:00" }, { "name": "symfony/translation", @@ -8186,23 +8116,23 @@ }, { "name": "webmozart/assert", - "version": "1.12.1", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "9be6926d8b485f55b9229203f962b51ed377ba68" + "reference": "eb0d790f735ba6cff25c683a85a1da0eadeff9e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68", - "reference": "9be6926d8b485f55b9229203f962b51ed377ba68", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/eb0d790f735ba6cff25c683a85a1da0eadeff9e4", + "reference": "eb0d790f735ba6cff25c683a85a1da0eadeff9e4", "shasum": "" }, "require": { "ext-ctype": "*", "ext-date": "*", "ext-filter": "*", - "php": "^7.2 || ^8.0" + "php": "^8.2" }, "suggest": { "ext-intl": "", @@ -8212,7 +8142,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10-dev" + "dev-feature/2-0": "2.0-dev" } }, "autoload": { @@ -8228,6 +8158,10 @@ { "name": "Bernhard Schussek", "email": "bschussek@gmail.com" + }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com" } ], "description": "Assertions to validate method input/output with nice error messages.", @@ -8238,9 +8172,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.12.1" + "source": "https://github.com/webmozarts/assert/tree/2.3.0" }, - "time": "2025-10-29T15:56:20+00:00" + "time": "2026-04-11T10:33:05+00:00" } ], "packages-dev": [ @@ -9284,16 +9218,16 @@ }, { "name": "laravel/sail", - "version": "v1.58.0", + "version": "v1.59.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "2e5e968138ca52ed87d712449697a8364d73b466" + "reference": "a41abad557e487eaefde6c9873085ed086fdf47a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/2e5e968138ca52ed87d712449697a8364d73b466", - "reference": "2e5e968138ca52ed87d712449697a8364d73b466", + "url": "https://api.github.com/repos/laravel/sail/zipball/a41abad557e487eaefde6c9873085ed086fdf47a", + "reference": "a41abad557e487eaefde6c9873085ed086fdf47a", "shasum": "" }, "require": { @@ -9343,7 +9277,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2026-04-27T13:38:34+00:00" + "time": "2026-05-13T14:02:20+00:00" }, { "name": "mockery/mockery", @@ -11553,16 +11487,16 @@ }, { "name": "symfony/yaml", - "version": "v8.0.8", + "version": "v8.0.11", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "54174ab48c0c0f9e21512b304be17f8150ccf8f1" + "reference": "48046fbd5567bd1717f278eaa2cfc3131f489984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/54174ab48c0c0f9e21512b304be17f8150ccf8f1", - "reference": "54174ab48c0c0f9e21512b304be17f8150ccf8f1", + "url": "https://api.github.com/repos/symfony/yaml/zipball/48046fbd5567bd1717f278eaa2cfc3131f489984", + "reference": "48046fbd5567bd1717f278eaa2cfc3131f489984", "shasum": "" }, "require": { @@ -11604,7 +11538,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v8.0.8" + "source": "https://github.com/symfony/yaml/tree/v8.0.11" }, "funding": [ { @@ -11624,7 +11558,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-13T12:07:53+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", diff --git a/resources/views/pages/connected-apps/⚡create.blade.php b/resources/views/pages/connected-apps/⚡create.blade.php index b00ae8f..f15bdef 100644 --- a/resources/views/pages/connected-apps/⚡create.blade.php +++ b/resources/views/pages/connected-apps/⚡create.blade.php @@ -1,19 +1,24 @@ + * @returns DataCollection */ #[Computed] - public function connectionStatuses(): Collection + public function connectionStatuses(): DataCollection { - return ConnectionStatus::query()->get()->map(function (ConnectionStatus $status) { - $status->name = ucfirst($status->name); + $statusService = app(ConnectionStatusService::class); + + return $statusService->getAll()->map(function (ConnectionStatusData $status) { + if ($status->name === ConnectionStatusEnum::Disconnected) { + $this->form->statusId = $status->id; + } return $status; }); } @@ -54,7 +63,11 @@ public function searchProvider(string $name) public function save() { - $this->form->save(); + try { + $this->form->save(); + } catch (Throwable $e) { + \Illuminate\Support\Facades\Log::error('Error while submitting Create a connected app', [$e->getMessage()]); + } } }; ?> @@ -63,17 +76,16 @@ public function save()
-