PHPackages                             eyroot/lx-simple-storage - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. eyroot/lx-simple-storage

ActiveLibrary[File &amp; Storage](/categories/file-storage)

eyroot/lx-simple-storage
========================

Storage solution with JSON and PHP

1.2.0(6y ago)010[1 PRs](https://github.com/eyroot/lx-simple-storage/pulls)GPL-3.0-onlyPHPCI passing

Since Apr 16Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/eyroot/lx-simple-storage)[ Packagist](https://packagist.org/packages/eyroot/lx-simple-storage)[ RSS](/packages/eyroot-lx-simple-storage/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (1)Versions (7)Used By (0)

lx-simple-storage
=================

[](#lx-simple-storage)

Storage solution with JSON and PHP.

Usage
-----

[](#usage)

### Basic

[](#basic)

```
use Lx\Storage\Factory as StorageFactory;
use Lx\Storage\StorageAbstract;

// initialize storage of type json
$storage = StorageFactory::create(
	StorageFactory::TYPE_JSON, 'items', array(
		'path' => '/path/directory/storage/json',
		StorageAbstract::FIELD_ID => 'id' // name of the id field
	)
);

// insert items
$storage->insert(array(
	'id' => 1,
	'title' => 'item 1'
));
$storage->insert(array(
	'id' => 2,
	'title' => 'item 2'
));

// get items by id
$item1 = $storage->getById(1);
$item2 = $storage->getById(2);

// update item with id 2
$storage->update(array('title' => 'item 2 title updated'), 2);

// retrieve items
$list = $storage->getList();

// delete item with id 1
$storage->delete(1);
```

### Autoincrement ids feature enabled

[](#autoincrement-ids-feature-enabled)

```
use Lx\Storage\Factory as StorageFactory;
use Lx\Storage\StorageAbstract;

// initialize storage of type json
$storage = StorageFactory::create(
	StorageFactory::TYPE_JSON, 'items', array(
		'path' => '/path/directory/storage/json',
		StorageAbstract::FIELD_ID => 'id' // name of the id field,
		StorageAbstract::AUTOINCREMENT_ID => true
	)
);

// insert items
$storage->insert(array(
	'title' => 'item 1'
));
$storage->insert(array(
	'title' => 'item 2'
));

// get items by id
$item1 = $storage->getById(1);
$item2 = $storage->getById(2);
```

Development set-up
------------------

[](#development-set-up)

- Clone project locally:

```
git clone https://github.com/eyroot/lx-simple-storage lx-simple-storage
cd lx-simple-storage

```

- Set-up project and install composer deps:

```
composer install

```

- Run unit testing: ! in case you get the "Error: No code coverage driver is available" when running the test suite, remember to install and enable the php-xdebug extension !

```
cd testing/
mkdir data-storage
../vendor/bin/phpunit

```

- Check the code coverage of tests by opening in browser:

```
file:///tmp/coverage-lx-simple-storage/index.html

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance54

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~178 days

Total

5

Last Release

2233d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13eb79becb2b2dd507293c9e60226676577d54527d61853a7b9c169506fcc9eb?d=identicon)[eyroot](/maintainers/eyroot)

---

Top Contributors

[![eyroot](https://avatars.githubusercontent.com/u/12270802?v=4)](https://github.com/eyroot "eyroot (15 commits)")

---

Tags

phpjsonstorage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eyroot-lx-simple-storage/health.svg)

```
[![Health](https://phpackages.com/badges/eyroot-lx-simple-storage/health.svg)](https://phpackages.com/packages/eyroot-lx-simple-storage)
```

PHPackages © 2026

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