PHPackages                             icecave/lace - 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. icecave/lace

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

icecave/lace
============

A DSN parser for Doctrine databases and cache drivers.

0.1.0(11y ago)42.3k1MITPHPPHP &gt;=5.5

Since Aug 26Pushed 11y ago2 watchersCompare

[ Source](https://github.com/IcecaveStudios/lace)[ Packagist](https://packagist.org/packages/icecave/lace)[ Docs](https://github.com/IcecaveStudios/lace)[ RSS](/packages/icecave-lace/feed)WikiDiscussions develop Synced 6d ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (1)

Lace
====

[](#lace)

[![Build Status](https://camo.githubusercontent.com/56fefc9e40c13ceaccd709fd6f0c244ac4d7868968f859e4c334b991fbdd0ec7/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f4963656361766553747564696f732f6c6163652f646576656c6f702e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/IcecaveStudios/lace)[![Test Coverage](https://camo.githubusercontent.com/d5aa2a7e428f860a09ad0ac79a2e979935f914a4cc6b801b00e2e93825af8db7/687474703a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f4963656361766553747564696f732f6c6163652f646576656c6f702e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/IcecaveStudios/lace?branch=develop)[![SemVer](https://camo.githubusercontent.com/fb75778f0b8ecb78725e6804d34eb2c10611b0a0007372b602b583398aaaf5ce/687474703a2f2f696d672e736869656c64732e696f2f3a73656d7665722d302e312e302d79656c6c6f772e7376673f7374796c653d666c61742d737175617265)](http://semver.org)

**Lace** is a DSN parser for Doctrine database and cache connections.

- Install via [Composer](http://getcomposer.org) package [icecave/lace](https://packagist.org/packages/icecave/lace)
- Read the [API documentation](http://icecavestudios.github.io/lace/artifacts/documentation/api/)

**Lace** was initially created to parse DSN URIs stored in environment variables on the Heroku platform.

Examples
--------

[](#examples)

### Database DSN

[](#database-dsn)

The `DatabaseDsnParser` class is responsible for parsing database DSNs into arrays compatible with [Doctrine DBAL's driver manager](http://doctrine-dbal.readthedocs.org/en/latest/reference/configuration.html).

The following drivers are currently supported:

- PostgreSQL
- MySQL
- SQLite

```
use Icecave\Lace\DatabaseDsnParser;

$parser = new DatabaseDsnParser;
$options = $parser->parse('postgres://username:password@hostname:1234/database');

print_r($options);
```

```
Array
(
    [driver] => pdo_pgsql
    [user] => username
    [password] => password
    [host] => hostname
    [port] => 1234
    [dbname] => database
)

```

### Cache DSN

[](#cache-dsn)

The `CacheDsnParser` class is responsible for parsing DSNs into arrays with the necessary information.

The following drivers are currently supported:

- Redis

```
use Icecave\Lace\CacheDsnParser;

$parser = new CacheDsnParser;
$options = $parser->parse('redis://username:password@hostname:1234');

print_r($options);
```

```
Array
(
    [host] => hostname
    [port] => 1234
    [password] => password
)

```

Contact us
----------

[](#contact-us)

- Follow [@IcecaveStudios](https://twitter.com/IcecaveStudios) on Twitter
- Visit the [Icecave Studios website](http://icecave.com.au)
- Join `#icecave` on [irc.freenode.net](http://webchat.freenode.net?channels=icecave)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

4280d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93a71bd75fcd51efee464532dbdd54927cd00e938805998c76e0a804d38fa3fb?d=identicon)[jmalloc](/maintainers/jmalloc)

---

Top Contributors

[![jmalloc](https://avatars.githubusercontent.com/u/761536?v=4)](https://github.com/jmalloc "jmalloc (18 commits)")

---

Tags

parsermysqlsqlitedoctrinepostgresredisdsnheroku

### Embed Badge

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

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

###  Alternatives

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)[apix/cache

A thin PSR-6 cache wrapper with a generic interface to various caching backends emphasising cache taggging and indexing to Redis, Memcached, PDO/SQL, APC and other adapters.

114542.8k6](/packages/apix-cache)[nettrine/dbal

Doctrine DBAL for Nette Framework

322.6M19](/packages/nettrine-dbal)[rybakit/phive-queue

$queue-&gt;push('I can be popped off after', '10 minutes');

16441.5k1](/packages/rybakit-phive-queue)[aura/sqlschema

Provides facilities to read table names and table columns from a database using PDO.

41234.1k4](/packages/aura-sqlschema)[endeveit/cache

Simple caching library with support for tags.

1711.1k](/packages/endeveit-cache)

PHPackages © 2026

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