Search by

adachsoft / action

Arkadiusz Adach

Framework-independent action validation, authorization, execution, and run-history components for PHP applications.

Package info

gitlab.com/a.adach/action

Issues

pkg:composer/adachsoft/action

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-11-22 14:37 UTC

This package is auto-updated.

Last update: 2026-11-22 13:37:36 UTC


README

adachsoft/action provides framework-independent components for validating, authorizing, resolving, and executing actions defined with adachsoft/action-contracts. It also persists each execution outcome through an application-provided run repository.

Features

  • Validate action parameters against their schema and type-specific rules.
  • Compose action type providers, validators, parameter option providers, and handlers.
  • Execute actions with authorization and clock-based run timestamps.
  • Wire the default components with ActionFactory, without requiring a dependency injection container.

Requirements

  • PHP 8.3 or later
  • Composer

Installation

Install the library with Composer:

composer require adachsoft/action

Usage

Provide implementations of the authorization policy, run repository, and clock interfaces, along with your action type providers and handlers. Pass them to ActionFactory and call create() to obtain an ActionExecutorInterface. The library does not prescribe a framework, persistence layer, authorization model, or handler implementation.

See the examples for parameter validation and execution walkthroughs.

Validation behavior

The parameter validator reports missing required values, unknown keys, invalid value types, values outside declared options, and non-list values for multiple parameters. It does not apply defaults. JSON parameters must be encodable with JSON_THROW_ON_ERROR.