Skip to content

Conversation

@dbellettini
Copy link
Member

@dbellettini dbellettini commented Aug 8, 2025

  • Switching from Recruiter Clock to Symfony Clock
  • Leverage Sleep feature from Symfony's interface

@dbellettini dbellettini self-assigned this Aug 8, 2025
@dbellettini dbellettini requested a review from Copilot August 8, 2025 14:55

This comment was marked as outdated.

@dbellettini dbellettini changed the title Switch to Clock library from custom to Symfony Upgrade Clock library to 5.0 leveraging mostly Symfony Aug 8, 2025
@dbellettini dbellettini requested a review from Copilot August 8, 2025 15:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the Clock library to version 5.0, transitioning from the custom Recruiter Clock implementation to Symfony's Clock component. The key changes include replacing clock method calls from current() to now(), utilizing Symfony's sleep functionality, and updating DateTime handling to use immutable objects.

  • Migrated from Recruiter\Clock to Symfony\Component\Clock\ClockInterface
  • Replaced current() method calls with now() to match Symfony Clock API
  • Updated sleep functionality to use clock-based sleep instead of external callback

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
composer.json Updates recruiterphp/clock dependency from ^4.1 to ^5.0
src/Recruiter/Concurrency/PeriodicalCheck.php Migrates to Symfony ClockInterface and updates method calls
src/Recruiter/Concurrency/MongoLock.php Refactors to use Symfony Clock with improved constructor and sleep handling
tests/Recruiter/Concurrency/PeriodicalCheckTest.php Updates test to use MockClock and sleep method
tests/Recruiter/Concurrency/MongoLockTest.php Comprehensive test updates for new clock interface and verification patterns

@dbellettini dbellettini merged commit 2ca0242 into master Aug 8, 2025
1 check passed
@dbellettini dbellettini deleted the symfony-clock branch August 8, 2025 15:59
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.

1 participant