coolms/core

Kernel contracts for the CoolMS platform: entity vocabulary, persistence-neutral mapping attributes, domain events, config loading, outbox/inbox and the seams modules implement

Maintainers

Package info

github.com/coolms/core

pkg:composer/coolms/core

Transparency log

Statistics

Installs: 73

Dependents: 7

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-17 17:43 UTC

This package is auto-updated.

Last update: 2026-08-17 18:21:47 UTC


README

CI Latest Version PHP License

The kernel contracts of the CoolMS platform. Entity vocabulary, persistence-neutral mapping attributes, domain events, and the seams every module implements.

Four dependencies, all Symfony components. No ORM, no framework, no bundle.

use CoolMS\Core\Identifier\IdentifierProviderTrait;
use CoolMS\Core\Mapping\Column;
use CoolMS\Core\Model\AggregateRootInterface;

class OutboxRecord implements AggregateRootInterface
{
    use IdentifierProviderTrait;

    public function __construct(
        #[Column(type: 'string')]
        public string $type,
    ) {}
}

That entity is mapped by whichever persistence adapter is installed. It names none of them.

Installation

composer require coolms/core

On its own this package gives you contracts and value objects. To persist anything you also need an adapter — see Persistence.

What is in here

Area What it holds
Mapping/ Column, Id, GeneratedValue — persistence-neutral attributes
Identifier/, Timestampable/, Blameable/ the reusable entity traits and their contracts
Attribute/ ClassMeta, FieldMeta — how a class describes itself to the platform
Event/, Lifecycle/ domain events, recorded-event providers, entity lifecycle events
Outbox/, Inbox/, ChangeFeed/ the transactional outbox, consumer idempotency, and sync change-feed rows plus their ports
Config/, Secret/, Option/ configuration loading, the secret-store contract, option sources
Backup/, Retention/ the backup contributor seam and the retention pruner port

Persistence

The mapping attributes are declarations; something has to read them. A persistence adapter package provides coolms/core-persistence-implementation and does the reading:

composer require coolms/core-doctrine

The attribute vocabulary is deliberately small — the columns the traits actually use, and nothing else. It is a translation, not a second mapping layer: the moment it grows associations or inheritance, there are two schemas to keep in step instead of one.

Related packages

Package Role
coolms/core-module application services composed over these contracts
coolms/core-bundle Symfony integration
coolms/core-doctrine Doctrine ORM/DBAL adapter

License

MIT. See LICENSE.