• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JBZoo / Mermaid-PHP
92%

Build:
DEFAULT BRANCH: master
Repo Added 12 Dec 2019 02:26PM UTC
Files 50
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • 1.0.0
  • 1.1.0
  • 1.1.1
  • 2.0.0
  • 2.1.0
  • 2.1.1
  • 2.1.2
  • 2.1.3
  • 2.2.0
  • 2.3.0
  • 2.3.1
  • feature/9-self-hosting-offline
  • feature/node-links-and-link-styles
  • master
  • pr-7-credit
  • release/8.0

23 Jul 2026 07:33PM UTC coverage: 91.755% (+1.4%) from 90.404%
34683423978

push

github

web-flow
feat: add Sequence Diagram support (#10) (#33)

## Summary

Adds first-class Mermaid `sequenceDiagram` support to the library,
following the same fluent, object-oriented style as the existing
`Graph`/`Timeline` families. Requested in #10.

A sequence diagram is modeled as an **ordered stream of statements with
nesting** (not two flat sets like `Graph`). A tiny `Statement` interface
(`render(int $shift): string`, extends `\Stringable`) is implemented by
every body element; participants/boxes form a header region; the
`SequenceDiagram` container renders header + ordered body and plugs into
the existing `Render`/`Helper` machinery.

## What's covered (full `sequenceDiagram` syntax)

- **Participants / actors** — aliases, `safeMode` (md5 ids, like
`Node`), repeatable per-participant `link()`
- **Messages** — all 10 arrow types, inline activation (`+`/`-`,
mutually exclusive) and explicit `activate`/`deactivate`
- **Notes** — `left of` / `right of` / `over` (one or two participants)
- **Lifecycle** — `create` / `destroy`; **comments** (`%%`)
- **Boxes** — participant grouping with optional color
- **Control blocks** — `loop`, `opt`, `break`, `rect` (single-section)
and `alt`/`else`, `par`/`and`, `critical`/`option` (multi-section),
arbitrarily nestable
- **Container** — title frontmatter, `autonumber`, `getParticipant()`,
`addMessageByIds()` (throws on unknown id), `renderHtml()`,
`getLiveEditorUrl()`

## Notes

- The `break` block class is named **`BreakBlock`** — `break` is a
reserved word in PHP, so `class Break` is a parse error. It still emits
the Mermaid `break` keyword.
- `Render::html()` / `Helper::getLiveEditorUrl()` union types widened to
accept `SequenceDiagram`.
- README updated with the new diagram type and a runnable example.

## Testing

- `tests/SequenceDiagramTest.php`: 23 tests, 58 assertions — every arrow
type, activation, notes, lifecycle, comments, boxes/links, all blocks +
nesting, container ordering, `addMessageByIds` errors, and an ... (continued)

153 of 158 new or added lines in 16 files covered. (96.84%)

690 of 752 relevant lines covered (91.76%)

79.63 hits per line

Relevant lines Covered
Build:
Build:
752 RELEVANT LINES 690 COVERED LINES
79.63 HITS PER LINE
Source Files on master
  • Tree
  • List 50
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
34683423978 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 12 Sep 2026 08:30AM UTC web-flow github
91.76
34580749622 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 11 Sep 2026 08:45AM UTC web-flow github
91.76
34457186275 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 10 Sep 2026 08:49AM UTC web-flow github
91.76
34331271814 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 09 Sep 2026 08:50AM UTC web-flow github
91.76
34206088817 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 08 Sep 2026 08:44AM UTC web-flow github
91.76
34104212276 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 07 Sep 2026 09:07AM UTC web-flow github
91.76
34021983287 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 06 Sep 2026 08:29AM UTC web-flow github
91.76
33954599182 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 05 Sep 2026 08:12AM UTC web-flow github
91.76
33854502847 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 04 Sep 2026 08:40AM UTC web-flow github
91.76
33734948994 master feat: add Sequence Diagram support (#10) (#33) ## Summary Adds first-class Mermaid `sequenceDiagram` support to the library, following the same fluent, object-oriented style as the existing `Graph`/`Timeline` families. Requested in #10. A seque... push 03 Sep 2026 08:44AM UTC web-flow github
91.76
See All Builds (3731)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc