Download the PHP package bartoszbartniczak/doctrine-datetime-with-microseconds without Composer

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

Doctrine DateTime With Microseconds

Doctrine plugin to save DateTime objects with microseconds in database.

codecov

Installation

Via composer

composer require bartoszbartniczak/doctrine-datetime-with-microseconds

How does it work?

Standard Doctrine behavior

Doctrine saves \DateTime to the database correctly, but omits the microseconds, which are part of the \DateTime object.

Standard doctrine mapping:

The Doctrine ORM saves the date, but without microseconds:

In some systems this behavior is not expected. There are some situations where the microseconds are very important information, so they should be persisted.

Caution: Not every Database system supports Timestamps with microseconds.

How to use?

This library resolves problem of persisting microseconds with Doctrine.

Mapping

Instead of using standard Doctrine type datetime, you can use datetime_microseconds

After persisting object, you should have seen datetime value with microseconds saved.

Supported Relational Database Management Systems

Table of compatibility

PHP 7.2 PHP 7.3 PHP 7.4
Postgres 9 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Postgres 10 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Postgres 11 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Postgres 12 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
MySQL 5.6.4+* :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
MySQL 8 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
MariaDB 5.3+ ** :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
MariaDB 10 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:

*Microseconds are supported since version 5.6.4 [source1] [source2]

** Microseconds are supported since version 5.3 [source]

Other Relational Database Management Systems

If your RDBMS is not pointed on the list above, it does not mean that it will not work. It means that this library was not tested yet with that databse system. You can try and test it yourself, or even try contribute to this project.


All versions of doctrine-datetime-with-microseconds with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
doctrine/dbal Version ^2.9
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 bartoszbartniczak/doctrine-datetime-with-microseconds contains the following files

Loading the files please wait ....