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

Skip to content

[Console] fixes unparsed StringInput tokens #7220

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

Merged
merged 2 commits into from
Feb 28, 2013
Merged

Conversation

jfsimon
Copy link
Contributor

@jfsimon jfsimon commented Feb 28, 2013

StringInput instances call setToken after constructor, parse method is called in constructor, so StringInput tokens where never parsed.

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #6749

fabpot added a commit that referenced this pull request Feb 28, 2013
This PR was merged into the 2.1 branch.

Commits
-------

5b19c89 [Console] fixed unparsed StringInput tokens
635b1fc StringInput resets the given options.

Discussion
----------

[Console] fixes unparsed StringInput tokens

`StringInput` instances call `setToken` after constructor, `parse` method is called in constructor, so `StringInput` tokens where never parsed.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6749
@fabpot fabpot merged commit 5b19c89 into symfony:2.1 Feb 28, 2013
jfsimon added a commit to jfsimon/symfony that referenced this pull request Mar 1, 2013
This reverts commit f52120b, reversing
changes made to 66c2be3.
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
jfsimon added a commit to jfsimon/symfony that referenced this pull request Mar 1, 2013
This reverts commit f52120b, reversing
changes made to 66c2be3.
fabpot added a commit that referenced this pull request Mar 6, 2013
This PR was merged into the 2.1 branch.

Commits
-------

6681df0 [Console] fixed StringInput binding
6b98883 [Console] added string input test
32f1904 Revert "merged branch jfsimon/issue-6749 (PR #7220)"

Discussion
----------

[Console] fixes tests

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7231

---------------------------------------------------------------------------

by gigablah at 2013-03-02T13:25:10Z

Apparently 5b19c89 broke the console shell. I was wondering why all commands executed through the shell in 2.2.0 were throwing "Too many arguments" exception.

---------------------------------------------------------------------------

by stof at 2013-03-02T13:27:09Z

@gigablah This is already fixed in the 2.2 branch as this PR has already been merged in 2.2 (but the revert is also needed in 2.1)

---------------------------------------------------------------------------

by gigablah at 2013-03-02T13:51:44Z

Ah, guess I'll have to wait for it to be pushed to the symfony/console repository then.
fabpot added a commit that referenced this pull request Mar 6, 2013
* 2.1:
  [FrameworkBundle] Fixes invalid serialized objects in cache
  remove dead code in yaml component
  fixed typo
  RedisProfilerStorage wrong db-number/index-number selected
  [DependencyInjection] added a test for the previous merge (refs #7261)
  Unset loading[$id] in ContainerBuilder on exception
  [Console] fixed StringInput binding
  [Console] added string input test
  Revert "merged branch jfsimon/issue-6749 (PR #7220)"
  fixed CS

Conflicts:
	src/Symfony/Component/Console/Tests/Input/StringInputTest.php
	src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php
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.

3 participants