Download the PHP package ringierimu/state-workflow without Composer

On this page you can find all versions of the php package ringierimu/state-workflow. 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 state-workflow

Laravel State workflow

Unit Test

Laravel State workflow provide tools for defining and managing workflows and activities with ease. It offers an object oriented way to define a process or a life cycle that your object goes through. Each step or stage in the process is called a state. You do also define transitions that describe the action to get from one state to another.

A workflow consist of state and actions to get from one state to another. These actions are called transitions which describes how to get from one state to another.

Installation

Publish config/workflow.php file

Run migrations

Configuration

  1. Open config/workflow.php and configure it

  2. Add HasWorkflowTrait to your model class to support workflow

Usage

Manage State/Workflow

Authenticated User Resolver

Ability to audit and track who action a specific state change for your object. The package leverage the default Laravel auth provider to resolve the authenticated user when applying the state changes.

For a custom authentication mechanism, you should override authenticatedUserId in your object class with your own implementation.

Fired Event

Each step has three events that are fired in order:

During state/workflow transition, the following events are fired in the following order:

  1. Validate whether the transition is allowed at all. Their event listeners are invoked every time a call to workflow()->can(), workflow()->apply() or workflow()->getEnabledTransitions() is executed. Guard Event

  2. The subject is about to leave a state. Leave Event

  3. The subject is going through this transition. Transition Event

  4. The subject is about to enter a new state. This event is triggered just before the subject states are updated. Enter Event

  5. The subject has entered in the states and is updated. Entered Event

  6. The subject has completed this transition. Completed Event

Subscriber

Create subscriber class to listen to those events and the class should extends WorkflowSubscriberHandler.

To register method to listen to specific even within subscriber use the following format for method name:

NB:

Event Methods

Each workflow event has an instance of Event. This means that each event has access to the following information:

Artisan Command

Symfony workflow uses GraphvizDumper to create the workflow image by using the dot command. The dot command is part of Graphviz.

You will be required to download dot command to make use of this command. https://graphviz.gitlab.io/download/

Usage

Run Unit Test

Credits


All versions of state-workflow with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
illuminate/events Version ^7|^8|^9|^10.0
illuminate/support Version ^7|^8|^9|^10.0
symfony/event-dispatcher Version ^5.1
symfony/workflow Version ^5.1
symfony/property-access Version ^5.1
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 ringierimu/state-workflow contains the following files

Loading the files please wait ....