Skip to content

Compatibility with composer v2 #58

@patricknelson

Description

@patricknelson

Looks like composer build is not compatible with composer v2.

$ composer build

[1/1] Creating phar graph-composer-1.1.0-5-g25ea081.phar
  - Adding main package "clue/graph-composer"
  - Adding composer base files

Catchable fatal error: Argument 1 passed to Clue\PharComposer\Package\Package::__construct() must be of the type array, boolean given, called in /root/graph-composer/vendor/clue/phar-composer/src/Clue/PharComposer/Phar/PharComposer.php on line 136 and defined in /root/graph-composer/vendor/clue/phar-composer/src/Clue/PharComposer/Package/Package.php on line 21
Script @php build.php handling the build event returned with error code 255

Build still works fine however in composer v1 (now deprecated). I noticed this when attempting to containerize this (see https://github.com/patricknelson/graph-composer-docker).
Step to reproduce:

# Get graph-composer-docker repository and work from the 'composer-2' branch
git clone git@github.com:patricknelson/graph-composer-docker.git
cd graph-composer-docker
git checkout composer-2

# Tries to build container, but will fail
docker-compose up -d --build

Basically, what the Dockerfile does:

EDIT: You can see the diff in Dockerfile now in this PR: patricknelson/graph-composer-docker#1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions