fix eggs with [] (#1596)

This commit is contained in:
Charles 2025-08-12 15:02:41 -04:00 committed by GitHub
parent d1df53c683
commit 46934d7a85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,14 @@ class EggConfigurationService
* @return array{
* startup: array{done: string[], user_interaction: string[], strip_ansi: bool},
* 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
@ -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
// can property map the egg placeholders to values.