# yohang/Finite

A Simple PHP Finite State Machine

Repository: https://github.com/yohang/Finite
Canonical: https://ross.abutalabs.com/products/finite
Homepage: http://yohan.giarel.li/Finite
Language: PHP
License: MIT
License Family: permissive
Last push: 2025-12-01T13:10:06+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 55, release rhythm 27, longevity 100
- inputs: {"age_days": 5088, "days_push": 275, "days_rel": 275, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1350, forks 185 (observed 2026-08-28T04:04:28.189090+00:00)

## What it is
Finite is a lightweight, low-dependency PHP finite state machine library that manages state and transition graphs for stateful objects, using PHP Enums in version 2. It supports attaching business logic to states, listening to transition events, and includes Symfony and Twig integrations.

## Use cases
- implement a state machine for PHP objects
- manage document workflow states like draft and published
- define state transitions with guards in PHP
- trigger domain logic on state transitions
- model order or approval workflows in PHP
- integrate a state machine into Symfony

## When to choose
- you need a simple, lightweight state machine in PHP with minimal dependencies
- your project uses PHP Enums and wants enum-based state definitions
- you want Symfony or Twig integration for workflows

## When to avoid
- you need a distributed or persistent workflow engine
- you're not working in PHP
- you need visual workflow modeling or BPMN support

## Facets
- artifact type: library
- maturity: active
- function: state-management, workflow-automation, middleware
- domain: developer-tools, backend, web-development
- platform: php
- tags: finite-state-machine, state-machine, php-enums, symfony, workflow, transitions, domain-modeling, automation, web-server

## Member repositories
- yohang/Finite (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:28.189090+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:42:19.140406+00:00, confidence not recorded.
  - readme: https://github.com/yohang/Finite (fetched 2026-08-28T04:04:28.189090+00:00, sha bb6a9f17f545)
  - homepage: http://yohan.giarel.li/Finite (fetched 2026-08-29T12:01:10.289307+00:00, sha 66e7f184db41)
- Data as of 2026-08-30T08:39:29.467469+00:00.
