Download the PHP package pixelfederation/vitess-php-pdo without Composer

On this page you can find all versions of the php package pixelfederation/vitess-php-pdo. 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 vitess-php-pdo

Vitess PDO driver

This library provides a PDO driver for Vitess. It is not a driver for the PDO PHP extension, it's just a pure PHP implementation of the PDO interface. It is interchangeable with the original PDO class, if no instanceof \PDO checks are present in the application code.

Current state

Currently the code is beta quality, not all PDO methods and classes are implemented, but it already has been tested in our application and it works properly. Everybody is welcome to create pull requests to implement some of the missing things.

Also, the unit tests are currently bound to our Vitess dev instance, there is a plan to change this. There's also not much documentation yet, but people requested the driver, so we decided to go open source.

This driver isn't compatible with any official MySql/MariaDB management tools, but we created an Adminer fork, which you can use to have some insight about the data in your Vitess cluster.

Usage

The Vitess PHP client, which is used in the PDO implementation has a dependency on the PHP GRPC extension, which has to be installed together with GRPC and Protobuf.

To install the composer package, run the following command:

After the installation of the dependencies, the PDO class should be instantiated this way:

If you want to use some limited DDL support, you have to instantiate the PDO instance this way:

Only a limited subset of DDL queries is supported (the goal of the implementation was to get the PDO driver work with Adminer.

Contribution

If you'd like to contribtue, we strongly recommend to run

from the project directory. This script will set up a commit hook, which checks the PSR/2 coding standards using PHPCS and also runs PHP linter and PHP Mess Detector PHPMD

To be able to run the unit tests, you need to have installed Vitess locally for now (there is a guide for Ubuntu and OS X).

The tests need to be run from a shell which has set all the environment variables from the guide, to be ready to run vitess instances. After setting the enviroment variables, just got to the library root folder and run the following command:

If there is a need to perform any sql queries in the newly written unit tests, there is a database schema provided in the tests/vitess/schema folder. The schema contains two shards - lookup and user.

Known issues

On OS X there is was "sometimes" a problem with the current GRPC version (0.13) and PHP GRPC extension (0.8) (both of the versions are mandatory for the PDO driver and Vitess), meaning that the GRPC requests to Vitess are a little bit slower for an unknown reason. Linux is unaffected.

Also, there is no PHP 7 GRPC extension yet.

Both issues were resolved in grpc 1.0.0RC1 and 1.0.0RC2, the extension should be stable now.


All versions of vitess-php-pdo with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
vitess/php-client Version v2.1.0
greenlion/php-sql-parser Version v4.1.1
doctrine/collections Version ^1.3
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 pixelfederation/vitess-php-pdo contains the following files

Loading the files please wait ....