Download the PHP package phpnomad/chronos-integration without Composer

On this page you can find all versions of the php package phpnomad/chronos-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package chronos-integration

PHPNomad Chronos Integration

Chronos-backed implementation of the phpnomad/chrono catalog. Ships one concrete class, ChronosChronoStrategy, that fulfills every non-platform chrono interface against cakephp/chronos — with IntlDateFormatter providing the locale-aware formatting that Chronos 3.x dropped.

The default comprehensive integration for chrono. About a fifth the install footprint of nesbot/carbon with effectively the same surface, plus locale support through ext-intl instead of bundled translation files.

Requirements

PHP 8.2 or newer, ext-intl, phpnomad/chrono ^1.0, cakephp/chronos ^2.4 || ^3.0.

Installation

The package's Initializer registers ChronosChronoStrategy against the chrono catalog. Apps using PHPNomad's loader pick this up automatically.

What gets bound

A single ChronosChronoStrategy instance fulfills these 28 chrono interfaces:

What does NOT get bound here

HasTimezone and HasLocale are intentionally not implemented by this integration. Chronos does not own the platform's timezone or locale; those come from the host environment.

The ChronosChronoStrategy constructor declares both as dependencies:

Pair with phpnomad/wordpress-integration (which resolves both from WordPress site settings) or supply your own concretes. Without a HasTimezone and HasLocale binding in the container, the strategy cannot be instantiated.

Model-side chrono interfaces (HasCreatedDate, HasModifiedDate) are likewise not implemented here — they are contracts for domain models, not platform capabilities.

Behavior notes

Testing in your own app

Because now() delegates to Chronos::now(), Chronos's built-in test helper works without any chrono-specific machinery:

For PSR-20-style fixed clocks, bind any PSR-20 implementation directly to ClockStrategy in your DI container — it will replace just the clock binding while leaving the rest of the Chronos-backed cluster intact.

Why Chronos and not Carbon

Chronos is a CakePHP-maintained immutable datetime library that started as a fork of early Carbon and has stayed disciplined about scope. The trade-offs:

If you already have Carbon in your stack (Laravel apps especially), use phpnomad/carbon-integration — there's no marginal cost since Carbon is already loaded.

License

MIT


All versions of chronos-integration with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-intl Version *
phpnomad/chrono Version ^1.0
phpnomad/loader Version ^1.0 || ^2.0
cakephp/chronos Version ^2.4 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phpnomad/chronos-integration contains the following files

Loading the files please wait ...