Problem/Motivation

When test installing the dependencies on gets

$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for clue/graph-uml dev-master -> satisfiable by clue/graph-uml[dev-master].
    - clue/graph-uml dev-master requires clue/graph 0.7.* -> satisfiable by clue/graph[v0.7.0, v0.7.1] but these conflict with your requirements or minimum-stability.

Reading https://www.drupal.org/docs/8/creating-custom-modules/add-a-composerjson... as a developer we need to require this library on Drupal level

sites/drupal/d8/www % composer require clue/graph-uml

Proposed resolution

Use the correct libraries from https://github.com/clue/graph and/or https://github.com/graphp. See also https://github.com/clue/graph/issues/130

Remaining tasks

- [x] Find out which pinned versions to use instead of dev-master
- [ ] Remove class_loader stuff as we have to use Drupal level class loader according to https://www.drupal.org/docs/8/creating-custom-modules/add-a-composerjson...

User interface changes

API changes

Data model changes

Comments

joachim created an issue. See original summary.

clemens.tolboom’s picture

Assigned: Unassigned » clemens.tolboom

Yeah ... I'll look into that soon as I worked on that code a little too.

clemens.tolboom’s picture

clemens.tolboom’s picture

Reading https://www.drupal.org/docs/8/creating-custom-modules/add-a-composerjson... and https://www.drupal.org/node/2405811 it seems like project users have to install Drupal AND GraphAPI through composer all the way.

Checking our composer.json I have no clue why some requirements are added

@@ -6,9 +6,6 @@
     "homepage": "https://drupal.org/project/graphapi",
     "license": "MIT",
     "require": {
-        "php": ">=5.3.0",
-        "symfony/finder": "~2.2",
-        "clue/graph-uml": "dev-master",
         "clue/graph": "dev-master"
     }
 }

For us developer we have to manually add "clue/graph": "dev-master" and others but I know lots of changes and code moves are done in that project so this needs more work :-/

clemens.tolboom’s picture

Issue summary: View changes
clemens.tolboom’s picture

git blame composer.json gives

f48655cf (Clemens Tolboom 2014-01-17 17:59:36 +0100 11)         "clue/graph-uml": "dev-master",
f48655cf (Clemens Tolboom 2014-01-17 17:59:36 +0100 12)         "clue/graph": "dev-master"

clemens.tolboom’s picture

Status: Active » Fixed

So we can fix this for now by let graph-uml decide on version.

This is now kinda fixed. When rendering starts working we need to get back to this I guess.

clemens.tolboom’s picture

Issue summary: View changes

I had to

sites/drupal/d8/www % rm -fr vendor/clue
clemens.tolboom’s picture

Issue summary: View changes
Priority: Critical » Normal
Status: Fixed » Needs work

This is not working as expected.

Changing Drupal composer.json makes the composer.lock file out of date.

Running composer install on graphapi directory makes it's class loader work.

joachim’s picture

Priority: Normal » Critical
Status: Needs work » Fixed

I just did a git pull, and composer install worked:

$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing clue/graph (v0.7.1)
    Downloading: 100%

  - Installing clue/graph-uml (dev-master a793993)
    Cloning a7939934109a0366f0561fb0273b13b71befbf82 from cache

  - Installing symfony/finder (v2.8.13)
    Downloading: 100%

Writing lock file
Generating autoload files
joachim’s picture

Status: Fixed » Needs work

Whoops, didn't mean to change status!

clemens.tolboom’s picture

Priority: Critical » Normal

It works but not as documented by d.o ... we'll live for now so not critical.

clemens.tolboom’s picture

Assigned: clemens.tolboom » Unassigned

I cannot get demo pages to work http://drupal.d8/admin/config/system/graphapi/formats

  1. The current module composer is requires symfony/finder (v2.8.13) which is not compatible with D8.7.x
  2. l() is deprecated in $text .= 'See ' . l("$project_id", 'http://drupal.org/project/' . $project_id) . ' on drupal.org';

Temp fixing both and install the remaining dependencies through root composer as the provided dependencies do not work.

www clemens$ composer require clue/graph-uml
Using version ^0.2.0 for clue/graph-uml
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing clue/graph (v0.7.1): Loading from cache
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing clue/graph-uml (v0.2.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess

does not help as

Error: Call to undefined function theme() in theme_graphapi_dispatch()

which makes me wonder how many code changes we need to make it work again.

joachim’s picture

Status: Needs work » Closed (outdated)