Merge remote-tracking branch 'upstream/main' into filament-v4

This commit is contained in:
Boy132 2025-08-13 14:14:55 +02:00
commit 9b906165aa
4 changed files with 27 additions and 19 deletions

View File

@ -20,7 +20,14 @@ class EggConfigurationService
* @return array{ * @return array{
* startup: array{done: string[], user_interaction: string[], strip_ansi: bool}, * startup: array{done: string[], user_interaction: string[], strip_ansi: bool},
* stop: array{type: string, value: string}, * stop: array{type: string, value: string},
* configs: array<mixed> * configs: list<array{
* file: string,
* replace: list<array{
* match: string,
* if_value?: string,
* replace_with: string
* }>
* }>
* } * }
*/ */
public function handle(Server $server): array public function handle(Server $server): array
@ -81,9 +88,10 @@ class EggConfigurationService
} }
/** /**
* @return array<mixed> * @param array<string, mixed> $configs
* @return array<int, array<string, mixed>>
*/ */
protected function replacePlaceholders(Server $server, object $configs): array protected function replacePlaceholders(Server $server, object|array $configs): array
{ {
// Get the legacy configuration structure for the server so that we // Get the legacy configuration structure for the server so that we
// can property map the egg placeholders to values. // can property map the egg placeholders to values.

View File

@ -61,8 +61,8 @@ class ServerCreationService
$egg = Egg::query()->findOrFail($data['egg_id']); $egg = Egg::query()->findOrFail($data['egg_id']);
// Fill missing fields from egg // Fill missing fields from egg
$data['image'] = $data['image'] ?? collect($egg->docker_images)->first(); $data['image'] ??= collect($egg->docker_images)->first();
$data['startup'] = $data['startup'] ?? $egg->startup; $data['startup'] ??= $egg->startup;
// If a deployment object has been passed we need to get the allocation and node that the server should use. // If a deployment object has been passed we need to get the allocation and node that the server should use.
if ($deployment) { if ($deployment) {
@ -92,7 +92,7 @@ class ServerCreationService
$data['node_id'] = $nodes->first(); $data['node_id'] = $nodes->first();
} }
} else { } else {
$data['node_id'] = Allocation::find($data['allocation_id'])?->node_id; $data['node_id'] ??= Allocation::find($data['allocation_id'])?->node_id;
} }
Assert::false(empty($data['node_id']), 'Expected a non-empty node_id in server creation data.'); Assert::false(empty($data['node_id']), 'Expected a non-empty node_id in server creation data.');

View File

@ -15,7 +15,7 @@
"doctrine/dbal": "~3.6.0", "doctrine/dbal": "~3.6.0",
"filament/filament": "4.0.0", "filament/filament": "4.0.0",
"guzzlehttp/guzzle": "^7.9", "guzzlehttp/guzzle": "^7.9",
"laravel/framework": "^12.22", "laravel/framework": "^12.23",
"laravel/helpers": "^1.7", "laravel/helpers": "^1.7",
"laravel/sanctum": "^4.1", "laravel/sanctum": "^4.1",
"laravel/socialite": "^5.21", "laravel/socialite": "^5.21",

24
composer.lock generated
View File

@ -936,16 +936,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.352.6", "version": "3.352.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "06d8e8c85f91e957f48480ce41e9c8a6d9fa253f" "reference": "26d8988376984e4684c497e71722a97b79aeef4e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/06d8e8c85f91e957f48480ce41e9c8a6d9fa253f", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/26d8988376984e4684c497e71722a97b79aeef4e",
"reference": "06d8e8c85f91e957f48480ce41e9c8a6d9fa253f", "reference": "26d8988376984e4684c497e71722a97b79aeef4e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1027,9 +1027,9 @@
"support": { "support": {
"forum": "https://github.com/aws/aws-sdk-php/discussions", "forum": "https://github.com/aws/aws-sdk-php/discussions",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.352.6" "source": "https://github.com/aws/aws-sdk-php/tree/3.352.7"
}, },
"time": "2025-08-11T18:04:59+00:00" "time": "2025-08-12T18:29:26+00:00"
}, },
{ {
"name": "blade-ui-kit/blade-heroicons", "name": "blade-ui-kit/blade-heroicons",
@ -3641,16 +3641,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v12.23.0", "version": "v12.23.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "1f81af17619f0bc8a87ec385a71546430c301b24" "reference": "2a0e9331a0db904236143fe915c281ff4be274a3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/1f81af17619f0bc8a87ec385a71546430c301b24", "url": "https://api.github.com/repos/laravel/framework/zipball/2a0e9331a0db904236143fe915c281ff4be274a3",
"reference": "1f81af17619f0bc8a87ec385a71546430c301b24", "reference": "2a0e9331a0db904236143fe915c281ff4be274a3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3854,7 +3854,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2025-08-12T15:37:17+00:00" "time": "2025-08-12T17:35:05+00:00"
}, },
{ {
"name": "laravel/helpers", "name": "laravel/helpers",
@ -16348,4 +16348,4 @@
"php": "8.2" "php": "8.2"
}, },
"plugin-api-version": "2.6.0" "plugin-api-version": "2.6.0"
} }