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

Improved fixable tasks #794

Merged
merged 4 commits into from
Aug 6, 2020
Merged

Conversation

veewee
Copy link
Contributor

@veewee veewee commented Aug 5, 2020

Q A
Branch master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Documented? no
Fixed tickets #786

This PR limits the amount of boilerplate that is needed for creating fixable task results and drops the need for a custom formatter.

Example:

if (!$process->isSuccessful()) {
    return FixableProcessResultProvider::provide(
        TaskResult::createFailed($this, $context, $this->formatter->format($process)),
        function () use ($arguments): Process {
            $arguments->add('--fix');
            return $this->processBuilder->buildProcess($arguments);
        }
    );
}

@veewee veewee added this to the 0.20.1 milestone Aug 5, 2020
@veewee veewee merged commit 2ec1e46 into phpro:master Aug 6, 2020
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.

1 participant