Download the PHP package lmc/cqrs-handler without Composer

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

LMC CQRS Handlers

cqrs-types Latest Stable Version Tests and linting Coverage Status

This library contains a base implementation for CQRS/Types.

Table of contents

Installation

Query Fetcher

Base implementation for a Query Fetcher Interface (see Types/QueryFetcherInterface).

It is responsible for

Usage

If you are not using a CQRS/Bundle you need to set up a Query Fetcher yourself.

Minimal Initialization

Full Initialization with all features.

You can add handlers and decoders by add methods.

Fetching a query

You can do whatever you want with a response, we will persist a result into db, for an example or log an error.

Query Handlers

It is responsible for handling a specific Query request and passing a result into OnSuccess callback. See more here.

GetCachedHandler

This handler is automatically created QueryFetcher and added amongst handlers with priority 80 when an instance of CacheItemPoolInterface is passed into QueryFetcher.

It supports queries implementing CacheableInterface with cacheTime > 0. The second condition allows you to avoid caching in queries with CacheableInterface by just a cache time value. There is also CacheTime::noCache() named constructor to make it explicit.

It handles a query by retrieving a result out of a cache (if the cache has the item and is hit (see PSR-6 for more).

CallbackQueryHandler

This handler supports a query with request type of "callable", "Closure" or "callback" (which all stands for a callable request).

It simply calls a created request as a function and returns a result to OnSuccess callback.

Query

Query is a request which fetch a data without changing anything. See more here

CachedDataQuery

This is a predefined implementation for a Query with CacheableInterface.

It is handy for in-app queries where you want to use cache for a result. You can also extend it and add more features.

ProfiledCachedDataQuery

This is a predefined implementation for a Query with CacheableInterface and ProfileableInterface.

It is handy for in-app queries where you want to use cache for a result and also profile it. You can also extend it and add more features.


Command Sender

Base implementation for a Command Sender Interface (see Types/CommandSenderInterface).

It is responsible for

Usage

If you are not using a CQRS/Bundle you need to set up a Command Sender yourself.

Minimal Initialization

Full Initialization with all features.

You can add handlers and decoders by add methods.

Sending a command

You can do whatever you want with a response, we will persist a result into db, for an example or log an error.

Send Command Handlers

It is responsible for handling a specific Command request and passing a result into OnSuccess callback. See more here.

CallbackSendCommandHandler

This handler supports a command with request type of "callable", "Closure" or "callback" (which all stands for a callable request).

It simply calls a created request as a function and returns a result to OnSuccess callback.

Command

Command is a request which change a data and may return result data. See more here

ProfiledDataCommand

This is a predefined implementation for a Command with ProfileableInterface.

It is handy for in-app commands where you want to profile it. You can also extend it and add more features.

ProfilerBag

Service, which is a collection of all profiler information in the current request. If you pass it to the QueryFetcher or CommandSender, they will profile query/command implementing ProfileableInterface to the ProfilerBag.

The information inside are used by a CqrsDataCollector, which shows them in the Symfony profiler (used in CQRS/Bundle).

Verbosity

Profiler bag can also hold an information about a verbosity level of profiling.

Levels:

There might be additional data added to the ProfilerItem with higher levels of verbosity.

You can set it by


All versions of cqrs-handler with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-mbstring Version *
lmc/cqrs-types Version ^3.2
psr/cache Version ^2.0 || ^3.0
psr/http-message Version ^1.0.1 || ^2.0
ramsey/collection Version ^1.2.2 || ^2.0
ramsey/uuid Version ^4.2.3
symfony/stopwatch Version ^5.0 || ^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 lmc/cqrs-handler contains the following files

Loading the files please wait ....