PHPackages                             nrslib/repository-supports - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nrslib/repository-supports

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nrslib/repository-supports
==========================

Support creating repository.

0.0.0(5y ago)121.8k2MITPHPPHP ^7.3|^8.0

Since Dec 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/nrslib/repository-support-php)[ Packagist](https://packagist.org/packages/nrslib/repository-supports)[ RSS](/packages/nrslib-repository-supports/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Repository Support
==================

[](#repository-support)

Support creating repository by file.

Sample
======

[](#sample)

Repository
----------

[](#repository)

```
interface UserRepositoryInterface
{
    function find(UserId $id): ?User;

    function save(User $user): void;
}
```

```
use nrslib\RepositorySupports\FileRepository;

class FileUserRepository implements UserRepositoryInterface
{
    use FileRepository;

    function find(UserId $id): ?User
    {
        $user = $this->load($id->getValue());
        if (is_null($user)) {
            return null;
        } else {
            return $user;
        }
    }

    public function save(User $user): void
    {
        $id = $user->getId()->getValue();
        $this->store($id, $user);
    }
}
```

Setup
-----

[](#setup)

### in Laravel

[](#in-laravel)

```
use nrslib\RepositorySupports\FileRepositoryConfig;

class AppServiceProvider extends ServiceProvider
{
    ...

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        // set directory here
        $debugPersistenceDirectoryFullPath = storage_path("debug\\persistence");
        FileRepositoryConfig::$basicDirectoryFullPath = $debugPersistenceDirectoryFullPath;
   }
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

1976d ago

### Community

Maintainers

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

---

Top Contributors

[![nrslib](https://avatars.githubusercontent.com/u/38722970?v=4)](https://github.com/nrslib "nrslib (5 commits)")

### Embed Badge

![Health badge](/badges/nrslib-repository-supports/health.svg)

```
[![Health](https://phpackages.com/badges/nrslib-repository-supports/health.svg)](https://phpackages.com/packages/nrslib-repository-supports)
```

PHPackages © 2026

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