ver. 0.282: Banners frontend migration, Cache cleanup, Shared\Cache namespace
- Banners frontend: front\Views\Banners (new), BannerRepository +2 frontend methods, front\view\Site przepięty, usunięte front\factory\Banners i front\view\Banners - Cache cleanup: eliminacja legacy class.Cache.php (file-based cache), 13 metod front\factory przepiętych z \Cache::fetch/store na CacheHandler - Shared\Cache namespace: CacheHandler i RedisConnection przeniesione do Shared\Cache\, 60 odwołań CacheHandler i 12 odwołań RedisConnection przepiętych, usunięte backward-compat wrappery class.CacheHandler.php i class.RedisConnection.php - Naprawione rozbieżności kluczy cache (random_products, category_name) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ Panel administratora (33 moduły) został w pełni zmigrowany na architekturę D
|
||||
| Settings | Fasada (BUG: get_single_settings_value ignoruje $param) | NISKI |
|
||||
| Languages | USUNIĘTA — przepięta na Domain | — |
|
||||
| Layouts | Fasada | NISKI |
|
||||
| Banners | Fasada | NISKI |
|
||||
| Banners | USUNIETA — przepieta na Domain | — |
|
||||
| Menu | Fasada | NISKI |
|
||||
| Pages | Fasada | NISKI |
|
||||
| ShopAttribute | Fasada | NISKI |
|
||||
@@ -51,7 +51,8 @@ Panel administratora (33 moduły) został w pełni zmigrowany na architekturę D
|
||||
|-------|--------|
|
||||
| Site | KRYTYCZNY — show() ~600 linii, pattern substitution engine |
|
||||
| ShopCategory | VIEW z logiką routingu (infinite scroll vs pagination) |
|
||||
| Articles, Banners, Menu, Scontainers | Czyste VIEW |
|
||||
| Articles, Menu, Scontainers | Czyste VIEW |
|
||||
| Banners | PRZENIESIONA do `front\Views\Banners` |
|
||||
| Languages, Newsletter | PRZENIESIONE do `front\Views\` (nowy namespace) |
|
||||
| ShopClient, ShopOrder, ShopPaymentMethod | Czyste VIEW |
|
||||
| ShopTransport | PUSTA klasa (placeholder) |
|
||||
@@ -79,12 +80,12 @@ Panel administratora (33 moduły) został w pełni zmigrowany na architekturę D
|
||||
|-------|-------|--------|
|
||||
| S | ~1130 | htacces() ~500 linii — generowanie .htaccess; reszta to utility |
|
||||
| Tpl | ~90 | OK — silnik szablonów, bez zmian |
|
||||
| CacheHandler | ~50 | OK — Redis wrapper |
|
||||
| RedisConnection | ~40 | OK — singleton |
|
||||
| CacheHandler | ~50 | ZMIGROWANY do `Shared\Cache\CacheHandler` — wrappery usuniete |
|
||||
| RedisConnection | ~40 | ZMIGROWANY do `Shared\Cache\RedisConnection` — wrappery usuniete |
|
||||
| Email | ~100 | OK — PHPMailer wrapper (drobne poprawki) |
|
||||
| Log | ~20 | OK — audit logging |
|
||||
| DbModel | ~60 | OK — base ORM |
|
||||
| Cache | ~50 | LEGACY — file-based cache, rozważyć usunięcie |
|
||||
| Cache | ~50 | USUNIETA — zastapiona CacheHandler (Redis) w ver. 0.282 |
|
||||
| Html | ~80 | OK — form helpers |
|
||||
| Image | ~100 | OK — GD wrapper |
|
||||
| Mobile_Detect | — | Third-party, bez zmian |
|
||||
@@ -246,19 +247,37 @@ Legacy Cleanup
|
||||
|
||||
---
|
||||
|
||||
### Etap: Banners, Menu, Pages, Layouts Frontend Services
|
||||
### Etap: Banners Frontend — ZREALIZOWANY
|
||||
|
||||
**Cel:** Migracja `front\factory\Banners` i `front\view\Banners` do Domain + Views.
|
||||
|
||||
**DODANE METODY (do istniejącej klasy `BannerRepository`):**
|
||||
- `banners(string $langId): ?array` — aktywne banery (home_page=0), filtrowanie dat, Redis cache, plaski format languages
|
||||
- `mainBanner(string $langId): ?array` — baner glowny (home_page=1), filtrowanie dat, Redis cache, plaski format languages
|
||||
|
||||
**NOWE:**
|
||||
- `front\Views\Banners` — czysty VIEW (`banners()`, `mainBanner()`)
|
||||
|
||||
**ZMIANA:**
|
||||
- `front\factory\Banners` → USUNIETA (logika przeniesiona do `BannerRepository`)
|
||||
- `front\view\Banners` → USUNIETA (zastapiona przez `front\Views\Banners`)
|
||||
- `front\view\Site::show()` — przepiecie na `$bannerRepo->banners()` / `$bannerRepo->mainBanner()` + `\front\Views\Banners::`
|
||||
- Testy: 4 nowe w `BannerRepositoryTest` (454 OK, 1449 asercji)
|
||||
|
||||
---
|
||||
|
||||
### Etap: Menu, Pages, Layouts Frontend Services
|
||||
|
||||
**Cel:** Migracja pozostałych fabryk "liściowych".
|
||||
|
||||
**NOWE:**
|
||||
- `Domain/Banner/BannerFrontendService.php` — `mainBanner()`, `banners()` (filtrowanie po datach)
|
||||
- `Domain/Menu/MenuFrontendService.php` — `menuDetails()`, `menuPages()` (rekurencja)
|
||||
- `Domain/Pages/PagesFrontendService.php` — `pageDetails()`, `mainPageId()`, `langUrl()`, `pageSort()`
|
||||
- `Domain/Layouts/LayoutsFrontendService.php` — `activeLayout()`, `articleLayout()`, `productLayout()`, `categoryLayout()`, `defaultLayout()`, `categoryDefaultLayout()`
|
||||
- Testy: 4 pliki testowe
|
||||
- Testy: 3 pliki testowe
|
||||
|
||||
**ZMIANA:**
|
||||
- `front/factory/Banners`, `Menu`, `Pages`, `Layouts` → fasady
|
||||
- `front/factory/Menu`, `Pages`, `Layouts` → fasady
|
||||
|
||||
**BUG FIX:** `cms\Layout::__get()` — poprawka referencji do `$this->data`
|
||||
|
||||
@@ -485,7 +504,7 @@ front\factory\ShopPromotion::promotion_type_XX() → shop\Product::is_product_on
|
||||
|
||||
**USUNIĘCIE:**
|
||||
- Martwy kod `eval()` dla `[PHP]` bloków (jeśli nieużywany)
|
||||
- `class.Cache.php` (legacy file-based) jeśli wszystkie użycia przeniesione na `CacheHandler`
|
||||
- ~~`class.Cache.php` (legacy file-based)~~ **ZREALIZOWANE** w ver. 0.282
|
||||
- Pusta klasa `front\view\ShopTransport`
|
||||
|
||||
**ZMIANA:**
|
||||
|
||||
Reference in New Issue
Block a user