Download the PHP package bjuppa/eloquent-state-machine without Composer

On this page you can find all versions of the php package bjuppa/eloquent-state-machine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package eloquent-state-machine

State machines for Laravel Eloquent models

This package allows you to treat a Laravel Eloquent model and its relationships as extended state in a hierarchical state machine.

The philosophy that sets this package apart from most other state machine implementations is that behavior is declared in code in classes representing states and events, and the model itself determines the current state. There is no overall configuration of the state machine's graph. The current state handles incoming events and transitions the model into another state.

Project status

I, Björn Nilsved, created this package back in 2020 for a Laravel app that has been in production since 2021. The development process of the state machine functionality was rather exploratory and focused on the needs of that specific app. As the state machine API, base classes, etc were very much in flux, I wrote specific tests in the app itself, and held off writing generic tests for the package until the structure had stabilised. Of course, once the API was stable and the app was deployed I never got around to writing those tests or documentation for the package as planned...

For my own needs this situation is fine, I'm confident in the test suite of my app. Should others show interest in this package I'd be willing to put some effort in to set up proper testing and documentation for release of a stable 1.0 version. Please get in touch if this is something you'd like to see happen!

Requirements

Row-level locking is only supported in MySQL / MariaDB and PostgreSQL.

Installation

You can install the package via composer:

Usage

Start by drawing a statechart for your state machine, without it you will probably miss some state, transition, event or action.

Everything related to a specific state in the chart is coded directly into distinct methods of that state's PHP class.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of eloquent-state-machine with dependencies

PHP Build Version
Package Version
Requires illuminate/database Version ^8.0 || ^9.0 || ^10.0
illuminate/support Version ^8.0 || ^9.0 || ^10.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bjuppa/eloquent-state-machine contains the following files

Loading the files please wait ....