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,Customerentities- Repository implementations
- Island business workflows
- Island migrations
Allowed Shared Code¶
Shared code must stay in one of the capped internal packages:
atraxion/contractsatraxion/integration-sdkatraxion/foundation
How To Handle Integrations¶
For payment, shipping, loyalty, vehicle providers, platform connectors, and supplier feeds:
- Keep adapter implementation in the owning island.
- Use
atraxion/integration-sdkfor common transport and reliability primitives. - 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:
- Reused by at least 2 islands.
- API is expected stable for 6+ months.
- Contains no mutable domain entities/workflows.
- 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¶
- Freeze new development on legacy shared bundle candidates.
- Re-home domain entities and workflows to owning islands.
- Keep only stable primitives/contracts in shared packages.
- Track deviations via ADR with clear sunset date.