Skip to content

Shared Bundles - Policy Update

Status

The previous "shared Symfony bundles for domain logic" approach is deprecated for this migration.

Why:

  • It couples island domains.
  • It increases coordination cost across deployables.
  • It conflicts with the anti-fragmentation policy in docs/migration/02-island-boundaries-and-performance.md.

Current Rule

Do not create shared bundles that contain mutable domain logic or ORM entities.

Explicitly forbidden in shared code:

  • Article, Order, Vehicle, Customer entities
  • Repository implementations
  • Island business workflows
  • Island migrations

Allowed Shared Code

Shared code must stay in one of the capped internal packages:

  1. atraxion/contracts
  2. atraxion/integration-sdk
  3. atraxion/foundation

How To Handle Integrations

For payment, shipping, loyalty, vehicle providers, platform connectors, and supplier feeds:

  1. Keep adapter implementation in the owning island.
  2. Use atraxion/integration-sdk for common transport and reliability primitives.
  3. Share DTO/event schemas via atraxion/contracts.

If a Bundle Seems Necessary

A new bundle-like shared module is allowed only if all are true:

  1. Reused by at least 2 islands.
  2. API is expected stable for 6+ months.
  3. Contains no mutable domain entities/workflows.
  4. Passed ADR review using docs/migration/03-architecture-review-checklist-template.md.

If any condition fails, keep it island-local.

Migration Guidance From Legacy Bundle Plan

  1. Freeze new development on legacy shared bundle candidates.
  2. Re-home domain entities and workflows to owning islands.
  3. Keep only stable primitives/contracts in shared packages.
  4. Track deviations via ADR with clear sunset date.