Skip to content

Commit e4d6396

Browse files
committed
Add selective Mermaid diagrams
1 parent 003b3ee commit e4d6396

3 files changed

Lines changed: 48 additions & 0 deletions

File tree

src/guide/concept/di-container.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,22 @@ That's what dependency containers are for.
118118
A dependency injection (DI) container is an object that knows how to instantiate and configure objects and
119119
all objects they depend on.
120120

121+
At runtime, application code declares dependencies. The container uses configuration and type declarations to build
122+
these objects and the objects they depend on:
123+
124+
```mermaid
125+
flowchart TD
126+
action[Action handler] -->|declares dependency| service[ReportService]
127+
container[DI container] -->|injects| service
128+
service -->|needs| cache[CacheInterface]
129+
service -->|needs| db[ConnectionInterface]
130+
container -->|creates and configures| service
131+
container -->|resolves| cache
132+
container -->|resolves| db
133+
definitions[Container definitions] -.-> container
134+
types[Constructor types] -.-> container
135+
```
136+
121137
Yii provides the DI container feature through the [yiisoft/di](https://github.com/yiisoft/di) package and
122138
[yiisoft/injector](https://github.com/yiisoft/injector) package.
123139

src/guide/databases/db-migrations.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ And the following steps show how to deploy a new release with database migration
2222
2. Scott updates the source code on the production server to the release tag.
2323
3. Scott applies any accumulated database migrations to the production database.
2424

25+
```mermaid
26+
flowchart LR
27+
subgraph Development
28+
create[Create migration] --> commit[Commit migration]
29+
commit --> pull[Pull changes]
30+
pull --> applyLocal[Apply migration locally]
31+
end
32+
33+
subgraph Production
34+
tag[Create release tag] --> deploy[Update source on server]
35+
deploy --> applyProd[Apply pending migrations]
36+
end
37+
```
38+
2539
Yii provides a set of migration command line tools that allow you to:
2640

2741
* create new migrations;

src/internals/016-security-workflow.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ Security issues are typically sent via [a security form](https://www.yiiframewor
55
If an issue is reported directly to a public page such as a repository issue or a forum topic, get the message
66
and delete the issue. Say thanks to the reporter and point to the security form for next time.
77

8+
```mermaid
9+
flowchart TD
10+
form[Security form report] --> verify[Verify issue]
11+
public[Public report] --> remove[Save details and delete public issue]
12+
remove --> redirect[Point reporter to the security form]
13+
redirect --> verify
14+
verify -->|needs details| requestInfo[Request more information]
15+
requestInfo --> verify
16+
verify -->|valid| advisory[Create draft security advisory]
17+
advisory --> severity[Set CVSS severity]
18+
severity --> credit[Ask about reporter credit]
19+
credit --> cve[Request CVE number]
20+
cve --> patch[Prepare patch pull request]
21+
patch --> wait[Wait for CVE allocation]
22+
wait --> release[Release]
23+
release --> publish[Publish advisory and submit FriendsOfPHP entry]
24+
```
25+
826
## Verify
927

1028
Verify that the issue is valid. Request more information if needed.

0 commit comments

Comments
 (0)