PHPackages                             snoussi/dburl\_parser - 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. snoussi/dburl\_parser

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

snoussi/dburl\_parser
=====================

A lightweight library that parses DbUrl and transforming it DSN

0146PHP

Since Oct 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Moh-Snoussi/dburl_parser)[ Packagist](https://packagist.org/packages/snoussi/dburl_parser)[ RSS](/packages/snoussi-dburl-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

DbUrlParser
===========

[](#dburlparser)

A lightweight simple library that parses DbUrl and transforming it DSN:

### Installation

[](#installation)

`composer require snoussi/dburl_parser`

### Usage

[](#usage)

```
use Snoussi\DbUrlParser;

$dbUrl = "mysql://dbUser:dbPass@127.0.0.1:3306/dbName?serverVersion=5.7";
$dsn = DbUrlParser::getDsnFromUrl($dbUrl);

echo($dsn); // mysql:host=127.0.0.1;dbname=dbName:3306;

$parts = DbUrlParser::getDatabaseUrlParts($dbUrl);
// $parts now contains all the properties: $parts["user" | "pass" | "engine" | "version" | "dbName" | "host" | "port" ]
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

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/7e68ce8f399f326c8461b7aa58e8b9e1b822997f813d3a36169281b4326734ef?d=identicon)[Moh-Snoussi](/maintainers/Moh-Snoussi)

---

Top Contributors

[![Moh-Snoussi](https://avatars.githubusercontent.com/u/47396333?v=4)](https://github.com/Moh-Snoussi "Moh-Snoussi (11 commits)")

### Embed Badge

![Health badge](/badges/snoussi-dburl-parser/health.svg)

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

###  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)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

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

Reliese Components for Laravel Framework code generation.

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

PHPackages © 2026

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