Skip to content

Commit 81ea6d5

Browse files
committed
chore: update project phase metadata JSON with Phase 16 & Phase 17 alignment
Added full definitions for Phase 16 (MySQL DBAL Stability Patch + DSN Hardening) Added full definitions for Phase 17 (PHPStan Level-Max Strict Typing Pass) Normalized phase structure (consistent ids, titles, versions, timestamps, summaries) Cleaned outdated planning fields for Phase 9–14 Removed deprecated nested phase:{} wrapper from Phase 15 Updated descriptions to match CHANGELOG, README.full.md, and actual implementation Ensured chronological ordering across Phase 10 → 17 Standardized schema fields (status, completed_at, summary, goals, changes) Fully aligned metadata with completed v1.2.2 release
1 parent 84c7e94 commit 81ea6d5

8 files changed

Lines changed: 638 additions & 69 deletions

File tree

CHANGELOG.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,46 @@ All notable changes to this project will be documented in this file.
1717

1818
---
1919

20-
# **[1.2.0] — 2025-11-17**
20+
# **[1.2.2] — 2025-11-18**
21+
22+
### 🚀 Phase 17 — Project-Wide PHPStan Level-Max Compliance
23+
24+
### Added
25+
26+
* Enforced **PHPStan Level Max** across the entire project.
27+
* Introduced strict type guarantees for all adapters, builders, resolvers, and config layers.
28+
* Added new unit tests validating strict-typing behavior for DSN parsing, Mongo, MySQL (PDO/DBAL), Redis, and Registry merging.
29+
30+
### Changed
31+
32+
* Removed all mixed-type access patterns across adapters and config builders.
33+
* Replaced nullable or ambiguous return types with strict typed signatures.
34+
* Updated `getDriver()` implementations to consistently return concrete driver types (PDO, DBAL Connection, MongoDB\Database, Redis/Predis).
35+
* Strengthened DSN parsers with array-shape guarantees.
36+
* Standardized merge logic in `EnvironmentConfig` and `RegistryConfig`.
37+
38+
### Fixed
39+
40+
* Resolved multiple PHPStan violations:
41+
42+
* Non-exhaustive `match()` expressions
43+
* `PDOStatement|false` return handling
44+
* `executeQuery()` on mixed DBAL driver
45+
* DSN parsing inconsistencies (missing host/user/pass/port)
46+
* Nullsafe operator usage on non-nullable objects
47+
* Fixed `strtolower(null)` inside `DatabaseResolver`.
48+
49+
### Notes
50+
51+
* 100% backward compatible.
52+
* No API changes; this is a purely internal quality & safety improvement.
53+
* Library is now fully aligned with strict TYPOLOGY standards across Maatify repositories.
54+
55+
---
2156

2257
## [1.2.1] — 2025-11-17
58+
### 🚀 Phase 16 — MySQL DBAL Stability Patch + DSN Hardening
59+
2360
### Fixed
2461
- Forced TCP mode for MySQL DBAL by disabling unix_socket fallback.
2562
- Resolved `SQLSTATE[HY000] [2002] No such file or directory` affecting GitHub CI runs.
@@ -37,6 +74,7 @@ All notable changes to this project will be documented in this file.
3774

3875
---
3976

77+
# **[1.2.0] — 2025-11-17**
4078
## 🚀 **Phase 15 — Raw Driver Layer + Full DSN Stabilization**
4179

4280
### Added

README.md

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,163 @@ composer require maatify/data-adapters
6262

6363
---
6464

