{"id":20980634,"url":"https://github.com/php-api-clients/command-bus","last_synced_at":"2025-07-14T08:36:58.170Z","repository":{"id":52422292,"uuid":"70561577","full_name":"php-api-clients/command-bus","owner":"php-api-clients","description":" :bus: Light weight wrapper around league/tactician adding promised based interface(s) and next tick execution","archived":false,"fork":false,"pushed_at":"2023-12-15T08:46:42.000Z","size":199,"stargazers_count":11,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-30T23:25:08.435Z","etag":null,"topics":["hacktoberfest","php","reactphp"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-api-clients.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-11T06:07:11.000Z","updated_at":"2023-05-19T16:38:03.000Z","dependencies_parsed_at":"2023-12-15T09:49:44.316Z","dependency_job_id":null,"html_url":"https://github.com/php-api-clients/command-bus","commit_stats":{"total_commits":81,"total_committers":5,"mean_commits":16.2,"dds":0.3950617283950617,"last_synced_commit":"677564bd6498179da174f24a7bd385ca1ed66bc0"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/php-api-clients/command-bus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fcommand-bus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fcommand-bus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fcommand-bus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fcommand-bus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-api-clients","download_url":"https://codeload.github.com/php-api-clients/command-bus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-api-clients%2Fcommand-bus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262018677,"owners_count":23245618,"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":["hacktoberfest","php","reactphp"],"created_at":"2024-11-19T05:29:25.003Z","updated_at":"2025-06-26T07:03:07.722Z","avatar_url":"https://github.com/php-api-clients.png","language":"PHP","readme":"# Command Bus\n\n[![Linux Build Status](https://travis-ci.org/php-api-clients/command-bus.svg?branch=master)](https://travis-ci.org/php-api-clients/command-bus)\n[![Windows Build status](https://ci.appveyor.com/api/projects/status/g2ru84xmskifri4y?svg=true)](https://ci.appveyor.com/project/php-api-clients/command-bus)\n[![Latest Stable Version](https://poser.pugx.org/api-clients/command-bus/v/stable.png)](https://packagist.org/packages/api-clients/command-bus)\n[![Total Downloads](https://poser.pugx.org/api-clients/command-bus/downloads.png)](https://packagist.org/packages/api-clients/command-bus)\n[![Code Coverage](https://scrutinizer-ci.com/g/php-api-clients/command-bus/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/php-api-clients/command-bus/?branch=master)\n[![License](https://poser.pugx.org/api-clients/command-bus/license.png)](https://packagist.org/packages/api-clients/command-bus)\n[![PHP 7 ready](http://php7ready.timesplinter.ch/php-api-clients/command-bus/badge.svg)](https://appveyor-ci.org/php-api-clients/command-bus)\n\nLight weight wrapper around [`league/tactician`](http://tactician.thephpleague.com/) adding [`promised`](https://github.com/reactphp/promise) based interface(s) and next tick execution.\n\n# Installation\n\nTo install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.\n\n```\ncomposer require api-clients/command-bus \n```\n\n# Usage\n\nSimply pass the command bus a [`ReactPHP` event loop](https://github.com/reactphp/event-loop) and a `CommandHandlerMiddleware` and it will run each handle in a future tick on the passed event loop.\n\n```PHP\n$commandHandlerMiddleware = new CommandHandlerMiddleware(/*...*/);\n$commandBus = new CommandBus(\n    $container-\u003eget(LoopInterface::class),\n    $commandHandlerMiddleware\n);\n```\n\nThere is one note though, command handlers are encouraged to return promises them self. \n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Cees-Jan Kiewiet\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-api-clients%2Fcommand-bus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-api-clients%2Fcommand-bus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-api-clients%2Fcommand-bus/lists"}