PHPackages                             waaseyaa/groups - 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. waaseyaa/groups

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

waaseyaa/groups
===============

Multi-bundle Group content entity type for Waaseyaa (group + group\_type; app-defined bundles)

v0.1.0-alpha.259(2w ago)01.7k↑45.6%1GPL-2.0-or-laterPHPPHP &gt;=8.5

Since Apr 19Pushed 1w agoCompare

[ Source](https://github.com/waaseyaa/groups)[ Packagist](https://packagist.org/packages/waaseyaa/groups)[ RSS](/packages/waaseyaa-groups/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (47)Versions (113)Used By (1)

waaseyaa/groups
===============

[](#waaseyaagroups)

**Layer 2 — Content Types**

Multi-bundle `group` content entity type for Waaseyaa applications. The package defines two entity types — `group` (the bundle-aware content entity, keyed by `gid`/`uuid`, labeled by `name`, partitioned by `type`) and `group_type` (the config entity that declares bundle identities) — and ships with **zero pre-registered bundles and zero bundle-scoped fields**. Consuming applications declare their own `GroupType` bundles and register bundle-scoped fields; those field values land in per-bundle subtables named `group__{bundle}`, while the core keys plus the `FieldStorage::Data` universals (`status`, `created_at`, `updated_at`) live on the base `group` table. The package is framework-agnostic: it targets no single product domain. See `docs/specs/bundle-scoped-storage.md`.

API exposure
------------

[](#api-exposure)

`group` and `group_type` deliberately opt in to the generic JSON:API surface and appear in authenticated API discovery. `GroupAccessPolicy` gates create, view, update, and delete operations on both types with the `administer groups`permission. Accounts without that permission receive no grant from the groups package policy and are denied for those operations.

Install
-------

[](#install)

Ships as part of `waaseyaa/framework` — consumers of the metapackage already have it. To depend on it directly:

```
composer require waaseyaa/groups
```

The `GroupsServiceProvider` is auto-discovered via `extra.waaseyaa.providers`; no manual wiring is required.

Key API
-------

[](#key-api)

### `Group` (extends `ContentEntityBase`)

[](#group-extends-contententitybase)

The `group` content entity. Entity keys: `id` -&gt; `gid`, `uuid`, `bundle` -&gt; `type`, `label` -&gt; `name`, `langcode`.

```
public function __construct(
    array $values = [],
    string $entityTypeId = '',
    array $entityKeys = [],
    array $fieldDefinitions = [],
);
public function getName(): string;          // alias for label()
public function setName(string $name): static;
public function getGroupTypeId(): string;   // the group_type bundle id (bundle())
```

### `GroupType` (extends `ConfigEntityBase`)

[](#grouptype-extends-configentitybase)

Config entity declaring a single bundle (e.g. `'business'`, `'organization'`). Holds bundle identity plus a `description`; bundle-scoped field definitions are registered separately. Entity keys: `id`, `label`.

```
public function __construct(array $values = [], string $entityTypeId = '', array $entityKeys = []);
public function getLabel(): string;
public function getDescription(): string;
public function setDescription(string $description): static;
```

### `GroupsServiceProvider` (extends `ServiceProvider`)

[](#groupsserviceprovider-extends-serviceprovider)

Registers the `group` content entity type (via `EntityType::fromClass`) and the `group_type` config entity type.

```
public function register(): void;
```

Register bundle-scoped fields against the `group` entity type through the framework's `EntityTypeManager`:

```
public function addBundleFields(string $entityTypeId, string $bundle, array $fields): void;
```

Usage
-----

[](#usage)

Declare a bundle's fields, then create and persist a group in that bundle. Bundle-scoped values route to `group__{bundle}` automatically.

```
// 1. Register fields for the 'business' bundle (grounded in TwoBundleCoexistenceTest).
$entityTypeManager->addBundleFields('group', 'business', [
    new FieldDefinition(
        name: 'email',
        type: 'string',
        targetEntityTypeId: 'group',
        targetBundle: 'business',
    ),
]);

// 2. Materialize the schema (creates `group` + `group__business`).
//    The framework runs this on the next install / schema pass.

// 3. Create and save a group in that bundle.
$group = $storage->create([
    'uuid'     => 'a1b2...',
    'type'     => 'business',
    'name'     => 'Acme Co.',
    'langcode' => 'en',
    'email'    => 'hello@acme.example',
]);
$storage->save($group);

$loaded = $storage->load($group->id());
$loaded->get('email');   // 'hello@acme.example' — merged back from group__business
```

Querying a field that exists in more than one bundle without a `type` constraint raises `BundleAmbiguousFieldException` — narrow with `->condition('type', 'business')`. Registered-but-unmaterialized bundle subtables are reported by `waaseyaa health:check` as `MISSING_BUNDLE_SUBTABLE`.

Key classes: `Group`, `GroupType`, `GroupsServiceProvider`.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance97

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78% 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 ~1 days

Total

112

Last Release

14d ago

PHP version history (2 changes)v0.1.0-alpha.148PHP &gt;=8.4

v0.1.0-alpha.176PHP &gt;=8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/25d0ff572e93e3461e5180a920725d65691fd1e15e2d914b254dbbc2d6c393bd?d=identicon)[jonesrussell](/maintainers/jonesrussell)

---

Top Contributors

[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (85 commits)")[![jonesrussell](https://avatars.githubusercontent.com/u/499552?v=4)](https://github.com/jonesrussell "jonesrussell (24 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/waaseyaa-groups/health.svg)

```
[![Health](https://phpackages.com/badges/waaseyaa-groups/health.svg)](https://phpackages.com/packages/waaseyaa-groups)
```

PHPackages © 2026

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