Adapter
Eight infrastructure packages - PSR-compatible, no framework coupling, individually usable.
The adapter layer implements the outer ports of the Hexagonal Architecture and provides concrete infrastructure for PHP applications: database connections, caching, structured logging, event dispatching and messaging. Each package implements the interfaces defined in jardissupport/contracts and can be used independently of the rest of the Jardis stack - including in existing projects without a DDD runtime.
Overview
Adapters form the outer layer of the Hexagonal Architecture. They implement interfaces from Contract and provide concrete infrastructure: database connections, caching, logging, events, HTTP, email, messaging and filesystems. Each package is independently usable: without Jardis Core, without a framework.
GitHub: jardisAdapter
Packages
Cache
Multi-layer caching with automatic write-through: from in-memory to database. PSR-16 compatible, five adapters (Memory, APCu, Redis, Database, Null), namespace isolation.
composer require jardisadapter/cacheDatabase Connection
PDO connection management with connection pool, read/write splitting and health checks. Supports MySQL, PostgreSQL and SQLite.
composer require jardisadapter/dbconnectionEvent Dispatcher
Four classes, zero magic: synchronous event dispatching for Domain-Driven Design. PSR-14 compatible, priority ordering, type-hierarchy matching, stoppable events.
composer require jardisadapter/eventdispatcherFilesystem
Local filesystem and S3 with one API: without AWS SDK, without Flysystem. Stream support, visibility management, unified abstraction.
composer require jardisadapter/filesystemHTTP Client
PSR-18 HTTP client with handler pipeline, retry and its own PSR-7 implementation: without Guzzle, without Symfony. Convenience methods, Bearer/Basic auth, exponential backoff.
composer require jardisadapter/httpLogger
Structured logging with 20+ handlers, fluent configuration and built-in error resilience. PSR-3 compatible, file, console, Redis, Slack, Loki and more.
composer require jardisadapter/loggerMailer
Direct SMTP delivery with STARTTLS, attachments and connection keepalive: without Swiftmailer, without Symfony. HTML/text, retry, configurable timeouts.
composer require jardisadapter/mailerMessaging
Multi-transport messaging with Redis, Kafka, RabbitMQ, database and in-memory: one API for all. Publisher/consumer pattern, unified interface.
composer require jardisadapter/messagingCommon Traits
- PSR-compatible — PSR-3, PSR-14, PSR-16, PSR-18 where applicable
- Closure-Orchestrator Pattern — consistent architecture in every package
- No framework coupling — usable with or without Jardis Core
- Interfaces from Contract — swappable with custom implementations