waaseyaa / engagement
Social engagement entities (reactions, comments, follows) for Waaseyaa
Requires
- php: >=8.5
- waaseyaa/access: ^0.1.0-alpha.249
- waaseyaa/entity: ^0.1.0-alpha.249
- waaseyaa/foundation: ^0.1.0-alpha.249
Requires (Dev)
- phpunit/phpunit: ^10.5
This package is auto-updated.
Last update: 2026-06-25 00:57:06 UTC
README
Layer 2 — Content Types
Social engagement entities for Waaseyaa: reactions, comments, follows.
Provides three content entities (Reaction, Comment, Follow) with their own access policies that respect parent-content visibility — comments on a draft post are not visible to anonymous readers even if the comment itself is public. EngagementAccessPolicy enforces the parent-cascade.
Access model
EngagementAccessPolicy gates view on two conditions (an administer content permission bypasses both):
- Parent-cascade — an engagement is only as visible as the content it targets (
target_type/target_id). The policy loads the parent and asks the access system whether the caller mayviewit; if it cannot prove the parent is viewable (parent missing, unresolvable, or denied, or the policy was constructed without itsEntityTypeManagerInterface/EntityAccessHandlerdependencies),viewis denied (fail-closed). The kernel's two-phase policy discovery injects those dependencies. - Comment moderation — an unpublished comment (
status = false) is viewable only by its owner.
Create access is authenticated-only; delete is owner-or-admin.
Key classes: Reaction, Comment, Follow, EngagementAccessPolicy, EngagementServiceProvider.