Phase 3 complete: - ScontainersRepository: containerDetails, containerSave, containerDelete, scontainerByLang - BannersRepository: bannerDetails, bannerSave, bannerDelete, activeBanners, mainBanner - 4 legacy factories converted to thin wrappers delegating to Domain repos Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
307 lines
9.3 KiB
Markdown
307 lines
9.3 KiB
Markdown
# Roadmap: cmsPRO
|
|
|
|
## Overview
|
|
Pełna refaktoryzacja cmsPRO do architektury DDD wzorowanej na shopPRO. Wzorzec: wrapper delegation — stare klasy delegują do nowych, zero regresji. Referencja: C:\visual studio code\projekty\shopPRO. PHP < 8.0 (produkcja).
|
|
|
|
## Current Milestone
|
|
**v0.1 Refaktoryzacja** (v0.1.0)
|
|
Status: In progress
|
|
Phases: 3 of 19 complete
|
|
|
|
## Already Completed (before PAUL)
|
|
- **Domain (6 repos):** Articles, Languages, Layouts, Pages, Settings, User
|
|
- **Shared (5 modules):** Cache, Helpers, Html, Image, Tpl
|
|
- **Form Edit System:** Universal form handling framework (FormEditViewModel, multi-tab, validation)
|
|
- **PHPUnit base:** Bootstrap, 3 test files (Languages, Settings, User)
|
|
|
|
## Phases
|
|
|
|
| Phase | Name | Plans | Status | Completed |
|
|
|-------|------|-------|--------|-----------|
|
|
| 1 | Infrastructure & Autoloader | 1 | Complete | 2026-04-04 |
|
|
| 2 | Shared: Email + Security | 1 | Complete | 2026-04-04 |
|
|
| 3 | Domain: Scontainers + Banners | 1 | Complete | 2026-04-04 |
|
|
| 4 | Domain: Authors + Newsletter | 1 | Not started | - |
|
|
| 5 | Domain: SeoAdditional + Cron + Releases | 1 | Not started | - |
|
|
| 6 | Admin: Base Infrastructure | 1 | Not started | - |
|
|
| 7 | Admin: Articles + ArticlesArchive | 1 | Not started | - |
|
|
| 8 | Admin: Pages + Layouts | 1 | Not started | - |
|
|
| 9 | Admin: Languages + Settings | 1 | Not started | - |
|
|
| 10 | Admin: Banners + Authors + Scontainers | 1 | Not started | - |
|
|
| 11 | Admin: Newsletter + Emails + SeoAdditional | 1 | Not started | - |
|
|
| 12 | Admin: Users + Backups + Filemanager | 1 | Not started | - |
|
|
| 13 | Admin: Releases + Update | 1 | Not started | - |
|
|
| 14 | Front: Site + Articles | 1 | Not started | - |
|
|
| 15 | Front: Pages + Menu + Banners + Scontainers | 1 | Not started | - |
|
|
| 16 | Front: Remaining modules | 1-2 | Not started | - |
|
|
| 17 | Users & Security: HMAC-SHA256 | 1 | Not started | - |
|
|
| 18 | Tests | 1-2 | Not started | - |
|
|
| 19 | Legacy Cleanup | 1 | Not started | - |
|
|
|
|
## Phase Details
|
|
|
|
### Phase 1: Infrastructure & Autoloader
|
|
|
|
**Goal:** Centralny autoloader (PSR-4 + legacy), composer.json z mapowaniem, usunięcie duplikatów z entry pointów.
|
|
**Depends on:** Nothing (first phase)
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- autoload/autoloader.php (hybrydowy)
|
|
- composer.json PSR-4: Domain\, Shared\, Admin\, Frontend\
|
|
- Migracja 6 entry pointów (index.php, admin/index.php, ajax.php, api.php, cron.php, download.php)
|
|
|
|
**Plans:**
|
|
- [ ] 01-01: PSR-4 autoloader setup i composer.json
|
|
|
|
### Phase 2: Shared: Email + Security
|
|
|
|
**Goal:** Dodać brakujące moduły Shared — Email (migracja z legacy) i Security (CsrfToken, wzór shopPRO).
|
|
**Depends on:** Phase 1 (autoloader)
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Shared\Email\Email — migracja z legacy
|
|
- Shared\Security\CsrfToken — nowy moduł (wzór shopPRO)
|
|
- Wrapper w starym class.Email.php (jeśli istnieje)
|
|
|
|
**Plans:**
|
|
- [ ] 02-01: Email + Security modules
|
|
|
|
### Phase 3: Domain: Scontainers + Banners
|
|
|
|
**Goal:** Repository dla Scontainers i Banners — przeniesienie logiki z factory do Domain\.
|
|
**Depends on:** Phase 1 (autoloader)
|
|
**Research:** Unlikely (wzorzec ustalony)
|
|
|
|
**Scope:**
|
|
- Domain\Scontainers\ScontainersRepository
|
|
- Domain\Banners\BannersRepository
|
|
- Wrappery w starych factory (delegacja)
|
|
|
|
**Plans:**
|
|
- [ ] 03-01: Scontainers + Banners repositories
|
|
|
|
### Phase 4: Domain: Authors + Newsletter
|
|
|
|
**Goal:** Repository dla Authors i Newsletter.
|
|
**Depends on:** Phase 1
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Domain\Authors\AuthorsRepository
|
|
- Domain\Newsletter\NewsletterRepository
|
|
|
|
**Plans:**
|
|
- [ ] 04-01: Authors + Newsletter repositories
|
|
|
|
### Phase 5: Domain: SeoAdditional + Cron + Releases
|
|
|
|
**Goal:** Repository dla SEO, Cron, i systemu Releases/Update.
|
|
**Depends on:** Phase 1
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Domain\SeoAdditional\SeoAdditionalRepository
|
|
- Domain\Cron\CronRepository
|
|
- Domain\Releases\ReleasesRepository (lub Update)
|
|
|
|
**Plans:**
|
|
- [ ] 05-01: SeoAdditional + Cron + Releases repositories
|
|
|
|
### Phase 6: Admin: Base Infrastructure
|
|
|
|
**Goal:** Bazowe klasy Admin\ — kontrolery bazowe, TableListRequestFactory, FormValidator (wzór shopPRO).
|
|
**Depends on:** Phase 1 (autoloader), Form Edit System (already done)
|
|
**Research:** Likely (analiza shopPRO Admin base classes)
|
|
|
|
**Scope:**
|
|
- Admin\Base\BaseController (lub abstrakcyjna klasa bazowa)
|
|
- Admin\Support\TableListRequestFactory
|
|
- Admin\Support\FormValidator
|
|
- Integracja z istniejącym FormEditViewModel
|
|
|
|
**Plans:**
|
|
- [ ] 06-01: Admin base infrastructure
|
|
|
|
### Phase 7: Admin: Articles + ArticlesArchive
|
|
|
|
**Goal:** Migracja kontrolerów Articles i ArticlesArchive do Admin\ z DI.
|
|
**Depends on:** Phase 6 (Admin base), Phase 1 (Domain\Articles already exists)
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Admin\Articles\ArticlesController
|
|
- Admin\Articles\ArticlesArchiveController
|
|
- Wrapper w starym controls/class.Articles.php
|
|
|
|
**Plans:**
|
|
- [ ] 07-01: Articles admin controllers
|
|
|
|
### Phase 8: Admin: Pages + Layouts
|
|
|
|
**Goal:** Migracja kontrolerów Pages i Layouts do Admin\.
|
|
**Depends on:** Phase 6
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Admin\Pages\PagesController
|
|
- Admin\Layouts\LayoutsController
|
|
|
|
**Plans:**
|
|
- [ ] 08-01: Pages + Layouts admin controllers
|
|
|
|
### Phase 9: Admin: Languages + Settings
|
|
|
|
**Goal:** Migracja kontrolerów Languages i Settings do Admin\.
|
|
**Depends on:** Phase 6
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Admin\Languages\LanguagesController
|
|
- Admin\Settings\SettingsController
|
|
|
|
**Plans:**
|
|
- [ ] 09-01: Languages + Settings admin controllers
|
|
|
|
### Phase 10: Admin: Banners + Authors + Scontainers
|
|
|
|
**Goal:** Migracja kontrolerów Banners, Authors, Scontainers do Admin\.
|
|
**Depends on:** Phase 6, Phase 3 (Domain repos), Phase 4 (Domain repos)
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Admin\Banners\BannersController
|
|
- Admin\Authors\AuthorsController
|
|
- Admin\Scontainers\ScontainersController
|
|
|
|
**Plans:**
|
|
- [ ] 10-01: Banners + Authors + Scontainers admin controllers
|
|
|
|
### Phase 11: Admin: Newsletter + Emails + SeoAdditional
|
|
|
|
**Goal:** Migracja kontrolerów Newsletter, Emails, SeoAdditional do Admin\.
|
|
**Depends on:** Phase 6, Phase 4, Phase 5
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Admin\Newsletter\NewsletterController
|
|
- Admin\Emails\EmailsController
|
|
- Admin\SeoAdditional\SeoAdditionalController
|
|
|
|
**Plans:**
|
|
- [ ] 11-01: Newsletter + Emails + SeoAdditional admin controllers
|
|
|
|
### Phase 12: Admin: Users + Backups + Filemanager
|
|
|
|
**Goal:** Migracja kontrolerów Users, Backups, Filemanager do Admin\.
|
|
**Depends on:** Phase 6
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Admin\Users\UsersController
|
|
- Admin\Backups\BackupsController
|
|
- Admin\Filemanager\FilemanagerController
|
|
|
|
**Plans:**
|
|
- [ ] 12-01: Users + Backups + Filemanager admin controllers
|
|
|
|
### Phase 13: Admin: Releases + Update
|
|
|
|
**Goal:** Migracja kontrolerów Releases i Update do Admin\.
|
|
**Depends on:** Phase 6, Phase 5 (Domain repos)
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Admin\Releases\ReleasesController
|
|
- Admin\Update\UpdateController
|
|
|
|
**Plans:**
|
|
- [ ] 13-01: Releases + Update admin controllers
|
|
|
|
### Phase 14: Front: Site + Articles
|
|
|
|
**Goal:** Migracja głównych kontrolerów front — Site i Articles do Frontend\.
|
|
**Depends on:** Phase 1 (autoloader), Domain repos
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Frontend\Site\SiteController (lub controls + factory + view)
|
|
- Frontend\Articles\ArticlesController
|
|
- LayoutEngine (jeśli potrzebny, wzór shopPRO)
|
|
|
|
**Plans:**
|
|
- [ ] 14-01: Site + Articles frontend controllers
|
|
|
|
### Phase 15: Front: Pages + Menu + Banners + Scontainers
|
|
|
|
**Goal:** Migracja front kontrolerów Pages, Menu, Banners, Scontainers.
|
|
**Depends on:** Phase 14 (Front base)
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Frontend\Pages, Frontend\Menu, Frontend\Banners, Frontend\Scontainers
|
|
|
|
**Plans:**
|
|
- [ ] 15-01: Pages + Menu + Banners + Scontainers frontend
|
|
|
|
### Phase 16: Front: Remaining modules
|
|
|
|
**Goal:** Migracja pozostałych front modułów — Authors, Languages, Newsletter, Search, AuditSEO, SeoAdditional, Layouts, Settings.
|
|
**Depends on:** Phase 14
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Wszystkie pozostałe front factories/controls/views
|
|
|
|
**Plans:**
|
|
- [ ] 16-01: Remaining frontend modules (batch 1)
|
|
- [ ] 16-02: Remaining frontend modules (batch 2, if needed)
|
|
|
|
### Phase 17: Users & Security: HMAC-SHA256
|
|
|
|
**Goal:** Wymiana insecure remember-me cookies (hash w JSON) na HMAC-SHA256 signed tokens.
|
|
**Depends on:** Phase 2 (Shared\Security), Phase 12 (Admin\Users)
|
|
**Research:** Likely (strategia migracji istniejących cookies, backward compat)
|
|
|
|
**Scope:**
|
|
- Nowy system remember-me z HMAC-SHA256
|
|
- Migracja istniejących sesji/cookies
|
|
- Security hardening w UserRepository
|
|
|
|
**Plans:**
|
|
- [ ] 17-01: HMAC-SHA256 cookie system
|
|
|
|
### Phase 18: Tests
|
|
|
|
**Goal:** Rozbudowa PHPUnit testów dla nowych Domain repositories i Admin controllers.
|
|
**Depends on:** Phase 5 (all Domain repos), Phase 13 (all Admin controllers)
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Testy dla nowych Domain repositories
|
|
- Testy dla Admin controllers (unit)
|
|
- Rozbudowa test bootstrap
|
|
|
|
**Plans:**
|
|
- [ ] 18-01: Domain repository tests
|
|
- [ ] 18-02: Admin controller tests
|
|
|
|
### Phase 19: Legacy Cleanup
|
|
|
|
**Goal:** Usunięcie legacy wrapperów i starych class.*.php po weryfikacji że cały kod używa nowych klas.
|
|
**Depends on:** All prior phases
|
|
**Research:** Unlikely
|
|
|
|
**Scope:**
|
|
- Usunięcie wrapperów z class.*.php
|
|
- Usunięcie starych controls/factory/view plików
|
|
- Finalna weryfikacja i cleanup
|
|
|
|
**Plans:**
|
|
- [ ] 19-01: Legacy wrapper removal and cleanup
|
|
|
|
---
|
|
*Roadmap created: 2026-04-04*
|
|
*Last updated: 2026-04-04*
|