Skip to content

Add flushState method to reset static variables in VaporWorkCommand#191

Merged
themsaid merged 1 commit into2.0from
flush-state
Jul 4, 2025
Merged

Add flushState method to reset static variables in VaporWorkCommand#191
themsaid merged 1 commit into2.0from
flush-state

Conversation

@avosalmon
Copy link
Contributor

This PR adds a flushState method to VaporWorkCommand, to reset static variables, mirroring the flushState method in the framework's WorkCommand.

https://github.com/laravel/framework/blob/5ad0a1c079f8a8dda603c97333864b7ef4b11d20/src/Illuminate/Queue/Console/WorkCommand.php#L379-L387

This would be useful when testing jobs via the vapor:work command.
e.g. laravel/nightwatch#199

@themsaid themsaid merged commit 72aafc7 into 2.0 Jul 4, 2025
3 checks passed
@avosalmon avosalmon deleted the flush-state branch July 4, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants