{"id":25893463,"url":"https://github.com/jenkoian/commandbuscommandbus","last_synced_at":"2025-07-18T01:37:45.036Z","repository":{"id":25588125,"uuid":"29022381","full_name":"jenkoian/CommandBusCommandBus","owner":"jenkoian","description":"🚌 Yo dawg, I heard you like command buses, so I put a command bus in your command bus, so you can command bus whilst you command bus","archived":false,"fork":false,"pushed_at":"2015-03-09T15:39:09.000Z","size":208,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-08T09:06:19.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkoian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-09T15:39:27.000Z","updated_at":"2024-04-08T09:06:19.613Z","dependencies_parsed_at":"2022-08-20T23:50:23.391Z","dependency_job_id":null,"html_url":"https://github.com/jenkoian/CommandBusCommandBus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkoian%2FCommandBusCommandBus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkoian%2FCommandBusCommandBus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkoian%2FCommandBusCommandBus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkoian%2FCommandBusCommandBus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkoian","download_url":"https://codeload.github.com/jenkoian/CommandBusCommandBus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241576890,"owners_count":19984939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-02T21:36:17.371Z","updated_at":"2025-03-02T21:36:17.921Z","avatar_url":"https://github.com/jenkoian.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"CommandBusCommandBus\n=====================\n\n![\"Yo dawg, I heard you like command buses, so I put a command bus in your command bus, so you can command bus whilst you command bus\"](yodawg.jpg)\n\nInstallation\n-------------\n\n```\ncomposer require jenko/command-bus-command-bus\n```\n\nUsage\n-----\n\nSay you have a controller (or whatever) that looks something like\n\n```php\n\u003c?php\n\nnamespace Acme\\Controller;\n\nuse Jenko\\CommandBusCommandBus\\CommandBus\n\nclass MyController\n{\n    /**\n     * CommandBus $commandBus\n     */\n    private $commandBus;\n\n    /**\n     * @param CommandBus $commandBus\n     */\n    public function __construct(CommandBus $commandBus)\n    {\n        $this-\u003ecommandBus = $commandBus;\n    }\n\n    /**\n     * @param Request $request\n     */\n    public function myAction(Request $request)\n    {\n        $stuff = $request-\u003eget('stuff');\n        $command = new MyCommand($stuff);\n\n        $this-\u003ecommandBus-\u003eexecute($command);\n\n        //...\n    }\n}\n```\n\nThen depending on your method of DependencyInjection just inject the required adapter for the command bus you want to use.\n\nFor example, in Symfony with controllers as services using Broadway:\n\n```yaml\nservices:\n\n    jenko.command_bus.broadway:\n        class: Jenko\\CommandBusCommandBus\\BroadwayCommandBusAdapter\n        arguments:\n            - @broadway.command_handling.simple_command_bus\n\n    acme.my_controller:\n        class: Acme\\Controller\\MyController\n        arguments:\n            - @jenko.command_bus.broadway\n````\n\nDisclaimer\n----------\n\nThis is a silly little project, you're probably better off just using the command bus which best fits your purpose. All the\ncommand buses used within this project look great, so pick one of the following, don't use this and I'm sure you won't far go wrong :)\n\n- [Broadway](https://github.com/qandidate-labs/broadway)\n- [Commander](https://github.com/Enginebit/Commander)\n- [Sergeant](https://github.com/acairns/sergeant)\n- [SimpleBus](https://github.com/SimpleBus/CommandBus)\n- [Tactician](https://github.com/thephpleague/tactician)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkoian%2Fcommandbuscommandbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkoian%2Fcommandbuscommandbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkoian%2Fcommandbuscommandbus/lists"}