johnnickell / fight-common
A shared PHP library for Hexagonal Architecture, CQRS, and reusable domain primitives
Requires
- php: >=8.5
- psr/cache: ^3.0
- psr/container: ^2.0
- psr/http-client: ^1.0
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^3.0
Requires (Dev)
- codeigniter4/framework: ^4.7
- codeigniter4/queue: ^1.0
- deptrac/deptrac: ^4.7
- doctrine/dbal: ^4.4
- doctrine/orm: ^3.6
- dragonmantank/cron-expression: ^3.0
- guzzlehttp/guzzle: ^7.10
- guzzlehttp/promises: ^2.3
- guzzlehttp/psr7: ^2.9
- laravel/framework: ^13.0
- lcobucci/jwt: ^5.6
- league/flysystem: ^3.0
- mockery/mockery: ^1.6
- nikic/php-parser: ^5.8
- phpseclib/phpseclib: ^3.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^13.0
- psr/simple-cache: ^3.0
- rector/rector: ^2.4
- slevomat/coding-standard: ^8.27
- slim/slim: ^4.14
- squizlabs/php_codesniffer: ^4.0
- symfony/dependency-injection: ^8.1
- symfony/event-dispatcher: ^8.1
- symfony/filesystem: ^8.1
- symfony/finder: ^8.1
- symfony/http-foundation: ^8.1
- symfony/http-kernel: ^8.1
- symfony/mailer: ^8.1
- symfony/mercure: ^0.7
- symfony/messenger: ^8.1
- symfony/process: ^8.1
- symfony/routing: ^8.1
- symfony/yaml: ^8.1
- twig/twig: ^3.0
- twilio/sdk: ^8.0
- yiisoft/db: ^2.0
- yiisoft/db-sqlite: ^2.0
- yiisoft/di: ^1.4
- yiisoft/files: ^2.0
- yiisoft/mailer: ^6.1
- yiisoft/router: ^4.0
- yiisoft/router-fastroute: ^4.0
- yiisoft/view: ^12.2
Suggests
- ext-sodium: Required by the optional Sodium MCP interaction and notice continuation protectors
- codeigniter4/framework: Required by the CodeIgniter transaction and capability service delegates
- codeigniter4/queue: Required by the CodeIgniter Queue messaging adapters
- deptrac/deptrac: Required to run optional architecture checks in a consuming repository
- doctrine/dbal: Required by the custom doctrine data types
- doctrine/orm: Required by the canonical Doctrine transactional unit of work, legacy 1.x unit of work, audit repository, and base repository
- dragonmantank/cron-expression: Required by the Scheduler for cron expression parsing
- guzzlehttp/guzzle: Required by the guzzle http client adapter
- guzzlehttp/promises: Required by the guzzle http client adapter
- guzzlehttp/psr7: Required by the guzzle http client adapter
- laravel/framework: Required by the Laravel cache, queue, transaction, security, routing, and capability provider adapters
- lcobucci/jwt: Required by the jwt token encoder and decoder
- league/flysystem: Required by the flysystem file storage adapter
- phpseclib/phpseclib: Required by the SFTP file transport adapter
- psr/simple-cache: Required by the optional PSR-16 read-through cache adapter
- slevomat/coding-standard: Required by the optional FightCommon PHP_CodeSniffer standard
- slim/slim: Required by the Slim HTTP and middleware adapter prototypes
- squizlabs/php_codesniffer: Required to run the optional FightCommon PHP_CodeSniffer standard
- symfony/dependency-injection: Required by the Symfony compilation passes
- symfony/event-dispatcher: Required by the validation and other event subscribers
- symfony/filesystem: Required for the filesystem adapter
- symfony/http-foundation: Required for the JSend response and other HTTP related utilities
- symfony/http-kernel: Required for the kernel middleware and other HTTP related utilities
- symfony/mailer: Required by the Symfony mail transport and attachment adapters
- symfony/mercure: Required by the public and private Mercure hub publishers
- symfony/messenger: Required by the async messenger command bus and event dispatcher
- symfony/process: Required by the Symfony process runner adapter
- symfony/routing: Required for the URL generator
- symfony/yaml: Required by the optional bounded MCP Skill frontmatter parser (8.1 or later)
- twig/twig: Required by the Twig template engine adapter
- twilio/sdk: Required by the Twilio SMS transport adapter
- yiisoft/db: Required by the Yii DB transactional unit of work adapter
- yiisoft/db-sqlite: Required to run the Yii DB transactional unit of work adapter conformance tests
- yiisoft/di: Required to boot Yii capability service providers
- yiisoft/files: Required to evaluate Yii Files against the shared Fight filesystem conformance suite
- yiisoft/mailer: Required to evaluate Yii Mail against the shared Fight mail conformance suite
- yiisoft/router: Required by the Yii URL generator adapter
- yiisoft/router-fastroute: Required to run the Yii URL generator adapter conformance tests
- yiisoft/view: Required to evaluate Yii View against the shared Fight templating conformance suite
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-25 23:30:15 UTC
README
Fight Common
Fight Common is a PHP library for tasks like checking input, handling commands and events, and sending email. Use the parts you need. You can keep your business rules separate from the framework and services you use.
Install with Composer, PHP's package manager. You need PHP 8.5 or later.
composer require johnnickell/fight-common
Choose a capability
- Quick Start — Run an order example without a framework.
- Components — Find a guide for the part you need.
- Frameworks — Check support and find setup guides.
Inward architecture
The Architecture guide explains the dependency rule: Adapter → Application → Domain. Adapters connect to tools such as databases and frameworks. Application code runs use cases. The domain holds the business rules and does not depend on the other two layers.
JSend response compatibility
The framework-neutral JSend response format is unchanged. Use the typed response API; the old raw Symfony response and unsafe exception presenters have been removed. See the Validation guide for response behavior.
MCP foundation imports
If you use the Model Context Protocol (MCP), start with the
removal inventory for canonical
imports and what to do before upgrading saved PHP objects or changing container registrations. McpResponder
and McpDiagnostics stay in the root MCP namespace. The v1.5 foundation map
records the old aliases, and the aggregate namespace map
covers the separate aggregate alignment.
See execution observations for optional activity records and their limits, and durable Tasks for the separate storage, transaction and read interfaces.
Project routes
Contributing · Repository · Source · Changelog · MIT License · Glossary · Local tooling
Copyright © 2026 John Nickell.