65+
# 🌟 Why Choose `maatify/data-adapters`?
66+
67+
`maatify/data-adapters` is not just another database wrapper —
68+
it is a **unified, production-ready connectivity engine** powering the entire Maatify Ecosystem.
69+
70+
Here’s why developers and teams prefer it:
71+
72+
---
73+
74+
## 🚀 1. One Resolver for All Data Sources
75+
Connect to **MySQL (PDO/DBAL)**, **MongoDB**, **Redis**, and **Predis** using the same API:
76+
77+
```php
78+
$adapter = $resolver->resolve('mysql.main');
79+
````
80+
81+
No manual wiring, no duplicate logic — **one resolver handles everything**.
82+
83+
---
84+
85+
## 🧠 2. DSN-First Architecture (PDO + Doctrine + Mongo + Redis)
86+
87+
Phase 13 introduced a complete DSN engine:
88+
89+
* `mysql://user:pass@host:3306/db`
90+
* `mongodb://host:27017/admin`
91+
* `redis://:password@host:6379/2`
92+
93+
This ensures **clean configuration**, **multi-profile support**, and **zero boilerplate**.
94+
95+
---
96+
97+
## 🔁 3. Multi-Profile Support (Unlimited Profiles)
98+
99+
```php
100+
mysql.main
101+
mysql.logs
102+
mysql.analytics
103+
mongo.activity
104+
redis.cache
105+
```
106+
107+
Run **isolated databases per module** with effortless switching.
108+
109+
---
110+
111+
## 🧩 4. Raw Driver Access (Phase 15)
112+
113+
Need native database power?
114+
115+
```php
116+
$pdo = $mysql->getDriver(); // PDO
117+
$db = $mongo->getDriver(); // MongoDB\Database
118+
$rd = $redis->getDriver(); // Redis or Predis\Client
119+
```
120+
121+
Perfect for advanced queries, analytics, or legacy migrations.
122+
123+
---
124+
125+
## 🩺 5. Built-In Diagnostics & Telemetry
126+
127+
Each adapter includes:
128+
129+
* `healthCheck()`
130+
* latency metrics
131+
* Prometheus-ready telemetry
132+
* structured log context
133+
* fallback logging
134+
135+
Ideal for microservices & modern cloud infrastructure.
136+
137+
---
138+
139+
## 🛡 6. Bulletproof Configuration Resolution
140+
141+
A 3-layer priority model:
142+
143+
```
144+
REGISTRY → DSN → Legacy environment variables
145+
```
146+
147+
This gives the library:
148+
149+
* ⭐ Predictable behavior
150+
* ⭐ Zero config duplication
151+
* ⭐ Clean environment files
152+
* ⭐ Dynamic overrides in production
153+
154+
---
155+
156+
## 🧪 7. Fully Tested — 93% Coverage
157+
158+
Test suite includes:
159+
160+
* DSN parsing
161+
* Registry merging
162+
* Multi-profile routing
163+
* Raw driver access
164+
* Diagnostics & telemetry
165+
* Redis/Mongo/MySQL integration
166+
167+
CI is stable and GitHub Actions validated.
168+
169+
---
170+
171+
## 🔥 8. Framework-Agnostic
172+
173+
Works with:
174+
175+
* maatify/bootstrap
176+
* maatify/security-guard
177+
* maatify/rate-limiter
178+
* maatify/mongo-activity
179+
* Laravel, Symfony, Slim, custom frameworks
180+
181+
You own the stack — the library adapts to you.
182+
183+
---
184+
185+
## 🌐 9. Enterprise-Grade Production Stability
186+
187+
Phase 15–17 implemented:
188+
189+
* DSN stabilization
190+
* Doctrine URL normalization
191+
* strict typing (PHPStan MAX)
192+
* DBAL safety
193+
* CI stability patch
194+
* cross-platform reliability (Linux/macOS/CI)
195+
196+
This is not hobby code — it’s ecosystem infrastructure.
197+
198+
---
199+
200+
## 🌈 10. Designed for Multi-Service Architectures
201+
202+
Supports:
203+
204+
* microservices
205+
* containers & Docker
206+
* Kubernetes
207+
* cloud deployments
208+
* serverless adapters
209+
* distributed logging
210+
* cross-service caches
211+
212+
Your data layer becomes **scalable, testable, and predictable**.
213+
214+
---
215+
216+
# 🔥 In short…
217+
218+
**If you want Redis, MongoDB, and MySQL to behave like a single unified system —
219+
this is the library.**
220+
221+
---
65222
## 🔥 New in Phase 13 — Unified Configuration Architecture
66223

67224
Phase 13 finalizes the unified configuration engine across all adapters.

RELEASE.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.1
1+
1.2.2

0 commit comments

Comments
 (0)