Version: 1.1.0
Completed: 2025-11-22
Project: maatify/data-fakes
- Implement
FakeMySQLAdapterusingFakeStorageLayer - Implement
FakeMySQLDbalAdapterwith Doctrine-style API - Support full CRUD operations (SELECT, INSERT, UPDATE, DELETE)
- Support filters, ordering, limit, offset
- Fully implement
AdapterInterfacelifecycle:- connect()
- disconnect()
- isConnected()
- healthCheck()
- getConnection()
- getDriver()
- DBAL lifecycle fully delegates to FakeMySQLAdapter
- Integrate and validate traits:
- NormalizesInputTrait
- QueryFilterTrait
- Update
FakeStorageLayerto support:- deterministic writes
- auto-increment tracking
- writeTable() replacement
- full reset() consistency
- Add complete PHPUnit coverage for:
- MySQL adapter
- DBAL adapter
- Storage layer behavior
src/Adapters/MySQL/FakeMySQLAdapter.php
src/Adapters/MySQL/FakeMySQLDbalAdapter.php
src/Adapters/Base/Traits/NormalizesInputTrait.php
src/Adapters/Base/Traits/QueryFilterTrait.php
src/Storage/FakeStorageLayer.php
tests/Adapters/FakeMySQLAdapterTest.php
tests/Adapters/FakeMySQLDbalAdapterTest.php
tests/Storage/FakeStorageLayerTest.php
| Test Area | Status |
|---|---|
| CRUD operations | ✅ Passed |
| Filters (IN / Contains / Regex) | ✅ Passed |
| Ordering ASC/DESC | ✅ Passed |
| LIMIT / OFFSET | ✅ Passed |
| DBAL wrapper | ✅ Passed |
| AdapterInterface lifecycle | ✅ Passed |
| FakeStorageLayer consistency | ✅ Passed |
Coverage: 92%
phpstan: Level 6 — Clean
FakeMySQLAdapterFakeMySQLDbalAdapter
FakeStorageLayer
NormalizesInputTraitQueryFilterTrait
- connect(), disconnect(), isConnected(), healthCheck(), getConnection(), getDriver()
- select(), insert(), update(), delete()
- fetchAll(), fetchOne()
- write(), writeTable(), read(), reset(), drop()
© 2025 Maatify.dev
Engineered by Mohamed Abdulalim (@megyptm) — https://www.maatify.dev
📘 Full documentation & source code:
https://github.com/Maatify/data-fakes
Special thanks to the Maatify.dev engineering team and open-source contributors.
Built with ❤️ by Maatify.dev — Unified Ecosystem for Modern PHP Libraries