Download the PHP package tzurbaev/laravel-pipeline-tasks without Composer

On this page you can find all versions of the php package tzurbaev/laravel-pipeline-tasks. 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 laravel-pipeline-tasks

Pipeline Tasks Helper

This package allows you to create some tasks with list of steps (pipes) and execute that steps one-by-one with ability to interrupt task execution on any step.

Build Status StyleCI ScrutinizerCI Latest Version on Packagist

Requirements

This package requires PHP 7.1 or higher.

Installation

You can install the package via composer:

Documentation

Examples

Example task & pipes are defined in the examples directory. Once you define your tasks, you can start your tasks via the TasksManager class:

Or you can use PipelineTasks facade:

All pipes will be executed in the order they are defined in the pipes method.

Stop execution

If you need to stop further task pipes from execution, just return false from your handle method.

Please note that there's strict type checking for the false value. This means that if you return empty string, 0 or null or any other falsish value, task execution won't be stopped.

Skip pipe

If you need to skip some pipe, just return any non-false value in the beginning of the handle method (or in any reasonable place).

You can also return some value that can be examined lately in the completed or failed methods of your task.

Accessing pipes results

Task class provides helper methods to retrieve any pipe's results:

Chaning pipe name

If you have several pipes of the same class, you might want to override its names, since at the end of the task you'll have results from the latest similar pipe.

You can override public function name() in you pipe class:

Now results will be stored as clone-git-branch-master instead of CloneGitRepository.

Events

TaskManager fires two events: Zurbaev\PipelineTasks\Events\PipelineTaskCompleted in case of successful task execution and Zurbaev\PipelineTasks\Events\PipelineTaskFailed in case of failure.

PipelineTaskCompleted instance contains public $task property, so you can access it in your listeners. PipelineTaskFailed in addition to the public $task property provides public $exception for identification what exact pipe caused failure.

Exceptions

If something went wrong during task execution, you can detect it via failed method on your task class or via listening to the PipelineTaskFailed event.

failed method accepts Zurbaev\PipelineTasks\Exceptions\PipelineTaskFailedException instance as first argument, so you can inspect it.

You can use $e->getPipeName() method to get the failed pipe's name.

If there was an exception while running pipe, you can access it via $e->getPrevious() method.

Exception codes described as constants of PipelineTaskFailedException class:

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

Contributing

Please see CONTRIBUTING for details.

Security

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

License

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


All versions of laravel-pipeline-tasks with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
illuminate/pipeline Version 5.5.*
illuminate/container Version 5.5.*
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 tzurbaev/laravel-pipeline-tasks contains the following files

Loading the files please wait ....