PHPackages                             jeyroik/extas-repositories-uuid-fields - 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. jeyroik/extas-repositories-uuid-fields

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

jeyroik/extas-repositories-uuid-fields
======================================

UUID fields support for extas

1.0.0(5y ago)0232PHP

Since Sep 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jeyroik/extas-repositories-uuid-fields)[ Packagist](https://packagist.org/packages/jeyroik/extas-repositories-uuid-fields)[ RSS](/packages/jeyroik-extas-repositories-uuid-fields/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

[![PHP Composer](https://github.com/jeyroik/extas-repositories-fields-uuid/workflows/PHP%20Composer/badge.svg?branch=master&event=push)](https://github.com/jeyroik/extas-repositories-fields-uuid/workflows/PHP%20Composer/badge.svg?branch=master&event=push)[![codecov.io](https://camo.githubusercontent.com/01e0124d1c608d463dfc8587d85666c0b1025bf8fcc8cf638a0c58d0f6672836/68747470733a2f2f636f6465636f762e696f2f67682f6a6579726f696b2f65787461732d7265706f7369746f726965732d6669656c64732d757569642f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/01e0124d1c608d463dfc8587d85666c0b1025bf8fcc8cf638a0c58d0f6672836/68747470733a2f2f636f6465636f762e696f2f67682f6a6579726f696b2f65787461732d7265706f7369746f726965732d6669656c64732d757569642f636f7665726167652e7376673f6272616e63683d6d6173746572)

Описание
========

[](#описание)

Allow to auto-fill fields on create with uuid.

Usage
=====

[](#usage)

1. Add plugin for your repo create stage.
2. Install plugin.
3. Place field marker (see below) into field value.

Applicable field markers
========================

[](#applicable-field-markers)

- `@uuid6`
- `@uuid4`
- `@uuid5..`

Example
=======

[](#example)

Prepare repository + item class.

```
namespace example;

use extas\components\repositories\Repository;
use extas\components\Item;
use extas\components\THasId;

class Example extends Item
{
    use THasId;

    public function getUuid()
    {
        return $this->config['uuid'] ?? '';
    }

    protected function getSubjectForExtension() : string
    {
        return 'example';
    }
}

class ExampleRepo extends Repository
{
    protected string $name = 'example';
    protected string $itemClass = Example::class;
}
```

extas.json

```
{
  "plugins": [
    {
      "class": "extas\\components\\plugins\\repositories\\PluginUUidField",
      "stage": "extas.example.create.before"
    }
  ]
}
```

Usage

```
use example\Example;
use example\ExampleRepo;

$example = new Example(['uuid' => '@uuid4']);
$repo = new ExampleRepo();
$created = $repo->create($example);
echo $created->getUuid(); // something like af29a3f4-f865-3a4a-8a87-dc8dc0b813cr
```

Notice
======

[](#notice)

Your repository should allow `create before stage` (this is by default).

See `extas\components\repositories\Repository::isAllowCreateBeforeStage` property for details.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~0 days

Total

2

Last Release

2079d ago

Major Versions

0.1.0 → 1.0.02020-09-02

### Community

Maintainers

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

---

Top Contributors

[![jeyroik](https://avatars.githubusercontent.com/u/6348124?v=4)](https://github.com/jeyroik "jeyroik (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jeyroik-extas-repositories-uuid-fields/health.svg)

```
[![Health](https://phpackages.com/badges/jeyroik-extas-repositories-uuid-fields/health.svg)](https://phpackages.com/packages/jeyroik-extas-repositories-uuid-fields)
```

###  Alternatives

[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.1M11](/packages/bavix-laravel-wallet)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[google/cloud-bigquery

BigQuery Client for PHP

8817.2M41](/packages/google-cloud-bigquery)[formal/orm

324.0k1](/packages/formal-orm)

PHPackages © 2026

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