stecman / symfony-console-completion

Automatic tab-key completion for Symfony console application options, arguments and parameters
MIT License
420 stars 26 forks source link

Prevent global/application options conflicting with CompletionCommand #87

Closed stecman closed 5 years ago

stecman commented 5 years ago

CompletionCommand does not need to know about custom application-level options in user code. This filters out options that aren't in the default set provided by the base Application class to prevent conflicts with option names.

If user-code wants to use global options in a subclass of CompletionCommand, filterApplicationOptions can be overridden to append any desired options to the default list.

Resolves the issue from #86 in a backwards compatible way.

Seretos commented 5 years ago

this changes is a much better solution than my. :+1: I have testet it in my case and until this PR is merged, i can use your workaround from #86

Thanks