PHPackages                             litebase/litebase-php - 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. litebase/litebase-php

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

litebase/litebase-php
=====================

Litebase PHP SDK

v0.5.9(4mo ago)2401MITPHPPHP ^8.4CI passing

Since Nov 10Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/litebase/litebase-php)[ Packagist](https://packagist.org/packages/litebase/litebase-php)[ Docs](https://litebase.com)[ GitHub Sponsors](https://github.com/litebase)[ RSS](/packages/litebase-litebase-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (9)Versions (11)Used By (1)

Litebase PHP SDK (Alpha)
========================

[](#litebase-php-sdk-alpha)

[![tests](https://github.com/litebase/litebase-php/actions/workflows/tests.yml/badge.svg)](https://github.com/litebase/litebase-php/actions/workflows/tests.yml)[![GitHub License](https://camo.githubusercontent.com/e25f8d97b641b2d1319839a9a93774db5147709225432babda8ef56211e34615/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c697465626173652f6c697465626173652d706870)](https://github.com/litebase/litebase-php/blob/main/LICENSE.md)

A PHP SDK for interacting with [Litebase](https://github.com/litebase/litebase), an open source distributed database built on SQLite, distributed file systems, and object storage.

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

[](#installation)

You can install the package via composer:

```
composer require litebase/litebase-php
```

Usage
-----

[](#usage)

```
use Litebase\Configuration;
use Litebase\LitebasePDO;

$pdo = new LitebasePDO([
    'host' => 'localhost',
    'port' => 8888,
    'token' => 'your_api_token',
    'database' => 'your_database_name/main',
]);

$statement = $pdo->prepare('SELECT * FROM users WHERE id = ?');
$statement->execute([1]);
$result = $statement->fetchAll(PDO::FETCH_ASSOC);

foreach ($result as $row) {
    print_r($row);
}

// Use transactions
$pdo = $pdo->beginTransaction();

try {
    $statement = $pdo->prepare('INSERT INTO users (name, email) VALUES (?, ?)');
    $statement->execute(['John Doe', 'john@example.com']);

    $statement = $pdo->prepare('INSERT INTO logs (user_id, action) VALUES (?, ?)');
    $statement->execute([$pdo->lastInsertId(), 'user_created']);

    $pdo->commit();
} catch (\Exception $e) {
    $pdo->rollBack();
    throw $e;
}
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/litebase/litebase-php?tab=contributing-ov-file) for details.

### Testing

[](#testing)

You can run the tests:

```
composer test
```

*Integration tests require a running Litebase Server. When running integration tests, a server will be automatically started using Docker.*You can run the tests with:

```
composer test-integration
```

Code of Conduct
---------------

[](#code-of-conduct)

Please see [CODE OF CONDUCT](https://github.com/litebase/litebase-php?tab=coc-ov-file) for details.

Security
--------

[](#security)

All security related issues should be reported directly to .

License
-------

[](#license)

Litebase is [open-sourced](https://opensource.org/) software licensed under the [MIT License](LICENSE.md).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance77

Regular maintenance activity

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~8 days

Total

9

Last Release

125d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2efc2600f86497b79d0c572a0c501fd11c96b720e7d694fd2fef61e22c4e7064?d=identicon)[litebase](/maintainers/litebase)

---

Top Contributors

[![tlaverdure](https://avatars.githubusercontent.com/u/1731025?v=4)](https://github.com/tlaverdure "tlaverdure (132 commits)")[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

databaselitebasephpsdksqlsqlite

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[google/cloud

Google Cloud Client Library

1.2k16.2M53](/packages/google-cloud)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[plank/laravel-mediable

A package for easily uploading and attaching media files to models with Laravel

8271.5M11](/packages/plank-laravel-mediable)

PHPackages © 2026

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