Download the PHP package micromus/kafka-bus-domain without Composer

On this page you can find all versions of the php package micromus/kafka-bus-domain. 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 kafka-bus-domain

Kafka Bus Messages for PHP

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style GitHub PHPStan

A PHP library for structuring, serializing, and deserializing Kafka messages. It provides typed message payloads with automatic casting, domain event messages, and factory helpers for both production and testing.

Installation

Core Concepts

Usage

1. Defining a Domain Message

Extend Payload and define casters in definitionCasters() to type your fields automatically.

2. Available Casters

Caster Description
IntegerCaster Casts value to int
FloatCaster Casts value to float
DateTimeCaster Parses/formats DateTimeInterface with a configurable format
PayloadCaster Hydrates a nested Payload subclass from an array
CollectionCaster Applies another caster to each item in an array
NullableCaster Wraps any caster to allow null values

3. Sending a JSON Message

JsonMessage extends Payload and implements ProducerMessageInterface, so it can be published directly to Kafka.


4. Sending a Domain Message

DomainMessage wraps an attributes object with a domain event type and a list of changed fields.

5. Consuming a Domain Message

Use DomainMessageFactory to deserialize an incoming Kafka message into a typed DomainMessage.

6. Testing Helpers

The library ships with factory base classes to generate realistic test data via Faker.

Define a test factory:

Use it in tests:

For payload-only factories, extend PayloadTestFactory:

Testing

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of kafka-bus-domain with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-rdkafka Version *
micromus/kafka-bus Version ^1.0.0
webmozart/assert Version ^1.11|^2.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 micromus/kafka-bus-domain contains the following files

Loading the files please wait ...