maatify/infra-drivers
Composer 安装命令:
composer require maatify/infra-drivers
包简介
Pure infrastructure driver builders constructed from explicit, typed, readonly configuration objects. No environment access. No adapters. No runtime magic.
关键字:
README 文档
README
maatify/infra-drivers
Pure infrastructure driver builders for PHP.
maatify/infra-drivers is a low-level infrastructure library responsible for
constructing real native drivers (PDO, Redis, MongoDB, etc.)
from explicit, typed, readonly configuration objects.
This package exists to strictly separate driver construction from application bootstrap logic, adapters, and domain concerns.
What this library is
- Builds real infrastructure drivers
- Accepts explicit configuration DTOs
- Performs deterministic validation
- Throws typed infrastructure exceptions
- Has zero environment awareness
What this library is NOT
This package does not:
- Read environment variables
- Use dotenv or env loaders
- Provide DI containers or service locators
- Wrap adapters or expose unified APIs
- Perform runtime detection or switching
- Implement retries, pooling, or lifecycle management
- Make logging or monitoring decisions
Any such behavior is considered a design violation.
Architectural position
Application
↓
maatify/bootstrap (env → config wiring)
↓
Configuration DTOs
↓
maatify/infra-drivers (driver construction only)
↓
Native drivers
↓
maatify/data-adapters (wrappers only)
Design status
- Architecture: LOCKED
- Scope: LOCKED
- Versioning: Semantic Versioning (SemVer)
Public API changes require a major version bump.
Quick Start
maatify/infra-drivers is a low-level infrastructure wiring library.
It builds real native drivers from explicit configuration DTOs without reading environment variables or relying on DI containers.
Example: MySQL using PDO
use Maatify\InfraDrivers\Config\MySQL\MySQLConfigDTO; use Maatify\InfraDrivers\Builder\MySQL\MySQLDriverBuilder; $config = new MySQLConfigDTO( dsn: 'mysql:host=localhost;dbname=test_db;charset=utf8mb4', username: 'user', password: 'password' ); $builder = new MySQLDriverBuilder(); /** @var PDO $pdo */ $pdo = $builder->build($config);
This example demonstrates pure wiring only:
- No environment loading
- No service container
- No abstraction layer
Usage Examples
This repository includes standalone executable examples demonstrating correct usage for all supported drivers.
Available examples:
- MySQL (PDO)
- MySQL (Doctrine DBAL)
- Redis (ext-redis)
- Redis (Predis)
- MongoDB
📁 See the full list in examples/
⚠️ These examples are for reference only and are not production bootstraps.
One-line identity
Build real infrastructure drivers from explicit configuration objects — nothing more, nothing less.
🪪 License
MIT License © Maatify.dev — Free to use, modify, and distribute with attribution.
👤 Author
Engineered by Mohamed Abdulalim (@megyptm) Backend Lead & Technical Architect — https://www.maatify.dev
🤝 Contributors
Special thanks to the Maatify.dev engineering team and all open-source contributors.
Contributions are welcome. Please read the Contributing Guide before opening a PR.
Built with ❤️ by Maatify.dev — Infrastructure-first PHP libraries
maatify/infra-drivers 适用场景与选型建议
maatify/infra-drivers 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「redis」 「database」 「mongodb」 「php」 「configuration」 「pdo」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 maatify/infra-drivers 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 maatify/infra-drivers 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 maatify/infra-drivers 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Generates Symfony2 documents, forms and CRUD
Microservice RPC through message queues.
Store your language lines in the database, yaml or other sources
The CodeIgniter Redis package
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-18