Search by

kumwe / portal-contract

llewellyn

Explicitly admitted portal contribution declarations and bounded presentation contracts.

Package info

github.com/kumwe/portal-contract

pkg:composer/kumwe/portal-contract

Statistics

Installs: 45

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.1 2026-09-08 16:05 UTC

This package is auto-updated.

Last update: 2026-09-12 15:14:37 UTC


README

Packagist version Package CI PHP requirement License

Explicitly admitted portal contribution declarations and bounded presentation contracts under Kumwe\Portal\Contract\. Requires PHP 8.5 with mbstring, exact Access Control 0.1.2 and Contribution 0.1.1.

Installation and use

Install the published Composer package with an exact pre-1.0 pin:

composer require kumwe/portal-contract:0.2.1
<?php

require 'vendor/autoload.php';

use Kumwe\Access\Capability;
use Kumwe\Contribution\ContributionOwner;
use Kumwe\Portal\Contract\PortalContributionAdmission;
use Kumwe\Portal\Contract\PortalTemplateDefinition;

$template = new PortalTemplateDefinition('acme.editor.index', 'editor/index.twig');
$admission = new PortalContributionAdmission(
    ContributionOwner::extension('acme/editor'),
    $template,
    Capability::fromString('acme.editor.read'),
);
assert($admission->exposed === false);

Admission binds a declaration to its owner and required capability. Exposure defaults to false and requires explicit opt-in. This declaration does not grant authority: Core checks current trust, lifecycle and capability before use. The standalone example also demonstrates route normalization and explicit exposure.

Core and SDK integration

Five immutable values define workspace, navigation, route, template and admission contracts. No ConfigProvider, factory or shared context is registered. Values are constructed directly. Core and SDK retain HTTP handlers, renderers, active registries, authentication, authorization, transactions, persistence and delivery.

The Core contract, integration guide, public API and architecture define ownership and required host checks. Dependency guidance and the release record retain exact compatibility and source evidence. Published versions and source CI status are linked above; Core integration is validated in the consuming repository.

Development and releases

composer install
composer check
composer examples

CI validates behavior, hostile inputs, full API/signature/documentation agreement, manifest digests and a real no-dev authoritative archive consumer. Release guidance describes publication and independent verification. Licensed under Apache-2.0; see the charter for package responsibility.