- Issue created by @prudloff
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
kim.pepper β made their first commit to this issueβs fork.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Need to add the composer dependency.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I'm wondering if we don't just add symfony/clock and replace usages of
datetime.time service
? π€ - π«π·France prudloff Lille
I'm not sure symfony/clock could replace getRequestTime().
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
If we are adding Psr/Clock as a dependency, then there should be at least one instance where we swap out to use it.
- π«π·France prudloff Lille
prudloff β changed the visibility of the branch 3501375-implement-psr-20 to hidden.
- π«π·France prudloff Lille
prudloff β changed the visibility of the branch 3501375-implement-psr-20 to active.
- πΊπΈUnited States smustgrave
Didn't review as it seems @kimpepper already did.
- π«π·France prudloff Lille
Am I correct to think we can break BC in the LinearHistory constructor because it is marked as internal and experimental?
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Added a CR and updated the IS. I think this is ready.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I was creating a follow up issue to replace
TimeInterface->getCurrentTime()
withClockInterface->now()->getTimestamp()
in the rest of core.I searched for usages of
\Drupal::time()->getCurrentTime()
and found 28 instances.\Drupal::time()
returns\Drupal\Component\Datetime\TimeInterface
but this doesn't extendPsr\ClockInterface
, so it's not a straight method swap.I think we need a new
\Drupal::clock()
method that returnsPsr\ClockInterface
. This would make it easier to swap out usage of\Drupal::time()->getCurrentTime()
with\Drupal::clock()->now()->getTimestamp()
. - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
We might want to do #17 and deprecate
\Drupal::time()->getCurrentTime()
in a follow up. - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I created a follow-up π [PP-1] Deprecate TimeInterface::getCurrentTime() and replace with ClockInterface::now()->getTimestamp() Postponed so back to RTBC.
I also squashed the commits and rebased on the latest 11.x. This will help if we need to continually rebase on 11.x until it gets committed.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
kim.pepper β changed the visibility of the branch 3501375-symfony-clock to hidden.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Left one nitpick.
- Merge request !11533[#3501375] Add a PSR-20 ClockInterface implementation β (Open) created by kim.pepper
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I'm trying an alternative approach in https://git.drupalcode.org/project/drupal/-/merge_requests/11533 however I can't tell if test fails are related or not? π€
Instead of adding onto the Time class, I'm creating a dedicated Clock implementation.
- π¦πΊAustralia mstrelan
Unrelated, see π [random test failure] ImageUrlProviderTest::testResize Active