Download the PHP package fwolfsjaeger/doctrine-cockroachdb without Composer

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

Latest Stable Version Total Downloads PHP Version Require License

CockroachDB Driver

CockroachDB Driver is a Doctrine DBAL Driver and ORM patcher to handle incompatibilities with PostgreSQL.

Big Thanks To

CockroachDB Quick Setup Guide

Usage

Configuration

(Optional) Use modified BasicEntityPersister and SerialGenerator

For improved compatibility and performance we recommend you to override Doctrine ORM's default BasicEntityPersister with the custom one provided with this package. When using the custom BasicEntityPersister you can use CockroachDB's built in SERIAL generator for primary keys, which performs vastly better than Doctrine's recommended SequenceGenerator.

Overriding is done by adding the composer script DoctrineCockroachDB\\Composer\\PatchDoctrine::overrideBasicEntityPersister to the composer.json script sections post-install-cmd and post-update-cmd:

Then change your entities to use the SerialGenerator provided by this package:

Finally, you should register the DoctrineCockroachDB\ORM\Listener\AddDefaultToSerialGeneratorListener and DoctrineCockroachDB\ORM\Listener\RemoveDefaultFromForeignKeysListener (in that order) to get proper default values for the identifiers using SerialGenerator when using Doctrine ORM.

Troubleshooting

ERROR: currval(): could not determine data type of placeholder $1

This is caused by using the IdentityGenerator as GenerateValue strategy and Doctrine ORM's default BasicEntityPersister. It is solved by using our custom BasicEntityPersister and SerialGenerator, see above for instructions.

Unit testing

Start an insecure single-node instance:

Connect to CockroachDB:

Create the user & database for the tests:

License

MIT


All versions of doctrine-cockroachdb with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-pdo Version *
ext-pdo_pgsql Version *
doctrine/dbal Version ^4.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 fwolfsjaeger/doctrine-cockroachdb contains the following files

Loading the files please wait ....