ver. 0.294: Code review complete — 96/96 classes, 27 fixes across all layers

Full codebase review of autoload/ directory (96 classes, ~1144 methods).
Fixes: null safety (query/find guards), redundant DI bypass, undefined
variables, missing globals, and Imagick WebP mime type bug in Helpers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 15:26:07 +01:00
parent 0252ccea30
commit de11afb003
30 changed files with 1380 additions and 1164 deletions

View File

@@ -4,6 +4,41 @@ Logi zmian z migracji na Domain-Driven Architecture. Najnowsze na gorze.
---
## ver. 0.294 (2026-02-19) - Code review: full codebase review complete (96/96 classes), 27 fixes across all layers
**Code review zakończony — 96 klas, ~1144 metody przejrzane.**
- **Domain layer (16 fixes):**
- FIX: `CategoryRepository` — usunięto martwy kod `updateCategoryDefaultLayoutId()`, `allCategoriesForCacheRefresh()`
- FIX: `ClientRepository` — null guard na `query()->fetchAll()`
- FIX: `DictionariesRepository` — null guard na `query()->fetchAll()` (2 metody)
- FIX: `IntegrationsRepository` — null guard na `query()->fetchAll()` (3 metody)
- FIX: `LanguagesRepository` — null guard na `query()->fetchAll()` (2 metody)
- FIX: `LayoutsRepository` — null guard na `query()->fetchAll()` (4 metody)
- FIX: `OrderAdminService` — null safety `find()` + redundancja DI
- FIX: `OrderRepository` — null guard na `query()->fetchAll()`
- FIX: `ProductRepository` — null guard na `query()->fetchAll()` (8 metod), redundancja DI
- FIX: `PromotionRepository` — redundancja `new ProductRepository` w pętlach (3 metody)
- **Admin layer (11 fixes):**
- FIX: `admin\App` — null guard po `details()` w logowaniu i 2FA
- FIX: `BannerController`, `ScontainersController`, `ShopProducerController` — null guard `find() ?: []` + `save()` null guard
- FIX: `PagesController` — null guard `menuDetails() ?: []`, `pageDetails() ?: []`
- FIX: `ProductArchiveController``$this->repository``$this->productRepository`
- FIX: `ShopAttributeController` — null guard `findAttribute() ?: []`
- FIX: `ShopCouponController` — null guard `find() ?: []`
- FIX: `ShopProductSetsController`, `ShopPromotionController` — null guard `find() ?: []`
- FIX: `ShopProductController` — null safety `findForAdmin() ?: []` + 3x redundancja DI
- **Front layer (3 fixes):**
- FIX: `LayoutEngine` — undefined `$level``null`; `$_GET['permutation_hash']``?? null`
- FIX: `ShopBasketController` — brakujące `global $lang_id` w `basketAddProduct()`
- **Shared layer (2 fixes):**
- FIX: `Helpers::generate_webp_image()``$_GET['c_w']`/`$_GET['c_h']``?? null`
- FIX: `Helpers::generate_webp_image()`**bug**: `'png'``'image/png'` (Imagick lossless WebP nigdy się nie aktywował)
- **CLASS_CATALOG.md** — kompletny katalog z ✅/🔧 przy wszystkich 1144 metodach
- Testy: 614 OK, 1821 asercji
---
## ver. 0.293 (2026-02-19) - Code review: fixes ArticleRepository, AttributeRepository, BannerRepository, BasketCalculator, CategoryRepository, PromotionRepository
- **ArticleRepository** (7 fixes):