Download the PHP package elie29/oci-driver without Composer

On this page you can find all versions of the php package elie29/oci-driver. 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 oci-driver

OCI Driver

build Coverage Status PHP Version

Text file encoding

Code style formatter

Installation

Run the command below to install via Composer:

Getting Started

OCI Query Builder provides a lightweight builder to dynamically create SQL queries. It does not validate the query at all.

Select builder

Select builder with union

Delete builder

Update builder

Insert builder

More examples are found in tests/OCI/Query/Builder folder.

Using OCI Driver Class

Using the factory

The Factory::create() method is the recommended way to create a Driver instance. It provides several benefits:

Purpose:

Environment Parameter ($env):

The second parameter defines the execution environment and controls debugging behavior:

Session Configuration:

Factory automatically alters the Oracle session to set:

This eliminates the need to use TO_CHAR or TO_DATE in your SQL queries:

Insert/Update Example

With Autocommit

Autocommit is the default behavior of OCI Driver:

With Transaction

To start a transaction, you should use beginTransaction as follows:

N.B.: When an error occurred using a transaction, rollback is called automatically.

Bind parameters

Fetch one row

N.B.: For binding parameters, follow the same insertion example above.

Fetch many rows

N.B.: For binding parameters, follow the same insertion example above.

Running Oracle via Docker

If Oracle is not installed locally, use Docker to spin up an Oracle Free 23 container before running integration tests:

Wait for the container to be ready (this can take 1–2 minutes):

The database is ready when the logs show:

Then configure tests/integration/config-connection.php with:

To stop and remove the container when done:

Continue with the steps below to set up and run the integration tests.

Prepare for the test

Before launching integration tests, you should follow these steps:

1. Configure database connection

Rename config-connection.php.dist in ./tests/integration to config-connection.php:

Modify USERNAME, PASSWORD and SCHEMA according to your Oracle Database Information.

SCHEMA could be one of the following:

2. Create A1 and A2 tables

Option A: Using the automated setup script (Recommended)

Run the composer script to automatically create the required tables:

This will:

Option B: Manual SQL creation

Alternatively, you can manually create the tables:

3. Run tests

Once the setup is complete, you can run the integration tests:

Development Prerequisites

Test Structure

The project uses PHPUnit for testing with two test suites as configured in phpunit.xml.dist:

Composer commands

You can run specific test suites:


All versions of oci-driver with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-oci8 Version *
ext-json Version *
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 elie29/oci-driver contains the following files

Loading the files please wait ...