Skip to content

fix(castor): Fix the --service option autocompletion - #440

Merged
lyrixx merged 1 commit into
mainfrom
fix-service-autocomplete
Sep 25, 2026
Merged

lyrixx merged 1 commit into
mainfrom
fix-service-autocomplete

Conversation

@lyrixx

@lyrixx lyrixx commented Sep 25, 2026

Copy link
Copy Markdown
Member

The --service option of docker:build, docker:up and docker:stop never suggests anything.

Symfony calls the autocomplete callback with a CompletionInput. docker\get_service_names(?string $profile) received it as $profile, converted to a string through ArgvInput::__toString(). No service has such a profile, so the list was always empty. PHPStan reports it too (argument.type on the AsOption attribute).

This adds a dedicated complete_service_names(CompletionInput $input) callback.

To reproduce (same as typing castor docker:build --service=<TAB>):

castor _complete -n -sbash -a1 -c2 -icastor -idocker:build -i--service=
  • before: no output
  • after: builder, frontend, postgres, router

Symfony calls the autocomplete callback with a CompletionInput, which
get_service_names() received as the profile name: no service matched,
so nothing was ever suggested.
@lyrixx
lyrixx enabled auto-merge September 25, 2026 10:10
@lyrixx
lyrixx merged commit eacd162 into main Sep 25, 2026
4 checks passed
@lyrixx
lyrixx deleted the fix-service-autocomplete branch September 25, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant