pardovimes/serra

A Script to check if there is Domain-Driven Design layer leaks

Maintainers

Package info

github.com/pardovimes/serra

pkg:composer/pardovimes/serra

Statistics

Installs: 4 505

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2022-02-09 11:46 UTC

This package is auto-updated.

Last update: 2026-04-05 19:34:16 UTC


README

Serra is a script that check if there are Domain-driven design layer leaks.

The name of this repository is inspired by serra angel

Installation

Install with composer:

$ composer require pardovimes/serra

Usage

php  <path to serra file> [-f <file>] [-c <config.json>]

Example

php  vendor/bin/serra

Options

  • -f <file> execute script only for this file
  • -c <json.file> execute script with this configuration

Configuration options

Example

{
  "folder-to-scan": "src/",
  "domain-folder-name": "Domain",
  "application-folder-name": "Application",
  "domain-valid-uses": [
    "Webmozart\\Assert\\Assert"
  ],
  "application-valid-uses": [
    "Webmozart\\Assert\\Assert"
  ]
}

Options

  • folder-to-scan if file is not passed it scans all files from folder. src/ by default.
  • domain-folder-name Domain layer name. Domain by default.
  • application-folder-name Application layer name. Application by default.
  • domain-valid-uses Array of packages that will ignore if found on domain layer. empty array by default
  • application-valid-uses Array of packages that will ignore if found on application layer. empty array by default

License

Composer is licensed under the GNU GPLv3 License - see the LICENSE file for details.