1. Go to this page and download the library: Download quietfrog/dependency-graph library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
quietfrog / dependency-graph example snippets
$service1 = new YourService1();
$service2 = new YourService2();
$service3 = new YourService3();
$service4 = new YourService4();
$graph = new Graph();
$graph->add($service1)->add($service2)->add($service3)->add($service4);
$graph->addDependency($service1, $service2);
$graph->addDependency($service1, $service3);
$graph->addDependency($service2, $service4);
$graph->addDependency($service3, $service4);