Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jfsimon
Copy link
Contributor

@jfsimon jfsimon commented Mar 1, 2013

Previous StringInputTest::testInputOptionWithGivenString test was broken.
Trying make it pass broke the way StringInput is used in the console.

Two things to know abour the StringInput class in its actual state:

  • the second argument in the constructor is useless
  • the bind method must be called in order to access arguments/options
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes

fabpot added a commit that referenced this pull request Mar 1, 2013
This PR was merged into the 2.2 branch.

Commits
-------

5bf2f71 [Console] added deprecation annotation
f95f8e2 [Console] added string input test
4b12118 Revert "merged branch jfsimon/issue-6749 (PR #7220)"

Discussion
----------

[Console] fixes tests

Previous `StringInputTest::testInputOptionWithGivenString` test was broken.
Trying make it pass broke the way `StringInput` is used in the console.

Two things to know abour the `StringInput` class in its actual state:
*  the second argument in the constructor is useless
*  the `bind` method **must** be called in order to access arguments/options

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
@fabpot fabpot merged commit 5bf2f71 into symfony:2.2 Mar 1, 2013
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfsimon Wouldn't it be possible to call bind at the end of the constructor so that the argument is working ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe to call the parent constructor only after tokenizing ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if the argument is deprecated it should be removed from the constructor signature. And you func_get_args instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tobion there is a pending PR making it work properly again, so there will be no reason to deprecate it because being broken.

@stof
Copy link
Member

stof commented Mar 1, 2013

@fabpot The previous PR was merged into 2.1 but you only reverted in 2.2

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.

4 participants