pardovimes / serra
A Script to check if there is Domain-Driven Design layer leaks
1.0.1
2022-02-09 11:46 UTC
Requires
- php: ^7.4 || ^8.0
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^9.5
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-scanif file is not passed it scans all files from folder.src/by default.domain-folder-nameDomain layer name.Domainby default.application-folder-nameApplication layer name.Applicationby default.domain-valid-usesArray of packages that will ignore if found on domain layer. empty array by defaultapplication-valid-usesArray 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.