Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Command Chaining Bundle Laravel Package

akmaks/command-chaining-bundle

View on GitHub
Deep Wiki
Context7

CommandChainingBundle

Bundle provides some functional for calling console commands in chain

Installation

  1. Install package
composer require akmaks/command-chaining-bundle
  1. Create file config/packages/akmaks_command_chaining.yaml and configure your chains
parameters:
    chains:
        App\UI\Console\FirstMainCommand:
            - App\UI\ConsoleSecondCommand
            - App\UI\ConsoleThirdCommand
            - App\UI\ConsoleSecondCommand
        App\UI\Console\SecondMainCommand:
            - App\UI\ConsoleSecondCommand
            - App\UI\ConsoleThirdCommand
            - App\UI\ConsoleSecondCommand
  1. Implements CommandChainingInterface in chain commands

For master commands:

class CreateCommand extends Command implements CommandChainingInterface
...
    public function isMasterCommand(): bool
    {
        return true;
    }

For chain commands:

class ConsoleSecondCommand extends Command implements CommandChainingInterface
...
    public function isMasterCommand(): bool
    {
        return false;
    }
...
  1. Check result:
bin/console app:first:main
[2021-05-25 21:07:25]: app:first:main is a master command of a command chain that has registered member commands
[2021-05-25 21:07:25]: app:first:second, app:first:third, app:first:second: are registered as a members of app:first:main command chain
[2021-05-25 21:07:25]: Executing app:first:main command itself first
[2021-05-25 21:07:25]: Executing app:first:main chain members
[2021-05-25 21:07:25]: Execution of app:first:main chain completed
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui