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

Support setup command traits before running #6577

Merged
merged 9 commits into from Mar 10, 2024

Conversation

huangdijia
Copy link
Member

@huangdijia huangdijia commented Mar 8, 2024

Bar:

trait Bar
{
    public function setUpBar($input, $output)
    {
        //...
    }
}

FooCommand:

class FooCommand extends \Hyperf\Command\Command
{
    use Bar;
    ...
}

The setUpBar method will be executed before FooCommand executes run.

@huangdijia huangdijia marked this pull request as ready for review March 8, 2024 09:03
@limingxinleo limingxinleo merged commit 10407ca into hyperf:master Mar 10, 2024
64 of 65 checks passed
@huangdijia huangdijia deleted the patch-command branch March 13, 2024 05:08
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

2 participants