refactor: centralny autoloader, Shared\Email i Shared\Security
- Utworzono autoload/autoloader.php (hybrydowy PSR-4 + legacy) - Zmigrowano 7 entry pointów do centralnego autoloadera - Dodano PSR-4 mapowanie w composer.json (Domain, Shared, Admin, Frontend) - Utworzono Shared\Email\Email (PHPMailer, migracja z Helpers) - Utworzono Shared\Security\CsrfToken (random_bytes + hash_equals) - Wrappery w Helpers delegują do nowych klas - Zaktualizowano docs/PROJECT_STRUCTURE.md - Inicjalizacja PAUL (.paul/) z roadmapą 19 faz refaktoryzacji Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
47
.paul/PROJECT.md
Normal file
47
.paul/PROJECT.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Project: cmsPRO
|
||||
|
||||
## Description
|
||||
Autorski system CMS z panelem administracyjnym (17 modułów admin, 13 modułów front). Projekt przechodzi pełną refaktoryzację kodu w 19 fazach — wzorcem docelowej architektury jest shopPRO. Wzorzec migracji: wrapper delegation (stare klasy delegują do nowych, zero regresji).
|
||||
|
||||
## Core Value
|
||||
Autorski system CMS umożliwiający zarządzanie treściami i stronami internetowymi.
|
||||
|
||||
## Already Completed
|
||||
- Domain (6 repos): Articles, Languages, Layouts, Pages, Settings, User
|
||||
- Shared (5 modules): Cache, Helpers, Html, Image, Tpl
|
||||
- Form Edit System: FormEditViewModel, multi-tab, validation, persistence
|
||||
- PHPUnit base: Bootstrap, 3 test files
|
||||
|
||||
## Requirements
|
||||
|
||||
### Must Have
|
||||
- Centralny PSR-4 autoloader (hybrydowy z legacy)
|
||||
- Wszystkie Domain repositories (Scontainers, Banners, Authors, Newsletter, SEO, Cron, Releases)
|
||||
- Shared\Email + Shared\Security (CsrfToken, HMAC-SHA256)
|
||||
- Admin\ namespace z DI dla wszystkich 17 modułów
|
||||
- Frontend\ namespace dla wszystkich front modułów
|
||||
- Bezpieczne cookies (HMAC-SHA256 zamiast hash w JSON)
|
||||
|
||||
### Should Have
|
||||
- PHPUnit testy dla nowych repositories i controllers
|
||||
- Legacy cleanup (usunięcie wrapperów po pełnej migracji)
|
||||
|
||||
### Nice to Have
|
||||
- Admin base classes (TableListRequestFactory, FormValidator — wzór shopPRO)
|
||||
|
||||
## Constraints
|
||||
- PHP < 8.0 (produkcja) — brak match, named args, union types, str_contains()
|
||||
- Referencja architektury: shopPRO (C:\visual studio code\projekty\shopPRO)
|
||||
- Zachowanie 100% kompatybilności wstecznej podczas migracji (wrapper delegation)
|
||||
- Medoo ORM (nie zmieniać)
|
||||
- Zewnętrzne biblioteki (Mobile_Detect, geoplugin) — nie ruszać
|
||||
|
||||
## Success Criteria
|
||||
- 19 faz refaktoryzacji zakończonych
|
||||
- Cały kod w namespace'ach Domain\, Shared\, Admin\, Frontend\
|
||||
- Zero regresji — istniejąca funkcjonalność działa bez zmian
|
||||
- Bezpieczne cookies (HMAC-SHA256)
|
||||
- Testy PHPUnit dla kluczowych modułów
|
||||
|
||||
---
|
||||
*Created: 2026-04-04*
|
||||
Reference in New Issue
Block a user