MODULAR LAYER FOR SYMFONY

When module dependencies come full circle.

A new module dependency can silently close a cycle such as Billing → Payment → Catalog → Billing. Sillbeam detects the cycle during the Symfony container build and shows the path, descriptor files and guidance for investigating it.

BillingPaymentCatalog
Three modules. One closed dependency cycle.

REAL DIAGNOSTIC · CORE v0.2.0


  SILLBEAM CORE  / Architecture
  ────────────────────────────────────────────────────────────────────────────
  ✕ Architecture violations found
  1 finding · 1 diagnosis · 3 modules · 0 projects

  ────────────────────────────────────────────────────────────────────────────
  01 Circular module dependency
  1 finding · Dependency graph

    Billing → Payment → Catalog → Billing
    Billing/BillingModule.php
    +2 related locations (see -v)

    WHAT IS WRONG
      Declared dependencies form a cycle: Billing → Payment → Catalog →
      Billing.

    ! IMPORTANT CONTEXT
      Modules cannot depend on each other in a loop. Sillbeam cannot decide
      which dependency your application should remove.

    POSSIBLE NEXT STEPS
      1. Domain option: Review the involved descriptors:
      Billing/BillingModule.php, Payment/PaymentModule.php,
      Catalog/CatalogModule.php. Decide which module should depend on the
      other. Remove or redirect a dependency, or move shared contracts into a
      separate module. Rerun architecture analysis.

  ────────────────────────────────────────────────────────────────────────────
  Technical context: -v · No source files were changed.

From diagnosis to an architecture decision.

Use the affected descriptors to review which relationship should change: remove or reverse a dependency, or extract shared contracts. Sillbeam provides the evidenced path and investigation guidance. You decide which change fits your application.

Explore architecture checks

Original output in English · Core v0.2.0 · Exit code 1: the container build is blocked.

Source and reproduction

Direct access needs clear boundaries, too.

Direct access without a declaration

InvoiceService uses PaymentService directly, but Billing → Payment is missing from the module descriptor. Sillbeam reports the undeclared access. The descriptor is the PHP class marked with #[SillbeamModule] where you declare the module and its direct dependencies.

See the Billing/Payment example

Access across a private boundary

A private module belongs to its Project. Access from another Project crosses that boundary. Sillbeam checks supported direct class references and identifies the access involved.

Domain modules

Which direct references between domain areas are intended? Declare those dependencies in the module descriptor as rules Sillbeam can check. Modules live under src/Module/ by default.

Clear diagnostics

When a violation is found, diagnostics show the technical evidence and next steps suited to the known context, helping you investigate the cause.

Integrate active areas

When module activation changes, Sillbeam reflects it in its automatic service and route imports through Symfony. Existing configuration remains authoritative; its imports must respect the module boundaries.

Symfony remains the foundation.

You keep Symfony’s container, services, routing and runtime. Sillbeam checks declared module boundaries and uses Symfony’s mechanisms to automatically integrate active module areas. Doctrine mappings are optional.

For an unclear module relationship, Core v0.3.0 uses sillbeam:inspect:module to show declared and observed dependencies. Native SVG graphs make direct relationships shareable; Doctor JSON structures installation diagnostics. The bilingual PHP API reference supplements the handbook.

BUSINESS DOMAINS AND INTERFACES

A place for each feature.
A scope for each interface.

Shop, administration and API need some of the same domain areas as well as code of their own. Modules and optional Projects express those assignments within one Symfony application.

Modules group domain functionality

Shared modules can exist without Projects. When Projects are used, modules are explicitly assigned or included through dependencies in their graphs; only active areas are integrated automatically.

Understand modules

Projects organize interfaces

Shop, administration and API can use shared modules. Code specific to an interface stays in its Project or private modules. All Projects run in the same Symfony application; they are not separate services.

Understand Projects
MODULARIZE WITH PURPOSE

As much structure
as your project needs.

When direct references between domain areas become hard to follow, declared and checked module boundaries can help. Whether adoption is worthwhile depends on the specific problem, not just application size.

Weigh benefits and limitations

Start with a specific area

Start by describing one domain area and its direct dependencies in a descriptor. Check the container build and the relevant tests. This lets you assess the integration effort against existing code before adding more modules or Projects.

Maintain boundaries deliberately

Keep descriptors and dependencies in sync with the code. Sillbeam does not decide your domain boundaries. If your existing Symfony structure already provides clear responsibilities and understandable relationships, you do not need to reorganize every area.

Start with one domain area.

Install Core, describe your first module and check the container build. Existing Symfony code can remain alongside it.

Go to installation
MEASURED, NOT PROMISED

Build cost and runtime.

A synthetic comparison of Core v0.2.0 and native Symfony: 100 modules, identical services, routes and responses. Measured on 23 October 2026.

MetricNative Symfony (ms)Core v0.2.0 (ms)
Cold build · p501,589.244,409.46
Warm HTTP · p503.3973.404
Warm HTTP · p955.0525.031

Very similar response times in the measured warm HTTP test. The additional architecture checks increase container build time. These results apply to the documented synthetic test setup.

Method and limitations

PHP 8.5.4, FrameworkBundle 8.1.6, HttpFoundation 8.1.9; one workstation, CLI OPcache and JIT disabled. Three build repeats, 150 warm HTTP samples per variant. HTTP here means in-process Kernel::handle(), without network, FPM or concurrent load. No Projects, Doctrine or database.

Synthetic linear dependencies are not capacity planning. Warm HTTP processes loaded neither the analyzer nor the PHP parser. Rerun on the target environment with realistic load before making your own claims.

Source: measurements from 23 October 2026. Raw data, source revision and reproduction instructions are documented in the Core repository. Measurements and reproduction