Skip to content
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

improve ParallelExecutor::generateOptions to manage all types of InputOption #1792

Merged
merged 1 commit into from
Jan 15, 2019
Merged

improve ParallelExecutor::generateOptions to manage all types of InputOption #1792

merged 1 commit into from
Jan 15, 2019

Conversation

rvitaliy
Copy link
Contributor

Q A
Bug fix? Yes
New feature? Yes
BC breaks? No
Deprecations? No
Fixed tickets #1721 (comment)

@antonmedv antonmedv merged commit 0db4d18 into deployphp:master Jan 15, 2019
@kick-the-bucket
Copy link
Contributor

kick-the-bucket commented Jan 15, 2019

Just by looking at the code it seems like it now handles NO_VALUE options wrong by always adding them no matter if they are true or false (set or not).

I'll try to test it more thoroughly later today.

@antonmedv
Copy link
Member

@kick-the-bucket Will be cool if you can add test for this case too.

@kick-the-bucket
Copy link
Contributor

kick-the-bucket commented Jan 15, 2019

The previous fatals would've been caught just by adding something like this to any recipe test:

option('value-none', null, InputOption::VALUE_NONE);
option('value-optional', null, InputOption::VALUE_OPTIONAL, 'blah');
option('value-required', null, InputOption::VALUE_REQUIRED);
option('value-array-required', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED);
option('value-array-optional', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, ['a' => 'b']);

But since the code has now moved to separate classes it will be way easier write some unit tests.

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.

None yet

3 participants