PHPackages                             watoki/stepper - 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. watoki/stepper

ActiveLibrary

watoki/stepper
==============

A minimal migration tool for PHP.

01.1kPHP

Since Feb 2Pushed 11y ago1 watchersCompare

[ Source](https://github.com/watoki/stepper)[ Packagist](https://packagist.org/packages/watoki/stepper)[ RSS](/packages/watoki-stepper/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

stepper [![Build Status](https://camo.githubusercontent.com/9b9dc08a5f5ee5b9233456d04581038c8a7dc52a3aa9230b3b1f1164e3a9795b/68747470733a2f2f7472617669732d63692e6f72672f7761746f6b692f737465707065722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/watoki/stepper)
=================================================================================================================================================================================================================================================================================

[](#stepper-)

*stepper* is a minimalistic migration tool.

Usage
-----

[](#usage)

In order to use *stepper*, you need at least one Step defining what should happen when the the Step is executed and also whether and how it can be undone.

```
class MyFirstStep implements Step {
    public function up() {
        // does something
    }

    public function down() {
        // undoes something
    }

    public function canBeUndone() {
        return true;
    }

    public function next() {}
}

```

With this one Step and a file (e.g. `migration.state`) to store the current state in, you can start the Stepper:

```
$app = new CliApplication(new StepperCommand(new StepOne(), 'migration.state'));
$app->run();

```

That's it. You can now execute the Step with `php myScript.php`. If you add a second Step later, make sure that the first Step returns it in it's `next` method:

```
public function next() {
    return new AnotherStep();
}

```

If you run `php myScript.php` now, only `AnotherStep` gets executed since the fact that the first Step already has been executed has been saved in `migration.state`.

If you want to revert whatever `AnotherStep` did you can run `php myScript.php --to=MyFirstStep` which will execute the `down` function of `AnotherStep`. This won't work if `AnotherStep::canBeUndone` returns `false`.

Documentation
-------------

[](#documentation)

For a detailed documentation, check out the [test suite](https://github.com/watoki/stepper/tree/master/spec/watoki/stepper/).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e687108526c164e4ad1c49b8228514541bd90d43ef70665a087d00e34a1f7559?d=identicon)[rtens](/maintainers/rtens)

---

Top Contributors

[![rtens](https://avatars.githubusercontent.com/u/1468866?v=4)](https://github.com/rtens "rtens (34 commits)")

### Embed Badge

![Health badge](/badges/watoki-stepper/health.svg)

```
[![Health](https://phpackages.com/badges/watoki-stepper/health.svg)](https://phpackages.com/packages/watoki-stepper)
```

PHPackages © 2026

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