Tactician is a command bus for PHP that provides a small, flexible implementation of the command pattern.
The tool solves the problem of organizing application logic by routing commands to their corresponding handlers. It works by accepting command objects, locating the appropriate handler for each command, and executing that handler. This approach decouples the code that issues commands from the code that executes them, making applications easier to test and maintain. The bus can be configured with middleware to add cross-cutting concerns like logging, validation, or transaction management around command execution.
Tactician suits projects where you want to structure business logic around discrete, named actions rather than procedural code paths. It works well in applications ranging from small services to larger systems where command organization becomes valuable. The tool is particularly useful when you need to add consistent behavior across multiple commands through middleware, or when you want to make command handling testable in isolation. Teams should choose this tool if they value explicit command routing and the ability to compose behavior through middleware chains, rather than relying on framework-level request handling or service locators.
The project maintains a stable, minimal codebase focused on the core command bus abstraction. Development activity shows consistent attention to the repository with regular engagement on issues and pull requests. The maintainers respond to community contributions and keep the tool aligned with PHP ecosystem standards. The project demonstrates a commitment to keeping the implementation lean and avoiding feature creep, which aligns with its stated goal of being small and flexible rather than comprehensive.