Skip to content

thesis-php/message

Repository files navigation

Thesis Message

PHP Version Requirement GitHub Release

This package provides four interfaces for messaging: Message, Command, Event and Call.

Installation

composer require thesis/message

Usage

use Thesis\Message\Call;
use Thesis\Message\Command;
use Thesis\Message\Event;

final readonly class RegisterUser implements Command
{
    public function __construct(
        public Uuid $userId,
        public string $name,
    ) {}
}

final readonly class UserRegistered implements Event
{
    public function __construct(
        public Uuid $userId,
    ) {}
}

/**
 * @implements Call<string>
 */
final readonly class GetUserName implements Call
{
    public function __construct(
        public Uuid $userId,
    ) {}
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages