Add PSR-20 Clock Interface as composer dependency

Created on 14 July 2025, about 2 months ago

Problem/Motivation

PSR-20 defines a standard interface for system clocks.

If it implemented PSR-20, the service could be used with other libraries that can use a PSR-20 clock. And so it would encourage service reuse, add interoperability with other libraries, and prevent having multiple implementations on the same website.

Dependency Evaluation - psr/clock

Maintainership of the package

Maintained by PHP-FIG. Drupal already uses a number of similar packages, either directly (psr/log) or through other dependencies such as guzzle (psr/http-client) or symfony (psr/container, etc.)

Security policies of the package

Not sure it's relevant since it's only a single interface

Expected release and support cycles

Unlikely to require frequent updates, except for language evolution, e.g. updating syntax or signatures.

Code quality

The interface is too simple for this to be applicable, see https://github.com/php-fig/clock/blob/master/src/ClockInterface.php

Other dependencies it would add, if any (the full tree, not just direct dependencies), and evaluations for those dependencies as well

N/A

Proposed resolution

  • Add a composer dependency on psr/clock

Remaining tasks

Follow up with โœจ Implement PSR-20 in datetime.time service Active to add the implementation.

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

โœจ Feature request
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component

base system

Created by

๐Ÿ‡ฆ๐Ÿ‡บAustralia kim.pepper ๐Ÿ„โ€โ™‚๏ธ๐Ÿ‡ฆ๐Ÿ‡บSydney, Australia

Live updates comments and jobs are added and updated live.
  • Needs framework manager review

    It is used to alert the framework manager core committer(s) that an issue significantly impacts (or has the potential to impact) multiple subsystems or represents a significant change or addition in architecture or public APIs, and their signoff is needed (see the governance policy draft for more information). If an issue significantly impacts only one subsystem, use Needs subsystem maintainer review instead, and make sure the issue component is set to the correct subsystem.

  • Needs release manager review

    It is used to alert the release manager core committer(s) that an issue significantly affects the overall technical debt or release timeline of Drupal, and their signoff is needed. See the governance policy draft for more information.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024