PHPackages                             welearn/clock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. welearn/clock

AbandonedArchivedLibrary[PSR &amp; Standards](/categories/psr-standards)

welearn/clock
=============

Implementation of upcoming PSR-20 clock

1.0.2(3y ago)3349MITPHPPHP &gt;=7.4

Since Oct 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/welearn-GmbH/clock)[ Packagist](https://packagist.org/packages/welearn/clock)[ RSS](/packages/welearn-clock/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (4)Used By (0)

[![PHP Composer](https://github.com/welearn-GmbH/clock/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/welearn-GmbH/clock/actions/workflows/php.yml)

> Better use  as it's symfony standard!

welearn/clock
=============

[](#welearnclock)

A simple implementation of the upcoming PSR-20 clock.

Installation
------------

[](#installation)

```
composer require welearn/clock

```

Or see

### For symfony

[](#for-symfony)

Add to `services.yaml` to allow the service being wired.

```
Welearn\Clock\ClockInterface:
    class: Welearn\Clock\Clock

```

For your unittests you can use mocks against `Welearn\Clock\ClockInterface` (the interface will be replaced with the PSR interface at one point!). Alternatively you can also create the `FrozenClock` with a specific date and time or `Clock`manually.

Clock implementations
=====================

[](#clock-implementations)

Clock
-----

[](#clock)

Returns the current date as an `DateTimeImmutable` when calling `now`.

FrozenClock
-----------

[](#frozenclock)

Allows to set a date through contructor which is always returned when calling `now`.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

3

Last Release

1349d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bde24ad681b25466fc71c320ebf5c45caea9e224d2f913bac9bfdda0a726db48?d=identicon)[Misha90](/maintainers/Misha90)

---

Top Contributors

[![msphn](https://avatars.githubusercontent.com/u/579227?v=4)](https://github.com/msphn "msphn (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/welearn-clock/health.svg)

```
[![Health](https://phpackages.com/badges/welearn-clock/health.svg)](https://phpackages.com/packages/welearn-clock)
```

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[spomky-labs/otphp

A PHP library for generating one time passwords according to RFC 4226 (HOTP Algorithm) and the RFC 6238 (TOTP Algorithm) and compatible with Google Authenticator

1.5k50.3M168](/packages/spomky-labs-otphp)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

185701.7M5.6k](/packages/nesbot-carbon)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k53](/packages/ecotone-ecotone)[simplesamlphp/saml2

SAML2 PHP library from SimpleSAMLphp

30418.0M43](/packages/simplesamlphp-saml2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
