stella-maris/架构决策记录

一个跟踪架构设计决策的属性

1.0.0 2022-09-08 06:17 UTC

This package is auto-updated.

Last update: 2024-08-24 19:44:45 UTC


README

Dmitri Goosens 的一个想法,通过一种可自动检索、分析,最重要的是可以再次找到的格式来捕捉架构决策

用法

安装完成后,您可以在代码的任何位置添加一个 Adr 属性,以清晰地记录导致代码创建或更改的架构决策

<?php

use StellaMaris\ArchitecturalDecision\Record;

#[Record('
We decided to use Architectural Decision Records to better illustrate
why stuff was done.

There is no need to add a time or date or a name as that should already
be reflected within the VCS.

Record-entries can span multiple lines as they use strings 😁
')]
class Foo
{

}

安装

此软件包最好通过 composer 安装。

composer require stella-maris/architectural-decision-record

技巧

故意在包中未使用 ADR 这个术语,因为它可能会与 Active Domain Responder 模式混淆。

如果您想用 Record 替代属性中的 ADR,则可以自由创建一个类别名,如下所示

<?php


use StellaMaris\ArchitecturalDecision\Record as ADR;

#[ADR('
We decided to use Architectural Decision Records to better illustrate
why stuff was done.

There is no need to add a time or date or a name as that should already
be reflected within the VCS.

Record-entries can span multiple lines as they use strings 😁
')]
class Foo
{

}