consensus/php-d2

Provides a PHP wrapper around the D2 binary from Terrastruct.

Maintainers

Package info

gitlab.com/consensus.enterprises/misc/php-d2

Homepage

Issues

pkg:composer/consensus/php-d2

Statistics

Installs: 117

Dependents: 0

Suggesters: 0

Stars: 0

1.0.1 2026-02-04 16:14 UTC

This package is auto-updated.

Last update: 2026-03-04 21:25:37 UTC


README

Provides a PHP wrapper around the d2 binary.

This makes it easier to securely use d2 in PHP-based projects, such as the D2 module for Drupal.

Usage

Require the package via Composer:

composer require consensus/php-d2

Call the provided methods like so:

use Consensus\PhpD2;

$svg = (new D2())->generateSvg($d2_input, $d2_options);