kumwe / portal-contract
Explicitly admitted portal contribution declarations and bounded presentation contracts.
Requires
- php: ^8.5
- ext-mbstring: *
- kumwe/access-control: 0.1.2
- kumwe/contribution: 0.1.1
Requires (Dev)
- ext-zip: *
- phpstan/phpstan: ^2.1
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^12.0
- squizlabs/php_codesniffer: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-12 15:14:37 UTC
README
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.