Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a set of convenient global helper functions in the Workflow namespace to simplify workflow definitions and improve code readability. The changes wrap existing WorkflowStub, ActivityStub, and ChildWorkflowStub static methods with more concise function calls, and include time-based helper functions (seconds, minutes, hours, days, weeks, months, years) for easier duration specification.
Key Changes:
- Added 18 global helper functions covering workflow control, activity execution, child workflows, and time helpers
- Refactored 30+ fixture test files to use the new helper functions
- Added comprehensive unit tests for all new helper functions
Reviewed changes
Copilot reviewed 50 out of 50 changed files in this pull request and generated 22 comments.
| File | Description |
|---|---|
| src/functions.php | Introduces all new global helper functions with appropriate existence checks |
| composer.json | Adds autoload configuration to load the functions file |
| tests/Unit/FunctionsTest.php | Comprehensive test suite with test workflows for all helper functions |
| tests/Fixtures/*.php (30+ files) | Updates existing test fixtures to use new helper functions instead of static method calls |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #299 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 350 350
===========================================
Files 48 49 +1
Lines 1425 1442 +17
===========================================
+ Hits 1425 1442 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR introduces convenient global helper functions in the Workflow namespace to simplify workflow definitions and make the code more readable and concise.
New Helper Functions
Workflow Control:
Activity & Child Workflows:
Time Helpers: