PHPackages                             glueful/extension-contracts - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. glueful/extension-contracts

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

glueful/extension-contracts
===========================

Shared cross-extension contracts for the Glueful ecosystem: tenancy, payment, and email-template seams.

v1.0.0(3d ago)025↑1100%1MITPHPPHP ^8.3

Since Jul 5Pushed 3d agoCompare

[ Source](https://github.com/glueful/contracts)[ Packagist](https://packagist.org/packages/glueful/extension-contracts)[ RSS](/packages/glueful-extension-contracts/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (3)Used By (1)

Extension Contracts
===================

[](#extension-contracts)

Shared cross-extension contracts for the Glueful ecosystem. This package is intentionally small: interfaces, readonly value objects, and constants only.

Soft Binding Rule
-----------------

[](#soft-binding-rule)

Only implementers bind shared contract IDs in the container. Consumers resolve a contract with `has() ? get() : ` and never bind defaults under a shared contract ID. That avoids boot-order and last-wins container surprises.

Tenancy
-------

[](#tenancy)

`CurrentTenantResolver::tenantUuid()` returns the active tenant UUID or `''`. The empty string is a valid single-store sentinel only when the consuming extension is not running in tenant mode. In tenant mode, a bound resolver returning `''` means missing tenant context and the consumer must fail closed unless it is running an explicitly named system/maintenance path.

`TenantTableRegistry` lets tenant-aware extensions register tenant-owned tables without writing into another extension's config.

Payments
--------

[](#payments)

`PaymentCollector` starts a payment for a `PayableReference` and must be idempotent per `(type, id)`: repeated calls return or refresh the same logical intent.

`PaymentConfirmationHandler` is the provider-to-owner seam. Payment providers dispatch verified successful payments only, with `PaymentConfirmation::amount`in integer minor units. The payable owner still compares amount and currency against its own record before transitioning business state.

Email
-----

[](#email)

`EmailTemplateRegistry` lets any extension declare mail templates as data — `EmailTemplateDefinition` (key, label, default subject/body, owner) with `EmailTemplatePlaceholder` metadata (name, description, sample) that drives admin chips and test-sends. Implementations must enforce the collision rule: re-registering a key is allowed only for the same owner; a different owner claiming an existing key throws at boot. Registrant extensions soft-resolve the registry (`has() ? register : skip`), so a missing email channel degrades to "templates simply aren't registered".

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance99

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

3d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/95650726?v=4)[msowah](/maintainers/msowah)[@msowah](https://github.com/msowah)

---

Top Contributors

[![MichaelSowah](https://avatars.githubusercontent.com/u/24699905?v=4)](https://github.com/MichaelSowah "MichaelSowah (6 commits)")

---

Tags

contractsemailpaymentstenancyglueful

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/glueful-extension-contracts/health.svg)

```
[![Health](https://phpackages.com/badges/glueful-extension-contracts/health.svg)](https://phpackages.com/packages/glueful-extension-contracts)
```

###  Alternatives

[egulias/email-validator

A library for validating emails against several RFCs

11.7k734.8M445](/packages/egulias-email-validator)[sendgrid/sendgrid

This library allows you to quickly and easily send emails through Twilio SendGrid using PHP.

1.6k50.9M197](/packages/sendgrid-sendgrid)[pelago/emogrifier

Converts CSS styles into inline style attributes in your HTML code

94746.7M141](/packages/pelago-emogrifier)[zbateson/mail-mime-parser

MIME email message parser

54753.3M91](/packages/zbateson-mail-mime-parser)[soundasleep/html2text

A PHP script to convert HTML into a plain text format

48021.2M91](/packages/soundasleep-html2text)[opcodesio/mail-parser

Parse emails without the mailparse extension

228.8M11](/packages/opcodesio-mail-parser)

PHPackages © 2026

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