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

Skip to content

[Console] ensure integer exit codes in events #8038

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 1 commit into from
May 19, 2013

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented May 14, 2013

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

@@ -131,7 +131,7 @@ public function run(InputInterface $input = null, OutputInterface $output = null
}
$exitCode = $e->getCode();

$exitCode = is_numeric($exitCode) && $exitCode ? $exitCode : 1;
$exitCode = $exitCode ? (is_numeric($exitCode) ? (int) $exitCode : 1) : 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This previously considered null and '' as an error which is not intented.

@Seldaek
Copy link
Member

Seldaek commented May 15, 2013

Seems reasonable to me.

@fabpot
Copy link
Member

fabpot commented May 15, 2013

Looks good to me. We probably need to add tests for the edge cases and I think it should be done on the 2.1 branch instead.

@Tobion
Copy link
Contributor Author

Tobion commented May 17, 2013

@fabpot I've split the things for 2.1 into #8080 and added tests as good as possible.
This PR only has events stuff that was introduced in 2.3. So please merge this into 2.3 instead of master.

fabpot added a commit that referenced this pull request May 19, 2013
This PR was merged into the master branch.

Discussion
----------

[Console] ensure integer exit codes in events

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

fe1db71 [Console] ensure integer exit codes in events
@fabpot fabpot merged commit fe1db71 into symfony:master May 19, 2013
fabpot added a commit that referenced this pull request May 19, 2013
This PR was merged into the 2.1 branch.

Discussion
----------

[Console] fix and refactor exit code handling

Split of #8038

Commits
-------

5c317b7 [Console] fix and refactor exit code handling
@Tobion
Copy link
Contributor Author

Tobion commented May 19, 2013

@fabpot not 2.3?

@Tobion Tobion deleted the console-event branch May 19, 2013 20:09
@fabpot
Copy link
Member

fabpot commented May 19, 2013

sorry, I forgot to switch the target. fixed now.

@Tobion
Copy link
Contributor Author

Tobion commented May 27, 2013

@fabpot seems like you didn't merge it in 2.3. It still not there.

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