feat(02-bug-fixes): extract CronHandlerFactory, complete Phase 2

Phase 2 complete (4/4 plans):
- Plan 02-01: Fix dead ZPL page size condition in AllegroShipmentService
- Plan 02-02: Add time-based cursor to AllegroStatusSyncService
- Plan 02-03: Fix ShopproOrdersSyncService using wrong state repository
- Plan 02-04: Extract CronHandlerFactory as single cron composition point

Plan 02-04 specifics:
- New CronHandlerFactory builds complete cron object graph
- Application::maybeRunCronOnWeb() reduced from 80+ to ~20 lines
- bin/cron.php reduced from 123 to 26 lines
- Fixed 2 bugs: AllegroOAuthClient→AllegroTokenManager,
  AllegroOrderSyncStateRepository→ShopproOrderSyncStateRepository

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-03-13 00:43:04 +01:00
parent 87203c4321
commit 880ab5933f
8 changed files with 498 additions and 227 deletions

View File

@@ -8,14 +8,14 @@ orderPRO to narzędzie do wielokanałowego zarządzania sprzedażą. Projekt prz
**v0.1 Initial Release** (v0.1.0)
Status: In progress
Phases: 1 complete, 1 in progress (TBD total)
Phases: 2 complete, next TBD
## Phases
| Phase | Name | Plans | Status | Completed |
|-------|------|-------|--------|-----------|
| 1 | Tech Debt | 2/2 | ✅ Complete | 2026-03-12 |
| 2 | Bug Fixes | 3/? | 🔄 In Progress | — |
| 2 | Bug Fixes | 4/4 | ✅ Complete | 2026-03-13 |
## Phase Details
@@ -31,7 +31,8 @@ Naprawa zidentyfikowanych błędów z `.paul/codebase/CONCERNS.md`.
- **Plan 02-01** — Naprawa martwego warunku ZPL page size w AllegroShipmentService — *Complete*
- **Plan 02-02** — Kursor `last_status_checked_at` w AllegroStatusSyncService (no time-based cursor) — *Complete*
- **Plan 02-03** — `ShopproOrdersSyncService` używa `AllegroOrderSyncStateRepository` (błędna zależność) — *Complete*
- **Plan 02-04** — `Application.php` ręcznie buduje graf obiektów crona (duplikacja, rozbieżność z bin/cron.php) — *Complete*
---
*Roadmap created: 2026-03-12*
*Last updated: 2026-03-12*
*Last updated: 2026-03-13*