Download the PHP package rockett/pipeline without Composer

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

Pipeline

GitHub License Packagist Version Packagist Downloads Forgejo Workflow Status

Provides an implementation of the pipeline pattern with additional processors for conditional interruption and stage tapping.

This package was originally forked from League's excellent pipeline package.

Installation

Requires PHP 8.3+.

Quick Start

[!NOTE] PHP 8.5+ Pipe Operator: With PHP 8.5 introducing the native pipe operator, basic sequential operations can now be achieved without a package. However, this library still provides value through reusable pipeline objects, conditional interruption (continueWhen/continueUnless), stage tapping for observability (beforeEach/afterEach), and a fluent API for composing complex processing workflows that go beyond simple function chaining.

Pipeline Pattern

The pipeline pattern lets you compose sequential operations by chaining stages. Each stage receives a traveler (payload), processes it, and passes the output to the next stage. Internally, this is equivalent to:

Immutability

Pipelines are implemented as immutable stage-chains, contracted by the PipelineContract interface. When you add a new stage, the pipeline will be cloned with the new stage added in. This makes pipelines easy to re-use, and minimizes side-effects.

Usage

Operations in a pipeline (stages) can accept anything from the pipeline that satisfies the callable type-hint. So closures and anything that's invokable will work.

Class-based stages

Classes can be used as stages by implementing StageContract and an __invoke method:

You can create custom stage contracts to type-hint the traveler and return type.

Re-usability

Pipelines can be re-used as stages within other pipelines, enabling composable architectures:

Pipeline Builders

While pipelines are immutable by design, there are scenarios where you need to conditionally compose stages before building the pipeline. Pipeline builders solve this by providing a mutable container for collecting stages, which is then converted to an immutable pipeline:

Once build() is called, you have an immutable pipeline that can be reused or passed around safely without concerns about side-effects from modifications.

Processors

Processors handle iteration through stages and enable additional features like conditional interruption and stage tapping.

[!CAUTION] As of v4.1, these processors are deprecated and slated for removal in v5:

  • InterruptibleProcessor – use Processor with continueUnless()/continueWhen()
  • TapProcessor – use Processor with beforeEach()/afterEach()
  • InterruptibleTapProcessor – use Processor with combined methods

FingersCrossedProcessor (Default)

Basic sequential processing with no early exit capability (throw an exception to stop).

Processor

The Processor supports conditional interruption (early exit) and stage tapping (callbacks before/after each stage), configured fluently with method-chaining:

Features can be composed via method chaining:

Exiting pipelines early

Use interrupt methods to exit pipelines early based on conditions:

In this example, when $traveler->hasError() returns true, the pipeline exits early.

Available interrupt methods:

Invoking actions on each stage

Use tap methods to invoke callbacks before and/or after each stage for logging, metrics, or debugging:

Per-stage conditions

Stages can optionally implement a condition method to control whether they should execute. If the condition returns false, the stage is skipped and the traveler is passed to the next stage untouched.

[!NOTE] Condition-checking is done after the beforeEach stage tap.

Handling Exceptions

The package won't catch exceptions. Handle them in your code, either inside a stage or when calling the pipeline.

Testing

License

Pipeline is a fork of [League\Pipeline] by Frank de Jonge. It is licensed under the ISC License, with the original code retaining its MIT License. See LICENSE.md for details.

Contributing

Contributions are welcome – if you have something to add to this package, or have found a bug, feel free to submit a pull request for review.


All versions of pipeline with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
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 rockett/pipeline contains the following files

Loading the files please wait ...