makomweb/tactix

Tooling for tactical domain driven design

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/makomweb/tactix

v0.1.4 2026-01-15 13:00 UTC

This package is auto-updated.

Last update: 2026-01-15 13:08:24 UTC


README

app-ci-workflow

Tactical DDD, simplified for PHP: tag your classes (via PHP attributes) and validate missing tags + forbidden relations.

project-logo

Installation

composer require --dev makomweb/tactix

Requirements:

Usage

1. Tag your classes

  • install the tags package from PHP Molecules as a regular dependeny via:
composer require xmolecules/phpmolecules
  • tag your classes with the available attributes:
use PHPMolecules\DDD\Attribute\AggregateRoot;
use PHPMolecules\DDD\Attribute\Entity;
use PHPMolecules\DDD\Attribute\ValueObject;
use PHPMolecules\DDD\Attribute\Service;
use PHPMolecules\DDD\Attribute\Factory;
use PHPMolecules\DDD\Attribute\Repository;

#[Entity]
final class User {}

2. Check your classes or folders

use Tactix\Check;

Check::className(User::class);
Check::folder(__DIR__.'/src');

Check throws on violations:

  • Tactix\ClassViolationException
  • Tactix\FolderViolationException

Both exceptions contain a $violations property of type array<Tactix\Violation> to get further details about wether there are missing tags, ambiguity or forbidden relations.

Forbidden relations

Tactix includes a small built-in blacklist (see Tactix\Forbidden) and reports violations as:

(MyValueObject)-[consumes]->(MyEntity) is a forbidden relation! ❌