Skip to content

Conversation

@ktomk
Copy link
Contributor

@ktomk ktomk commented Mar 4, 2017

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #21869
License MIT

Looking for options in the (raw) arguments should not look after an
argument of "--" has been encountered.

Not doing so prevents invoking the command or passing these arguments to
the command w/o interfering with the wrong application or command.

With this change: Places where the application looks for global flags like --verbose or
--help make use of the new OPTION_FLAG_POSIX that stops parsing options
at the options-from-operands delimiter "--" as in 12.2 Utility Syntax
Guidelines Guideline 10.

Refs:

Looking for options in the (raw) arguments should not look after an
argument of "--" has been encountered.

Not doing so prevents invoking the command or passing these arguments to
the command w/o interfering with the wrong application or command.

Places where the application looks for global flags like --verbose or
--help make use of the new OPTION_FLAG_POSIX that stops parsing options
at the options-from-operands delimiter "--" as in 12.2 Utility Syntax
Guidelines Guideline 10.

Refs:

- http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02
@fabpot
Copy link
Member

fabpot commented Mar 5, 2017

-- is supported as of Symfony 3.0, see #11431

@ktomk
Copy link
Contributor Author

ktomk commented Mar 5, 2017

Hmm, I see -- in the help output of that command in composer (based on 2.8.x IIRC) already, here this is within the composer project:

selection_018

selection_019

So if the fix is only in 3.0, then this has been filed against the wrong branch according to the docs I read yesterday, it's written, that it needs to go against the lowest supported one.

Can't the fix be ported onto 2.7+?

@ktomk
Copy link
Contributor Author

ktomk commented Mar 5, 2017

Looks like the fix is done in a similar fashion. A pity I have not seen it earlier, it's some time ago.

@fabpot
Copy link
Member

fabpot commented Mar 5, 2017

This can be seen as a bug fix, but this is also a behavior change, so back then, we decided to merge it in master. We won't change the decision, so it cannot be backported.

@ktomk
Copy link
Contributor Author

ktomk commented Mar 5, 2017

Hmm, the behaviour of the routine does not change. What actually changes, is the flaw removed. I don't think there is much to decide, but it's your decision, I don't want anyone to loose her or his face, I mean that was back in 2014 considering now that as a bug is indeed a bit late.

@fabpot
Copy link
Member

fabpot commented Mar 5, 2017

Closing then. Thanks.

@fabpot fabpot closed this Mar 5, 2017
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