buyanov/symfony-temporal-worker
symfony/dependency-injection, symfony/http-kernel).#[AutoconfigureTag] via Laravel’s Autowire or registerTaggedServices().#[AutoconfigureTag] via custom attribute handling (e.g., Illuminate\Support\Facades\Attribute::get()).#[Route], #[Inject]) differ from Symfony’s #[AutoconfigureTag]. Requires custom logic (e.g., Illuminate\Contracts\Container\BindingResolution).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony Dependency Bloat | Medium | Isolate Symfony DI to a single module (e.g., TemporalModule) via Laravel’s Module pattern. |
| Annotation Incompatibility | High | Implement a compiler pass to convert #[AutoconfigureTag] to Laravel-compatible tags. |
| Temporal Server Cost/Complexity | High | Start with Temporal Cloud (serverless) for PoC; evaluate self-hosting for production. |
| Debugging Workflows | Medium | Use Temporal’s Web UI + Laravel’s Log::channel('temporal') for correlation. |
| Idempotency Violations | High | Enforce unique workflow IDs (e.g., UUIDv7) and validate in Laravel middleware. |
| Component | Laravel Stack Equivalent | Integration Strategy |
|---|---|---|
| Symfony DI Container | Laravel Service Container (app/Providers/AppServiceProvider) |
Use partial integration via Illuminate\Contracts\Container\Container facade. |
| Annotations | Laravel Attributes (#[Inject]) |
Create a compiler pass to map #[AutoconfigureTag] to Laravel’s bind() calls. |
| gRPC Client | Guzzle HTTP Client | Replace with Temporal’s gRPC client for activity/workflow communication. |
| Event Loop | Laravel Queues (queue:work) |
Run Temporal worker as a separate process (e.g., php artisan temporal:work). |
| Logging | Monolog | Extend Monolog handler to include Temporal workflow IDs for correlation. |
Phase 1: Proof of Concept (2-4 weeks)
Phase 2: Annotation Bridge (3-5 weeks)
#[AutoconfigureTag].// app/Providers/TemporalServiceProvider.php
public function boot(): void
{
$this->app->afterResolving('temporal.activity', fn ($activity) => {
// Register activity with Temporal client
});
}
Phase 3: Full Integration (4-6 weeks)
Phase 4: Observability & Scaling (Ongoing)
temporal workflow stuck > 1 hour).doctrine/annotations polyfill).ProductPropertyActivityInterface → Laravel ProductPropertyJob.php artisan temporal:list).How can I help you explore Laravel packages today?