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. itinance/tiny-state-machine

ActiveLibrary

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 2mo 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 54% 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

3749d 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

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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