How spatie/laravel-queueable-action works
Main Components
a) Core Components:
• QueueableAction Trait
• ActionJob Class
• Action Classes (User-defined)
• Laravel Queue System
• Service Provider
b) Supporting Components:
• Testing Framework
• Command System
• Configuration System
1. Entry Points Layer
• Controller/Application Code
• Artisan Commands (ActionMakeCommand)
2. Action Layer
• QueueableAction Trait
• User Action Classes
• Action Configuration
3. Queue Processing Layer
• ActionJob
• Laravel Queue System
• Job Middleware
• Backoff Handling
4. Testing Layer
• QueueableActionFake
• Testing Assertions
Key Relationships
• How an action gets queued (Application → Action → Queue)
• How the queue processes the action (Queue → ActionJob → Action Execution)
• How dependency injection works with actions
• How the testing framework integrates
Specific Implementation Details
• QueueableAction trait with its main methods (onQueue, execute)
• ActionJob class showing its relationship with Laravel's queue system
• Configuration options (queue names, job class customization)
• Testing utilities and assertions
Flow Patterns
Key flows:
Synchronous: Action → execute() → Result
Asynchronous: Action → onQueue() → ActionJob → Queue → Process → Result
Testing: Action → QueueableActionFake → Assertions
Additional Elements
Notes/callouts for:
• Constructor injection capabilities
• Available configuration options
• Testing assertion methods
• Middleware integration points