Skip to content

[Notifier] use a clock to create datetime instances #57099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2024

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented May 24, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues
License MIT

@xabbuh xabbuh requested a review from OskarStark as a code owner May 24, 2024 08:59
@carsonbot carsonbot added this to the 7.2 milestone May 24, 2024
@carsonbot carsonbot changed the title [Notifier] use a clock to create datetime instances [Notifier]  use a clock to create datetime instances May 24, 2024
@xabbuh
Copy link
Member Author

xabbuh commented May 24, 2024

#54756 (comment) made me think that we should rather use a clock to be able to properly mock the time in tests. If we agree on this approach, I'll update the other Notifier bridges as well.

@OskarStark OskarStark changed the title [Notifier]  use a clock to create datetime instances [Notifier] use a clock to create datetime instances May 24, 2024
Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

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

I like it 👍

@xabbuh xabbuh force-pushed the notifier-transports-clock branch 2 times, most recently from 839b8a9 to c1d6297 Compare May 24, 2024 20:00
@xabbuh xabbuh force-pushed the notifier-transports-clock branch from c1d6297 to e9ffb8c Compare May 24, 2024 20:01
@xabbuh
Copy link
Member Author

xabbuh commented May 24, 2024

I updated all places in the Notifier component where we could use a clock.

@fabpot
Copy link
Member

fabpot commented May 25, 2024

Thank you @xabbuh.

@fabpot fabpot merged commit 3bdbb07 into symfony:7.2 May 25, 2024
8 of 10 checks passed
@xabbuh xabbuh deleted the notifier-transports-clock branch May 25, 2024 14:48
fabpot added a commit that referenced this pull request Jun 18, 2024
…n the FrameworkBundle (xabbuh)

This PR was merged into the 7.2 branch.

Discussion
----------

[FrameworkBundle] wire a clock for the BlueSky transport in the FrameworkBundle

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

following #57099 and #57434

Commits
-------

35f8cf5 wire a clock for the BlueSky transport in the FrameworkBundle
@xabbuh xabbuh mentioned this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants