Download the PHP package lmc/cqrs-bundle without Composer

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

LMC CQRS Bundle

cqrs-types Latest Stable Version Tests and linting Coverage Status

Symfony bundle for CQRS libraries and extensions. It registers services, data collectors etc. by a configuration.

Table of contents

Installation

Configuration

Profiler extended configuration

TIPs:

Note: if you don't enable any of the extension, there will only be a CallbackQueryHandler and CallbackSendCommandHandler, so you probably need to register your own.

Routes

You must register the routes for a CQRS bundle if you enable a profiler.

Tags:

Tags are automatically registered, if your class implements an Interface and is registered in Symfony container as a service

With priority

Note: Default priority is 50 and none of the predefined handlers, profilers, etc. has priority higher than 90 (see complete list below)

Services

Bundle registers all necessary services according to configuration (for example, if you set http: true it will automatically register all http handlers, etc.)

Most of the services are registered both by an alias and a class name, so it will be available for autowiring. All interfaces are automatically configured to have a tag (see Tags section above).

Handlers

There are 2 main services, which are essential to the library. Both of them have its interface to represent it, and it is advised to use it via the interface.

1. Query Fetcher Interface

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.

2. Command Sender Interface

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.

Note: There is no logging feature in the CQRS library, if you need one, you have to implement it by yourself.

Profiler Bag

There is a profiler bag service, which is a collection of all profiler information in the current request. The information inside are used by a CqrsDataCollector, which shows them in the Symfony profiler.

It requires profiler: true in the configuration.

You can access the profiler bag either by:

Extensions

We offer a basic extensions for a common Commands & Queries

Http

Http extension repository

Installation

NOTE: You will also need an implementation for PSR-7, PSR-17 and PSR-18 for HTTP extensions to work.

Configuration

Enabling a Http extension will allow a QueryFetcher and CommandSender to handle a PSR-7 Requests/Response and decode it.

Solr

SOLR extension repository

Installation

Configuration

Enabling a Solr extension will allow a QueryFetcher and CommandSender to handle a Solarium Requests/Result and decode it.

Solarium Query Builder

It allows you to build a Solarium request only by defining an Entity with all features you want to provide. See Solr extension readme for more information.

Note: You can specify a tag for your custom applicator by lmc_cqrs.solr.query_builder_applicator

List of all predefined services and their priorities

Note: To see a list of all services really registered in your application use bin/console debug:cqrs (it requires debug: true in your configuration)

Top most handlers for Commands & Queries

Interface Class Alias
Lmc\Cqrs\Types\QueryFetcherInterface Lmc\Cqrs\Handler\QueryFetcher @lmc_cqrs.query_fetcher
Lmc\Cqrs\Types\CommandSenderInterface Lmc\Cqrs\Handler\CommandSender @lmc_cqrs.command_sender

Query Handlers

Service Alias Tag Priority Enabled
Lmc\Cqrs\Handler\Handler\GetCachedHandler - - 80 if cache is enabled
Lmc\Cqrs\Handler\Handler\CallbackQueryHandler @lmc_cqrs.query_handler.callback lmc_cqrs.query_handler 50 always
Lmc\Cqrs\Http\Handler\HttpQueryHandler @lmc_cqrs.query_handler.http lmc_cqrs.query_handler 50 if http extension is enabled

Send Command Handlers

Service Alias Tag Priority Enabled
Lmc\Cqrs\Handler\Handler\CallbackSendCommandHandler @lmc_cqrs.send_command_handler.callback lmc_cqrs.send_command_handler 50 always
Lmc\Cqrs\Http\Handler\HttpSendCommandHandler @lmc_cqrs.send_command_handler.http lmc_cqrs.send_command_handler 50 if http extension is enabled

Response decoders

Service Alias Tag Priority Enabled
Lmc\Cqrs\Http\Decoder\HttpMessageResponseDecoder @lmc_cqrs.response_decoder.http lmc_cqrs.response_decoder 90 if http extension is enabled
Lmc\Cqrs\Http\Decoder\StreamResponseDecoder @lmc_cqrs.response_decoder.stream lmc_cqrs.response_decoder 70 if http extension is enabled
Lmc\Cqrs\Types\Decoder\JsonResponseDecoder @lmc_cqrs.response_decoder.json lmc_cqrs.response_decoder 60 always

Profiler formatters

Service Alias Tag Priority Enabled
Lmc\Cqrs\Http\Formatter\HttpProfilerFormatter @lmc_cqrs.profiler_formatter.http lmc_cqrs.profiler_formatter -1 if http extension is enabled
Lmc\Cqrs\Types\Formatter\JsonProfilerFormatter - lmc_cqrs.profiler_formatter -1 if profiler is enabled
Lmc\Cqrs\Bundle\Service\ErrorProfilerFormatter - lmc_cqrs.profiler_formatter -1 if profiler is enabled

Other services

Class Alias Purpose Enabled
Lmc\Cqrs\Bundle\Controller\CacheController - Controller for invalidating cache from a profiler if profiler is enabled
Lmc\Cqrs\Bundle\Profiler\CqrsDataCollector - Collects a data about Commands & Queries for a profiler if profiler is enabled
Lmc\Cqrs\Handler\ProfilerBag @lmc_cqrs.profiler_bag A collection of all ProfilerItems, it is a main source of data for a CqrsDataCollector if profiler is enabled

All versions of cqrs-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-mbstring Version *
lmc/cqrs-handler Version ^2.2
lmc/cqrs-types Version ^3.2
symfony/config Version ^5.2 || ^6.0 || ^7.0
symfony/console Version ^5.2 || ^6.0 || ^7.0
symfony/dependency-injection Version ^5.2 || ^6.0 || ^7.0
symfony/error-handler Version ^5.2 || ^6.0 || ^7.0
symfony/framework-bundle Version ^5.2 || ^6.0 || ^7.0
symfony/http-foundation Version ^5.2 || ^6.0 || ^7.0
symfony/http-kernel Version ^5.2 || ^6.0 || ^7.0
twig/twig Version ^2.0 || ^3.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-bundle contains the following files

Loading the files please wait ....