bin/console commands (baks:assets:install), suggesting compatibility with Symfony-based Laravel (shared kernel). Non-Symfony Laravel apps may need wrapper scripts.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Nginx Unit Compatibility | High | Validate against Nginx Unit’s official PHP module. Test with PHP-FPM vs. native Nginx Unit PHP. |
| Configuration Overrides | Medium | Document conflicts with Laravel’s built-in web server (e.g., php artisan serve). |
| Certbot Lock-in | Medium | Abstract certificate logic via a facade or adapter pattern. |
| Lua/PHP Hybrid Code | Low | Ensure team familiarity with Nginx Unit’s Lua scripting for custom logic. |
| State Management | Medium | Clarify how Nginx Unit’s in-memory caching interacts with Laravel’s session/queue systems. |
/api/analytics) first.baks:assets:install to sync configs, then manually validate Lua/PHP hybrid logic.routes/web.php/routes/api.php to delegate to Nginx Unit where applicable (e.g., via middleware or custom router).php artisan serve with Nginx Unit for local/dev testing.| Component | Compatibility Notes |
|---|---|
| Laravel Middleware | May need wrappers to bridge Nginx Unit’s Lua context with Laravel’s middleware pipeline. |
| Queues/Jobs | Nginx Unit does not replace Laravel Queues; treat as a parallel execution layer. |
| Database | No direct impact, but ensure connection pooling aligns with Nginx Unit’s worker model. |
| Caching | Nginx Unit’s in-memory cache can complement Laravel’s cache drivers (e.g., Redis). |
| Auth (Sanctum/JWT) | Validate token parsing in Lua vs. PHP (performance vs. flexibility trade-off). |
config/ complexity.luacheck).App\Exceptions\Handler).error.log) with Laravel’s Monolog.unit.conf for worker processes (worker_processes), memory limits (worker_memory_limit), and Lua script timeouts.unit reload) enables zero-downtime config updates, but:
supervisor) to avoid port conflicts.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Nginx Unit Process Crash | API/WebSocket unavailability | Use a reverse proxy (e.g., Nginx) as a circuit breaker. |
| Lua Script Errors | 500 errors for affected routes | Implement a fallback route in Laravel. |
| Certbot Renewal Failure | HTTPS downtime | Automate renewal with cron + alerts. |
| PHP Module Incompatibility | Corrupted responses | Feature flag routes by Nginx Unit readiness. |
| Resource Exhaustion (Memory) | OOM kills | Set worker_memory_limit conservatively. |
How can I help you explore Laravel packages today?