Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent global/application options conflicting with CompletionCommand #87

Merged
merged 1 commit into from
Jan 19, 2019

Conversation

stecman
Copy link
Owner

@stecman stecman commented Jan 6, 2019

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.

`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 while
maintaining backwards compatibility.

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.

Solves the issue mentioned in #86
@Seretos
Copy link

Seretos commented Jan 10, 2019

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

Thanks

@stecman stecman merged commit bd07a24 into master Jan 19, 2019
@stecman stecman deleted the conflicting-options branch January 19, 2019 21:25
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.

None yet

2 participants