repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/CustomIdBehaviour.php | src/Aggregate/CustomIdBehaviour.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
trait CustomIdBehaviour
{
public function __construct(
private readonly string $id,
) {
}
public static function fromString(string $id): self
{
return new self($id);
}
public function toString()... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/ApplyMethodNotFound.php | src/Aggregate/ApplyMethodNotFound.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use function sprintf;
final class ApplyMethodNotFound extends AggregateException
{
/**
* @param class-string<AggregateRoot> $aggregateRootClass
* @param class-string $event
*/
public function __constru... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/Uuid.php | src/Aggregate/Uuid.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
final class Uuid implements AggregateRootId
{
use RamseyUuidV7Behaviour;
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/AggregateHeader.php | src/Aggregate/AggregateHeader.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use DateTimeImmutable;
use Patchlevel\Hydrator\Normalizer\DateTimeImmutableNormalizer;
/** @immutable */
final class AggregateHeader
{
/** @param positive-int $playhead */
public function __construct(
public readonly string... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/BasicChildAggregate.php | src/Aggregate/BasicChildAggregate.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use Patchlevel\Hydrator\Normalizer\ObjectNormalizer;
/** @experimental */
#[ObjectNormalizer]
abstract class BasicChildAggregate implements ChildAggregate
{
use ChildAggregateBehaviour;
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/AggregateRootMetadataAware.php | src/Aggregate/AggregateRootMetadataAware.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootMetadata;
use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootMetadataFactory;
interface AggregateRootMetadataAware
{
public static function metadata(): Aggr... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/MetadataNotPossible.php | src/Aggregate/MetadataNotPossible.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
final class MetadataNotPossible extends AggregateException
{
public function __construct()
{
parent::__construct('Metadata method must be called on the concrete implementation');
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/AggregateRootIdNotSupported.php | src/Aggregate/AggregateRootIdNotSupported.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use RuntimeException;
use function get_debug_type;
use function sprintf;
final class AggregateRootIdNotSupported extends RuntimeException
{
/** @param class-string $aggregateRootClass */
public function __construct(string $aggrega... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/BasicAggregateRoot.php | src/Aggregate/BasicAggregateRoot.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootMetadata;
abstract class BasicAggregateRoot implements AggregateRoot, AggregateRootMetadataAware
{
use AggregateRootAttributeBehaviour {
metadata as getMetadata;
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/ChildAggregate.php | src/Aggregate/ChildAggregate.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
/** @experimental */
interface ChildAggregate
{
/** @param callable(object $event): void $recorder */
public function setRecorder(callable $recorder): void;
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/ChildAggregateBehaviour.php | src/Aggregate/ChildAggregateBehaviour.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use Patchlevel\Hydrator\Attribute\Ignore;
/** @experimental */
trait ChildAggregateBehaviour
{
/** @var callable(object $event): void */
#[Ignore]
private $recorder;
protected function recordThat(object $event): void
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/AggregateRoot.php | src/Aggregate/AggregateRoot.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
interface AggregateRoot
{
public function aggregateRootId(): AggregateRootId;
/** @param iterable<object> $events */
public function catchUp(iterable $events): void;
/** @return list<object> */
public function releaseE... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/RamseyUuidV7Behaviour.php | src/Aggregate/RamseyUuidV7Behaviour.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;
trait RamseyUuidV7Behaviour
{
public function __construct(
private readonly UuidInterface $id,
) {
}
public static function fromString(string $id): self
{
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/InvalidAggregateStreamName.php | src/Aggregate/InvalidAggregateStreamName.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use RuntimeException;
use function sprintf;
final class InvalidAggregateStreamName extends RuntimeException
{
public function __construct(string $stream)
{
parent::__construct(sprintf('Invalid aggregate stream name "%s". E... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/AggregateRootMetadataAwareBehaviour.php | src/Aggregate/AggregateRootMetadataAwareBehaviour.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootMetadata;
use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootMetadataFactory;
use Patchlevel\EventSourcing\Metadata\AggregateRoot\AttributeAggregateRootMetadataF... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/AggregateRootBehaviour.php | src/Aggregate/AggregateRootBehaviour.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use Patchlevel\Hydrator\Attribute\Ignore;
use Patchlevel\Hydrator\Attribute\NormalizedName;
trait AggregateRootBehaviour
{
/** @var list<object> */
#[Ignore]
private array $uncommittedEvents = [];
#[NormalizedName('_playhe... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Aggregate/AggregateRootAttributeBehaviour.php | src/Aggregate/AggregateRootAttributeBehaviour.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Aggregate;
use Patchlevel\Hydrator\Attribute\Ignore;
use Patchlevel\Hydrator\Attribute\PostHydrate;
use ReflectionProperty;
use function array_key_exists;
use function count;
use function explode;
trait AggregateRootAttributeBehaviour
{
use Aggr... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Projector.php | src/Attribute/Projector.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
use Patchlevel\EventSourcing\Subscription\RunMode;
#[Attribute(Attribute::TARGET_CLASS)]
final class Projector extends Subscriber
{
public function __construct(
string $id,
string $group = 'projector',
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/RetryStrategy.php | src/Attribute/RetryStrategy.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
final class RetryStrategy
{
public function __construct(
public readonly string $name,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Snapshot.php | src/Attribute/Snapshot.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
final class Snapshot
{
public function __construct(
public readonly string $name,
public readonly int|null $batch = null,
public readonly string|null $version... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Inject.php | src/Attribute/Inject.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_PARAMETER)]
final class Inject
{
public function __construct(
public readonly string $service,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Answer.php | src/Attribute/Answer.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_METHOD)]
final class Answer
{
/** @param class-string|null $queryClass */
public function __construct(
public readonly string|null $queryClass = null,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Stream.php | src/Attribute/Stream.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
#[Attribute(Attribute::TARGET_CLASS)]
final class Stream
{
/** @param string|class-string<AggregateRoot> $name */
public function __construct(
public read... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/SuppressMissingApply.php | src/Attribute/SuppressMissingApply.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
final class SuppressMissingApply
{
public const ALL = '*';
/** @var list<class-string> */
public readonly array $suppressEvents;
public readonly bool $suppressAll;
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Apply.php | src/Attribute/Apply.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Apply
{
/** @param class-string|null $eventClass */
public function __construct(
public readonly string|null $eventClass = null,
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/OnFailed.php | src/Attribute/OnFailed.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_METHOD)]
final class OnFailed
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Subscriber.php | src/Attribute/Subscriber.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
use Patchlevel\EventSourcing\Subscription\RunMode;
#[Attribute(Attribute::TARGET_CLASS)]
class Subscriber
{
public function __construct(
public readonly string $id,
public readonly RunMode $runMode,
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Id.php | src/Attribute/Id.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_PROPERTY)]
final class Id
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/ChildAggregate.php | src/Attribute/ChildAggregate.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
/** @experimental */
#[Attribute(Attribute::TARGET_PROPERTY)]
final class ChildAggregate
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Subscribe.php | src/Attribute/Subscribe.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Subscribe
{
public const ALL = '*';
/** @param class-string|self::ALL $eventClass */
public function __construct(
public read... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Event.php | src/Attribute/Event.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
final class Event
{
public function __construct(
public readonly string $name,
/** @var list<string> */
public readonly array $aliases = [],
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/InstantRetry.php | src/Attribute/InstantRetry.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
use Throwable;
#[Attribute(Attribute::TARGET_CLASS)]
final class InstantRetry
{
/**
* @param positive-int|null $maxRetries
* @param list<class-string<Throwable>>|null $exceptions
*/
pu... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Handle.php | src/Attribute/Handle.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_METHOD)]
final class Handle
{
/** @param class-string|null $commandClass */
public function __construct(
public readonly string|null $commandClass = null,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Aggregate.php | src/Attribute/Aggregate.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
final class Aggregate
{
public function __construct(
public readonly string $name,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Setup.php | src/Attribute/Setup.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_METHOD)]
final class Setup
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Teardown.php | src/Attribute/Teardown.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_METHOD)]
final class Teardown
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/SplitStream.php | src/Attribute/SplitStream.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
final class SplitStream
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Header.php | src/Attribute/Header.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
final class Header
{
public function __construct(
public readonly string $name,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Attribute/Processor.php | src/Attribute/Processor.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Attribute;
use Attribute;
use Patchlevel\EventSourcing\Subscription\RunMode;
#[Attribute(Attribute::TARGET_CLASS)]
final class Processor extends Subscriber
{
public function __construct(
string $id,
string $group = 'processor',
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/UniqueConstraintViolation.php | src/Store/UniqueConstraintViolation.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Throwable;
final class UniqueConstraintViolation extends StoreException
{
public function __construct(Throwable|null $previous = null)
{
parent::__construct('unique constraint violation', 0, $previous);
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/StreamClosed.php | src/Store/StreamClosed.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use RuntimeException;
final class StreamClosed extends RuntimeException
{
public function __construct()
{
parent::__construct('Stream is already closed.');
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/UnsupportedCriterion.php | src/Store/UnsupportedCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use RuntimeException;
use function sprintf;
final class UnsupportedCriterion extends RuntimeException
{
/** @param class-string $criterionClass */
public function __construct(string $criterionClass)
{
parent::__construct(s... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/ReadOnlyStore.php | src/Store/ReadOnlyStore.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Closure;
use InvalidArgumentException;
use Patchlevel\EventSourcing\Message\Message;
use Patchlevel\EventSourcing\Store\Criteria\Criteria;
use Psr\Log\LoggerInterface;
final class ReadOnlyStore implements Store
{
public function __cons... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/StreamStartHeader.php | src/Store/StreamStartHeader.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
/** @immutable */
final class StreamStartHeader
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/StoreException.php | src/Store/StoreException.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use RuntimeException;
abstract class StoreException extends RuntimeException
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/LockingNotImplemented.php | src/Store/LockingNotImplemented.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use function sprintf;
final class LockingNotImplemented extends StoreException
{
/** @param class-string $platform */
public function __construct(string $platform)
{
parent::__construct(
sprintf(
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/StreamDoctrineDbalStoreStream.php | src/Store/StreamDoctrineDbalStoreStream.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Result;
use Doctrine\DBAL\Types\DateTimeTzImmutableType;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\Types;
use Generator;
use IteratorAggregate;
use Patchlevel\EventSour... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/DoctrineDbalStore.php | src/Store/DoctrineDbalStore.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Closure;
use Doctrine\DBAL\ArrayParameterType;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\DBAL\Platforms\MariaDBPlatform;
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrin... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Stream.php | src/Store/Stream.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Patchlevel\EventSourcing\Message\Message;
use Traversable;
/** @extends Traversable<Message> */
interface Stream extends Traversable
{
public function close(): void;
/** @throws StreamClosed */
public function next(): void;
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/StoreIsReadOnly.php | src/Store/StoreIsReadOnly.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
final class StoreIsReadOnly extends StoreException
{
public function __construct()
{
parent::__construct('Store is in read only mode');
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/DoctrineDbalStoreStream.php | src/Store/DoctrineDbalStoreStream.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Result;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\Types;
use Generator;
use IteratorAggregate;
use Patchlevel\EventSourcing\Aggregate\AggregateHeader;
use Patchlevel\Ev... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/WrongQueryResult.php | src/Store/WrongQueryResult.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
final class WrongQueryResult extends StoreException
{
public function __construct()
{
parent::__construct('the type of the query result is wrong');
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/MissingEventRegistry.php | src/Store/MissingEventRegistry.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Patchlevel\EventSourcing\Metadata\Event\EventRegistry;
use RuntimeException;
use function sprintf;
final class MissingEventRegistry extends RuntimeException
{
/** @param class-string $criterionClass */
public function __construct(... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/StreamDoctrineDbalStore.php | src/Store/StreamDoctrineDbalStore.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Closure;
use Doctrine\DBAL\ArrayParameterType;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\DBAL\Platforms\MariaDBPlatform;
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrin... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/InvalidStreamName.php | src/Store/InvalidStreamName.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use function sprintf;
final class InvalidStreamName extends StoreException
{
public function __construct(string $streamName)
{
parent::__construct(sprintf('Invalid stream name "%s"', $streamName));
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Store.php | src/Store/Store.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Closure;
use Patchlevel\EventSourcing\Message\Message;
use Patchlevel\EventSourcing\Store\Criteria\Criteria;
interface Store
{
public function load(
Criteria|null $criteria = null,
int|null $limit = null,
int|nu... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/SubscriptionStore.php | src/Store/SubscriptionStore.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
interface SubscriptionStore
{
public function supportSubscription(): bool;
public function setupSubscription(): void;
public function wait(int $timeoutMilliseconds): void;
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/MissingDataForStorage.php | src/Store/MissingDataForStorage.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Throwable;
use function sprintf;
final class MissingDataForStorage extends StoreException
{
public function __construct(string $information, Throwable|null $previous = null)
{
parent::__construct(
sprintf('Cann... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/ArrayStream.php | src/Store/ArrayStream.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use ArrayIterator;
use Generator;
use Iterator;
use IteratorAggregate;
use Patchlevel\EventSourcing\Message\Message;
use Traversable;
/** @implements IteratorAggregate<Message> */
final class ArrayStream implements Stream, IteratorAggregate
{
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/InMemoryStore.php | src/Store/InMemoryStore.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Closure;
use Patchlevel\EventSourcing\Aggregate\AggregateHeader;
use Patchlevel\EventSourcing\Clock\SystemClock;
use Patchlevel\EventSourcing\Message\HeaderNotFound;
use Patchlevel\EventSourcing\Message\Message;
use Patchlevel\EventSourcing... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/ArchivedHeader.php | src/Store/ArchivedHeader.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
/** @immutable */
final class ArchivedHeader
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/StreamStore.php | src/Store/StreamStore.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Patchlevel\EventSourcing\Store\Criteria\Criteria;
interface StreamStore extends Store
{
/** @return list<string> */
public function streams(): array;
public function remove(Criteria|null $criteria = null): void;
public fu... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/StreamReadOnlyStore.php | src/Store/StreamReadOnlyStore.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use Closure;
use Patchlevel\EventSourcing\Message\Message;
use Patchlevel\EventSourcing\Store\Criteria\Criteria;
use Psr\Log\LoggerInterface;
final class StreamReadOnlyStore implements StreamStore
{
public function __construct(
pri... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/InvalidType.php | src/Store/InvalidType.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store;
use function sprintf;
final class InvalidType extends StoreException
{
public function __construct(string $field, string $type)
{
parent::__construct(sprintf('"%s" should be a "%s" type', $field, $type));
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/EventsCriterion.php | src/Store/Criteria/EventsCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class EventsCriterion
{
public function __construct(
/** @var list<string> */
public readonly array $events,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/Criteria.php | src/Store/Criteria/Criteria.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
use function array_key_exists;
use function array_values;
final class Criteria
{
/** @var array<class-string, object> */
private readonly array $criteria;
public function __construct(object ...$criteria)
{
$re... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/CriterionNotFound.php | src/Store/Criteria/CriterionNotFound.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
use RuntimeException;
use function sprintf;
final class CriterionNotFound extends RuntimeException
{
/** @param class-string $criterionClass */
public function __construct(string $criterionClass)
{
parent::__const... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/FromPlayheadCriterion.php | src/Store/Criteria/FromPlayheadCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class FromPlayheadCriterion
{
public function __construct(
public readonly int $fromPlayhead,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/ToIndexCriterion.php | src/Store/Criteria/ToIndexCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class ToIndexCriterion
{
public function __construct(
public readonly int $toIndex,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/ToPlayheadCriterion.php | src/Store/Criteria/ToPlayheadCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class ToPlayheadCriterion
{
public function __construct(
public readonly int $toPlayhead,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/AggregateIdCriterion.php | src/Store/Criteria/AggregateIdCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class AggregateIdCriterion
{
public function __construct(
public readonly string $aggregateId,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/FromIndexCriterion.php | src/Store/Criteria/FromIndexCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class FromIndexCriterion
{
public function __construct(
public readonly int $fromIndex,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/StreamCriterion.php | src/Store/Criteria/StreamCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class StreamCriterion
{
/** @var list<string> */
public readonly array $streamName;
public function __construct(
string ...$streamName,
) {
$this->streamName = $streamName;
}
public stati... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/CriteriaBuilder.php | src/Store/Criteria/CriteriaBuilder.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
use function is_array;
final class CriteriaBuilder
{
/** @var list<string>|null */
private array|null $streamName = null;
private string|null $aggregateName = null;
private string|null $aggregateId = null;
private ... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/AggregateNameCriterion.php | src/Store/Criteria/AggregateNameCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class AggregateNameCriterion
{
public function __construct(
public readonly string $aggregateName,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/EventIdCriterion.php | src/Store/Criteria/EventIdCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class EventIdCriterion
{
public function __construct(
public readonly string $eventId,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Criteria/ArchivedCriterion.php | src/Store/Criteria/ArchivedCriterion.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Criteria;
final class ArchivedCriterion
{
public function __construct(
public readonly bool $archived,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Header/EventIdHeader.php | src/Store/Header/EventIdHeader.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Header;
/** @immutable */
final class EventIdHeader
{
public function __construct(
public readonly string $eventId,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Header/StreamNameHeader.php | src/Store/Header/StreamNameHeader.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Header;
/** @immutable */
final class StreamNameHeader
{
public function __construct(
public readonly string $streamName,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Header/IndexHeader.php | src/Store/Header/IndexHeader.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Header;
/** @immutable */
final class IndexHeader
{
/** @param positive-int $index */
public function __construct(
public readonly int $index,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Header/RecordedOnHeader.php | src/Store/Header/RecordedOnHeader.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Header;
use DateTimeImmutable;
/** @immutable */
final class RecordedOnHeader
{
public function __construct(
public readonly DateTimeImmutable $recordedOn,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Store/Header/PlayheadHeader.php | src/Store/Header/PlayheadHeader.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Store\Header;
/** @immutable */
final class PlayheadHeader
{
/** @param positive-int $playhead */
public function __construct(
public readonly int $playhead,
) {
}
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/AggregateUnknown.php | src/Repository/AggregateUnknown.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
use Patchlevel\EventSourcing\Aggregate\AggregateRootId;
use function sprintf;
final class AggregateUnknown extends RepositoryException
{
/** @param class-string<AggregateRoot> $ag... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/PlayheadMismatch.php | src/Repository/PlayheadMismatch.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRootId;
use function sprintf;
final class PlayheadMismatch extends RepositoryException
{
public function __construct(string $aggregateRootClass, AggregateRootId $aggregateRootId, int $p... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/AggregateOutdated.php | src/Repository/AggregateOutdated.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
use Patchlevel\EventSourcing\Aggregate\AggregateRootId;
use function sprintf;
final class AggregateOutdated extends RepositoryException
{
/** @param class-string<AggregateRoot> $a... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/WrongAggregate.php | src/Repository/WrongAggregate.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use function sprintf;
final class WrongAggregate extends RepositoryException
{
/**
* @param class-string $aggregateRootClass
* @param class-string $expected
*/
public function __construct(string $aggregateRootClass,... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/SnapshotRebuildFailed.php | src/Repository/SnapshotRebuildFailed.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
use Patchlevel\EventSourcing\Aggregate\AggregateRootId;
use Throwable;
use function sprintf;
final class SnapshotRebuildFailed extends RepositoryException
{
/** @param class-strin... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/DefaultRepositoryManager.php | src/Repository/DefaultRepositoryManager.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
use Patchlevel\EventSourcing\Clock\SystemClock;
use Patchlevel\EventSourcing\EventBus\EventBus;
use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootClassNotRegistered;
use ... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/AggregateDetached.php | src/Repository/AggregateDetached.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
use Patchlevel\EventSourcing\Aggregate\AggregateRootId;
use function sprintf;
final class AggregateDetached extends RepositoryException
{
/** @param class-string<AggregateRoot> $a... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/Repository.php | src/Repository/Repository.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
use Patchlevel\EventSourcing\Aggregate\AggregateRootId;
/** @template T of AggregateRoot */
interface Repository
{
/**
* @return T
*
* @throws AggregateNotFound
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/AggregateAlreadyExists.php | src/Repository/AggregateAlreadyExists.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
use Patchlevel\EventSourcing\Aggregate\AggregateRootId;
use function sprintf;
final class AggregateAlreadyExists extends RepositoryException
{
/** @param class-string<AggregateRoo... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/RepositoryException.php | src/Repository/RepositoryException.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use RuntimeException;
abstract class RepositoryException extends RuntimeException
{
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/DefaultRepository.php | src/Repository/DefaultRepository.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateHeader;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
use Patchlevel\EventSourcing\Aggregate\AggregateRootId;
use Patchlevel\EventSourcing\Clock\SystemClock;
use Patchlevel\EventSourc... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/AggregateNotFound.php | src/Repository/AggregateNotFound.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRootId;
use function sprintf;
final class AggregateNotFound extends RepositoryException
{
public function __construct(string $aggregateRootClass, AggregateRootId $rootId)
{
... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/RepositoryManager.php | src/Repository/RepositoryManager.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository;
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
interface RepositoryManager
{
/**
* @param class-string<T> $aggregateClass
*
* @return Repository<T>
*
* @template T of AggregateRoot
*/
public fu... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/MessageDecorator/SplitStreamDecorator.php | src/Repository/MessageDecorator/SplitStreamDecorator.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository\MessageDecorator;
use Patchlevel\EventSourcing\Message\Message;
use Patchlevel\EventSourcing\Metadata\Event\EventMetadataFactory;
use Patchlevel\EventSourcing\Store\StreamStartHeader;
final class SplitStreamDecorator implements MessageDeco... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/MessageDecorator/ChainMessageDecorator.php | src/Repository/MessageDecorator/ChainMessageDecorator.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository\MessageDecorator;
use Patchlevel\EventSourcing\Message\Message;
final class ChainMessageDecorator implements MessageDecorator
{
/** @param iterable<MessageDecorator> $messageDecorators */
public function __construct(
privat... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/Repository/MessageDecorator/MessageDecorator.php | src/Repository/MessageDecorator/MessageDecorator.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\Repository\MessageDecorator;
use Patchlevel\EventSourcing\Message\Message;
interface MessageDecorator
{
public function __invoke(Message $message): Message;
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/CommandBus/CommandBus.php | src/CommandBus/CommandBus.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\CommandBus;
interface CommandBus
{
/** @throws HandlerNotFound */
public function dispatch(object $command): void;
}
| php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
patchlevel/event-sourcing | https://github.com/patchlevel/event-sourcing/blob/183a44ce065b249fae92725ba5af56f01335ac88/src/CommandBus/InstantRetryCommandBus.php | src/CommandBus/InstantRetryCommandBus.php | <?php
declare(strict_types=1);
namespace Patchlevel\EventSourcing\CommandBus;
use Patchlevel\EventSourcing\Attribute\InstantRetry;
use Patchlevel\EventSourcing\Repository\AggregateOutdated;
use ReflectionClass;
use Throwable;
use function in_array;
final class InstantRetryCommandBus implements CommandBus
{
/**... | php | MIT | 183a44ce065b249fae92725ba5af56f01335ac88 | 2026-01-05T02:54:16.927404Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.