Skip to content

Commit ec3a310

Browse files
authored
Merge pull request #11 from cspray/task/remove-unnecessary-constructs
Task/remove unnecessary constructs
2 parents adf088c + 80e144c commit ec3a310

19 files changed

+4
-4585
lines changed

.github/workflows/testing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: 'Unit Tests & Static Analysis'
22

33
on:
44
push:
5-
branches: [ release-1.x, release-2.x ]
5+
branches: [ release-1.x, release-2.x, release-3.x ]
66
pull_request:
7-
branches: [ release-1.x, release-2.x ]
7+
branches: [ release-1.x, release-2.x, release-3.x ]
88

99
jobs:
1010
continuous-integration:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.phpunit.cache
22
.phpunit.result.cache
33
architectural-decisions.xml.bak
4+
composer.lock
45
vendor/

README.md

+1-34
Original file line numberDiff line numberDiff line change
@@ -58,41 +58,8 @@ final class MyFirstDecision extends DocBlockArchitecturalDecision {
5858
}
5959
```
6060

61-
Optionally, you can also annotate appropriate places in your codebase where it might make sense to do so. After that you can run a command to generate an XML document detailing all of your decisions and where they were annotated in your codebase.
62-
63-
```shell
64-
./vendor/bin/architectural-decisions
65-
```
66-
67-
If successful a file named `architectural-decisions.xml` will be generated and stored in the root of your project. You can use this file to generate views into the content, assist in static analysis, or whatever else you might want to do with the ADR information and where it is used in your codebase.
61+
Optionally, you can also annotate appropriate places in your codebase where it might make sense to do so.
6862

6963
### Setting Custom Meta Data
7064

7165
There might be additional information you'd like to include with an ArchitecturalDecisionRecord that doesn't fit into the contents of the decision. Perhaps it is additional data that can be used with static analysis. Perhaps you like to include information about who authored the decision or some other meta-data. You can implement the `ArchitecturalDecisionRecord::setMetaData(DOMElement $meta)` method to add whatever data you'd like to the generated XML document. Please review the [DOMDocument](https://www.php.net/domdocument) documentation for how to appropriately add elements and attribute to the `<meta>` element.
72-
73-
## Example XML Document
74-
75-
This document was generated by parsing this library. We include a lightweight example for why you should use Attributes for ADR!
76-
77-
```xml
78-
<?xml version="1.0" encoding="UTF-8"?>
79-
<architecturalDecisions xmlns="https://architectural-decision.cspray.io/schema/architectural-decision.xsd">
80-
81-
<architecturalDecision
82-
id="UsingAttributesForArchitecturalDecisions"
83-
attribute="Cspray\ArchitecturalDecision\ArchitecturalDecisionRecords\UsingAttributesForArchitecturalDecisions">
84-
<date>2022-07-19</date>
85-
<status>Accepted</status>
86-
<contents><![CDATA[Architectural Decision Records (ADR) can be useful in determining why a piece of software is the way it is. While these type of documents can live anywhere, an Attribute in your codebase can be a good place to store this info. For more information, please check out the README in this repo or at https://github.com/cspray/architectural-decision]]></contents>
87-
<codeAnnotations>
88-
<codeAnnotation>
89-
<class>Cspray\ArchitecturalDecision\ArchitecturalDecisionRecord</class>
90-
</codeAnnotation>
91-
</codeAnnotations>
92-
<meta />
93-
</architecturalDecision>
94-
95-
<!-- Additional architecturalDecision would be listed here -->
96-
97-
</architecturalDecisions>
98-
```

bin/architectural-decisions

-67
This file was deleted.

0 commit comments

Comments
 (0)