SILLBEAM HANDBOOK · v0.4.0

Configuration

Adapt discovery areas, namespaces and exclusions to your directory structure, and configure integrations.

Overview

Default: sillbeam: {}. The source boundary is %kernel.project_dir%/src, and its namespace is determined from Composer PSR-4. Relative paths refer to the application directory. Ambiguous PSR-4 mappings require an explicit namespace.

In the example configuration below, adapt paths, namespaces, module IDs and Project IDs to your existing descriptors. It illustrates available options; unknown IDs and nonexistent explicit roots are errors.

YAML
sillbeam:
    discovery:
        root: '%kernel.project_dir%/src'
        namespace: 'App\'
        excludes: ['Generated/**', '**/Tests/**']
        # Bei Angabe ersetzt jede Liste den Standard für diese Art.
        modules:
            - path: src/Domain
              namespace: 'App\Domain\'
              excludes: ['Legacy/**']
            - path: packages/Accounting/src
              namespace: 'Accounting\'
        projects:
            - path: src/Surface
              namespace: 'App\Surface\'
    integrations:
        controllers: [Http, '**/Controller']
        entities: [Model, '**/Entity']
        services:
            exclude: ['Model/**', 'Entity/**', '**/Entity/**', 'Dto/**', '**/Dto/**', 'Tests/**', '**/Tests/**', 'Fixtures/**', '**/Fixtures/**', 'Migrations/**', '**/Migrations/**']
    modules:
        legacy: { enabled: false }
        'project:shop:old-reports': { enabled: false }
    projects:
        shop: { hosts: [shop.example.com, www.example.com] }
        admin: { hosts: [admin.example.com] }
    doctrine:
        enabled: null

Multiple configuration files are merged according to Symfony rules: root, exclusion and integration lists are appended; an explicit entry replaces the respective default. An empty list removes the default but does not delete entries from previous configuration files.

Without specified lists, module roots are src/Module and Project roots are src/Project. An empty list removes the respective default. Explicit roots must exist, and Composer autoloading must load their namespaces. Identical paths with conflicting namespaces are errors. The source root remains monitored; descriptors outside allowed boundaries are reported.

Patterns use /, * (one segment), ** (recursive) and ?. Global exclusions are relative to the source root or absolute; local exclusions are relative to the respective root. Exclusions apply to discovery and automatic service, route and entity imports. Controller/entity patterns select directories relative to the descriptor area. Defaults: Controller, **/Controller and Entity, **/Entity.

Automatic service imports exclude Entity/, Dto/, Tests/, Fixtures/ and Migrations/ directly below the descriptor and at every nesting level by default. An explicit integrations.services.exclude list replaces these defaults; retain the desired development-directory patterns. An empty list imports all directories. Entities under Model/ need their own service exclusion. This list does not change discovery, routing or Doctrine exclusions. Native service configuration and DI attributes remain available.

Doctrine: null enables integration automatically when DoctrineBundle is registered; true requires it and fails without the bundle; false disables Sillbeam mappings. The shorthand doctrine: false is allowed. Only active modules are mapped automatically; direct Project entities are also mapped. Manual native mappings are preserved, even when they deliberately include excluded areas again.

Activation options can use %env(bool:...)%. They are resolved at build time. Rebuild the container cache after changing build environment variables.

IDs match [a-z][a-z0-9-]*. Hosts are exact, trimmed, lowercase hostnames without a scheme, port, path or wildcard. The architecture check reports configuration entries for unknown modules or Projects.

With active Doctrine integration, mappings are prepared during prepend(). A bundle that prepends Sillbeam configuration must be registered before SillbeamCoreBundle; alternatively, configure the options directly in the application. Different configuration prepended later causes a build error if Doctrine integration is active or becomes active through it.

Technical reference: published Core tag v0.2.0, commit cf2f4102ad7c15db30ad5c5af21852bc2aaec99a in the Core repository. Historical verification records identify their own source snapshots separately. The unchanged contracts were checked against the published Core v0.3.0.

In v0.4.0, an explicitly configured discovery path must resolve to a directory. Conventional module and Project directories may be absent. The sillbeam.locale project default accepts de or en.

Source index and Symfony caches

Core can reuse static parser results under var/sillbeam/source-index when source content and parser inputs match. Missing or unusable entries fall back to parsing the sources. Symfony separately manages container and routing caches.

The architecture reference describes storage and fresh builds.