I ran into this error:

Fatal error: Class 'Fhaculty\Graph\Graph' not found in /Users/erik/www/drupal8/modules/contrib/graphapi/modules/graphapi_class/graphapi_class.module on line 161

Steps to reproduce:

  • Create an UML text format using only the UML filter.
  • Add this filter to the body of the node
  • Add something to the body field and save the node
  • The error is now displayed on all pages.

I am using the master branch of Graph library: https://github.com/clue/graph. FilterClassDiagram does not exist in this code. However this code does exist in https://github.com/clue/graph-uml

Comments

sutharsan’s picture

In composer.json:

 "require": {
        "php": ">=5.3.0",
        "symfony/finder": "~2.2",
        "clue/graph-uml": "dev-master",
        "clue/graph": "dev-master"
    }

But in graph/lib/Fhaculty/Graph there is no Uml directory. Only: Algorithm, Edge, Exception, Exporter, Loader, Set.

I guess something went wrong with composer.

sutharsan’s picture

Even with placing Uml from graph-uml / src / Fhaculty / Graph / Uml into graph/lib/Fhaculty/Graph/Uml, I can't get it to work. It needs a better installation procedure, or at least better documentation.

clemens.tolboom’s picture

Did you run

composer install</install> on the graphapi directory?

<code>
cd /Users/erik/www/drupal8/modules/contrib/graphapi
composer install --no-dev

(--no-dev variant is a little faster)

This has to do with Graph API #2168563: How to load graph and graph-uml php libraries? and eventually Core #1920666: Allow additional external libraries with composer

clemens.tolboom’s picture

Category: Bug report » Support request

Do we need to adjust the README.txt ?

clemens.tolboom’s picture

Status: Active » Fixed

I've changed hook_requirements and updated the README.txt to better reflect steps to install.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.