PHPackages                             jonas-elias/hyperf-oracle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. jonas-elias/hyperf-oracle

ActiveLibrary[Database &amp; ORM](/categories/database)

jonas-elias/hyperf-oracle
=========================

A oracle handler for hyperf/database.

v1.0.1(2y ago)102.5k↓26.5%4[1 issues](https://github.com/jonas-elias/hyperf-oracle/issues)MITPHPPHP &gt;=8.1

Since Mar 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jonas-elias/hyperf-oracle)[ Packagist](https://packagist.org/packages/jonas-elias/hyperf-oracle)[ RSS](/packages/jonas-elias-hyperf-oracle/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (9)Versions (3)Used By (0)

Oracle driver for Hyperf
========================

[](#oracle-driver-for-hyperf)

[![Latest Stable Version](https://camo.githubusercontent.com/309c5155ea82e1b6ad1667b6d92cc3fe339c00ba44a9707a381f70e197d105dd/687474703a2f2f706f7365722e707567782e6f72672f6a6f6e61732d656c6961732f6879706572662d6f7261636c652f76)](https://packagist.org/packages/jonas-elias/hyperf-oracle) [![Total Downloads](https://camo.githubusercontent.com/3e5eae5a7ce711319d94d7952608eab8053804ba1dd7b5c8adce199bdf51187a/687474703a2f2f706f7365722e707567782e6f72672f6a6f6e61732d656c6961732f6879706572662d6f7261636c652f646f776e6c6f616473)](https://packagist.org/packages/jonas-elias/hyperf-oracle) [![Latest Unstable Version](https://camo.githubusercontent.com/529dcb38a66718c17c593ee59666b09feb96868b9bc4ca630d0087d5b9882fb4/687474703a2f2f706f7365722e707567782e6f72672f6a6f6e61732d656c6961732f6879706572662d6f7261636c652f762f756e737461626c65)](https://packagist.org/packages/jonas-elias/hyperf-oracle) [![License](https://camo.githubusercontent.com/c49030ddfb4e794bfb7df188a9af6c111a4fdfcabcf7dc3c0c707b13d97c8779/687474703a2f2f706f7365722e707567782e6f72672f6a6f6e61732d656c6961732f6879706572662d6f7261636c652f6c6963656e7365)](https://packagist.org/packages/jonas-elias/hyperf-oracle) [![PHP Version Require](https://camo.githubusercontent.com/68b02d2bf399fb300fc3b004918f480a458c32bc9bc016156ff1ec4a9a04a345/687474703a2f2f706f7365722e707567782e6f72672f6a6f6e61732d656c6961732f6879706572662d6f7261636c652f726571756972652f706870)](https://packagist.org/packages/jonas-elias/hyperf-oracle)

Hyperf-Oracle
-------------

[](#hyperf-oracle)

Hyperf-Oracle is an Oracle Database Driver package for Hyperf. Extension of Hyperf\\Database that uses pdo-oci extension to communicate with Oracle. Through integration of Swoole, Hyperf optimizes resource utilization and boosts concurrency, leading to enhanced throughput and responsiveness when interfacing with Oracle databases.

Quick Installation
------------------

[](#quick-installation)

```
composer require jonas-elias/hyperf-oracle
```

Example
-------

[](#example)

```
use Hyperf\DbConnection\Db;

// select
Db::table('users')->get();
// insert
Db::table('users')->insert(['name' => 'jonas']);
// update
Db::table('users')->where('id', '=', 1)->update(['name' => 'johnny']);
// delete
Db::table('users')->delete(1);
```

Environment Settings
--------------------

[](#environment-settings)

The following environment variables should be configured to specify the connection details for the Oracle database:

```
DB_DRIVER=oracle
DB_HOST=oracle.host
DB_PORT=1521
DB_SERVICE_NAME=XE
DB_SID=XE
DB_USERNAME=user
DB_PASSWORD=password
DB_CHARSET=utf8mb4
DB_AUTO_COMMIT=false
DB_TIMEZONE=America/Sao_Paulo
```

Configuration in Code
---------------------

[](#configuration-in-code)

In your `databases.php` configuration file, you can set up the database connection using the following format:

```
return [
    'default' => [
        'driver' => env('DB_DRIVER', 'oracle'),
        'host' => env('DB_HOST', 'host'),
        'port' => env('DB_PORT', 1521),
        'database' => env('DB_DATABASE', 'hyperf'),
        'username' => env('DB_USERNAME', 'oracle'),
        'service_name' => env('DB_SERVICE_NAME', 'XE'),
        'sid' => env('DB_SID', 'XE'),
        'auto_commit' => env('DB_AUTO_COMMIT', false),
        'timezone' => env('DB_TIMEZONE', 'America/Sao_Paulo'),
        'password' => env('DB_PASSWORD', 'password'),
        'charset' => env('DB_CHARSET', 'utf8mb4'),
        'prefix' => env('DB_PREFIX', ''),
        'pool' => [
            'min_connections' => 1,
            'max_connections' => 10,
            'connect_timeout' => 10.0,
            'wait_timeout' => 3.0,
            'heartbeat' => -1,
            'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60),
        ],
        'commands' => [
            'gen:model' => [
                'path' => 'app/Model',
                'force_casts' => true,
                'inheritance' => 'Model',
                'uses' => '',
                'table_mapping' => [],
            ],
        ],
    ],
];
```

Credits
-------

[](#credits)

- [Jonas Elias](https://github.com/jonas-elias)
- [Arjay Angeles](https://github.com/yajra/laravel-oci8)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

835d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48037643?v=4)[jonas-elias](/maintainers/jonas-elias)[@jonas-elias](https://github.com/jonas-elias)

---

Top Contributors

[![jonas-elias](https://avatars.githubusercontent.com/u/48037643?v=4)](https://github.com/jonas-elias "jonas-elias (57 commits)")

---

Tags

phpdatabaseoracleoci8swoolehyperf

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/jonas-elias-hyperf-oracle/health.svg)

```
[![Health](https://phpackages.com/badges/jonas-elias-hyperf-oracle/health.svg)](https://phpackages.com/packages/jonas-elias-hyperf-oracle)
```

###  Alternatives

[hyperf/database-pgsql

A pgsql handler for hyperf/database.

12321.2k21](/packages/hyperf-database-pgsql)[hyperf/database

A flexible database library.

192.9M321](/packages/hyperf-database)[hyperf/http-server

A HTTP Server for Hyperf.

103.0M371](/packages/hyperf-http-server)[hyperf/crontab

A crontab component for Hyperf.

131.7M77](/packages/hyperf-crontab)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
