Skip to content

[Console] Verbose long option value does not work in ArgvInput #9576

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

Closed
wants to merge 1 commit into from

Conversation

chEbba
Copy link
Contributor

@chEbba chEbba commented Nov 22, 2013

This PR just add a test and opens the issue, which relates #9566 to start a discussion about the problem.

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets no
License MIT
Doc PR ~

I added a test for long option value. Which does not work for ArgvInput. So syntax

cli.php --verbose=3 command
cli.php command --verbose=3

is not working since 2.3.

What can be done:

  • Remove all hacks like hasParameterOption('--verbose=3')
  • Remove tests for long option value
  • Add checks in ArrayInput for options without value

But there a low chance of user problems still exists if they rely on this option in ArrayInput (long verbose option value works for ArrayInput with VALUE_NONE because it does not check that value is acceptable, and does not work for String or Argv because of this check).

The another way is to add some more hacks to fix this support. But any change in this way have to be a hack, because option should stay to be VALUE_NONE for BC.

@chEbba
Copy link
Contributor Author

chEbba commented Nov 22, 2013

Branch was created from #9566 so PR will be rebased after merge of #9566, to remove additional commits.

@chEbba
Copy link
Contributor Author

chEbba commented Nov 24, 2013

Rebased.

@fabpot
Copy link
Member

fabpot commented Mar 19, 2014

Closing this PR as it only contains a test that cannot be merged. I've created an issue about this instead with a reference to this code for whomever might want to work on a fix (see #10487).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants