PHPackages                             itinance/tiny-state-machine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. itinance/tiny-state-machine

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

itinance/tiny-state-machine
===========================

1.0.3(10y ago)0183MITPHPPHP &gt;=5.3.2

Since Feb 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/itinance/tiny-state-machine)[ Packagist](https://packagist.org/packages/itinance/tiny-state-machine)[ RSS](/packages/itinance-tiny-state-machine/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (4)Dependencies (4)Versions (7)Used By (0)

TinyStateMachine
================

[](#tinystatemachine)

Installation
------------

[](#installation)

composer require itinance/tiny-state-machine

Usage
-----

[](#usage)

This StateMachine enables to set some state in an application and to request this state elsewhere, even in Twig.

Setting state:

```
StateMachine::instance()->setState('Foobar');

```

Setting state with value:

```
StateMachine::instance()->setState('Foobar', 'barfoo');

```

Request state:

```
StateMachine::instance()->getState('Foobar' /* , $default */);

StateMachine::instance()->hasState('Foobar');
StateMachine::instance()->hasStateWithValue('Foobar', 'barfoo');

```

Twig:

```
{% if hasState('Foobar') %}

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

3796d ago

Major Versions

0.9.0 → 1.0.02016-02-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bdfaccd9eaf060eef8c7270c5dc5da7a255ee7f7393da0640847074bfcb96c5?d=identicon)[itinance](/maintainers/itinance)

---

Top Contributors

[![itinance](https://avatars.githubusercontent.com/u/1758597?v=4)](https://github.com/itinance "itinance (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/itinance-tiny-state-machine/health.svg)

```
[![Health](https://phpackages.com/badges/itinance-tiny-state-machine/health.svg)](https://phpackages.com/packages/itinance-tiny-state-machine)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M387](/packages/easycorp-easyadmin-bundle)[symfony/web-profiler-bundle

Provides a development tool that gives detailed information about the execution of any request

2.3k160.5M1.2k](/packages/symfony-web-profiler-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

567.3M132](/packages/symfony-ux-icons)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M559](/packages/shopware-core)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
