Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
WIP #25825: Add a failing test to demonstrate bug introduced in #24987.#25852
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
5ebc8a4 to01ed485Comparenicolas-grekas commentedJan 21, 2018
@greg-1-anderson the fix should be submitted against branch 2.7, isn't it? Would you like to submit one? |
greg-1-anderson commentedJan 21, 2018
@nicolas-grekas The bug was committed to many versions of Symfony. If 2.7 is where I should start, I'll be happy to make a PR there to fix this. |
nicolas-grekas commentedJan 21, 2018
Yes, that's how we manage this: we first merge in the lowest branch, then we merge that branch up to master. |
greg-1-anderson commentedJan 22, 2018
Work continues in#25893 |
Uh oh!
There was an error while loading.Please reload this page.
This PR adds some failing tests to demonstrate the problem introduced by the above-referenced PR.
The main issue introduced is demonstrated by test
[B].hasParameterOption('-s')returns the wrong result because it confuses the characters in the value of the-eflag for additional options.Proposed resolution:
Back out#24987
Impact:
Symfony Console will once again have the limitation that one cannot use
cli.php -fhto set the-fflag AND get help via the-hflag, becausehasParameterOption/getParameterOptiononly work with short parameters that appear by themselves (e.g.cli.php -f -h). This limitation is necessary becausehasParameterOption()has no access to the input definition.In the tests below, backing out#24987 would have the following effect:
[A]: Control test:getOptions()/getOption()will continue to work as always.[B]: Fixed[C]and[D]: Will fail. Fixed by[Console] Fix global console flag when used in chain #24987, but introduces a worse problem[E],[F]and[G]: Not supported.Remaining work:
The function
getParameterOptionstill does not work correctly for short options with values. This bug was pre-existing, prior to#24987, and was not affected by that PR. See the comment on failing test[I].