PHPackages                             dbbridge/dbbridge - 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. dbbridge/dbbridge

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

dbbridge/dbbridge
=================

A Laravel package for automating the setup and integration of native PHP database drivers

04PHP

Since Feb 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Abdallah-Tah/dbbridge)[ Packagist](https://packagist.org/packages/dbbridge/dbbridge)[ RSS](/packages/dbbridge-dbbridge/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

DBBridge: Laravel Database Extension Manager
============================================

[](#dbbridge-laravel-database-extension-manager)

DBBridge is a Laravel package that simplifies the installation and configuration of PHP database extensions across different operating systems. It provides an interactive CLI that guides users through the process of setting up database drivers for SQL Server, Oracle, MySQL, and more.

Features
--------

[](#features)

- **Environment Detection**: Automatically detects your PHP environment, OS, and installed extensions
- **Cross-Platform Support**: Works on Windows, Linux (Debian/Ubuntu, RHEL/CentOS), and macOS
- **Multiple Database Support**: Handles SQL Server, Oracle, and MySQL drivers
- **Guided Installation**: Step-by-step instructions for installing required extensions
- **Automated Setup**: Scripts to automate the installation process where possible
- **Connection Testing**: Verify your database connections are working correctly
- **Version Compatibility**: Works across PHP 7.4 to 8.4 with automatic adaptation

Requirements
------------

[](#requirements)

- PHP 7.4 or higher (compatible with PHP 7.4, 8.0, 8.1, 8.2, 8.3, and 8.4)
- Laravel 8.0 or higher (compatible with Laravel 8, 9, 10, and 11)
- Composer

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require dbbridge/dbbridge
```

After installation, publish the configuration file:

```
php artisan vendor:publish --provider="DBBridge\DBBridgeServiceProvider" --tag="config"
```

**Important:** Installation commands require root privileges. Run them with `sudo`:

```
sudo php artisan dbbridge:install-extensions --extension=oci8
```

Usage
-----

[](#usage)

### Check Your Environment

[](#check-your-environment)

To check your current environment and installed database extensions:

```
php artisan dbbridge:check-environment
```

This will display information about your PHP version, operating system, and installed database extensions.

### Install Database Extensions

[](#install-database-extensions)

To install database extensions:

```
php artisan dbbridge:install-extensions --extension=sqlsrv
```

Available options:

- `--extension`: The extension to install (sqlsrv, oci8, mysqli)
- `--mode`: Installation mode (guided or manual, default: guided)

### Test Database Connection

[](#test-database-connection)

To test a database connection:

```
php artisan dbbridge:test-connection --connection=sqlsrv
```

This will attempt to connect to the specified database and display connection information.

Supported Database Extensions
-----------------------------

[](#supported-database-extensions)

- **SQL Server**: sqlsrv and pdo\_sqlsrv extensions
- **Oracle**: oci8 and pdo\_oci extensions
- **MySQL**: mysqli and pdo\_mysql extensions

OS Support
----------

[](#os-support)

- **Windows**: Supports installation of pre-compiled DLLs
- **Linux**: Supports Debian-based (Ubuntu, Debian) and RHEL-based (CentOS, Fedora) distributions
- **macOS**: Supports installation via Homebrew and PECL

PHP Version Compatibility
-------------------------

[](#php-version-compatibility)

DBBridge is designed to work seamlessly across multiple PHP versions:

- **PHP 7.4**: Uses array-based Process constructor for compatibility
- **PHP 8.0+**: Uses the more convenient `fromShellCommandline` method
- **PHP 8.1+**: Takes advantage of newer PHP features when available
- **PHP 8.2+**: Fully compatible with newer PHP versions
- **PHP 8.3 and 8.4**: Tested and supported

The package automatically detects your PHP version and adjusts its behavior accordingly, ensuring compatibility across all supported versions.

Configuration
-------------

[](#configuration)

The configuration file (`config/dbbridge.php`) contains settings for each supported database extension, including installation commands for different operating systems.

Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

1. **Permission Denied**: When running installation scripts, you may need administrator/root privileges.

    Solution: Run the command with `sudo` on Linux/macOS or as Administrator on Windows.
2. **Missing Dependencies**: Some extensions require system libraries to be installed first.

    Solution: Follow the guided installation instructions which include all prerequisites.
3. **PHP Version Compatibility**: Ensure your PHP version is compatible with the extensions you're trying to install.

    Solution: Check the compatibility matrix in the documentation for each extension.

Testing
-------

[](#testing)

DBBridge comes with a comprehensive test suite. To run the tests:

```
composer test
```

Or use the provided test scripts:

```
# On Windows
run-environment-test.bat

# On Linux/macOS
./run-environment-test.sh
```

The test suite includes:

- **Unit Tests**: Testing individual components like the EnvironmentDetector and ExtensionInstaller
- **Feature Tests**: Testing the commands and their interactions with the system
- **Integration Tests**: Testing the database connections with different drivers
- **Version Compatibility Tests**: Ensuring the package works across PHP versions

License
-------

[](#license)

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

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a61545d3e749019b5ae58160977437da6b0037203955060fb9829807e22c1b4?d=identicon)[abdallah-tah](/maintainers/abdallah-tah)

---

Top Contributors

[![Abdallah-Tah](https://avatars.githubusercontent.com/u/96321216?v=4)](https://github.com/Abdallah-Tah "Abdallah-Tah (6 commits)")

### Embed Badge

![Health badge](/badges/dbbridge-dbbridge/health.svg)

```
[![Health](https://phpackages.com/badges/dbbridge-dbbridge/health.svg)](https://phpackages.com/packages/dbbridge-dbbridge)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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