Skip to content

ID must be unique for UmlClassDiagram #18

@clemens-tolboom

Description

@clemens-tolboom

I somehow needed to do

$ git diff
diff --git a/lib/Fhaculty/Graph/Loader/UmlClassDiagram.php b/lib/Fhaculty/Graph/Loader/UmlClassDiagram.php
index 63e5035..2d15650 100644
--- a/lib/Fhaculty/Graph/Loader/UmlClassDiagram.php
+++ b/lib/Fhaculty/Graph/Loader/UmlClassDiagram.php
@@ -65,7 +65,7 @@ class UmlClassDiagram extends Base
         } else {
             $reflection = new ReflectionClass($class);
         }
-        $vertex = $this->graph->createVertex($class);
+        $vertex = $this->graph->createVertex($class, TRUE);

         $parent = $reflection->getParentClass();
         if ($parent) {

I feeded it with get_declared_classes();

  $loader = new UmlClassDiagram();
  try {
    foreach ($classes as $class) {
      $loader->createVertexClass($class);
    }
  }
  catch (Exception $exc) {
    return $exc->getMessage();
  }

My test environment is a little tricky so I was wondering how we test this easier.

BTW awesome UML generator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions