PHPackages                             mwstake/mediawiki-component-datastash - 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. mwstake/mediawiki-component-datastash

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

mwstake/mediawiki-component-datastash
=====================================

Persistent key/value store for user data

1.0.0(yesterday)02↑2900%GPL-3.0-onlyPHP

Since Jun 18Pushed yesterdayCompare

[ Source](https://github.com/hallowelt/mwstake-mediawiki-component-datastash)[ Packagist](https://packagist.org/packages/mwstake/mediawiki-component-datastash)[ RSS](/packages/mwstake-mediawiki-component-datastash/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (6)Versions (2)Used By (0)

MediaWiki Stakeholders Group - Components
-----------------------------------------

[](#mediawiki-stakeholders-group---components)

Datastash - persistent key/value store for user data
====================================================

[](#datastash---persistent-keyvalue-store-for-user-data)

**This code is meant to be executed within the MediaWiki application context. No standalone usage is intended.**

Usage
-----

[](#usage)

Data can be stashed for current wiki or globally, accessible across wikis in the same cluster. The API is simple:

```
/** @var \MWStake\MediaWiki\Component\DataStash\StashManager $stash */
$stash = \MediaWiki\MediaWikiServices::getInstance()->getService( 'MWStake.DataStash' );
$user = \RequestContext::getMain()->getUser();

$stash->stash( 'myKey', [ 'some' => 'value' ], $user );

// or globally
$stash->stashGlobal( 'myKeyGlobal', [ 'some' => 'value' ], $user );

var_dump( $stash->get( 'myKey', $user ) );
// outputs: [ 'some' => 'value' ]

var_dump( $stash->getGlobal( 'myKeyGlobal', $user ) );
// outputs: [ 'some' => 'value' ]
```

It is possible to store same key both globally and locally, although not recommended.

### REST

[](#rest)

`GET rest.php/mws/v1/data-stash/{key}` - get stashed data for current user.

- `key` - key of the stashed data
- query param `global` - if set to `1`, global stash will be returned, otherwise local stash for current wiki

`POST rest.php/mws/v1/data-stash/{key}` - stash data for current user.

- `key` - key of the stashed data
- `body`

```
{
    "data": { "some": "value" },
    "global": true
}
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance100

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/161c38b5448b71865cf0652b6974ed489dd3683b5d6e1814973cea6cb66c8f1d?d=identicon)[dsavuljesku](/maintainers/dsavuljesku)

---

Top Contributors

[![it-spiderman](https://avatars.githubusercontent.com/u/13665198?v=4)](https://github.com/it-spiderman "it-spiderman (3 commits)")

### Embed Badge

![Health badge](/badges/mwstake-mediawiki-component-datastash/health.svg)

```
[![Health](https://phpackages.com/badges/mwstake-mediawiki-component-datastash/health.svg)](https://phpackages.com/packages/mwstake-mediawiki-component-datastash)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[yemenopensource/filament-excel

This package useful for importing excel files into models.

194.2k](/packages/yemenopensource-filament-excel)

PHPackages © 2026

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