symfony/polyfill-time

Symfony polyfill for the Time API added to PHP 8.6

Maintainers

Package info

github.com/symfony/polyfill-time

Homepage

pkg:composer/symfony/polyfill-time

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

1.x-dev 2026-08-07 13:08 UTC

This package is auto-updated.

Last update: 2026-08-07 17:58:39 UTC


README

This component provides the Time API added to PHP 8.6 core, for PHP >= 8.1:

  • Time\TimeException, Time\Duration

The phpt tests of the native implementation, borrowed from php-src, run against the polyfill as part of the test suite. One divergence remains: Duration is a plain final class with readonly properties instead of a readonly class, so ReflectionClass::newInstanceWithoutConstructor() succeeds where the native class rejects it. Dynamic properties are rejected as they are natively.

More information can be found in the main Polyfill README.

License

This library is released under the MIT license.