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

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

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

UUID fields support for extas

0.1.0(6y ago)02.4k5PHPCI failing

Since Apr 9Pushed 6y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (6)Versions (2)Used By (5)

[![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

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity46

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

2229d ago

### 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 (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k74.6k86](/packages/pocketmine-pocketmine-mp)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[getdkan/dkan

DKAN Open Data Catalog

385135.4k2](/packages/getdkan-dkan)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[tomaj/hermes

Simple php background processing library

38251.0k5](/packages/tomaj-hermes)

PHPackages © 2026

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