ver. 0.273 - ShopProducer refactor + cleanup 6 factory facades
- Domain\Producer\ProducerRepository (CRUD + frontend) - admin\Controllers\ShopProducerController (DI) - Nowe widoki: producers-list, producer-edit (table-list/form-edit) - shop\Producer -> fasada do ProducerRepository - Przepiecie ShopProduct factory na TransportRepository - Usuniete 6 pustych factory facades: Languages, Newsletter, Scontainers, ShopProducer, ShopTransport, Layouts - Usuniete legacy: controls\ShopProducer, stare szablony - Testy: 338 tests, 1063 assertions OK
This commit is contained in:
@@ -4,6 +4,23 @@ Logi zmian z migracji na Domain-Driven Architecture. Najnowsze na gorze.
|
||||
|
||||
---
|
||||
|
||||
## ver. 0.273 (2026-02-15) - ShopProducer
|
||||
|
||||
- **ShopProducer** - migracja `/admin/shop_producer` na Domain + DI + nowe widoki
|
||||
- NOWE: `Domain\Producer\ProducerRepository` (`listForAdmin`, `find`, `save`, `delete`, `allProducers`, `findForFrontend`, `producerProducts`, `allActiveIds`)
|
||||
- NOWE: `admin\Controllers\ShopProducerController` (DI) z akcjami `list`, `edit`, `save`, `delete`
|
||||
- UPDATE: modul `/admin/shop_producer/*` dziala na `components/table-list` i `components/form-edit` z zakladkami jezykowymi (Opis + SEO)
|
||||
- UPDATE: routing i menu admin na kanoniczny URL `/admin/shop_producer/list/`
|
||||
- UPDATE: `shop\Producer` przepiety na fasade do `Domain\Producer\ProducerRepository`
|
||||
- UPDATE: `admin\factory\ShopProduct` - 2 wywolania `admin\factory\ShopTransport` przepiete na `Domain\Transport\TransportRepository`
|
||||
- UPDATE: `admin\controls\ShopProduct` - usuniety fallback do `admin\factory\Layouts`
|
||||
- CLEANUP: usuniete legacy `autoload/admin/controls/class.ShopProducer.php`, `admin/templates/shop-producer/list.php`, `admin/templates/shop-producer/edit.php`
|
||||
- CLEANUP: usuniete 6 pustych factory facades: `admin\factory\Languages`, `admin\factory\Newsletter`, `admin\factory\Scontainers`, `admin\factory\ShopProducer`, `admin\factory\ShopTransport`, `admin\factory\Layouts`
|
||||
- TEST: dodane `tests/Unit/Domain/Producer/ProducerRepositoryTest.php` i `tests/Unit/admin/Controllers/ShopProducerControllerTest.php`
|
||||
- Testy: **OK (338 tests, 1063 assertions)**
|
||||
|
||||
---
|
||||
|
||||
## ver. 0.272 (2026-02-15) - ShopProductSets
|
||||
|
||||
- **ShopProductSets** - migracja `/admin/shop_product_sets` na Domain + DI + nowe widoki
|
||||
|
||||
@@ -199,7 +199,7 @@ Jezyki panelu i frontendu.
|
||||
| start | 1 = domyslny jezyk |
|
||||
| o | Kolejnosc |
|
||||
|
||||
**Uzywane w:** `Domain\\Languages\\LanguagesRepository`, `admin\\Controllers\\LanguagesController`, `admin\\factory\\Languages`, `front\\factory\\Languages`
|
||||
**Uzywane w:** `Domain\\Languages\\LanguagesRepository`, `admin\\Controllers\\LanguagesController`, `front\\factory\\Languages`
|
||||
|
||||
## pp_langs_translations
|
||||
Slownik tlumaczen panelu/frontendu.
|
||||
@@ -462,7 +462,7 @@ Rodzaje transportu sklepu (modul `/admin/shop_transport`).
|
||||
| apilo_carrier_account_id | ID konta przewoznika w Apilo (NULL gdy brak mapowania) |
|
||||
| o | Kolejnosc wyswietlania |
|
||||
|
||||
**Uzywane w:** `Domain\Transport\TransportRepository`, `admin\Controllers\ShopTransportController`, `front\factory\ShopTransport`, `admin\factory\ShopTransport`
|
||||
**Uzywane w:** `Domain\Transport\TransportRepository`, `admin\Controllers\ShopTransportController`, `front\factory\ShopTransport`
|
||||
|
||||
## pp_shop_transport_payment_methods
|
||||
Powiazanie metod transportu z metodami platnosci (tabela lacznikowa).
|
||||
@@ -540,3 +540,31 @@ Powiazanie kompletow z produktami (tabela lacznikowa).
|
||||
**Uzywane w:** `Domain\ProductSet\ProductSetRepository`, `shop\Product`, `front\factory\ShopProduct`, `admin\factory\ShopProduct`
|
||||
|
||||
**Aktualizacja 2026-02-15 (ver. 0.272):** modul `/admin/shop_product_sets` korzysta z `Domain\ProductSet\ProductSetRepository` przez `admin\Controllers\ShopProductSetsController`. Usunieto legacy klasy `admin\controls\ShopProductSets` i `admin\factory\ShopProductSet`. `shop\ProductSet` dziala jako fasada do repozytorium.
|
||||
|
||||
## pp_shop_producer
|
||||
Producenci produktow (modul `/admin/shop_producer`).
|
||||
|
||||
| Kolumna | Opis |
|
||||
|---------|------|
|
||||
| id | PK |
|
||||
| name | Nazwa producenta |
|
||||
| status | Status: 1 = aktywny, 0 = nieaktywny |
|
||||
| img | Sciezka do logo producenta (NULL gdy brak) |
|
||||
|
||||
**Uzywane w:** `Domain\Producer\ProducerRepository`, `admin\Controllers\ShopProducerController`, `shop\Producer`, `shop\Product`, `front\controls\ShopProducer`
|
||||
|
||||
## pp_shop_producer_lang
|
||||
Tlumaczenia producentow (per jezyk). FK kaskadowe ON DELETE CASCADE.
|
||||
|
||||
| Kolumna | Opis |
|
||||
|---------|------|
|
||||
| id | PK |
|
||||
| producer_id | FK do pp_shop_producer |
|
||||
| lang_id | ID jezyka (np. pl, en) |
|
||||
| description | Opis producenta (TEXT) |
|
||||
| data | Dane producenta (TEXT, HTML) |
|
||||
| meta_title | Meta title SEO (VARCHAR 255) |
|
||||
|
||||
**Uzywane w:** `Domain\Producer\ProducerRepository`, `shop\Producer`, `shop\Product`
|
||||
|
||||
**Aktualizacja 2026-02-15 (ver. 0.273):** modul `/admin/shop_producer` korzysta z `Domain\Producer\ProducerRepository` przez `admin\Controllers\ShopProducerController`. Usunieto legacy `admin\controls\ShopProducer` i `admin\factory\ShopProducer`. `shop\Producer` dziala jako fasada do repozytorium.
|
||||
|
||||
@@ -222,6 +222,8 @@ autoload/
|
||||
│ │ └── TransportRepository.php
|
||||
│ ├── ProductSet/
|
||||
│ │ └── ProductSetRepository.php
|
||||
│ ├── Producer/
|
||||
│ │ └── ProducerRepository.php
|
||||
│ └── ...
|
||||
├── admin/
|
||||
│ ├── Controllers/ # Nowe kontrolery (namespace \admin\Controllers\)
|
||||
@@ -294,5 +296,16 @@ Pelna dokumentacja testow: `TESTING.md`
|
||||
- Usunieto legacy: `autoload/admin/controls/class.ShopProductSets.php`, `autoload/admin/factory/class.ShopProductSet.php`, `admin/templates/shop-product-sets/view-list.php`, `admin/templates/shop-product-sets/set-edit.php`.
|
||||
- `shop\ProductSet` przepiety na fasade do `Domain\ProductSet\ProductSetRepository`.
|
||||
|
||||
## Dodatkowa aktualizacja 2026-02-15 (ver. 0.273)
|
||||
- Dodano modul domenowy `Domain/Producer/ProducerRepository.php`.
|
||||
- Dodano kontroler DI `admin/Controllers/ShopProducerController.php`.
|
||||
- Modul `/admin/shop_producer/*` dziala na nowych widokach (`producers-list`, `producer-edit`).
|
||||
- Usunieto legacy: `autoload/admin/controls/class.ShopProducer.php`, `admin/templates/shop-producer/list.php`, `admin/templates/shop-producer/edit.php`.
|
||||
- `shop\Producer` przepiety na fasade do `Domain\Producer\ProducerRepository`.
|
||||
- `admin\controls\ShopProduct` uzywa `ProducerRepository::allProducers()`.
|
||||
- Usunieto 6 pustych factory facades: `admin\factory\Languages`, `admin\factory\Newsletter`, `admin\factory\Scontainers`, `admin\factory\ShopProducer`, `admin\factory\ShopTransport`, `admin\factory\Layouts`.
|
||||
- Przepieto 2 wywolania `admin\factory\ShopTransport` w `admin\factory\ShopProduct` na `Domain\Transport\TransportRepository`.
|
||||
- Usuniety fallback do `admin\factory\Layouts` w `admin\controls\ShopProduct`.
|
||||
|
||||
---
|
||||
*Dokument aktualizowany: 2026-02-15*
|
||||
|
||||
@@ -152,6 +152,7 @@ grep -r "Product::getQuantity" .
|
||||
| 21 | ShopTransport | 0.269 | listForAdmin, find, save, allActive, allForAdmin, findActiveById, getTransportCost, lowestTransportPrice, getApiloCarrierAccountId, powiazanie z PaymentMethod, DI kontroler |
|
||||
| 22 | ShopAttribute | 0.271 | list/edit/save/delete/values, nowy edytor wartosci, cleanup legacy, przepiecie zaleznosci kombinacji |
|
||||
| 23 | ShopProductSets | 0.272 | listForAdmin, find, save, delete, allSets, allProductsMap, multi-select Selectize, DI kontroler |
|
||||
| 24 | ShopProducer | 0.273 | listForAdmin, find, save, delete, allProducers, producerProducts, fasada shop\Producer, DI kontroler |
|
||||
|
||||
### Product - szczegolowy status
|
||||
- ✅ getQuantity (ver. 0.238)
|
||||
@@ -169,11 +170,11 @@ grep -r "Product::getQuantity" .
|
||||
|
||||
## Kolejność refaktoryzacji (priorytet)
|
||||
|
||||
1-23: ✅ Cache, Product, Banner, Settings, Dictionaries, ProductArchive, Filemanager, Users, Pages, Integrations, ShopPromotion, ShopCoupon, ShopStatuses, ShopPaymentMethod, ShopTransport, ShopAttribute, ShopProductSets
|
||||
1-24: ✅ Cache, Product, Banner, Settings, Dictionaries, ProductArchive, Filemanager, Users, Pages, Integrations, ShopPromotion, ShopCoupon, ShopStatuses, ShopPaymentMethod, ShopTransport, ShopAttribute, ShopProductSets, ShopProducer
|
||||
|
||||
Nastepne:
|
||||
24. **Order**
|
||||
25. **Category**
|
||||
25. **Order**
|
||||
26. **Category**
|
||||
|
||||
## Form Edit System
|
||||
|
||||
@@ -251,7 +252,9 @@ tests/
|
||||
│ │ ├── Dictionaries/DictionariesRepositoryTest.php
|
||||
│ │ ├── Integrations/IntegrationsRepositoryTest.php
|
||||
│ │ ├── PaymentMethod/PaymentMethodRepositoryTest.php
|
||||
│ │ ├── Producer/ProducerRepositoryTest.php
|
||||
│ │ ├── Product/ProductRepositoryTest.php
|
||||
│ │ ├── ProductSet/ProductSetRepositoryTest.php
|
||||
│ │ ├── Promotion/PromotionRepositoryTest.php
|
||||
│ │ ├── Settings/SettingsRepositoryTest.php
|
||||
│ │ ├── ShopStatus/ShopStatusRepositoryTest.php
|
||||
@@ -265,12 +268,18 @@ tests/
|
||||
│ ├── SettingsControllerTest.php
|
||||
│ ├── ShopCouponControllerTest.php
|
||||
│ ├── ShopPaymentMethodControllerTest.php
|
||||
│ ├── ShopProducerControllerTest.php
|
||||
│ ├── ShopProductSetsControllerTest.php
|
||||
│ ├── ShopPromotionControllerTest.php
|
||||
│ ├── ShopStatusesControllerTest.php
|
||||
│ └── UsersControllerTest.php
|
||||
└── Integration/
|
||||
```
|
||||
**Lacznie: 312 testow, 948 asercji**
|
||||
**Lacznie: 338 testow, 1063 asercji**
|
||||
|
||||
Aktualizacja 2026-02-15 (ver. 0.273):
|
||||
- dodano testy `tests/Unit/Domain/Producer/ProducerRepositoryTest.php`
|
||||
- dodano testy `tests/Unit/admin/Controllers/ShopProducerControllerTest.php`
|
||||
|
||||
Aktualizacja 2026-02-14 (ver. 0.271):
|
||||
- dodano testy `tests/Unit/Domain/Attribute/AttributeRepositoryTest.php`
|
||||
|
||||
@@ -36,7 +36,7 @@ Alternatywnie (Git Bash):
|
||||
Ostatnio zweryfikowano: 2026-02-15
|
||||
|
||||
```text
|
||||
OK (324 tests, 1000 assertions)
|
||||
OK (338 tests, 1063 assertions)
|
||||
```
|
||||
|
||||
## Struktura testow
|
||||
@@ -54,6 +54,7 @@ tests/
|
||||
| | |-- Dictionaries/DictionariesRepositoryTest.php
|
||||
| | |-- Integrations/IntegrationsRepositoryTest.php
|
||||
| | |-- PaymentMethod/PaymentMethodRepositoryTest.php
|
||||
| | |-- Producer/ProducerRepositoryTest.php
|
||||
| | |-- Product/ProductRepositoryTest.php
|
||||
| | |-- ProductSet/ProductSetRepositoryTest.php
|
||||
| | |-- Promotion/PromotionRepositoryTest.php
|
||||
@@ -71,6 +72,7 @@ tests/
|
||||
| |-- ShopAttributeControllerTest.php
|
||||
| |-- ShopCouponControllerTest.php
|
||||
| |-- ShopPaymentMethodControllerTest.php
|
||||
| |-- ShopProducerControllerTest.php
|
||||
| |-- ShopProductSetsControllerTest.php
|
||||
| |-- ShopPromotionControllerTest.php
|
||||
| |-- ShopStatusesControllerTest.php
|
||||
@@ -411,3 +413,14 @@ OK (324 tests, 1000 assertions)
|
||||
Nowe testy dodane 2026-02-15:
|
||||
- `tests/Unit/Domain/ProductSet/ProductSetRepositoryTest.php` (7 testow: find default/normalize, save insert/update, delete invalid, whitelist sortowania/paginacji, allSets)
|
||||
- `tests/Unit/admin/Controllers/ShopProductSetsControllerTest.php` (5 testow: kontrakty metod, aliasy legacy, return types, DI konstruktora)
|
||||
|
||||
## Aktualizacja suite (ShopProducer refactor, ver. 0.273)
|
||||
Ostatnio zweryfikowano: 2026-02-15
|
||||
|
||||
```text
|
||||
OK (338 tests, 1063 assertions)
|
||||
```
|
||||
|
||||
Nowe testy dodane 2026-02-15:
|
||||
- `tests/Unit/Domain/Producer/ProducerRepositoryTest.php` (9 testow: find default/normalize, save insert/update, delete invalid/success, whitelist sortowania/paginacji, allProducers, producerProducts)
|
||||
- `tests/Unit/admin/Controllers/ShopProducerControllerTest.php` (5 testow: kontrakty metod, aliasy legacy, return types, DI konstruktora)
|
||||
|
||||
Reference in New Issue
Block a user