Download the PHP package phphd/pipeline-bundle without Composer

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

PhdPipelineBundle

🧰 Provides Symfony Messenger middleware for basic per-bus pipelining. It enables streamlined chaining of the messages created by message handlers. For instance, when handler (hdl1) processes message (msg1), it creates a subsequent message (msg2), triggering the invocation of the next handler (hdl2), which may, in turn, produce yet another new message, and this cycle continues.

Codecov Psalm coverage Psalm level Build Status Packagist Downloads Licence

Installation 📥

  1. Install via composer

  2. Enable the bundle in the bundles.php

Configuration ⚒️

To leverage chain of pipelined handlers for your command/query buses, you should add phd_pipeline.forward_chain middleware to the list:

Usage 🚀

Consider having this original message that is initially dispatched to the message bus:

Thy upfront message handler returns a new message that will be used for subsequent redispatch:

The new created message conveys basically the same business concept, but on the higher level of abstraction than initially. Thereof, instead of scalar types, it has business objects (e.g. VacationType entity instead of $vacationTypeId scalar). Basically, new class no longer merely represents the DTO. It now embodies the complete domain object.

You should add #[NextForwarded] attribute to enable forwarding of this new message to the next handler:

Messages lacking #[NextForwarded] attribute will not be forwarded. This attribute must be put on each message expected of redispatching.

Finally, one ultimate handler must implement the core business logic. It may or may not return a result to the calling code.

You may chain as many message handlers as needed, even in a recursive manner, by returning an instance of the same class as the original message, provided that it has the forwarding attribute enabled.

Extended forwarding

If you don't want to use the attribute on the message class, you don't have to. There could be some cases when you'd like to apply some dynamic configurations for NextForwarded instance. In such cases, you can return an instance of NextForwarded class right from the handler method:

The code above is no different from the one shown earlier.


All versions of pipeline-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.2
symfony/messenger Version ^6.3.5 | ^7.0
symfony/dependency-injection Version ^6.0 | ^7.0
symfony/http-kernel Version ^6.0 | ^7.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 phphd/pipeline-bundle contains the following files

Loading the files please wait ....