Download the PHP package owlcorp/doctrine-microseconds-datetime without Composer

On this page you can find all versions of the php package owlcorp/doctrine-microseconds-datetime. 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 doctrine-microseconds-datetime

Microseconds DateTime Support for Doctrine

What is this about?

This library has no fancy logo. It also lacks all cool badges, but what it has is a simple & ready-to-use implementation of mili- and microsecond types for Doctrine ORM/DBAL.

Why?

Date and time is hard, databases are hard - a combination of the two is a nightmare. There's a 5+ years old issue describing the problem. To do it properly and across all platforms seems nearly impossible. However, it is possible to do it with a limited scope. This is why this package was created: I personally stepped into that issue many times over the years, and here came the time to stop copying & pasting the same code.

How to use?

  1. Install with composer: composer require owlcorp/doctrine-microseconds-datetime (it will work across PHP7.0-8+)
  2. Add DBAL types

    • If you're using Symfony, edit config/packages/doctrine.yaml and add:

    • If you're not using Symfony check official Doctrine documentation.
  3. For ORM, you can use it like so:

What's supported?

See table below. These are combos which I was able to test, and they should cover most of the usecases. If you know about another database engine supporting it and it can be confirmed easily issues are welcome :)

↓ DB ↓ \ Type → time_micro datetime_micro datetimetz_micro3
PostgreSQL <10 2 2
PostgreSQL 10+
MySQL 5.6.4+
Oracle-Xe
Microsoft SQL <2008 ⚠️ ⚠️
Microsoft SQL 2008+ & Azure
SQLite 31 ⚠️ ⚠️
Other databases

✅ = full microseconds support (.000000) | ⚠️ = miliseconds only (.000) | ❌ = not supported

Quirks

  1. SQLite does't support native TIME/DATETIME fields, but internal functions support text-based representation with milisecond precision.
  2. Older PgSQL in certain edge-cases could loose some precision, you're unlikely to hit the non-Y2K year-2000 bug.
  3. Bonus: yes, timezone support is broken in most databases. Even where supported you probably shouldn't use it.

Sources


All versions of doctrine-microseconds-datetime with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0|^8.0
doctrine/dbal Version >=v2.5.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 owlcorp/doctrine-microseconds-datetime contains the following files

Loading the files please wait ....