8000 WIP #25825: Add a failing test to demonstrate bug introduced in #24987. by greg-1-anderson · Pull Request #25852 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

greg-1-anderson
Copy link
Contributor
@greg-1-anderson greg-1-anderson commented Jan 20, 2018
Q A
Branch? master
Bug fix? yes (failing tests only for now)
New feature? no
BC breaks? demonstrates BC breaks already committed
Deprecations? tbd
Tests pass? no (this is the purpose of this PR for now)
Fixed tickets #25825, #24987 (aiming to fix this - not yet fixed)
License MIT
Doc PR n/a

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 -e flag for additional options.

Proposed resolution:

Back out #24987

Impact:

Symfony Console will once again have the limitation that one cannot use cli.php -fh to set the -f flag AND get help via the -h flag, because hasParameterOption / getParameterOption only work with short parameters that appear by themselves (e.g. cli.php -f -h). This limitation is necessary because hasParameterOption() has no access to the input definition.

In the tests below, backing out #24987 would have the following effect:

Remaining work:

The function getParameterOption still 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].

@nicolas-grekas
Copy link
Member

@greg-1-anderson the fix should be submitted against branch 2.7, isn't it? Would you like to submit one?

@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Jan 21, 2018
@greg-1-anderson
Copy link
Contributor Author

@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
Copy link
Member

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
Copy link
Contributor Author

Work continues in #25893

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

Successfully merging this pull request may close these issues.

3 participants
0