feat(13-email-mailboxes): phase 13 complete — email DB foundation + SMTP mailbox CRUD

3 migrations (email_mailboxes, email_templates, email_logs), full CRUD
for SMTP mailboxes with encrypted passwords (IntegrationSecretCipher),
native SMTP connection test via stream_socket_client, sidebar navigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 23:57:33 +01:00
parent 8b3fb3fd0b
commit 3223aac4d9
16 changed files with 1257 additions and 19 deletions

View File

@@ -1,5 +1,14 @@
# Tech Changelog
## 2026-03-15 (Phase 13 — DB + Skrzynki pocztowe)
- Dodano 3 migracje email: `000054_create_email_mailboxes_table`, `000055_create_email_templates_table`, `000056_create_email_logs_table`.
- Nowe klasy: `EmailMailboxController` (index, save, delete, toggleStatus, testConnection), `EmailMailboxRepository` (listAll, findById, save, delete, toggleStatus, listActive).
- Test polaczenia SMTP przez natywny `stream_socket_client` z pelnym handshake (EHLO → STARTTLS → AUTH LOGIN) — bez zewnetrznych bibliotek.
- Hasla SMTP szyfrowane przez `IntegrationSecretCipher` (AES-256-CBC + HMAC-SHA256).
- Widok `settings/email-mailboxes.php` — lista skrzynek + formularz CRUD + AJAX test polaczenia.
- Nawigacja: link "Skrzynki pocztowe" w sidebar Settings.
- 5 nowych route'ow: GET/POST `/settings/email-mailboxes/*`.
## 2026-03-14
- Zoptymalizowano zapytanie listy zamowien (`OrdersRepository::buildListSql()`):
- 4 correlated subqueries (items_count, items_qty, shipments_count, documents_count) zastapiono aggregating LEFT JOINami — eliminuje N+1 na kazdym wierszu listy.